Repository navigation
[CTX-0216] feat(agent): credential scrubbing for tool args/results - #370
Merged
Merged
Conversation
…r tool args/results
Xuepoo
force-pushed
the
ctx-0216/feat-credential-scrubbing
branch
from
September 7, 2026 02:24
01d3faf to
68b0dc4
Compare
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.
FIND-0002 follow-up. ToolSpec validated bounds only; tool arguments/results now scrub secrets before logs/IPC.
Scrubbing (
crates/bitty-agent/src/tool.rs, std-only):REDACTED_MARKER([redacted], ipc parity),is_sensitive_key,looks_like_secret_token,scrub_text/scrub_tool_args/scrub_tool_result.key=value/key: valueredaction; PEM/prefix/bearer unstructured pass; fail-closed whole-payload redact on ambiguous shapes.ToolCall/ToolResult: redactingDebug,scrubbed/scrubbed_arguments/scrubbed_content/log_safe; raw kept only for host dispatch.lib.rs.Tests: 9 new cases (args/results/logs redaction, legit passthrough, case-insensitive/bare/bearer/PEM/prefix, ambiguous fail-safe incl. nested/numeric/unterminated, Debug/log_safe, caps, key heuristics).
cargo test -p bitty-agent: 39 passed.cargo test -p bitty-runtime: green (sole consumer). Full workspace: only 2 flaky bitty-app pump tests fail in parallel run; both pass isolated with and without this diff (no dep path bitty-app->bitty-agent).Priority: P2 | Area: agent | Labels: feat,area:agent,P2 | Milestone: v0.1.0 | RFC: FIND-0002 | Task: CTX-0216
Closes #369