Skip to main content

How to exclude a Semgrep Supply Chain rule from a scan

To troubleshoot a problematic rule or to remove a rule that's too noisy, you can exclude a specific rule from being run during a Semgrep Supply Chain scan using the --exclude-rule flag:

semgrep ci --exclude-rule <rule_ID>

The --exclude-rule flag requires the rule ID as a parameter. To retrieve this value:

  1. Sign in to Semgrep AppSec Platform, and go to Supply Chain.
  2. Select the finding whose details you want to view:
    • If the default Group by Rule is enabled, click the Details icon on the card of the finding.
    • If the No grouping view is enabled, click the header hyperlink on the card of the finding.
  3. Scroll to the Pattern panel, and click Rule to change the view. The rule id is listed in row 1 and begins with the ssc prefix.

Not finding what you need in this doc? Ask questions in our Community Slack group, or see Support for other ways to get help.