Skip to content

moexmen/gas-report-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gas-report-filter

This program is specifically for filtering issues in the JUnit XML report generated by GoASTScanner. The scanner only allows for whitelisting of entire rules and it is not recommended to whitelist an entire rule just for a few false positives.

Therefore, this program will allow for more granular whitelisting by filtering out the issues that are false positives.

How to use

Installing

go get -u github.com/moexmen/gas-report-filter

Usage

This program will take in the JUnit XML report from stdin and output the filtered results to stdout. An example is given here:

gas -fmt=junit-xml ./... | gas-report-filter -whitelist whitelist.json > /log/report.xml

A whitelist file has to be given, the format is given below.

Whitelisting format

{
  "Issues": [
    {
      "details": "<<details>>",
      "file": "<<filename>>",
      "code": "<<offending code>>",
      "reason": "This is a false positive."
    }
  ]
}

For code, copy whatever that comes after > in the Jenkins test result. You'll also need to make sure that these characters: <, >, &, ' and " are escaped.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages