From bac7ee5b0a5d543a044e1d8b27c060f1ed5637bc Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Mon, 17 Aug 2026 12:07:16 -0700 Subject: [PATCH] Add explicit GITHUB_TOKEN permissions to workflow callers CodeQL actions/missing-workflow-permissions flagged the three reusable-workflow caller jobs that had no effective permissions block (ci.yml already declares contents: read). Each caller job now grants the least privilege the called shared-config workflow actually needs, since a caller's permissions become the ceiling for the whole called workflow. - cd.yml -> contents: write. shared-config/cd.yml checks out with persisted credentials and runs discourse/publish-rubygems-action, whose `rake release` does a raw `git push` of the version tag, then runs `gh release create`. Anything less breaks the deploy. Its notify_on_failure job only posts to a Slack webhook and needs no scope. - stale.yml -> issues: write + pull-requests: write. actions/stale comments on and closes both stale issues and stale PRs. - triage.yml -> issues: write. shared-config/triage.yml runs `gh issue edit --add-label triage` and declares issues: write on its own job, so the caller must grant at least that. --- .github/workflows/cd.yml | 2 ++ .github/workflows/stale.yml | 3 +++ .github/workflows/triage.yml | 2 ++ 3 files changed, 7 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8cb675f..4c9ab97 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,5 +8,7 @@ on: jobs: call-workflow-from-shared-config: + permissions: + contents: write uses: rubyatscale/shared-config/.github/workflows/cd.yml@main secrets: inherit diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 0287d52..2696450 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -5,4 +5,7 @@ on: - cron: '0 0 * * *' jobs: call-workflow-from-shared-config: + permissions: + issues: write + pull-requests: write uses: rubyatscale/shared-config/.github/workflows/stale.yml@main diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 74bb1d9..7c492ee 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -6,4 +6,6 @@ on: - opened jobs: call-workflow-from-shared-config: + permissions: + issues: write uses: rubyatscale/shared-config/.github/workflows/triage.yml@main