semgrep-vscode icon indicating copy to clipboard operation
semgrep-vscode copied to clipboard

`nosemgrep` comments not honored by extension in python

Open forana opened this issue 6 months ago • 5 comments

Anonymized python:

class MyClass (
    ABadClass,  # nosemgrep: myrule
    AnotherClass,
    ADifferentClass,
): ...

Anonymized rule:

  - id: myrule
    languages:
      - python
    severity: ERROR
    message: Do not use ABadClass
    pattern-regex: .*ABadClass.*

Via CLI, the nosemgrep line correctly ignores the error. Via the plugin, the error is not ignored.

forana avatar Jul 30 '24 14:07 forana