fix: keep api credential fallback redaction active#1379
fix: keep api credential fallback redaction active#1379NocGeek wants to merge 1 commit intonesquena:masterfrom
Conversation
|
Confirmed against A few things worth thinking about before merge:
Surgical 15/9 line diff in a single security-sensitive file. Will defer merge to maintainer review. |
|
Released as part of v0.50.252 — thanks @NocGeek! This PR was merged into the v0.50.252 release batch via #1387 alongside 5 other contributor fixes. The full CHANGELOG entry is at https://github.com/nesquena/hermes-webui/blob/master/CHANGELOG.md. Pre-release verification: 3507 pytest tests pass, full QA harness pass (20 structural + 11 browser API + 23 Agent Browser CDP), Opus mentor APPROVED with two non-blocking follow-ups applied during the release batch (force=True on agent redactor, debug-log on profile fallback). Closing this PR — the change is live on master. |
Summary
agent.redact.redact_sensitive_textis importableghp_...,sk-...,hf_..., andAKIA...Root Cause
api.helpers._build_redact_fn()returned the agent redactor directly whenever it was importable. In this environment, the agent redactor missed several credential formats that the WebUI fallback already knew how to mask, so session, search, and memory API responses could leak plaintext fake test credentials.Tests
python3 -m py_compile api/helpers.pypython -m pytest tests/test_security_redaction.py tests/test_session_summary_redaction.pypython -m pytest tests/test_security_redaction.py tests/test_session_summary_redaction.py tests/test_session_ops.py tests/test_session_index.py tests/test_session_search_bfcache_822.pypython -m pytestLocal full-suite result:
3486 passed, 2 skipped, 3 xpassed