ghost-scan-code skill
scriptsPerforms SAST code scanning to identify security vulnerabilities like SQL injection, XSS, and BOLA in applications and libraries.
- GitHub stars
- 441
- Files
- 12
- Last commit
- Sep 28, 2026
- License
- apache-2.0
- Allowed tools
- 6
What does the ghost-scan-code skill do?
ghost-scan-code performs SAST code scanning to identify security vulnerabilities like SQL injection, XSS, and BOLA in applications and libraries.
Summary generated from the skill's SKILL.md.
About the ghost-scan-code skill
Performing security audits on source code is what ghost-scan-code enables for developers working on backend, frontend, mobile applications, or libraries. The skill identifies vulnerabilities such as SQL injection, XSS, BOLA, BFLA, and SSRF by planning and executing targeted scans. It is designed for use when a user requires a SAST scan or a vulnerability assessment of a codebase to find security flaws.
An agent loads this skill to navigate through a multi-step process involving planning, file nomination, and analysis. It relies on internal scripts like loop.sh and criteria/index.yaml to map project types to specific vulnerability vectors. The process produces organized findings stored in a dedicated directory, categorized by verified or rejected issues. Users can control the intensity of the scan by specifying a depth of quick, balanced, or full, though full scans require explicit confirmation due to higher token usage.
This tool utilizes standard file system and shell capabilities including Read, Write, Edit, Glob, Grep, and Bash to inspect the repository. It manages its own state through a structured directory system that tracks plans, nominations, and analyses.
What an agent can do with it
- 1Conduct a full security auditPerform a comprehensive SAST scan on a repository to find OWASP vulnerabilities.
- 2Scan libraries for specific flawsCheck a library for issues like prototype pollution, unsafe deserialization, or ReDoS.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the ghost-scan-code skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the ghost-scan-code skill in Plugin
/plugin marketplace add ghostsecurity/skills /plugin install ghost@ghost-security
Install the ghost-scan-code skill in Claude Code
~/.claude/skills/ghost-scan-code/SKILL.md
$ npx degit ghostsecurity/skills/plugins/ghost/skills/scan-code ~/.claude/skills/ghost-scan-codeInstall the ghost-scan-code skill in Claude Code (project)
.claude/skills/ghost-scan-code/SKILL.md
$ npx degit ghostsecurity/skills/plugins/ghost/skills/scan-code .claude/skills/ghost-scan-codeInstall the ghost-scan-code skill in Codex
~/.agents/skills/ghost-scan-code/SKILL.md
$ npx degit ghostsecurity/skills/plugins/ghost/skills/scan-code ~/.agents/skills/ghost-scan-codeInstall the ghost-scan-code skill in Gemini CLI
~/.gemini/skills/ghost-scan-code/SKILL.md
$ npx degit ghostsecurity/skills/plugins/ghost/skills/scan-code ~/.gemini/skills/ghost-scan-codeInstall the ghost-scan-code skill in Claude.ai
npx degit ghostsecurity/skills/plugins/ghost/skills/scan-code ghost-scan-code && zip -r ghost-scan-code.zip ghost-scan-code # claude.ai → Customize → Skills → + → Create skill → Upload a skill → ghost-scan-code.zip
SKILL.md
View on GitHubFind 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
Files in this skill
12ghost-scan-code skill questions
How do I install the ghost-scan-code skill in Claude Code?
Run npx degit ghostsecurity/skills/plugins/ghost/skills/scan-code ~/.claude/skills/ghost-scan-code. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the ghost-scan-code skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What types of security vulnerabilities can this tool find?
The tool scans for issues including SQL injection, XSS, BOLA, BFLA, SSRF, prototype pollution, unsafe deserialization, ReDoS, path traversal, and zip slip.
What happens if I choose a full scan?
A full scan uses significantly more tokens, so the agent will warn you and ask for confirmation before proceeding.