К основному содержанию
скилл CX Codex

ghost-scan-code — скилл для Claude Code: SAST-скан кода

Ищет уязвимости в исходниках: SQL-инъекции, XSS, SSRF и другие категории OWASP. Планирует проверки, потом прогоняет их по проекту.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add ghostsecurity/skills --skill ghost-scan-code -a claude-code
npx skills add ghostsecurity/skills --skill scan-code -a claude-code
Открыть на GitHub

Что делает ghost-scan-code

Скилл работает в два этапа. Сначала планировщик решает, какие векторы уязвимостей проверять в каждом проекте репозитория, затем отдельные агенты прогоняют эти проверки по конкретным файлам. Найденное проходит верификацию, так что в отчёте остаются подтверждённые находки, а не сырые срабатывания.

Покрытие делится на приложения и библиотеки. Для приложений это бэкенд, фронтенд и мобильный код: SQL-инъекции, XSS, BOLA, BFLA, SSRF и прочие категории OWASP. Для библиотек — prototype pollution, небезопасная десериализация, ReDoS, path traversal, zip slip.

Глубина задаётся аргументом depth: quick по умолчанию, ещё есть balanced и full. Режим full расходует заметно больше токенов, и скилл сначала спросит подтверждение — это повод не запускать его вслепую на большом монорепозитории. Результаты складываются в $HOME/.ghost/repos/<repo_id>/scans/<short_sha>/code, а перед первым запуском нужен кэш контекста репозитория: если файла repo.md нет, скилл попросит прогнать repo-context. Из инструментов ему доступны Read, Write, Edit, Glob, Grep и Bash.

Какие задачи решает

  • найти SQL-инъекции и XSS в исходниках перед релизом
  • проверить библиотеку на prototype pollution и небезопасную десериализацию
  • прогнать SAST-аудит по бэкенду, фронтенду и мобильному коду сразу
  • отсеять ложные срабатывания сканера через этап верификации
  • разложить находки по файлам и сохранить отчёт между запусками

Примеры запросов агенту

  • просканируй репозиторий на уязвимости, depth=quick
  • проверь только SSRF и path traversal в папке api/
  • сделай полный SAST-скан, depth=full

Как установить ghost-scan-code

1Через Skills CLI (Vercel)

npx skills add ghostsecurity/skills --skill ghost-scan-code -a claude-code
npx skills add ghostsecurity/skills --skill scan-code -a claude-code

2Вручную: положить файлы

~/.claude/skills/scan-code/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/scan-code/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о ghost-scan-code

Как установить ghost-scan-code в Claude?

Через npx skills add ghostsecurity/skills --skill ghost-scan-code -a claude-code. Файл скилла окажется в ~/.claude/skills/scan-code/SKILL.md.

Что делает ghost-scan-code?

Планирует, какие векторы уязвимостей проверять, прогоняет сканы по каждому проекту репозитория и верифицирует находки. На выходе — список подтверждённых проблем в $scan_dir/findings/.

Что нужно для работы скилла?

Кэш контекста репозитория: если файла repo.md нет, скилл сначала попросит прогнать repo-context. Ещё нужен доступ к Bash, потому что шаги запускаются через scripts/loop.sh.

Исходный текст

SKILL.md · Apache-2.0
---
name: "ghost-scan-code"
description: "Ghost Security - SAST code scanner. Finds security vulnerabilities in source code by planning and executing targeted scans for issues like SQL injection, XSS, BOLA, BFLA, SSRF, and other OWASP categories. Supports applications (backend, frontend, mobile) and libraries (prototype pollution, unsafe deserialization, ReDoS, path traversal, zip slip). Use when the user asks for a code security audit, SAST scan, vulnerability scan of source code, or wants to find security flaws in a codebase or library."
allowed-tools: Read, Write, Edit, Glob, Grep, Bash
argument-hint: "[depth=quick]"
license: apache-2.0
metadata:
  version: 1.1.1
---

