Repository navigation
docs(security): record the case-sensitive ruleset patterns and the case-variant guard - #2543
Merged
Merged
Conversation
…se-variant guard Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019NtSiNeMSRGjEKSx7yTfdu
modelmirror
approved these changes
Oct 18, 2026
modelmirror
enabled auto-merge
October 18, 2026 18:34
modelmirror
disabled auto-merge
October 18, 2026 18:34
modelmirror
enabled auto-merge
October 18, 2026 18:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
This records the repository's ruleset settings as they now stand. The maintainer applied the settings today; this PR changes the docs only.
promote: restrict creationandpromote: freezenow includerefs/heads/[Pp][Rr][Oo][Mm][Oo][Tt][Ee]/**alongsiderefs/heads/promote/**. Ruleset patterns match case-sensitively: before the bracket include, a non-admin push ofPromote/xsucceeded even thoughpromote/xwas refused.case variants: restrict creation. It refuses creation of every other casing ofmainandstaging, and only the repository admin role can bypass it. Every environment that admits those names by branch policy is therefore safe whether or not policy matching ignores case. That question is undocumented and untested.refs/heads/to whatever you type. Typing the full ref storedrefs/heads/refs/heads/promote/**, which covered no branch. Thecontextsstage caught it.contextsreads only thepromote/**include. The bracket include and the case-variants ruleset are confirmed by the push checks, not by the gate.docs/pipeline.md's one-time setup step now lists both protections.Artifact served: none directly. This covers the integrity of the
promote/*candidates and of the environment branch policies they rest on.Evidence (observed 2026-10-18)
All pushes below were made from the non-admin agent account.
promote/ruleset-probewas refused ("push declined due to repository rule violations").Promote/ruleset-probewas created. The maintainer deleted it; it started no workflow runs.Promote/ruleset-probewas refused.Stagingwas refused.Mainwas not pushed; the pattern is the same single rule.contextsdoes not check this ruleset.scripts/promotion-gate.sh contexts, run by the maintainer with an admin token:rulesets:errors, exit 1.promotion gate: contexts clean, exit 0.Review
docs-reviewer. It raised one blocker: the claim thatstagingis kept from deletion was undocumented. It is true: thestaging: protect historyruleset (id 19778491, rulesdeletion,non_fast_forward) is active, as the API shows. The text now names that ruleset. Its recommended changes are applied:Its nits are applied: the rulesets summary line and the error-message hint.
No reviewer subagent ran for security. The change only records settings that are already applied and widens no access. I self-reviewed it against the security checklist.
Left for the maintainer.
docs/security.mdis a CODEOWNERS path that describes the security posture, so it waits for your review. I have not merged it.Generated by Claude Code