Skip to content

fix(safety): make secret redaction source aware - #1671

Merged
Liu-RK merged 4 commits into
TokenRhythm:mainfrom
Liu-RK:fix/source-aware-secret-redaction
Sep 16, 2026
Merged

Liu-RK merged 4 commits into
TokenRhythm:mainfrom
Liu-RK:fix/source-aware-secret-redaction

Conversation

@Liu-RK

@Liu-RK Liu-RK commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

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, .env reads, 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 .env files, 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.

  • Links point to existing repository files or stable external pages.
  • Code fences and Markdown tables render correctly on GitHub.
  • Examples avoid real secrets, local private paths, and private transcripts.

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.
@Liu-RK
Liu-RK added this pull request to the merge queue Sep 16, 2026
@github-actions

Copy link
Copy Markdown

Merge queue CI: successrun 35100576567, attempt 1.
Tested queue candidate: e32001d4d8d334156cc8333b17496f94e853671d. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

@github-actions

Copy link
Copy Markdown

Merge queue CI: successrun 35101515129, attempt 1.
Tested queue candidate: 6e4362d2c69f6a33508facf3824be2c06aecca57. This result belongs to that combined tree, not necessarily the PR's current head.

The run summary lists reused suites and executed checks. A green PR check alone does not mean queue validation has passed.

Merged via the queue into TokenRhythm:main with commit 6e4362d Sep 16, 2026
35 checks passed
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