Repository navigation
fix(managed-files-guard): grant pull-requests read to check-managed-files callers - #738
Conversation
…iles callers From ci-workflows v0.39.0 the check-managed-files action lists the pull request's commits to skip Dependabot-only pull requests, which needs pull-requests: read. Both caller templates granted only contents: read, so every sync pull request failed with a 403 on the commits listing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T7GukBojtE99rLCPY7Cw3R
|
Claude finished @kyle-sexton's task in 53s —— View job Security review complete
No security findings. This diff is purely additive: it grants
|
|
Claude finished @kyle-sexton's task in 1m 57s —— View job Claude code review
No blocking findings. This is a small, well-scoped fix:
Not independently verified (author-claimed only): the test run (167 PASS/0 FAIL), Scope is tight (permission grants + matching test/docs updates only), and I found no correctness, security, or maintainability issues to flag. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review has reviewed this pull request through d515da6; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through d515da6; a later push is reviewed from there. |
…#816) No related issue: ci-runner release v0.1.35 failed pedantic zizmor on this synced caller ([run 39374988850](https://github.com/melodic-software/ci-runner/actions/runs/39374988850)). ## Summary ci-runner's release gate runs zizmor 1.30.1 with `persona: pedantic`. Its `undocumented-permissions` audit flags the uncommented `pull-requests: read` grant (added in #738) in the synced `pr-check-managed-files-hosted.yml`, and the release fails. ci-runner cannot edit the managed copy, so the fix lands here, the same path #601 took for v0.1.25. ## Fix - `components/managed-files-guard/managed-files-guard.yml` and `managed-files-guard-fleet.yml`: same-line comment on `pull-requests: read` naming why check-managed-files needs it. No permission change. ## Verification - `bash harness/shell/run-tests.sh components/managed-files-guard/managed-files-guard.test.sh`: 1 passed (175 PASS, 0 FAIL; covers per-target materialization, byte equality and actionlint on synced output). - zizmor 1.30.1 (`ghcr.io/zizmorcore/zizmor@sha256:a2eb396d…`), `--persona pedantic`, online, on both templates: no findings. - zizmor 1.30.1 pedantic over a copy of the ci-runner tree with this template substituted at `.github/workflows/pr-check-managed-files-hosted.yml`: no findings (the unmodified tree reports the one `undocumented-permissions` finding). - `actionlint` on both templates: clean. ## Related - #738: added the `pull-requests: read` grant. - #601: the earlier pedantic-zizmor fix to this component (ci-runner v0.1.25). - [melodic-software/ci-runner run 39374988850](https://github.com/melodic-software/ci-runner/actions/runs/39374988850): the failed release gate. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q6B1MWhz73WFRYyyrKjtjY Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
No related issue: urgent fix for every sync PR failing pr-check-managed-files with a 403; tracked from dotfiles#1070.
Summary
From ci-workflows v0.39.0,
check-managed-fileslists the pull request's commits (to skip PRs whose every commit is Dependabot's) and needspull-requests: read, as itsaction.ymlstates. Both caller templates granted onlycontents: read, so every sync PR fails withGET /repos/.../pulls/N/commits - 403 Resource not accessible by integration(dotfiles run 37637251894).Fix
components/managed-files-guard/managed-files-guard.yml(hosted) andmanaged-files-guard-fleet.yml: addpull-requests: readbesidecontents: readin the workflow-levelpermissionsblock.managed-files-guard.test.sh: the whole-grant assertion now expectscontents=read,pull-requests=read.README.md: the failure-behavior and verification sections name both permissions.The diff touches only permission lines in the two YAML files, so it merges cleanly with #735 (pin bump on the same files).
Verification
bash components/managed-files-guard/managed-files-guard.test.sh: 167 PASS, 0 FAIL (includes per-target materialization and actionlint on the synced output).actionlinton both caller files: clean.markdownlint-cli2on the README and the pre-commit hooks (typos, editorconfig, gitleaks, shellcheck): clean.check-managed-filescaller in this repo: a repo-wide grep finds only these two templates plus manifest/docs references.Related
pull-requests: readgrant to its ownpr-require-checks.ymlcaller.🤖 Generated with Claude Code
https://claude.ai/code/session_01T7GukBojtE99rLCPY7Cw3R