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

ghost-scan-secrets — скилл для Claude Code: как установить

Ищет утёкшие API-ключи, токены и пароли в кодовой базе проекта. Пригодится перед коммитом или при аудите репозитория на скрытые секреты.

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

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

Скилл работает как оркестратор для проверки кодовой базы на забытые токены, пароли и ключи доступа. На этапе настройки он вычисляет идентификатор репозитория и готовит каталоги в ~/.ghost/repos/. Субагент инициализации затем скачивает бинарный файл poltergeist в ~/.ghost/bin/poltergeist или poltergeist.exe в Windows.

После развёртывания бинарника сканер находит подозрительные строки и сохраняет их в candidates.json. Если совпадений нет, процесс сразу переходит к отчёту. Найденные кандидаты анализируются параллельными субагентами, которые определяют критичность и дают инструкции по устранению утечки. При сбое любой задачи оркестратор делает ровно один повтор перед остановкой.

Подготовка каталогов жёстко завязана на команду git hash-object, поэтому без установленного Git процесс завершится ошибкой.

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

  • найти зашитые пароли и API-ключи в кодовой базе
  • обнаружить открытые значения переменных в файлах окружения
  • оценить критичность выявленных утечек авторизационных данных
  • сформировать инструкции по устранению найденных уязвимостей

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

  • Проверь репозиторий на утечки секретов и паролей
  • Просканируй папку src на наличие открытых API-ключей
  • Запусти ghost-scan-secrets для текущей ветки

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

1Через Skills CLI (Vercel)

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

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

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

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

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

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

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

Для установки выполните команду npx skills add ghostsecurity/skills --skill ghost-scan-secrets -a claude-code.

Что делает скилл ghost-scan-secrets?

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

Куда сохраняются бинарный файл Poltergeist и отчёты о проверке?

Утилита скачивается в директорию ~/.ghost/bin/poltergeist (или poltergeist.exe в Windows). Промежуточные кандидаты и итоговые находки скилл записывает в каталог ~/.ghost/repos/<repo_id>/scans/<short_sha>/secrets/.

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

SKILL.md · Apache-2.0
---
name: "ghost-scan-secrets"
description: |
  Ghost Security - Secrets and credentials scanner. Scans codebase for leaked API keys, tokens, passwords, and sensitive data. Detects hardcoded secrets and generates findings with severity and remediation guidance. Use when the user asks to check for leaked secrets, scan for credentials, find hardcoded API keys or passwords, detect exposed .env values, or audit code for sensitive data exposure.
allowed-tools: Read, Glob, Grep, Bash, Task, TodoRead, TodoWrite
argument-hint: "[path-to-scan]"
license: apache-2.0
metadata:
  version: 1.1.0
---

# Ghost Security Secrets Scanner — Orchestrator

You are the top-level orchestrator for secrets scanning. Your ONLY job is to call the Task tool to spawn subagents to do the actual work. Each step below gives you the exact Task tool parameters to use. Do not do the work yourself.

## Defaults

- **repo_path**: the current working directory
- **scan_dir**: `~/.ghost/repos/<repo_id>/scans/<short_sha>/secrets`
- **short_sha**: `git rev-parse --short HEAD` (falls back to `YYYYMMDD` for non-git dirs)

$ARGUMENTS

Any values provided above override the defaults.

---

## Execution

1. **Setup** — compute paths and create output directories
2. **Initialize Poltergeist** — install the poltergeist binary
3. **Scan for Secrets** — run poltergeist against the codebase
4. **Analyze Candidates** — assess each candidate for confirmation
5. **Summarize Results** — generate the final scan report

### Step 0: Setup

Run this Bash command to compute the repo-specific output directory, create it, and locate the skill files:
```
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}/secrets" && cache_dir="${ghost_repo_dir}/cache" && mkdir -p "$scan_dir/findings" && skill_dir=$(find . -path '*skills/scan-secrets/SKILL.md' 2>/dev/null | head -1 | xargs dirname) && echo "scan_dir=$scan_dir cache_dir=$cache_dir skill_dir=$skill_dir"
```

