[DevOps] Tighten workflow permissions (update-api-docs, update-confluence, ci - #732
[DevOps] Tighten workflow permissions (update-api-docs, update-confluence, ci#732lisa-tarbo wants to merge 7 commits into
Conversation
Review: workflow permission tightening + header commentsVerified the substantive changes against the workflow bodies and the scripts they call — the permission tightening is correct:
Spot-checked every factual claim in the new headers and they hold up: the Worth fixing
Minor
Nothing blocking beyond (1). |
Docs review — three workflow headers + permissions tighteningSolid PR. I traced every factual claim in the new headers against the actual YAML and Python, and they all hold up:
The headers also follow the Three things, none blocking
Minor: No 🤖 Generated with Claude Code |
9a4da6f to
deaf42d
Compare
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
deaf42d to
df2578c
Compare
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review: workflow hardening Re-reviewed at Re-verified every factual claim in the three new headers against the YAML and Python; they all hold:
Worth fixing
Minor
Only (1) is worth blocking on, and only because the description already claims it's done. 🤖 Generated with Claude Code |
Background
Recently added an
AGENTS.mdto thegithub/workflowsdir and improvedREADME-Claude-workflowsfor workflows to assist engineers (and Claude) with improving security on workflows.Resolves: #694 which was to audit these workflows.
Details
update-api-docs.ymla.) removed two dead grants on the default GITHUB_TOKEN as the actual write (peter-evans/create-pull-request), uses the
ocs-agentGitHub App token explicitly.b) With these permissions removed, now the create-github-app-token step now scopes the minted ocs-agent token to permission-contents: write and permission-pull-requests: write — just what peter-evans/create-pull-request needs to push the branch and open the PR, instead of inheriting every permission the app installation has.
update-confluence.yml- updated for consistent use of env variables to fix direct-interpolation issue of TAG="${{ github.event.inputs.release_tag }}" going straight into the run: script.update-confluence.yml- fix for Heredoc Command Injection risk by generating random string for Delimiter for release note tag & release detailspersist-credentials: falseon checkout unless the job runs git against the remote after it.Reviewer Notes
Acceptance Testing
uv run prek run actionlint --filesupdate-confluence.yml- has a manual run, but needs to be done by someone with Confluence permissionsupdate-api-docs.yml- has manual dispatch runci.yml- very limited changes. Triggered on push to main. So checked by developer after merge