Skip to content

fix(rulesets): bypassable rulesets are not floor cover (D106, D235) - #1103

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/floor-d106-bypass-not-cover
Oct 1, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
feat/floor-d106-bypass-not-cover

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

Implements owner rulings D106 and D235 (standards#787) in scripts/apply-protection-floor.sh.

  • D106 — a bypassable ruleset is not cover. A ruleset with any bypass_actors entry no longer counts toward the repo-level or the org-level cover union. A repo whose only cover is bypassable now reports WOULD-CREATE, and --apply POSTs the standalone zero-bypass Branch-Floor alongside. No existing ruleset is modified. The report detail counts the bypassable rulesets discounted.
  • D235 — third gcrypt vault. hyperpolymath/claude-config-vault joins config/rulesets/gcrypt-vault-class.txt (it already carries Gcrypt-Vault-Guard 24256082), so the applier will never write non_fast_forward to a force-pushing vault.
  • config/rulesets/README.adoc documents the new state rule.

Tests

bash scripts/tests/apply-protection-floor-test.sh → 57 passed, 0 failed.

  • New fixtures: bypassed-twin (repo-level floor + always-bypass) and org-bypassed-repo (org-level floor + always-bypass) — both WOULD-CREATE in report mode and CREATED under --apply. Apply-mode write count goes from 2 to 4, asserted both ways.
  • Two new mutants, both killed: "bypassable repo ruleset counted as cover" → bypassed-twin flips to COVERED-BY-RICHER; "bypassable org ruleset counted as cover" → org-bypassed-repo flips to ORG-INHERITED.
  • richer-repo (zero bypass) stays COVERED-BY-RICHER. That is the negative control: genuine cover is still honoured.
  • claude-config-vault asserted EXCLUDED-D50, with no write in apply mode.

Scripts remain 100755.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR

D106: a ruleset carrying any bypass actor no longer counts toward the
repo-level or org-level cover union. A repo whose only cover is
bypassable is WOULD-CREATE and --apply writes the standalone zero-bypass
Branch-Floor alongside; nothing existing is modified. The report detail
names how many bypassable rulesets were discounted.

D235: hyperpolymath/claude-config-vault joins the gcrypt-vault class
(already on Gcrypt-Vault-Guard 24256082), so the applier never writes
non_fast_forward to it.

Tests: 57 passed, 0 failed. New fixtures bypassed-twin (repo) and
org-bypassed-repo (org) with one killed mutant each; richer-repo stays
the zero-bypass negative control.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ji1bq3TypfycfUPAR7hSxR
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3113fa1a-7334-4930-8acc-f631803ef160

📥 Commits

Reviewing files that changed from the base of the PR and between 3238461 and 143978c.

📒 Files selected for processing (4)
  • config/rulesets/README.adoc
  • config/rulesets/gcrypt-vault-class.txt
  • scripts/apply-protection-floor.sh
  • scripts/tests/apply-protection-floor-test.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (25)
  • GitHub Check: Trust pipeline summary
  • GitHub Check: governance / Well-Known (RFC 9116 + RSR)
  • GitHub Check: governance / Code quality + docs
  • GitHub Check: governance / Actions lockfile verify
  • GitHub Check: governance / UUID v7 conformance
  • GitHub Check: governance / Debt ratchet
  • GitHub Check: governance / Licence consistency
  • GitHub Check: governance / Live Actions policy (credentialed advisory)
  • GitHub Check: governance / Workflow security linter
  • GitHub Check: governance / Language / package anti-pattern policy
  • GitHub Check: governance / Security policy checks
  • GitHub Check: governance / Allowlist Preflight
  • GitHub Check: governance / Check Workflow Staleness
  • GitHub Check: governance / Exemption ratchet
  • GitHub Check: governance / Guix packaging policy (Nix retired)
  • GitHub Check: scorecard / Run Scorecard PR
  • GitHub Check: ci / Detect mix.exs
  • GitHub Check: scan / rust-secrets
  • GitHub Check: scan / gitleaks
  • GitHub Check: analyze-js / analyze
  • GitHub Check: analyze-actions / analyze
  • GitHub Check: scan / Hypatia Neurosymbolic Analysis
  • GitHub Check: Registry + topology in sync
  • GitHub Check: Repo self-tests
  • GitHub Check: semgrep-cloud-platform/scan
🔇 Additional comments (7)
config/rulesets/gcrypt-vault-class.txt (1)

16-16: LGTM!

Also applies to: 19-19

config/rulesets/README.adoc (1)

61-69: LGTM!

scripts/apply-protection-floor.sh (4)

128-128: LGTM!


229-229: LGTM!

Also applies to: 242-251


278-278: LGTM!

Also applies to: 292-301


341-346: LGTM!

scripts/tests/apply-protection-floor-test.sh (1)

108-108: LGTM!

Also applies to: 120-120, 161-173, 261-273, 315-319, 345-351, 459-467


📝 Summary

Summary by CodeRabbit

  • Protection Coverage
    • Rulesets with bypass actors no longer count as protection-floor coverage. Repositories covered only by bypassable rulesets are reported as needing a floor; applying changes adds a standalone floor without modifying those rulesets.
    • Reports now identify bypassable rulesets excluded from coverage.
  • Configuration
    • Added claude-config-vault to the Gcrypt vault exclusion class.

Walkthrough

Repository and organisation rulesets with bypass actors no longer count as protection-floor coverage. The script reports discounted rulesets and creates standalone floors when required. The gcrypt-vault exclusion class adds a repository.

Changes

Floor coverage

Layer / File(s) Summary
Bypassable ruleset coverage
config/rulesets/README.adoc, scripts/apply-protection-floor.sh, scripts/tests/apply-protection-floor-test.sh
Rulesets with bypass actors no longer count towards repository or organisation floor coverage. The script reports their counts. Tests cover report and apply behaviour for bypassed rulesets.

Gcrypt vault exclusion class

Layer / File(s) Summary
Vault class membership
config/rulesets/gcrypt-vault-class.txt, scripts/apply-protection-floor.sh, scripts/tests/apply-protection-floor-test.sh
The exclusion class adds hyperpolymath/claude-config-vault. The empty-list refusal message now states that D50+D235 name three members. Tests check that the repository is excluded.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: joshuajewell

Merge Risk: ⚪ Minimal · up to 14397

The change stops rulesets with bypass actors from counting as protection-floor cover and excludes one more vault repository from floor writes. No merge-blocking risk is evident from the supplied context.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 14397

The change strengthens protection by discounting bypassable rulesets while preserving existing rulesets and the added backup vault. No introduced security weakness was established. Runtime credential permissions, trusted target selection, and overlapping execution remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The potential write scope is the non-excluded supplied repository set for which the runtime credential can create rulesets. D106 expands candidates to repositories previously classified as covered only through bypassable repository or organization rulesets. The inspected mutation path creates repository-level floors, not organization-wide policy.

Trust Boundaries and Controls

  • observed — The POST relies on ambient GitHub CLI authentication and locally selected targets; the script does not establish credential identity or a repository authorization allowlist. The README documents capabilities measured with particular tokens, not the identity or grants of this invocation. Missing source_type still causes refusal rather than assuming repository ownership.

Resilience and Maintainability Implications

  • observed — A normal sequential rerun recognizes an exact active zero-bypass floor as CONVERGED. POST failures report UNKNOWN, repeated throttling aborts the sweep, and failed verification reports WROTE-UNVERIFIED rather than CREATED. Cleanup removes temporary files only; it does not reconcile a write accepted before interruption.

Hardening Proposals

  • proposed — Document a least-privilege invocation identity, trusted target-list ownership, and single-writer execution or reconciliation procedures for overlapping and interrupted applies. These are operational hardening proposals, not established PR-introduced vulnerabilities.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: bypassable rulesets no longer count as protection-floor coverage. It is concise and specific.
Description check ✅ Passed The description directly explains the D106 and D235 changes, affected files, expected behaviour, and test results. It is relevant to the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (2 skipped: 2 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • 🔴 Error committing to branch - (🔄 Check to retry)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

❤️ Share

A rabbit checks the rulesets with care,
Bypass actors no longer count there.
A floor is created when coverage is thin,
A vault joins the class, with its name tucked in.
The tests hop through each change and report what they see.

Comment @coderabbitai help to get the list of available commands.

@hyperpolymath
hyperpolymath merged commit 658ded3 into main Oct 1, 2026
49 checks passed
@hyperpolymath
hyperpolymath deleted the feat/floor-d106-bypass-not-cover branch October 1, 2026 13:29
@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

❌ Failed to create Coding Agent finishing-touch task. Please try again.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Add Carrot credits or activate Agent usage billing to use Autofix

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