-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: test requires keyword - v1 #1505
Conversation
Can you add a test with the example rules I shared in the previous PR? |
547296a
to
f598d65
Compare
Done. |
f598d65
to
547edd4
Compare
547edd4
to
3f3ef02
Compare
|
||
# These rules have something invalid about them, but do follow the general rule | ||
# structure, so should be eliminated by the requires statement. | ||
alert vxlan any any -> any any (requires: version >= 10; sid:1;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put version 42 rather than 10 which is within our lifetimes I hope
alert http any any -> any any (msg:"TEST Suricata >= 7 and < 8"; content:"uid=0"; requires: version >= 7 < 8; sid:7; rev:1;) | ||
|
||
# Rule for Suricata >= 7.0.3 but less than 8... Or >= 8.0.1 | ||
alert http any any -> any any (content:"uid=0"; requires: version >= 7.0.3 < 8 | >= 8.0.1; sid:9; rev:1;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow we allow complex "or" !
alert vxlan any any -> any any (requires: version >= 10; sid:1;) | ||
alert udp any any -> any any (vxlan_vni:10; requires: version >= 10; sid:2;) | ||
alert http any any => any any (requires: version >= 10; sid:3;) | ||
alert tcp any any -> any any (frame:smtp.not_supported; requires: version >= 10; sid:4;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we also test requires: version >= 10, superpower: notyet
? (superpower being an unknown key yet for the requires
keyword
Merged in #1558, thanks! |
Also includes readme update for files to exists as a requirement.