fix(safety): make secret redaction source aware - #1671
Merged
Liu-RK merged 4 commits intoSep 16, 2026
Merged
Conversation
Classify shell and grep output using explicit source provenance, recognize all .env variants, and keep credential assignment text strict outside source contexts.
Keep the gateway subprocess timeout contract out of the saturated xdist phase so its one-second provider deadline measures the synthetic stream rather than worker contention.
|
Merge queue CI: success — run 35100576567, attempt 1. The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
|
Merge queue CI: success — run 35101515129, attempt 1. The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed. |
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.
Scope
Scope boundary: Make tool-result secret redaction source-aware so ordinary source assignments remain readable while secret-bearing outputs stay masked.
Non-goals: Change filesystem permissions, add tools, broaden credential-pattern coverage, or modify documentation.
Branch
Base branch: main
Target exception: N/A
Issue
Linked issue: None
If None, reason: Direct regression fix for source-code token variables being replaced before the model could inspect them.
Release Note
Release note: Preserve ordinary token variables in source output while retaining secret masking for environment dumps and credential files.
Tests
Ruff: passed on all four changed Python files.
Pytest: 155 passed across secret redaction, dispatch envelopes, web fetch, trace recorder, and approval-event coverage.
Build: not needed; Python-only runtime change.
Regression tests: added
Notes: Coverage includes PHP token variables, known provider-key prefixes,
.envreads, environment dumps, project config, and OpenSquilla config paths including$HOME.The default test path remains offline, deterministic, credential-free, and safe for forks.
Maintainer Live Check
Maintainer live check: no
Surface: N/A
Maintainer-only note: No provider credentials or external services are required for this change.
Safety
No secrets, local-only artifacts, private prompts or transcripts, channel identifiers, session artifacts, non-public fixtures, or
tests/_private/contents are committed. Known provider-key formats and Authorization headers remain masked for every result source. Assignment masking remains enabled for.envfiles, shell profiles, environment dumps, and OpenSquilla configuration.Third-Party Origin
Third-party origin: inspired-by
Details if non-none: Behavior was informed by NousResearch/hermes-agent at commit
2b7292ff0f5a61ceb212d28832883e2912949c96(https://github.com/NousResearch/hermes-agent, MIT). No dependency, fixture, asset, or documentation was vendored.Documentation Changes
No documentation files changed.