Harden/xmlsecuritydsig static analysis - #287
Merged
Merged
Conversation
Close SSRF via IPv4-mapped IPv6, fail closed on unknown transforms, tighten same-document Reference URIs, and fix enveloped-signature / Object C14N handling without always detaching Signature from the caller DOM.
Preserve the caller DOM and allow later references to resolve after an enveloped transform.
Narrow XPath results to DOMElement before attribute access, correct related PHPDocs, and guard failed queries so static analysis and runtime failure paths stay consistent.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
tvdijen
reviewed
Aug 8, 2026
| const LETTERS = '\w'; | ||
| const EXTENDED_ALPHANUMERIC = '-\w\d\s_:\.'; | ||
|
|
||
| /* Attribute names only — no whitespace or XPath operators. */ |
Contributor
There was a problem hiding this comment.
What are you trying to filter here? XML-attributes? With optional prefix?
Reject a null/non-key argument before verification so KeyInfo cannot be relied on implicitly and the safe-by-default API contract stays intact.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #287 +/- ##
============================================
+ Coverage 69.97% 71.25% +1.27%
- Complexity 596 660 +64
============================================
Files 4 4
Lines 1542 1687 +145
============================================
+ Hits 1079 1202 +123
- Misses 463 485 +22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Harden/xmlsecuritydsig static analysis