Suppressing results when running with the CodeQL CLI #10940
NateD-MSFT
started this conversation in
Ideas
Replies: 1 comment 7 replies
-
Hi @NateD-MSFT , the CodeQL CLI does support suppression annotations. It works by running a query with Here is an example of an alert suppression query: codeql/go/ql/src/AlertSuppression.ql Line 4 in e566357 |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'm a dev over in the Windows group at Microsoft. We've been building up a repo of CodeQL queries related to or useful for driver development (https://github.com/microsoft/Windows-Driver-Developer-Supplemental-Tools) and have been evangelizing the tool to partners.
One aspect we've been running into issues with is that, as is the case with any static analysis tool, CodeQL has queries that may provide useful results but may also cause false positives. With our other tools, it's possible for driver developers to use pragmas or comments to suppress specific warnings in their code when they know it's a false positive.
I've done some research, but to the best of my knowledge there is no such mechanism available for CodeQL at the CLI level. Is this correct? If so, I'd love to know the general thoughts on suppression going forward and if there is any plan to add this feature at the CLI/code level. (I understand LGTM previously had suppression comments that worked for LGTM, but LGTM is going away - and regardless, these comments wouldn't help devs running the CLI.)
Beta Was this translation helpful? Give feedback.
All reactions