Repository navigation
fix(guardrail): --no-verify bypass (#171) + remove unwired scaffolder agent (#170) - #177
Merged
Merged
Conversation
…acharacters R10 only treated whitespace as a flag-token boundary, so forms like `git commit --no-verify&&echo` slipped past the guardrail and could bypass pre-commit hooks / signature verification. Broaden the boundary to include shell token separators ([\s;&|()<>]) and add regression tests for the bypass forms plus false-positive guards. Fixes #171 https://claude.ai/code/session_01MNT1hAQw9AzGapXdEA3BFp
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Walkthrough
Changesガードレール検出ロジック修正
scaffolder サブエージェント削除と関連整理
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Per issue #170 evaluation: agents/scaffolder.md defined analyze/scaffold/ update-state modes but had no spawn path (no skill or hook ever called subagent_type="claude-code-harness:scaffolder"). Scaffolding is done inline by harness-setup and state sync by harness-plan; setup/plan are interactive Lead flows where worktree isolation is counterproductive, so the agent provided no benefit and only misled readers as a registered-but- dead stub. Remove the agent definition and clean up all active references: - hooks SubagentStart/Stop matchers (hooks/ + .claude-plugin/, dual-synced) - docs: team-composition, agent-frontmatter-policy, distribution-scope, go/DESIGN - skills harness-setup/harness-plan/harness-loop + codex/opencode mirrors - tests that asserted scaffolder.md (spec-ssot, upstream-integration, agent-permission-mode, validate-plugin-v3) updated for the removal - generic agent_type examples in go comments/test + detect-test-framework.sh Result: 3-agent topology (worker / reviewer / advisor). check-consistency green, scaffolder-referencing tests pass, go tests pass. History (CHANGELOG / memory archive / v3-architecture) intentionally retained. Closes #170 https://claude.ai/code/session_01MNT1hAQw9AzGapXdEA3BFp
…prs-review-NFoQ3 # Conflicts: # CHANGELOG.md
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.
This branch bundles two related cleanups from the recent-issues review.
1.
fix(guardrail): detect--no-verify/--no-gpg-signbypass via shell metacharacters (#171)The R10 guardrail (
go/internal/guardrail/helpers.go) used(?:^|\s)...(?:\s|$)— only whitespace counted as a token boundary. Because bash also treats&&,;,|as separators, the flag stayed effective while slipping past detection:Fix: broaden the boundary class to
[\s;&|()<>]for leading/trailing anchors. Detection direction is safe (broader → more likely to deny); trailing non-separators (--no-verify-mode,--no-verifyx) still don't match.Tests:
TestR10_ShellMetacharBypass(8 bypass forms now deny) +TestR10_NoFalsePositive(substring forms stay non-deny). Existing R10 tests unchanged.Fixes #171
2.
refactor(agents): remove unwiredscaffolderagent (#170)agents/scaffolder.mddefined analyze/scaffold/update-state modes but had no spawn path — no skill or hook ever calledsubagent_type="claude-code-harness:scaffolder"(worker/reviewer do). Scaffolding is done inline byharness-setup, state sync byharness-plan; both are interactive Lead flows where worktree isolation is counterproductive. The agent provided no benefit and only misled readers as a registered-but-dead stub.Removed the agent and cleaned all active references:
SubagentStart/SubagentStopmatchers (hooks/+.claude-plugin/, dual-synced)codex/&opencode/mirrorsscaffolder.md(spec-ssot, upstream-integration, agent-permission-mode, validate-plugin-v3) updated for the removalagent_typeexamples in go comments/test +detect-test-framework.shResult: 3-agent topology (worker / reviewer / advisor). History (CHANGELOG / memory archive / v3-architecture) intentionally retained.
Closes #170
Verification
go test ./internal/guardrail/ ./internal/lifecycle/ ./internal/state/— passscripts/ci/check-consistency.sh— pass (mirror parity OK)CHANGELOG.md[Unreleased].https://claude.ai/code/session_01MNT1hAQw9AzGapXdEA3BFp
Summary by CodeRabbit
Bug Fixes
Tests
Documentation
Removed
Chores