Skip to content

fix(ci): drop unused deployments:write permission from deploy job#99

Merged
kellenmurphy merged 1 commit into
mainfrom
fix/ci-drop-deployments-write
Jun 3, 2026
Merged

fix(ci): drop unused deployments:write permission from deploy job#99
kellenmurphy merged 1 commit into
mainfrom
fix/ci-drop-deployments-write

Conversation

@kellenmurphy
Copy link
Copy Markdown
Owner

Resolves code-scanning alert #15 (Scorecard Token-Permissions, severity high, score 9/10).

The deploy job declared deployments: write at the job level, but no step uses GitHub's Deployments API:

  • The environment: production deployment record is created by GitHub's own internal mechanism — it does not consume the job token's deployments scope.
  • cloudflare/wrangler-action deploys to Cloudflare Pages, which never touches GitHub Deployments.

The remaining writes are required and retained:

  • id-token: write — OIDC for actions/attest-build-provenance (Sigstore)
  • attestations: write — writing the build attestation

This is a pre-existing finding (present since the initial commit), not introduced by the recent dependency batch. Removing the dead permission tightens the deploy token and clears the alert. If a deploy ever genuinely needed it, the step would fail with a clear 403 and it's a one-line re-add.

Scorecard Token-Permissions (code-scanning alert #15) flagged the deploy
job's job-level `deployments: write`. No step uses GitHub's Deployments
API — the `environment: production` record is created by GitHub itself,
and wrangler-action deploys to Cloudflare Pages without touching it. The
remaining id-token/attestations writes are required by attest-build-provenance.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kellenmurphy kellenmurphy merged commit 20a61df into main Jun 3, 2026
12 checks passed
@kellenmurphy kellenmurphy deleted the fix/ci-drop-deployments-write branch June 3, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant