Repository navigation
fix(ASV-4361): close five log-redaction and dispatch findings - #64
Merged
Merged
Conversation
Address the httpigeon code-audit and bug-bounty epic: - ASV-4364: replace filtered Hash/Array values wholesale so partial redaction no longer leaks fragments of nested secrets. - ASV-4362: recurse unfiltered hash values through the shared dispatcher so content/regex filters catch secrets in JSON bodies and headers, not just top-level strings. - ASV-4092: substitute with gsub's block form so replacements stay literal instead of expanding backreferences (\1, \&) that re-emit the secret. - ASV-4090: skip nil captures from zero-width groups instead of concatenating nil and raising TypeError, which dropped log entries. - ASV-4091: dispatch the validated symbol, not the caller's object, so a to_sym/to_str divergence can no longer bypass the method allow-list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Line coverage sat at 94.47% on main, below the 95% gate; the release-PR job skips unit-test, so main drifted under unnoticed. Add a spec for the middleware's rescue path, which logs a request that raises before re-raising — the audit-log path ASV-4090 protects. Coverage now 95.16%. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ShivamPatel17
approved these changes
Jul 17, 2026
drush211
approved these changes
Jul 17, 2026
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.
Summary
Fixes all five findings in the ASV-4361 code-audit and bug-bounty epic. Four touch
LogRedactor; one touchesRequestdispatch.Hash/Arrayvalue withredactor_stringinstead of serializing and truncating it, which leaked the leading and trailing bytes of nested secrets.redactdispatcher so content/regex filters run against string values inside JSON bodies and headers, not only top-level strings.gsub's block form so a filter's replacement stays literal. The string form expanded backreferences (\1,\&), re-emitting the secret in plaintext.nilcaptures from zero-width groups instead of concatenatingniland raisingTypeError, which silently dropped audit-log entries in production.sym_methodrather than the caller's raw object.sendresolves a non-Symbol argument viato_str, so an object with divergentto_sym/to_strbypassed the HTTP-method allow-list.Testing
to_sym/to_strdispatch guard.bundle exec rspec— 122 examples, 0 failures.bundle exec rubocop— no offenses.Ran
/simplify,/code-review, and/security-reviewover the diff./simplifyand/code-reviewsurfaced a dispatcher-duplication cleanup and redundant regex recompilation, both applied./security-reviewfound no new vulnerabilities.🤖 Generated with Claude Code