Skip to content

ci: declare empty permissions on release workflow#798

Open
arpitjain099 wants to merge 1 commit into
denoland:mainfrom
arpitjain099:chore/release-permissions
Open

ci: declare empty permissions on release workflow#798
arpitjain099 wants to merge 1 commit into
denoland:mainfrom
arpitjain099:chore/release-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown

@arpitjain099 arpitjain099 commented May 14, 2026

Pins the release job to permissions: {}. The job checks out the repo with secrets.DENOBOT_PAT, sets git author/committer to denobot, and runs deno run -A jsr:@deno/rust-automation@0.22.1/tasks/publish-release with GITHUB_TOKEN: ${{ secrets.DENOBOT_PAT }}. The workflow's own GITHUB_TOKEN is never used.

Defense-in-depth angle: a compromised third-party action (cf. CVE-2025-30066) runs inside the existing job context and exfiltrates whatever scope the workflow token holds via build logs. With permissions: {} the token has zero scope to leak; release authority lives only in DENOBOT_PAT.

Matches the per-job contents: read + id-token: write block already declared in ci.yml. YAML validated locally with yaml.safe_load.

The release job clones the repo with DENOBOT_PAT, then runs
publish-release with the same PAT. The workflow GITHUB_TOKEN is unused.
permissions:{} captures that contract.

Style matches the per-job permissions block in ci.yml (contents:read +
id-token:write for trusted publishing).

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants