ghost-scan-code
- Use it when:
- You want a security audit of your own code, an app or a library, before shipping it.
- It does:
- Plans which vulnerability classes fit each project, nominates candidate files, analyzes them, then verifies every finding.
- You get:
- One Markdown file per finding under ~/.ghost/, and a summary of how many were verified and how many rejected.
- Depth:
- Quick by default, or balanced or full; full asks you first because it uses far more tokens.
- Needs:
- Claude Code's CLI, which runs up to five workers in parallel, and the ghost-repo-context skill.
Runs each stage as separate claude -p workers, so it needs the Claude Code CLI, and it needs ghost-repo-context from the same plugin, which it runs first; install the ghost plugin from ghostsecurity/skills. Results stay in ~/.ghost/.
TL;DR
Ghost Security's AI code scanner for SAST, static analysis of source code. It first reads the repository context that ghost-repo-context writes, then a planner picks scans for each project from criteria per project type: for backends, frontends and mobile apps, issues such as SQL injection, XSS, broken object- or function-level authorization and SSRF; for libraries, prototype pollution, unsafe deserialization, ReDoS, path traversal and zip slip. The plan becomes a checklist of project, agent and vector; nominators pick candidate files for each, analyzers examine each candidate and write findings, and verifiers recheck every unverified finding. Each stage runs through a loop script that starts fresh claude -p workers with file tools, up to five at a time, and picks up where it left off after a timeout. Arguments can narrow the scan to chosen vectors, files or areas. It ends by listing the finding files and counting verified against rejected findings.
Summarizes the skill at 25fdf06.
npx skills add https://github.com/ghostsecurity/skills --skill ghost-scan-code skills.sh pageSource on GitHubAll skills from ghostsecurity/skills
- Total Downloads
- 5,500 on skills.sh, Nov 9, 2026
- Repo stars
- 440 ghostsecurity/skills
- First seen
- Feb 20, 2026 on skills.sh
Weekly values
| Week to | Installs |
|---|---|
| Sep 21 | 153 |
| Sep 28 | 155 |
| Oct 5 | 134 |
| Oct 12 | 143 |
| Oct 19 | 153 |
| Oct 26 | 161 |
| Nov 2 | 155 |
| Nov 9 | 155 |
| Category |
Compliance, guardrails, skill vetting and browser fingerprinting. Everything for building software: planning, coding, debugging, design, frameworks, cloud, agents and skills. |
|---|---|
| Type |
A multi-step process the agent follows: interview, debug, run a TDD loop, review. |
| Effect |
Its own steps create or change files, git state or local tools. |
| Needs |
Uses Claude Code features such as hooks or background agents. |
| Publisher |
Everyone else. Unverified vendor claims default to community. |
| Topics |
SKILL.md
From ghostsecurity/skills at 25fdf06. Checked daily, last changed Nov 7, 2026.
Frontmatter
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.1Find 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, orfull— 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
- Scan criteria: criteria/index.yaml
Step 1: Setup
Compute the repo-specific output directory:
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"
- Read
$cache_dir/repo.md— if missing, run the repo-context skill first and then continue. - Read criteria/index.yaml to get the valid agent→vector mappings per project type
- Set
depthtoquickif not provided - If
depthisfull, warn the user that a full scan uses significantly more tokens and ask them to confirm before proceeding. If they decline, fall back tobalanced.
Step 2: Plan Scans
If $scan_dir/plan.md already exists, skip to the next step.
Otherwise, run the planner using scripts/loop.sh:
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.
# 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:
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:
mkdir -p $scan_dir/findings
Run analysis script
Using scripts/loop.sh:
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:
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:
- List all finding files in
$scan_dir/findings/ - Count verified vs rejected findings
- Present a summary to the user