Skip to content

fix(managed-files-guard): explain the pull-requests read grant inline - #816

Merged
kyle-sexton merged 1 commit into
mainfrom
fix/managed-files-guard-permission-comment
Oct 20, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
fix/managed-files-guard-permission-comment

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: ci-runner release v0.1.35 failed pedantic zizmor on this synced caller (run 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

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q6B1MWhz73WFRYyyrKjtjY

zizmor 1.30.1's pedantic undocumented-permissions audit flags the
uncommented `pull-requests: read` grant in both caller templates, which
failed the ci-runner v0.1.35 release gate. A same-line comment names why
check-managed-files needs it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q6B1MWhz73WFRYyyrKjtjY
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T05:35:26.619747Z 17806aa PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

claude-security-review reviewed 17806aa1fe904e3fcf677070c2b7a991f6af66f5: 0 finding(s), 0 as inline comments.

No security issues found. The PR only adds an inline YAML comment to the existing pull-requests: read grant in managed-files-guard.yml and managed-files-guard-fleet.yml. It doesn't change permissions, triggers, logic, or any standing instruction. Nothing here removes or softens a guardrail.

@github-actions

Copy link
Copy Markdown

claude-review reviewed 17806aa1fe904e3fcf677070c2b7a991f6af66f5: 0 finding(s), 0 as inline comments.

No findings. The PR adds a same-line comment to pull-requests: read in managed-files-guard.yml and managed-files-guard-fleet.yml. It changes no permission or behavior.

  • Comment accuracy: The comment says check-managed-files lists the PR's commits to skip all-Dependabot PRs. components/managed-files-guard/README.md (around line 232) says the same thing, so the comment is accurate. I checked this by reading the README, not by running the action.
  • Tests: managed-files-guard.test.sh (line 106) asserts the token is contents=read,pull-requests=read and nothing else. A trailing YAML comment doesn't affect that. I did not run the test suite, zizmor, or actionlint. The PR's verification claims (175 PASS, no zizmor findings) are the author's and I haven't confirmed them.
  • Closing issue: The PR states "No related issue" with a reason, so there are no acceptance criteria to check.
  • Path-scoped rules: The only rule file, pr-body-contract.md, covers the PR body. The body follows it: it has the No related issue: opening and the Summary, Fix, Verification and Related sections.

@kyle-sexton
kyle-sexton merged commit 829663f into main Oct 20, 2026
22 checks passed
@kyle-sexton
kyle-sexton deleted the fix/managed-files-guard-permission-comment branch October 20, 2026 05:38
kyle-sexton added a commit to melodic-software/ci-runner that referenced this pull request Oct 20, 2026
No related issue: release v0.1.35 failed pedantic zizmor (run
39374988850)

## Summary

`v0.1.35` ([run
39374988850](https://github.com/melodic-software/ci-runner/actions/runs/39374988850))
failed `Audit workflow security`: zizmor 1.30.1 `--persona pedantic`
reports `undocumented-permissions` on
`pr-check-managed-files-hosted.yml:85` (`pull-requests: read` with no
comment). That file is sync-managed from melodic-software/standards, so
as with `v0.1.25` the fix lands upstream:
[melodic-software/standards#816](melodic-software/standards#816),
then the next standards sync PR here.

## Fix

- `docs/releases.md`: record `v0.1.35` as reserved, no release assets.
- No local edit to the managed caller; the managed-files guard would
reject it.

**Release order:** merge standards#816, merge the resulting `chore: sync
standards components` PR here, then tag `v0.1.36` from that `main`
commit. Tagging before the sync lands repeats the failure.

## Verification

Every step of `release-publish-image.yml` job `Verify exact tagged
source`, run locally against this branch head (`d9f7380`) with Go
1.27.2, Node 24.21.0, PowerShell 7.6.7:

| Step | Command | Result |
|---|---|---|
| Release version and main ancestry | `git merge-base --is-ancestor HEAD
origin/main` | n/a before merge (exits 1: the branch head is not on
`main` yet); the tag regex is checked at tag time |
| Immutable pins | `pwsh ./scripts/Test-ReleasePins.ps1` | pass |
| Dependency freshness | `GITHUB_TOKEN=$(gh auth token)
./scripts/Test-DependencyFreshness.ps1 -OutputPath …` | pass
(`hardFail=False`) |
| Module graph | `go mod tidy -diff`; `go mod verify` | pass |
| Vet | `go vet ./...` | pass |
| Tests | `go test ./...` | pass |
| Race | `go test -race ./...` | pass |
| govulncheck | `go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...`
| pass |
| Workflow scripts | `node --test .github/scripts/*.test.cjs` | pass |
| actionlint + shellcheck | `go run
github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 -color -ignore
'unexpected key "queue" for "concurrency" section'` | pass |
| zizmor (branch head) | pinned
`ghcr.io/zizmorcore/zizmor:1.30.1@sha256:a2eb396d…`, `--persona
pedantic`, online, over `.` | **fail**: 1 `undocumented-permissions`
(expected until the sync lands) |
| zizmor (post-sync simulation) | same, over this tree with
standards#816's template at
`.github/workflows/pr-check-managed-files-hosted.yml` | pass, no
findings |
| Worker image build | `docker buildx build --load` (local default
builder, not the pinned BuildKit v0.34.0 builder) | pass |
| Worker image contract | `./scripts/verify-worker-image.sh
ci-runner-worker:release-verification` | pass |
| Windows compilation | `GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go
build -trimpath` for `ci-runner` and `ci-runner-controller`
(`-H=windowsgui`) | pass |

Not reproduced locally: the checksum-verified Buildx install and the
pinned BuildKit builder setup (the image was built with the local Docker
builder).

## Related

-
[melodic-software/standards#816](melodic-software/standards#816):
the upstream fix.
- #387, #388: the same path for `v0.1.25`.
- #484: the `v0.1.34` freshness fix.

🤖 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>
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