Skip to content

ci(security): scope GITHUB_TOKEN permissions in spanner-staging-tests.yml - #4626

Draft
derrickaw wants to merge 1 commit into
mainfrom
codescan/actions-spanner-staging-permissions
Draft

derrickaw wants to merge 1 commit into
mainfrom
codescan/actions-spanner-staging-permissions

Conversation

@derrickaw

@derrickaw derrickaw commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Note: this PR was auto-generated by tooling. Before moving it out of draft, the author has done a full review of the PR, specifically evaluating it on the following criteria:

  • The PR remediates confirmed, live Code Scanning finding(s) (CodeQL / Scorecard / zizmor) on main that are not already covered by upcoming Apache Beam releases, without altering intended template or workflow semantics
  • The fix is minimal, idiomatic, respects Dataflow Templates release-label and lockfile policies, and avoids suppressing alerts or masking defects
  • Relevant unit tests, linters, and CI checks have been verified

If you have concerns with the PR or with the underlying methodology used to generate this, please comment below - they will be addressed by the author not the tooling :)

Summary

Resolves OpenSSF Scorecard Token-Permissions (TokenPermissionsID, #336) in .github/workflows/spanner-staging-tests.yml:

  • Replaces top-level permissions: write-all with least-privilege permissions: contents: read.
  • Declares contents: read and checks: write explicitly at the spanner_java_integration_tests_templates job level so actions/checkout and dorny/test-reporter retain exact required permissions without granting broad repository write access (matching the same pattern verified end-to-end on .github/workflows/spanner-failure-injection-tests.yml in ci(security): scope GITHUB_TOKEN permissions in spanner-failure-injection-tests.yml #4616).

Verification

  • Verified CodeQL and zizmor (GitHub Actions Scan) pass in CI.
  • Note on Spanner Multi-Environment Integration Tests ([self-hosted, spanner]): The single [self-hosted, spanner] runner registered on the repository (nokill-gitactions-runner-2k2v) has been offline since 2026-11-20T21:32Z (all main runs of spanner-staging-tests.yml since Nov 20 have likewise sat in queued with runner_id: 0), so the pull_request job cannot be picked up until that runner is brought back online.
@derrickaw derrickaw added cleanup ignore-for-release github_actions Pull requests that update GitHub Actions code labels Nov 23, 2026
@derrickaw

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup github_actions Pull requests that update GitHub Actions code ignore-for-release size/XS

1 participant