Skip to content

security

Semgrep rules for unsafe code, from the FastAPI configuration and your own rule files. Guide: Security.

Always.

Runs the Semgrep rules of the FastAPI configuration and the files in security.semgrep_rules over the files of the run.

Runs at the push stage, on macOS and Linux.

An injection or a logged secret reads like ordinary code, and a pattern rule finds it before a reviewer has to.

Change the code the way the message says.

A rule in security.semgrep_rules with the pattern eval(...) reports its ID and location at eval(userInput). Parse the input instead, and allow only known operations.

gspot ignore security/semgrep --paths "<path>" --reason "<why>"
gspot ignore security/semgrep --rule <rule> --reason "<why>"

A suppression comment is refused; use gspot ignore.

Setting What it sets
security.semgrep_rules Rule files or folders of the repository that Semgrep runs, along with the rules of the FastAPI configuration.
Rule file Installed when
.gspot/rules/SECURITY.md Always
Tool Version
semgrep 1.181.0