Integrate libinjection: implement @detectSQLi and @detectXSS - #7
Merged
Merged
Conversation
The two libinjection operators parsed but refused to compile, so any CRS rule using them was unenforceable. Wire in the libinjectionrs port (now differential-tested to zero divergence from the C library over its corpus) and implement both operators: - @detectSQLi classifies with detect_sqli and, when capture is requested, places the fingerprint in the first capture, as ModSecurity does. - @detectXSS classifies with detect_xss. The dependency is a git pin on barbacane-dev/libinjectionrs so downstream git consumers of parapet resolve it. Conformance: the operators compile now, so the two known refusals are gone, the curated `sqli tautology` case is caught by rule 942100 rather than attributed as a gap, and the operator-refusal gate's known set is empty (any future refusal is flagged).
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.
The
@detectSQLiand@detectXSSoperators parsed but refused to compile,so every CRS rule using them (rule 942100 and friends) was unenforceable.
This wires in the libinjectionrs port, now differential-tested to zero
divergence from the C library over its ~163k-input corpus, and implements
both operators.
Changes
@detectSQLiclassifies withlibinjectionrs::detect_sqli; when captureis requested it places the fingerprint in the first capture, as
ModSecurity does.
@detectXSSclassifies withlibinjectionrs::detect_xss.barbacane-dev/libinjectionrs(rev with all sixchar-semantics fixes), so downstream git consumers of parapet resolve it.
Conformance
Both operators compile now, so:
sqli tautologycase is caught by rule 942100 rather thanattributed as a gap.
CI re-measures the FTW pass rate with the operators live; the README's
figure will be refreshed from that.