---
name: semgrep
description: "Use when adopting Semgrep to assess this standard: Track structural findings and suppressions"
---

# Apply Semgrep

Scan with a versioned rule set and retain the rule ID, source location and suppression status. Review any increase in ignored findings alongside active findings.

## Procedure

1. Inspect the repository configuration and identify the files or targets covered by Semgrep.
2. Use Semgrep in this repository to meet this standard: Track structural findings and suppressions. Scan with a versioned rule set and retain the rule ID, source location and suppression status. Review any increase in ignored findings alongside active findings. Inspect the repository configuration, record the baseline and exact reproduction steps, then add the smallest repeatable check that detects a regression.
3. Record the tool version, configuration, scope and findings. Explain any checks that could not run.
4. Use the same invocation after changes and compare the evidence against the baseline.

Refer to [the upstream documentation](https://semgrep.dev/docs/) for configuration and prerequisites.

## Optional Seikika installation

Package: [semgrep (Seikika kit)](https://github.com/seikika/seikika/tree/89eb0a2fcd2ffe67151df43f2a062ebc8a1e497c/packages/semgrep).

Add github:seikika/seikika/packages/semgrep@89eb0a2fcd2ffe67151df43f2a062ebc8a1e497c to the include list in .seikika/seikika.yaml. Set the config parameter to a reviewed repository rule file or directory. Run seikika install .seikika from the checkout root.
