Skip to content

Add explicit GITHUB_TOKEN permissions to workflows - #23

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

Add explicit GITHUB_TOKEN permissions to workflows#23
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 four open actions/missing-workflow-permissions CodeQL
alerts by giving every job an explicit, least-privilege permissions
block.

  • ci.yml (alerts Bump diff from 3.2.0 to 3.5.0 #3 lint, Scope to @gusto #4 test): both jobs only check out the
    repo, install node deps and run yarn lint / compile / xvfb-run yarn
    test. Neither touches the GitHub API, so a single workflow-level
    contents: read covers both.
  • stale.yml (alert Bump path-parse from 1.0.5 to 1.0.7 #2): calls shared-config's stale.yml, which runs
    actions/stale to comment on and close stale issues and PRs, so the
    caller ceiling must include issues: write and pull-requests: write or the scheduled sweep silently stops closing things.
  • triage.yml (alert Bump lodash from 4.17.19 to 4.17.21 #1): calls shared-config's triage.yml, which runs
    gh issue edit --add-label triage; issues: write is all it needs.

codeql.yml already declares its permissions and is left untouched.

Alerts resolved

  • #4 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:23
  • #3 actions/missing-workflow-permissions (medium) — .github/workflows/ci.yml:10
  • #2 actions/missing-workflow-permissions (medium) — .github/workflows/stale.yml:8
  • #1 actions/missing-workflow-permissions (medium) — .github/workflows/triage.yml:9

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 four open `actions/missing-workflow-permissions` CodeQL
alerts by giving every job an explicit, least-privilege permissions
block.

- ci.yml (alerts #3 `lint`, #4 `test`): both jobs only check out the
  repo, install node deps and run yarn lint / compile / xvfb-run yarn
  test. Neither touches the GitHub API, so a single workflow-level
  `contents: read` covers both.
- stale.yml (alert #2): calls shared-config's stale.yml, which runs
  actions/stale to comment on and close stale issues *and* PRs, so the
  caller ceiling must include `issues: write` and `pull-requests:
  write` or the scheduled sweep silently stops closing things.
- triage.yml (alert #1): calls shared-config's triage.yml, which runs
  `gh issue edit --add-label triage`; `issues: write` is all it needs.

codeql.yml already declares its permissions and is left 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 c30f19b into main Aug 17, 2026
5 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