# Find Issues

You find security issues in a repository. This skill plans which vulnerability vectors to scan, then executes those scans against each project.

## Inputs

- **depth**: `quick` (default), `balanced`, or `full` — override via `$ARGUMENTS`

$ARGUMENTS

> **Note:** Arguments passed can be used to customize the scan workflow if provided. For example, if the user specifies a specific set of vectors, count of vectors, specific candidate files, areas to focus on, count of candidate files, etc., ensure the relevant details are passed to the relevant steps in the skill.

## Supporting files

- Loop script: [scripts/loop.sh](scripts/loop.sh)
- Scan criteria: [criteria/index.yaml](criteria/index.yaml)

---

## Step 1: Setup

Compute the repo-specific output directory:
```bash
repo_name=$(basename "$(pwd)") && remote_url=$(git remote get-url origin 2>/dev/null || pwd) && short_hash=$(printf '%s' "$remote_url" | git hash-object --stdin | cut -c1-8) && repo_id="${repo_name}-${short_hash}" && short_sha=$(git rev-parse --short HEAD 2>/dev/null || date +%Y%m%d) && ghost_repo_dir="$HOME/.ghost/repos/${repo_id}" && scan_dir="${ghost_repo_dir}/scans/${short_sha}/code" && cache_dir="${ghost_repo_dir}/cache" && mkdir -p "$scan_dir" && echo "scan_dir=$scan_dir cache_dir=$cache_dir"
```

1. Read `$cache_dir/repo.md` — if missing, run the repo-context skill first and then continue.
2. Read [criteria/index.yaml](criteria/index.yaml) to get the valid agent→vector mappings per project type
3. Set `depth` to `quick` if not provided
4. If `depth` is `full`, warn the user that a full scan uses significantly more tokens and ask them to confirm before proceeding. If they decline, fall back to `balanced`.

---

## Step 2: Plan Scans

If `$scan_dir/plan.md` already exists, skip to the next step.

Otherwise, run the planner using [scripts/loop.sh](scripts/loop.sh):

```bash
bash <path-to-loop.sh> $scan_dir planner.md "- depth: <depth>
- arguments: <relevant argument overrides if any, otherwise omit>" 1 $cache_dir
```

Use a 10-minute timeout. If the command times out, re-run it — the script resumes from where it left off. If it fails 3 times consecutively with the same error, stop and report the failure.

**Verify:** `$scan_dir/plan.md` exists and contains at least one `## Project:` section before proceeding.

---

## Step 3: Nominate Files

If `$scan_dir/nominations.md` does not exist, generate it by reading `$scan_dir/plan.md` and for each project section (`## Project: <base_path> (<type>)`), parse the Recommended Scans table. For each row, extract the Agent and Vector columns. Write `$scan_dir/nominations.md` - one line per (project, agent, vector) combination. Skip projects with empty scan tables.

```markdown
# Nominations

- [ ] <base_path> (<type>) | <agent> | <vector>
- [ ] <base_path> (<type>) | <agent> | <vector>
...
```

If `$scan_dir/nominations.md` already exists, change every top level task `- [x]` to `- [ ]`. Keep all indented lines/subtasks beneath each item unchanged.

### Run nomination script

Using [scripts/loop.sh](scripts/loop.sh):

```bash
bash <path-to-loop.sh> $scan_dir nominator.md "- depth: <depth>
- arguments: <relevant argument overrides if any, otherwise omit>" 5 $cache_dir
```

Use a 10-minute timeout. If the command times out, re-run it — the script resumes from where it left off. If it fails 3 times consecutively with the same error, stop and report the failure.

**Verify:** `$scan_dir/nominations.md` contains at least one `- [x]` line before proceeding.

---

## Step 4: Analyze Nominated Files

Read `$scan_dir/nominations.md`. For each candidate file under a checked `- [x]` line, append to `$scan_dir/analyses.md` (skip candidates already listed in `analyses.md`).

