CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

testland/semgrep-rules

Use for any question or task about Semgrep, writing a rule that flags a code pattern, or a lighter static analysis (SAST) gate than CodeQL that needs no code database: Registry rulesets and custom YAML rules, semgrep ci with diff-aware baselines, nosemgrep suppressions, path filters, severity filters and JSON, SARIF, GitLab or JUnit output.

Quality

94%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

cli-reference.mdreferences/

Semgrep CLI reference

Full flag, output-format, and exit-code detail for semgrep-rules. The SKILL.md spine keeps the common commands; this file holds the exhaustive tables. All entries per semgrep.dev/docs/cli-reference.

Output formats

FlagPurpose
--jsonSemgrep JSON format (for multi-scanner triage)
--sarifSARIF format (GitHub Code Scanning upload)
--gitlab-sastGitLab SAST format (GitLab Security Dashboard)
--junit-xmlJUnit XML (test reporters)
--textDefault human-readable
--output VALWrite to file or URL

Performance flags

semgrep scan -j 8 --timeout 10 --max-target-bytes 5000000
  • -j VALUE - Parallelism degree (default: 3)
  • --timeout=DOUBLE - Per-rule per-file timeout in seconds (default: 5.0)
  • --max-target-bytes=VALUE - Skip files exceeding size (default: 1000000)

Exit codes

CodeMeaning
0Success, no issues
1Issues detected (with --error flag)
2Fatal error
3Invalid syntax in scanned language
4Invalid pattern in rule
5Invalid YAML configuration
7Invalid rule in configuration
8Unsupported language specified
13Invalid API key

The spine gates on 0 (pass) / 1 (findings) / 2 (fatal); the rest signal config or rule authoring errors.

SKILL.md

tile.json