-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Added MissingSecurityMetadata query #8437
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
Added MissingSecurityMetadata query #8437
Conversation
Should we maybe exclude queries in the experimental directory? |
Good point, thanks! Also, can we prevent the |
Hm, yes. That is an interesting issue 😂. I don't know if that's possible. |
40625b9
to
03f3535
Compare
Maybe also exclude the
Not currently possible. |
Done, thanks!
👍 Just added the blank |
Yes, it's specifically the Currently you check that all queries that has a |
There are many very old C++ queries that have no security severity because they're not part of any modern suite. To remove those results, it would be helpful to exclude queries that have no It would also remove the FPs from results like ExternalAPIsUsedWithUntrustedData. |
I think that's less of a problem for us since AFAIK the requirement is "all security queries should have a
Makes sense! Done in 82b2fd2. |
You could change the alert message depending on what is flagged. from TopLevel t, string msg
where
missingSeverity(t) and msg = "This query file is missing a `@security-severity` tag."
or
missingSecurityTag(t) and msg = "This query file is missing a `@tag secrity`".
select t, msg |
Yep, that's less complicated than what I initially imagined :-P Done in fd4c9fd, I also renamed the query so that it adjusts better to what it's doing now. |
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.
LGTM!
Adds a QL for QL query that raises a warning whenever a
.ql
file is tagged as@tag security
but it doesn't have a@security-severity
tag, or vice versa.