Skip to content

ci: scope the write permission to the job that uses it - #143

Merged
bgard68 merged 1 commit into
dapperfrom
claude/new-session-muubr7-dapper
Aug 25, 2026
Merged

ci: scope the write permission to the job that uses it#143
bgard68 merged 1 commit into
dapperfrom
claude/new-session-muubr7-dapper

Conversation

@bgard68

@bgard68 bgard68 commented Aug 25, 2026

Copy link
Copy Markdown
Owner

The dapper half of #142.

cleanup-runs.yml declared actions: write at the workflow level, where it applies to every job the file will ever contain. It now sits on the single job that needs it, with the workflow level dropped to contents: read.

The scope itself stays, because dropping it breaks the workflow. It is used by exactly one step — "Delete old runs of the high-frequency workflows" (DELETE /repos/{repo}/actions/runs/{id}) — which is the entire job.

workflow: {contents: read}   job: {actions: write, contents: read}

Behaviour is unchanged; the existing job resolves to exactly what it had before.

dependabot-lockfix.yml has no counterpart on this branch by design — workflow_run fires only from the default branch's copy, and that one already serves Dependabot branches based on either branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_019h7znwAftvs36vD4YwKMRf


Generated by Claude Code

The dapper half of the same change on main. cleanup-runs.yml declared
actions: write at the workflow level, where it applies to every job the file
will ever contain; it now sits on the single job that needs it, with the
workflow level dropped to contents: read.

The scope itself stays, because dropping it breaks the workflow: it is used by
exactly one step, "Delete old runs of the high-frequency workflows"
(DELETE /repos/{repo}/actions/runs/{id}), which is the entire job.

dependabot-lockfix.yml has no counterpart here by design — workflow_run fires
only from the default branch's copy, and that one already serves Dependabot
branches based on either branch.

Behaviour is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019h7znwAftvs36vD4YwKMRf
@bgard68
bgard68 merged commit ec9d195 into dapper Aug 25, 2026
8 checks passed
@bgard68
bgard68 deleted the claude/new-session-muubr7-dapper branch August 25, 2026 06:19
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