Skip to content
Back to skills

Semgrep

ASecurity

Run static analysis (SAST) over the codebase with semgrep to find real bug and security patterns — injection, auth gaps, secret handling, dangerous APIs. Use before a security-sensitive PR, on auth/payment/data-handling code, or when the user asks for a deterministic security scan.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 4, 2026
ai-agentsjavascripttypescriptgojavabashnodenodejsgitapisecurity

Works with

  • api

Security analysis

A100/100

Scanned September 4, 2026

npx -y skills add LFTPadilla/agent-dev-kit --skill semgrep --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Semgrep?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Semgrep
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lftpadilla-semgrep/badge)](https://www.skillsdirectory.com/skills/lftpadilla-semgrep)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: semgrep
description: Run static analysis (SAST) over the codebase with semgrep to find real bug and security patterns — injection, auth gaps, secret handling, dangerous APIs. Use before a security-sensitive PR, on auth/payment/data-handling code, or when the user asks for a deterministic security scan.
---

# semgrep — static analysis / SAST

Pattern-based static analysis. Deterministic, fast, rule-driven — the
complement to an LLM security review: semgrep never misses a known pattern,
the LLM reasons about novel ones. Run both.

## Run

```bash
semgrep --config auto                 # auto-select rules for the detected languages
semgrep --config p/typescript         # registry rule pack (TS)
semgrep --config p/javascript
semgrep --config p/owasp-top-ten      # OWASP Top 10 patterns
semgrep --config p/secrets            # hardcoded secrets
semgrep --config p/nodejs             # Node-specific
semgrep --config auto --json          # machine-readable for processing
```

Scope to a diff for speed:
```bash
semgrep --config auto $(git diff --name-only --diff-filter=ACM main)
```

Install: `pipx install semgrep` (or `brew install semgrep`). No global install? `pipx run semgrep ...`.

## How to use the output

1. Pick rule packs by the code under review — `p/owasp-top-ten` + `p/secrets`
   for auth/payment surfaces; `p/typescript` for general correctness.
2. Triage findings by severity. Confirm each against the real code — semgrep
   patterns can false-positive on guarded paths.
3. For a PR, scan only the diff (above) to keep it fast.
4. Report: rule id, file:line, why it matters, fix. Don't auto-apply on
   security code without confirmation.

## Gotchas

- `--config auto` phones the registry; for offline/CI pin explicit `p/...` packs.
- Custom rules go in `.semgrep.yml` — but prefer registry packs first (YAGNI).
- Pairs with the `security-review` skill: semgrep catches known patterns, the
  review reasons about the rest.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.