fix: FPs related to maxDB information leakage#4382
Conversation
|
📊 Quantitative test results for language: |
There was a problem hiding this comment.
Pull request overview
This PR fixes false positives in the MaxDB SQL information leakage detection rule (951210) by making the regex pattern more specific and removing an unverified pattern component.
Changes:
- Tightened the regex pattern from
(?i:SQL error.*POS[0-9]+.*|Warning.*maxdb.*)to(?i)Warning.{1,10}maxdb[\(\)_a-z:]{1,26}:to reduce false positives - Removed the
SQL error.*POS[0-9]+.*alternative pattern that could not be verified with actual MaxDB error messages - Added a second positive test case covering the
maxdb::query()error format
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| rules/RESPONSE-951-DATA-LEAKAGES-SQL.conf | Updated regex to be more specific and removed unverified pattern alternative |
| tests/regression/tests/RESPONSE-951-DATA-LEAKAGES-SQL/951210.yaml | Added test case for maxdb::query() error format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I'm questioning even having this database supported. Looks like the conenctor for PHP (PECL) has been unmaintained since 2007: https://pecl.php.net/package/maxdb. Maybe we just drop this? |
|
ping @azurit |
|
@fzipi Well, current regex supports only PHP error messages, so.. But I'm not sure if we should remove support for some software without releasing a major version. I would merge this now and remove whole rule in the next major release. |
Proposed changes
POS(8)but brackets were not escaped and were later removed probably because we considered them as excessive group in regex (regex changed fromPOS([0-9]+)toPOS[0-9]+).These are the only error messages i was able to find on the net:
PR Checklist
commentfield to write the expected behaviorFurther comments
For the reviewer
ctl:requestBodyAccess=Offwere used in the rule