Skip to content

Add explicit GITHUB_TOKEN permissions to CI and audit workflows - #118

Merged
dduugg merged 1 commit into
mainfrom
fix-code-scanning-alerts
Aug 17, 2026
Merged

Add explicit GITHUB_TOKEN permissions to CI and audit workflows#118
dduugg merged 1 commit into
mainfrom
fix-code-scanning-alerts

Conversation

@dduugg

@dduugg dduugg commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Resolves the eight open actions/missing-workflow-permissions CodeQL
alerts (#1, #3, #4, #5, #6, #7, #8, #9). Every job now has an effective
permissions: block scoped to what it actually does.

ci.yml
Workflow-level contents: read covers check, test and lints,
which only check out the repo and run cargo check/test/fmt/clippy.

Four jobs override to contents: write because they mutate releases:

  • release runs gh release create --generate-notes
  • upload-mac-universal-bin and upload-linux-bin run
    gh release upload to attach the built tarballs
  • generate-dotslash-files uses facebook/dotslash-publish-release,
    which also publishes via gh release upload

audit.yml
rustsec/audit-check needs checks: write to publish the advisory
status check on push/pull_request runs and issues: write to open an
issue per new advisory on the weekly scheduled run (both documented in
the action's README). contents: read covers actions/checkout. It
does not upload SARIF, so no security-events: write.

codeql.yml already declares permissions and is untouched.

Alerts resolved

  • #9 actions/missing-workflow-permissions (medium) — .github/workflows/audit.yml:14
  • #8 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:149
  • #7 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:126
  • #6 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:102
  • #5 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:57
  • #4 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:42
  • #3 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:31
  • #1 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:22

Verification

  • Every job in every flagged workflow now has an effective permissions: block (cross-checked by parsing the YAML against the alert list).
  • actionlint output is byte-identical to main — no new findings introduced.
  • codeql.yml untouched.

Resolves the eight open `actions/missing-workflow-permissions` CodeQL
alerts (#1, #3, #4, #5, #6, #7, #8, #9). Every job now has an effective
`permissions:` block scoped to what it actually does.

ci.yml
  Workflow-level `contents: read` covers `check`, `test` and `lints`,
  which only check out the repo and run cargo check/test/fmt/clippy.

  Four jobs override to `contents: write` because they mutate releases:
  - `release` runs `gh release create --generate-notes`
  - `upload-mac-universal-bin` and `upload-linux-bin` run
    `gh release upload` to attach the built tarballs
  - `generate-dotslash-files` uses facebook/dotslash-publish-release,
    which also publishes via `gh release upload`

audit.yml
  `rustsec/audit-check` needs `checks: write` to publish the advisory
  status check on push/pull_request runs and `issues: write` to open an
  issue per new advisory on the weekly scheduled run (both documented in
  the action's README). `contents: read` covers actions/checkout. It
  does not upload SARIF, so no `security-events: write`.

codeql.yml already declares permissions and is untouched.
@dduugg
dduugg requested a review from a team as a code owner August 17, 2026 19:34
@github-project-automation github-project-automation Bot moved this to Triage in Modularity Aug 17, 2026
@dduugg
dduugg merged commit cad9ef9 into main Aug 17, 2026
11 checks passed
@dduugg
dduugg deleted the fix-code-scanning-alerts branch August 17, 2026 19:40
@github-project-automation github-project-automation Bot moved this from Triage to Done in Modularity Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant