[Bug]: PR Skill Scan fails on every fork pull request because the sticky-comment step cannot write with a read-only token

Author: aniruddhaadak80Created Sep 29, 2026Updated Sep 29, 2026

Area: Repository tooling (CI workflows)

What happened

The PR Skill Scan workflow fails on every pull request opened from a fork, regardless of what the PR changes. The job's only failing step is Post or update PR comment, not the scan.

From the run log:

Skill dirs to scan: 'skills/deeptools'
...
SKILL_SCANNER_LLM_API_KEY unset - skipping scan (typical for pull_request workflows from forks).
##[error]Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment

Two separate things are happening, and the error message only names the second:

  1. The scan is skipped, deliberately. SKILL_SCANNER_LLM_API_KEY is not exposed to pull_request runs from forks, so the repo wrapper prints skipping scan and continues. There are no findings because no scan runs.
  2. The failing step is the sticky comment. marocchino/sticky-pull-request-comment@v2 then tries to post the (empty) report via POST /issues/comments. On a fork PR, GITHUB_TOKEN is read-only, so the API returns Resource not accessible by integration and the step exits non-zero, failing the job.

The other three PR checks pass, so the job is red for a reason unrelated to the code.

Why it is worth fixing rather than documenting

Every outside contributor hits this, and the result is a permanently red required-looking check on their PR. Evidence that it is repo-wide and not specific to one PR:

PR Author Scan changed skills
#275 @BriceZemba failure
#272 @aniruddhaadak80 failure
#280 @aniruddhaadak80 failure
#282 @aniruddhaadak80 failure
#285 @aniruddhaadak80 failure
#287 @aniruddhaadak80 failure

#275 is from a first-time contributor and has the same failure, which suggests new contributors are being told their PR is red when the scan never actually examined their skill.

What you expected instead

One of:

  • the job completes for fork PRs and reports honestly that the scan was skipped, or
  • the job does not run for fork PRs at all, rather than running and failing.

Steps to reproduce

  1. Fork this repository, branch from main, and change a file under skills/.
  2. Open a pull request against main.
  3. Watch PR Skill Scan fail with Resource not accessible by integration - .../issues/comments#create-an-issue-comment.

Options, with the tradeoff in each

Flagging these because the obvious one has a downside, and this is a maintainer policy decision rather than something a contributor should land unilaterally.

A. continue-on-error: true on the comment step only. One line. But note the consequence: since the scan is already skipped for forks, this would make the job go green without a scan having run, which reads as "this skill passed the security scan" when nothing was scanned. I would not recommend this on its own, because it converts a confusing red into a misleading green.

B. Grant the job pull-requests: write. This fixes the root cause and lets the report actually post, which is the behaviour the workflow clearly intends. It does not change what is or is not scanned, so the job would still be green for a skipped scan — same false-assurance problem as A, unless the report also states that the scan was skipped.

C. Skip the job for fork PRs, e.g. if: github.event.pull_request.head.repo.full_name == github.repository. Fork PRs then show no scan check instead of a red one, and same-repo PRs keep the real scan with a real posting token. This is the option that makes the signal honest, at the cost of fork PRs having no scan result at all — which is already the true state today.

D. Make the scan actually run for forks by supplying SKILL_SCANNER_LLM_API_KEY from a repository secret. That closes the real gap (fork skills are currently unscanned) rather than the cosmetic one, and it is the only option that changes coverage. It costs API spend per PR.

My own read, for what it is worth: C plus a line in the job summary saying the scan was skipped for fork PRs gives an honest signal cheaply, and D is the one that actually improves security posture. A and B alone risk making an unscanned skill look scanned.

Happy to open a PR for whichever of these you prefer, including C+D together, and to keep the reporting change separate from the permission change so each is reviewable on its own.

Error output

##[error]Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment
SKILL_SCANNER_LLM_API_KEY unset - skipping scan (typical for pull_request workflows from forks).

Source: K-Dense-AI/scientific-agent-skills