SRE-901: Stop handing CI more Vault reach than it uses - #149
Conversation
PR SummaryLow Risk Overview Workflow-level The Reviewed by Cursor Bugbot for commit 9c842d5. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟡 Changes recommended
id-token: write remains granted at the workflow level (affecting the PR-running validate job) and should be scoped to the renovate job to fully achieve least-privilege OIDC/Vault access.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR hardens the Housekeeping GitHub Actions workflow by reducing the default token/secrets exposure for the Renovate (dependencies) job, aligning with the “narrow CI Vault reach” goal.
Changes:
- Reduce workflow
contentspermission fromwritetoread. - Remove
secrets: inheritfrom therenovatereusable-workflow call.
File summaries
| File | Description |
|---|---|
| .github/workflows/housekeeping.yml | Narrows default GITHUB_TOKEN permissions and stops inheriting secrets for the Renovate reusable workflow call. |
Review details
Suppressed comments (1)
.github/workflows/housekeeping.yml:69
- After removing
secrets: inherit, this job still needs OIDC for Vault access. If you apply the workflow-level permission tightening (droppingid-token: write), add explicit job-level permissions here so onlyrenovatecan mint an OIDC token.
uses: hashintel/.github/.github/workflows/housekeeping-dependencies.yml@9957be5b132761d8b54dea2eb3166f417ebacaf9 # main
with:
repoCache: ${{ inputs.repoCache || 'enabled' }}
logLevel: ${{ inputs.logLevel || 'info' }}
overrideSchedule: ${{ inputs.overrideSchedule || false }}
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Applies the CI Vault narrowing from hashintel/hash#9160 to this repo.
secrets: inheritdropped from therenovatejob. The pinned reusable workflow reads nosecrets.*— the Vault address comes fromvars.VAULT_ADDR, a repo variable, whichsecrets: inheritnever carried.contents: write→read. The reusable workflow declarescontents: readfor itself, so the Renovate job's token is already read-only in the current scheduled runs. The caller-sidewriteonly reached this workflow's ownvalidatejob, which checks out and runsjq/actionlint.Related links
hashWhat tests cover this?
actionlintv1.7.12 on the changed file: clean. Renovate is proven green undercontents: read, since that is already its effective permission today.