codeql-action icon indicating copy to clipboard operation
codeql-action copied to clipboard

Adding Ignored files should close previous alerts

Open michael-hawker opened this issue 2 years ago • 1 comments

I'm setting up a new CodeQL instance, looking at the alerts for the PR branch, I saw I had thousands:

image

Hundreds appeared to be in generated XAML files from the platform build process (probably something they should look at later, but unrelated to our codebase directly):

image

So, I added in the config file to ignore these files:

image

However, all the alerts for these files still remained open on the next pass of the CI, since these files are listed as ignored, it'd be nice to have them all automatically deleted/closed.

It makes it really hard to find the actual things I should be looking for. And it seems like I can only close 25 items at a time, page by page in the filtered view.

Probably going to have to close my PR and open a new PR just to get a clean list...

michael-hawker avatar Aug 28 '23 17:08 michael-hawker

Unfortunately, filtering files with paths and paths-ignore has no effect for compiled languages. For compiled languages such as C# CodeQL will analyze all files as "seen" by a compiler during the build.

The https://github.com/advanced-security/filter-sarif Action can be used to filter out any unwanted results based on file path and query (or both).

aibaars avatar Sep 18 '23 09:09 aibaars