Store `scan_dir` (the absolute path under `~/.ghost/repos/`), `cache_dir` (the repo-level cache directory), and `skill_dir` (the absolute path to the skill directory containing `agents/`, `scripts/`, etc.).

After this step, your only remaining tool is Task. Do not use Bash, Read, Grep, Glob, or any other tool for Steps 1–4.

### Step 1: Initialize Poltergeist

Call the Task tool to initialize the poltergeist binary:
```json
{
  "description": "Initialize poltergeist binary",
  "subagent_type": "general-purpose",
  "prompt": "You are the init agent. Read and follow the instructions in <skill_dir>/agents/init/agent.md.\n\n## Inputs\n- skill_dir: <skill_dir>"
}
```

The init agent installs poltergeist to `~/.ghost/bin/poltergeist` (or `poltergeist.exe` on Windows).

### Step 2: Scan for Secrets

Call the Task tool to run the poltergeist scanner:
```json
{
  "description": "Scan for secret candidates",
  "subagent_type": "general-purpose",
  "prompt": "You are the scan agent. Read and follow the instructions in <skill_dir>/agents/scan/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>"
}
```

The scan agent returns the candidate count and writes `<scan_dir>/candidates.json`.

**If candidate count is 0**: Skip to Step 4 (Summarize) with no findings.

### Step 3: Analyze Candidates

Call the Task tool to analyze the candidates:
```json
{
  "description": "Analyze secret candidates",
  "subagent_type": "general-purpose",
  "prompt": "You are the analysis agent. Read and follow the instructions in <skill_dir>/agents/analyze/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>\n- skill_dir: <skill_dir>\n- cache_dir: <cache_dir>"
}
```

The analysis agent spawns parallel analyzers for each candidate and writes finding files to `<scan_dir>/findings/`.

### Step 4: Summarize Results

Call the Task tool to summarize the findings:
```json
{
  "description": "Summarize scan results",
  "subagent_type": "general-purpose",
  "prompt": "You are the summarize agent. Read and follow the instructions in <skill_dir>/agents/summarize/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>\n- skill_dir: <skill_dir>\n- cache_dir: <cache_dir>"
}
```

After executing all the tasks, report the scan results to the user.

---

## Error Handling

If any Task call fails, retry it **once**. If it fails again, stop and report the failure.

© ghostsecurity · Apache-2.0 · ghostsecurity/skills

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

Всё по теме «Безопасность» →
secrets-scan OWASP Ищет захардкоженные пароли, API-ключи и токены в коде и конфигах — до коммита или при аудите репозитория. CX Codex +1 337установок secrets goldsky-io Скилл ведёт агента через создание, просмотр, ротацию и удаление секретов Goldsky — именованных объектов с учётными данными для sink пайплайнов. CX Codex +1 3 600установок n8n-credentials-and-security-official n8n-io Скилл следит, чтобы ключи и токены в воркфлоу n8n шли через систему учётных данных, а не лежали текстом в нодах. CX Codex +1 2 000установок credentials google-deepmind Проверяет, есть ли нужный ключ в .env, и просит добавить его так, чтобы значение не попало в чат. CX Codex +1 1 400установок security-scan ruvnet Гоняет проверку репозитория на трёх уровнях глубины: зависимости, секреты, опасные паттерны. Пригодится перед релизом и при разборе PR. CX Codex +1 748установок Next.js Security Scan sugarforever Скилл ищет дыры в Next.js и TypeScript/JavaScript проектах: XSS, инъекции, утечки секретов, проблемы авторизации. Пригодится перед деплоем. CX Codex +1 553установок

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

ghost-scan-code Ищет уязвимости в исходниках: SQL-инъекции, XSS, SSRF и другие категории OWASP. Планирует проверки, потом прогоняет их по проекту. CX Codex +1 5 200установок 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установок

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

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