```
- [ ] <base_path> (<type>) | <agent> | <vector> | <candidate_file>
```

Create the findings directory:
```bash
mkdir -p $scan_dir/findings
```

### Run analysis script

Using [scripts/loop.sh](scripts/loop.sh):

```bash
bash <path-to-loop.sh> $scan_dir analyzer.md "" 5 $cache_dir
```

Use a 10-minute timeout. If the command times out, re-run it — the script resumes from where it left off. If it fails 3 times consecutively with the same error, stop and report the failure.

**Verify:** `$scan_dir/analyses.md` contains at least one `- [x]` line before proceeding.

---

## Step 5: Verify Findings

List all `.md` files in `$scan_dir/findings/`. If none exist, write a `no-findings.md` summary and stop.

Using [scripts/loop.sh](scripts/loop.sh):

```bash
bash <path-to-loop.sh> $scan_dir verifier.md "" 5 $cache_dir
```

Use a 10-minute timeout. If the command times out, re-run it — the script resumes from where it left off. If it fails 3 times consecutively with the same error, stop and report the failure.

---

## Completion

After all steps complete, report the scan results:

1. List all finding files in `$scan_dir/findings/`
2. Count verified vs rejected findings
3. Present a summary to the user

© ghostsecurity · Apache-2.0 · ghostsecurity/skills

Похожие скиллы

Всё по теме «Безопасность» →
security-scan jwynia Скилл прогоняет кодовую базу по OWASP Top 10, ищет захардкоженные ключи и опасные конфиги. Пригодится перед деплоем или ревью чужого репозитория. CX Codex +1 471установок Next.js Security Scan sugarforever Скилл ищет дыры в Next.js и TypeScript/JavaScript проектах: XSS, инъекции, утечки секретов, проблемы авторизации. Пригодится перед деплоем. CX Codex +1 553установок Python Security Scan sugarforever Скилл проверяет код на Python, Flask, Django и FastAPI на уязвимости OWASP Top 10, утечки секретов и уязвимые зависимости. Пригодится перед релизом и во время аудита безопасности. CX Codex +1 540установок secrets-scan OWASP Ищет захардкоженные пароли, API-ключи и токены в коде и конфигах — до коммита или при аудите репозитория. CX Codex +1 337установок security-pen-testing Alireza Rezvani Скилл помогает искать уязвимости в веб-приложениях, API и зависимостях: от OWASP-проверок до подготовки отчёта. Используйте его для тестирования, на которое у вас есть письменное разрешение. 834установок vulnerability-scanning aj-geddes Скилл для поиска уязвимостей в зависимостях, коде, контейнерах и секретах. Пригодится перед деплоем и при аудитах безопасности. CX Codex +1 611установок

Из того же набора7

ghost-scan-secrets Ищет утёкшие API-ключи, токены и пароли в кодовой базе проекта. Пригодится перед коммитом или при аудите репозитория на скрытые секреты. CX Codex +1 4 400установок ghost-scan-deps Скилл запускает аудит зависимостей проекта по файлам блокировок, находит уязвимости с CVE и готовит отчёт с оценкой риска и шагами по исправлению. CX Codex +1 4 300установок ghost-repo-context Сканирует кодовую базу, находит проекты и записывает карту архитектуры в repo.md. Нужен перед анализом безопасности или знакомством с новым репозиторием. CX Codex +1 3 800установок ghost-report Собирает находки всех сканирующих скиллов Ghost Security в один отчёт по риску и уверенности. Пригодится перед релизом или аудитом. CX Codex +1 3 800установок ghost-validate Проверяет отчёты сканеров безопасности и отделяет ложные срабатывания от реальных уязвимостей. Анализирует код, проверяет маршруты и при доступности тестирует эндпоинты. CX Codex +1 3 800установок ghost-exo Маршрутизирует запросы к платформе exo: создаёт цепочки агентов, улучшает их по прошлым запускам и находит сбои. CX Codex +1 947установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой