Repository navigation
fix(managed-files-guard): exempt sync PRs only when the sync App opened them - #690
Conversation
The skip step exempted a PR carrying the standards-sync label from any author, and a PR from the sync App (or a user named like it) without the label. Exempt only a PR authored by melodic-standards-sync[bot] that also carries the label. The dependabot author exemption is unchanged. Document why standards-ref defaults to main: the guard must read the manifest that is live for the target, and a fixed SHA stops tracking roster and component changes as soon as standards moves. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The skip step also accepted a plain `dependabot` login, which a user account could hold. Accept only the App login `dependabot[bot]`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 finished @kyle-sexton's task in 3m 27s —— View job Review: fix/managed-files-guard (
|
|
Claude finished @kyle-sexton's task in 1m 44s —— View job Security review complete ✅
No security issues found. Scope: Notes from the review:
Actions-hardening concerns (unpinned actions, |
|
claude-security-review has reviewed this pull request through 6b42970; a later push is reviewed from there. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b42970884
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [[ "$PR_ACTOR" == 'melodic-standards-sync[bot]' && | ||
| ",${PR_LABELS}," == *",standards-sync,"* ]]; then |
There was a problem hiding this comment.
Refetch labels applied after PR creation
On every newly created standards-sync PR, the pinned peter-evans/create-pull-request implementation creates the PR without labels and adds labels afterward. Consequently, the pull_request: opened payload has no standards-sync label, so this condition rejects a genuine App-authored sync PR; .github/workflows/pr-require-checks.yml:368-379 runs the guard on opened but explicitly skips it for the subsequent labeled event, leaving the advisory check red. Refetch the PR's current labels before evaluating the App-plus-label condition rather than relying on the frozen event payload.
Useful? React with 👍 / 👎.
| # Anyone who can label a PR can add `standards-sync`, so the label | ||
| # exempts only a PR the sync App itself opened. | ||
| if [[ "$PR_ACTOR" == 'melodic-standards-sync[bot]' && | ||
| ",${PR_LABELS}," == *",standards-sync,"* ]]; then | ||
| skip=true |
There was a problem hiding this comment.
Correct the now-impossible label remediation
For a contributor-authored PR that hits the guard, .github/actions/check-managed-files/run.sh:72-75 still instructs the user to add the standards-sync label, but this new actor check means that instruction can never clear the failure for that PR. Update the rejection message to explain that only App-authored sync PRs are exempt and that other changes must be made in the standards source.
Useful? React with 👍 / 👎.
|
claude-review has reviewed this pull request through 6b42970; a later push is reviewed from there. |
No related issue: wording follow-up to melodic-software/ci-workflows#690. ## Summary ci-workflows#690 changed the `check-managed-files` composite so that a pull request skips the managed-files guard only when `melodic-standards-sync[bot]` authored it **and** it carries the `standards-sync` label. Before, either one was enough. The component's caller headers and README still described the old rule. ## Fix - The headers in `managed-files-guard.yml` and `managed-files-guard-fleet.yml` and one README line now state the rule: authored by `melodic-standards-sync[bot]` and labelled `standards-sync`. - The change is comment and docs only; no YAML key, value or job changed. - The README's dated per-version history (around lines 144-151) is left as written, since it describes past releases. ## Verification - `components/managed-files-guard/managed-files-guard.test.sh`: 0 FAIL. - markdownlint: 0 issues. ## Related - melodic-software/ci-workflows#690 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
No related issue: Phase 7 defect D13 from the 2026-10-03 ci-workflows defect review.
Summary
The managed-files guard skipped any PR labelled
standards-sync, and anyone who can label a PR could add that label to bypass the guard on standards-managed files. It also accepted the plain loginsmelodic-standards-syncanddependabot, which a user account could register.Fix
melodic-standards-sync[bot]and it carries thestandards-synclabel. The sync always applies that label (maintenance-sync-standards.yml:494), so real sync PRs still skip.dependabot[bot]skips as a Dependabot author; the plaindependabotlogin no longer does.standards-refstaysmain, and its description now says why: the guard must read the manifest live for each target, and the synced standards callers passmainon purpose. A caller may still pin a SHA, as ci-workflows' own job does.Verification
.github/scripts/check-managed-files-skip.test.cjsextracts the skip step's script fromaction.ymland runs it on 7 cases: label alone, bot alone, bot plus label, plain logins, Dependabot. 7 pass; 4 fail againstmain'saction.yml.actionlint,shellcheck,composite-run-shellcheck.sh: exit 0.zizmor --offline: no findings.Related
🤖 Generated with Claude Code