Skip to main content

Workflow Permissions

📋 Overview

All GitHub Actions workflows in this repository follow the OpenSSF Scorecard Token-Permissions principle:

  • Top-level permissions: is contents: read (read-only by default).
  • Write-scoped permissions are declared at the job level only when a specific step requires them.
  • No workflow grants permissions: write-all or omits an explicit top-level permissions: block.

This document enumerates every job-scoped write permission across .github/workflows/ and records the justification so security auditors and Scorecard reviewers can verify each exception.

🔒 Job-Scoped Write Permissions

The 15 write permissions below are required by the action or CLI invoked in the corresponding job. Each grant is the minimum scope needed.

WorkflowJobPermissionRationale
check-binary-integrity.ymlcheck-binary-integritysecurity-events: writeRequired by github/codeql-action/upload-sarif to publish binary integrity findings to the Security tab.
codeql-analysis.ymlanalyzesecurity-events: writeRequired by github/codeql-action/analyze to upload CodeQL SARIF results to the Security tab.
dast-zap-scan.ymldast-zap-scansecurity-events: writeRequired by github/codeql-action/upload-sarif to publish ZAP DAST findings to the Security tab.
dependency-pinning-scan.ymldependency-pinning-scansecurity-events: writeRequired by github/codeql-action/upload-sarif to publish SHA-pinning findings to the Security tab.
gitleaks-scan.ymlscansecurity-events: writeRequired by github/codeql-action/upload-sarif to publish secret-scanning findings to the Security tab.
main.ymldependency-pinningsecurity-events: writeInherited by reusable dependency-pinning-scan.yml; required for SARIF upload.
main.ymlcodeql-analysissecurity-events: writeInherited by reusable codeql-analysis.yml; required for SARIF upload.
main.ymlgenerate-dependency-sbomcontents: writeRequired by gh release upload "${TAG}" dependencies.spdx.json --clobber to attach the dependency SBOM to the release.
main.ymlattest-releaseattestations: writeRequired by actions/attest-build-provenance and actions/attest to create Sigstore provenance attestations.
main.ymlattest-releasecontents: writeRequired by gh release upload to attach *.sigstore.json and *.intoto.jsonl attestation artifacts to the release.
main.ymlsbom-diffcontents: writeRequired by gh release upload "${TAG}" dependency-diff.md --clobber to attach the dependency-change report to the release.
main.ymlappend-verification-notescontents: writeRequired by gh release edit to append artifact-verification instructions to the release body.
pr-validation.ymldependency-pinningsecurity-events: writeInherited by reusable dependency-pinning-scan.yml; required for SARIF upload.
pr-validation.ymlcodeql-analysissecurity-events: writeInherited by reusable codeql-analysis.yml; required for SARIF upload.
scorecard.ymlanalysissecurity-events: writeRequired by github/codeql-action/upload-sarif to publish OpenSSF Scorecard findings to the Security tab.

🛡️ Defense in Depth

The release-publishing path uses additional hardening beyond minimum permissions:

  • All actions are SHA-pinned (no floating tags).
  • persist-credentials: false on every actions/checkout invocation.
  • id-token: write is granted only to jobs that mint Sigstore OIDC tokens; the token is never exposed to user-controlled steps.
  • Release-gated jobs (generate-dependency-sbom, attest-release, sbom-diff, append-verification-notes) run only when release-please produces a release (needs.release-please.outputs.release_created == 'true').

🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.