fix(932180): reduce substring false positives#4338
Conversation
|
📊 Quantitative test results for language: |
|
I'm not a fan of hardcoding these values. I've thought about using the delimiter technique with I also don't think the delimiter technique described for Let's ask for more ideas. |
|
Actually, I tried to use a macro with |
Agreed, but the only other solution I see is moving to a regex.
aah I see what happened, you originally mentioned using After digging a bit deeper, I can see this won't work as well because there are some entries such as: which is intentionally meant to match permutations, adding a word boundary for all entries will result in false negatives. I'll add some tests for this case as the tests are a bit bare for this rule. |
for more information, see https://pre-commit.ci
Co-authored-by: Max Leske <250711+theseion@users.noreply.github.com>
Proposed changes
This PR adds a chained rule to rule 932180 to reduce false positive with substring matches. It checks for entries in
restricted-upload.datathat commonly result in false positives and in effect enforces a word boundary for those keywords if they exist within the parameter.closes #4320
PR Checklist
commentfield to write the expected behaviorFurther comments
N/A
For the reviewer
ctl:requestBodyAccess=Offwere used in the rule