fix(932340): Add more UNIX FP commands#4454
Conversation
for more information, see https://pre-commit.ci
|
📊 Quantitative test results for language: |
EsadCetiner
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
I think this PR is excluding too many commands, based on your report I think it would be better if we required an evasion prefix such as ; or & before blocking. Can you update 932340.ra to use the unix-shell-evasion-prefix instead of unix-shell-evasion-prefix-start-of-string?
You'll need to update the tests as well since they test for blocking with no prefix.
This reverts commit 4883ad3.
for more information, see https://pre-commit.ci
|
Thanks, @EsadCetiner. I made those updates. |
EsadCetiner
left a comment
There was a problem hiding this comment.
Can you add some negative tests based on the false positives you've experienced? Also please update the Author section at the top of the test file.
|
@EsadCetiner, I added a test. I tried to follow the docker instructions on https://coreruleset.org/docs/6-development/6-5-testing-the-rule-set/ to run it locally, but I received the error below. |
|
@ssigwart Sorry, I haven't used the Docker image before so I can't help you. I have a personal setup script for bare metal installations if you are interested: https://github.com/EsadCetiner/crs-dev-environment-setup it's meant to be ran on a dev environment only. Nevertheless, I don't think you'll need to run the tests locally since your not writing very complex tests. |
ssigwart
left a comment
There was a problem hiding this comment.
Sorry, I haven't used the Docker image before so I can't help you. I have a personal setup script for bare metal installations if you are interested: https://github.com/EsadCetiner/crs-dev-environment-setup it's meant to be ran on a dev environment only.
Nevertheless, I don't think you'll need to run the tests locally since your not writing very complex tests.
No problem. I'll just let GitHub Actions run it.
I made the updates. Also, I updated the test authors file because I forgot to do that last round.
EsadCetiner
left a comment
There was a problem hiding this comment.
Looks good, thanks for the contribution!
Proposed changes
Add move UNIX commands that are likely to cause FPs. Basically any two letter one can cause FPs for fields to enter your initials.
Feel free to close this if you'd rather people add exceptions instead.
Fixes #4453
PR Checklist
commentfield to write the expected behaviorFurther comments
I can work on tests if you want, but didn't want to do that if it's not the right direction.
For the reviewer
ctl:requestBodyAccess=Offwere used in the rule