tonybaloney/pycharm-security

Github Action Ignores noinspection

tclancy opened this issue · 5 comments

Describe the bug

Unless I am using the wrong name (I tried HardcodedPasswordCheck and PW101), the # noinspection flag seems to be ignored in the Github action version of the check

To Reproduce
Code or Steps to reproduce the behavior:

  1. Hard-code a password in a test file (or any file if you're feeling dangerous)
  2. Add # noinspection HardcodedPasswordCheck on the preceding line.
  3. Push to Github with action turned on
  4. Still see flagged behavior

Expected behavior
The line should not be flagged.

Screenshots
Screen Shot 2020-03-04 at 3 17 32 PM

Not related, but since I am here: it's also flagging up assert usage in our BDD tests (which don't have test in their name so they don't hit this test); is there a way to ignore an issue file-wide?

thanks for raising this. I'll investigate.

You can add a file-level suppression in the Code Inspection review panel in PyCharm

I'm stuck right now (would like to add a profile to handle the BDD tests more cleanly) but my PyCharm is too recent and won't let me add the plugin. I see there's an open issue for that so I will watch that for a fix. Thanks for the cool plugin.

I'm stuck right now (would like to add a profile to handle the BDD tests more cleanly) but my PyCharm is too recent and won't let me add the plugin. I see there's an open issue for that so I will watch that for a fix. Thanks for the cool plugin.

Try this version (I assume you're using 2020.1 EAP?) https://plugins.jetbrains.com/plugin/13609-python-security/update/79746

2019.2.6 / I tried that yesterday and it wouldn't let me use it.

It looks like these do work now.