fix/executor: redact a generic Key field only when its value is secret-shaped #104
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/scrub-generic-key-shape"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #77. The credential scrubber redacted any field whose name ends in key, so SonarQube's metricKey, projectKey and ruleKey values came back as REDACTED in proxied MCP results. The env-value scrub was innocent. Key names now fall into three classes. Names containing token, secret, password, passwd or credential, and names containing a strong word such as api, private, access, sign, ssh, hmac, pass, crypt, cipher, session, host or admin, are redacted unconditionally as before. A generic name ending in key is redacted only when its value is secret-shaped, 32 characters or more, or 16 or more with a digit, and an array or object under such a name is redacted whole when any element inside is secret-shaped or the span is truncated. Bare key keeps its 40-character floor. Two reviewer rounds: a 300000-case differential fuzz against main including container values found no case where this branch leaks something main redacted, every difference is a generic key with a non-secret value. Round one caught two real gaps in my first cut, containers under a generic key and missing strong words, both closed with tests. Regression test uses the real Sonar quality gate and issues response shapes. CHANGELOG Fixed bullet. 🤖 Generated with Claude Code