Skip to content
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

Rule Suppression Format #34

Open
ejohn20 opened this issue Sep 11, 2017 · 7 comments
Open

Rule Suppression Format #34

ejohn20 opened this issue Sep 11, 2017 · 7 comments

Comments

@ejohn20
Copy link
Member

ejohn20 commented Sep 11, 2017

@joshbw proposed a standard format for suppressing false positives using commands on a line of code in our extension tools.

Fields proposed:

  • ToolName
  • Identifier (SEC###, DS###)
  • Comment
  • Expiration Date
  • Hash code
  • Author

What other fields would be helpful?

Format could be something simple:

  • //ToolName:Identifier:HashCode:Author:Comment:EndDate

Thoughts on the format?

@skosten
Copy link

skosten commented Sep 12, 2017 via email

@ejohn20
Copy link
Member Author

ejohn20 commented Sep 18, 2017

Agree - on our side we can easily add a configuration option to ignore suppression if desired.

Also, I think we should track who is suppressing what. I added an Author tag above, which could be the login id of the person that triggers the suppression.

@felickz
Copy link

felickz commented Nov 2, 2017

Are you looking to address an issue that the native suppression mechanisms do not support? (compiler pragma directives and Suppress Message attributes)

The existing GlobalSuppressions file seems to be the best place to store false positives as we can then put a watch on the suppression file and audit any changes made there.

Style Analyzers "CodeAnalysisSuppressionMustHaveJustification" rule seems to help enforce some level of documentation: SA1404

@ejohn20
Copy link
Member Author

ejohn20 commented Dec 3, 2018

@felickz this is mainly for the non-code file analyzers, which the built in suppression does not support. The standard code warnings work just fine using the built in suppression.

@ejohn20
Copy link
Member Author

ejohn20 commented Dec 3, 2018

Next release will include a .pumafile that allows suppression of findings (code and non-code).

@brettpostin
Copy link

I've just come across this issue as I was looking for a way to prevent developers easily suppressing rules without oversight. This sounds like a timely addition!

Are you able to give any timescales for the next release?

@ejohn20
Copy link
Member Author

ejohn20 commented Jan 3, 2019

@brettpostin We just released this feature in our professional edition last week. We will iron the documentation out for this over the next few weeks. It is something that will be contributed back to the open source edition in time, but likely not until Q2 2019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants