Repository navigation
feat(security): set what enforce does for each built-in tool rule - #88
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
fylorn
force-pushed
the
feat/builtin-rule-action
branch
from
September 21, 2026 18:01
857f636 to
06a978d
Compare
Merged
fylorn
added a commit
that referenced
this pull request
Sep 21, 2026
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.
A built-in tool-call rule's action (cut off or record only) becomes a setting, like a custom rule's. A built-in rule supplies a regular expression and a factory action; whether a match is cut off in enforce mode is the user's call. Until now the only way to change it was to copy the rule as a custom one and turn the original off.
Configuration
Only actions that differ from the factory are written. An id that is not a built-in rule is reported with the other unknown ids in
GET /securityand ignored, the same asenableanddisable.Control API
PUT /security/inspect_tools/builtin/{id}/actionwith{ action, base_version }writes one line, or removes it when the action goes back to the factory one.redactanswerssecurity.no_action: what happens to a redaction match is decided by the mode.GET /securitygives each built-in tool rule its effectiveactionand itsdefault_action.POST /security/inspect_tools/testwithrulereports the effective action.Additive:
CONTROL_API_VERSIONunchanged.Tests
cargo test --workspace(1508 passed),clippy -D warnings,fmt.🤖 Generated with Claude Code