Files
ECC/tests/scripts
Gaurav DubeyandClaude Opus 5.5 4d3e66e0ab fix(hooks): redact joined-fragment secret values and make JWT scan linear
- Replace the secret=/api_key= value regex with a single-pass, quote-aware
  scanner so the whole Bash word is redacted when quoted and unquoted
  fragments are joined (e.g. --secret='prefix-'suffix), while a value inside
  an enclosing quoted string stops at that string's closing quote.
- Searching for the keyword itself (grep -n "secret =" file,
  rg 'api_key:' dir) no longer redacts the rest of the command.
- Use a lookbehind instead of \b before the JWT header so long dot-free
  ey-ey-... runs are scanned in linear time instead of quadratic.
- Add regression tests for joined fragments, keyword searches, and the
  ey- performance case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 03:41:05 +00:00
..