# Semgrep Scan

> Run Semgrep SAST analysis for security and code quality

- Skill: `majiayu000/semgrep-scan` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add majiayu000/semgrep-scan`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/semgrep-scan/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/semgrep-scan

---


# Semgrep SAST Scan

Run static application security testing with Semgrep.

## What To Do

1. **Install**: `pip install semgrep` or `brew install semgrep`

2. **Run scan**:
   ```bash
   semgrep scan --config=auto --json --output=semgrep-report.json
   ```

3. **Custom rules for .NET**:
   ```bash
   semgrep scan --config=p/csharp --config=p/owasp-top-ten --config=p/jwt
   ```

4. **CI Integration**:
   ```yaml
   - script: semgrep scan --config=auto --error --json -o semgrep.json
     displayName: "SAST Scan"
   ```

5. **Interpret results**: Fix HIGH/ERROR severity first. Use `--severity=error` to filter.

## Arguments
- `--config=<ruleset>`: Semgrep config (auto, p/csharp, p/owasp-top-ten)
- `--severity=<level>`: Filter by severity (info, warning, error)
