How rule-based SAST works
Opengrep is an open-source, static analysis tool that finds bugs and vulnerabilities in source code using pattern matching. Opengrep parses the source code, applies pattern matching based on rules, and reports matches based on the rule specifications. Opengrep rules are in the YAML format. When you run a SAST scan, Endor Labs downloads Opengrep and works seamlessly. If you wish, you can use Semgrep instead of Opengrep with Endor Labs. Endor Labs includes a set of curated rules. You can create your own rules or import rules with the rule designer.Enable the default SAST finding policies to generate findings from SAST scans.
Endor Labs does not scan the files included in the
.gitignore files during SAST scan. You can also use the nosemgrep annotation in the code to skip SAST scan. Refer to the Semgrep Documentation for more information.SAST severity matrix
Endor Labs determines the severity of findings by combining two factors from the SAST rule: impact and confidence. Impact measures the potential consequences of exploiting a security issue. Confidence represents the certainty that a detected pattern is a genuine security issue rather than a false positive. If either factor cannot be determined, the severity defaults to low. The following matrix shows how Endor Labs resolves severity by combining impact and confidence.| High Impact | Medium | High | Critical |
|---|---|---|---|
| Medium Impact | Low | Medium | High |
| Low Impact | Low | Low | Medium |
| Low Confidence | Medium Confidence | High Confidence |