Przejdź do treści
Biblioteka skilli
Bezpieczeństwo · Przegląd i audyt

semgrep-analyze

/semgrep-analyze

Uruchamia Semgrep na wskazanych plikach i zwraca ustrukturyzowane wyniki analizy statycznej jako bramkę przed przeglądem.

Licencja
MIT
Ostatnia zmiana repozytorium
14.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 14.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Uruchamia Semgrep na wskazanych plikach i zwraca ustrukturyzowane wyniki analizy statycznej jako bramkę przed przeglądem.

Wyzwalacze z opisu

run semgrepscan for vulnerabilitiesstatic analysis on this code

Argumenty

/semgrep-analyze [path] [--rules <ruleset>]
Oryginalny opis (EN)

Run Semgrep static analysis on target files and return structured findings. Use this when the user wants static analysis, SAST scanning, or security scanning — phrases like "run semgrep", "scan for vulnerabilities", "static analysis on this code", or as a pre-review gate when security findings are needed before AI agents run.

Jak działa

  1. Constraints
  2. Parse Arguments
  3. Steps
  4. Common Rulesets
Sekcje z nagłówków SKILL.md, w oryginale · 128 linii, 486 słów
Podgląd SKILL.md
---
name: semgrep-analyze
description: >-
  Run Semgrep static analysis on target files and return structured
  findings. Use this when the user wants static analysis, SAST scanning, or
  security scanning — phrases like "run semgrep", "scan for
  vulnerabilities", "static analysis on this code", or as a pre-review gate
  when security findings are needed before AI agents run.
argument-hint: "[path] [--rules <ruleset>]"
user-invocable: true
allowed-tools: Read, Grep, Glob, Bash(semgrep *)
---

# Semgrep Analyze

Role: worker. This skill runs Semgrep and reports findings — it does
not fix code.

You have been invoked with the `/semgrep-analyze` skill. Run a Semgrep
scan and return structured findings.

## Constraints

1. **Do not modify code.** Report findings only.
2. **Return structured JSON.** Output must match the output format below.
3. **Be concise.** No preambles, narration, or filler text.

## Parse Arguments

Arguments: $ARGUMENTS

- `path`: Directory or file to scan (default: current working
  directory)
- `--rules <ruleset>`: Semgrep ruleset (default: `auto`)
- `--programmatic`: Return structured JSON only, with no prose or
  status messages. Designed for callers like the static analysis
  pre-pass in `/code-review`. When set, skip installation guidance
  on failure — just return the skip status JSON.

Examples:

```text
/semgrep-analyze
/semgrep-analyze src/
/semgrep-analyze --rules p/security-audit
/semgrep-analyze src/utils --rules p/javascript
/semgrep-analyze --programmatic src/
```

## Steps

### 1. Check Semgrep installation

```bash
semgrep --version
```

If not installed, output:

```json
{"status": "skip", "issues": [], "summary": "semgrep not installed — install via pip install semgrep, pipx install semgrep, or brew install semgrep"}
```

If `--programmatic` is set, return the JSON above and stop — do not
add installation guidance or prose.

Otherwise (human-facing run), also tell the user: **Run `/project-init` to set
up this repo's tooling as the one-stop entry point — it installs semgrep as a
capability tool (see its `${CLAUDE_PLUGIN_ROOT}/skills/project-init/references/capability-tools.md`) — or install semgrep
directly — `pip install semgrep` (also `pipx install semgrep` or `brew install
semgrep`).** (The direct install command is the fallback.)

Stop.

### 2. Run Semgrep scan

```bash
semgrep scan --config <ruleset> --quiet --json <path>
```

Default ruleset is `auto`. Default path is `.`.

### 3. Parse results

Map each Semgrep finding to an issue:

| Semgrep field        | Output field        |
| -------------------- | ------------------- |
| `check_id`           | `ruleId`            |
| `extra.severity`     | `severity`          |
| `path`               | `file`              |
| `start.line`         | `line`              |
| `extra.message`      | `message`           |
| `extra.metadata.cwe` | `cwe` (if present)  |

Severity mapping:

| Semgrep severity | Output severity |
| ---------------- | --------------- |
| ERROR            | error           |
| WARNING          | warning         |
| INFO             | suggestion      |

### 4. Output JSON

```json
{
  "status": "pass|warn|fail",
  "issues": [
    {
      "severity": "error|warning|suggestion",
      "file": "<path>",
      "line": 0,
      "ruleId": "<check_id>",
      "message": "<description>",
      "cwe": "<CWE-ID>",
      "suggestedFix": "<fix>"
    }
  ],
  "summary": "<N findings: N errors, N warnings, N suggestions>"
}
```

Status: `fail` if any errors, `warn` if warnings but no errors,
`pass` if clean.

## Common Rulesets

| Ruleset            | Description                                 |
| ------------------ | ------------------------------------------- |
| `auto`             | Auto-detect language, use recommended rules |
| `p/javascript`     | JavaScript-specific rules                   |
| `p/typescript`     | TypeScript-specific rules                   |
| `p/react`          | React-specific rules                        |
| `p/nodejs`         | Node.js security rules                      |
| `p/security-audit` | General security audit                      |
| `p/owasp-top-ten`  | OWASP Top 10 vulnerabilities                |
| `p/ci`             | Rules suitable for CI/CD                    |
| `p/default`        | Semgrep default ruleset                     |

Wersje

W bazie nie ma innych skilli o nazwie semgrep-analyze.

Migawka bazy z 13.11.2026 · wersja paczki 1496f174c7bd (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 2 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100semgrep
    Uruchamia analizę statyczną Semgrep w bazie kodu, opcjonalnie z Semgrep Pro do analizy taint między plikami.
  • 100sast-configuration
    Konfiguruje skanowanie SAST w CI/CD: reguły Semgrep, narzędzia takie jak Bandit i ESLint, przegląd znalezisk oraz własne reguły bezpieczeństwa.
  • 95semgrep
    Uruchamia skan Semgrep na kodzie przez równoległe podagenty, w trybie pełnym albo tylko dla wysokiej pewności.
  • 100semgrep-rule-creator
    Tworzy własne reguły Semgrep do wykrywania podatności, błędów i wzorców w kodzie, przy budowie niestandardowej analizy statycznej.
  • 100semgrep-rule-creator
    Tworzy własne reguły Semgrep do wykrywania podatności, błędów i wzorców w kodzie, przy budowie niestandardowej analizy statycznej.
  • 100semgrep-rule-creator
    Tworzy własne reguły Semgrep do wykrywania podatności, błędów i wzorców w kodzie, przy budowie niestandardowej analizy statycznej.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.