ghost-scan-deps by ghostsecurity/skills
npx skills add https://github.com/ghostsecurity/skills --skill ghost-scan-deps您是软件成分分析(SCA)扫描的顶层编排器。您的唯一工作是调用 Task 工具来生成子代理执行实际工作。下面的每个步骤都为您提供了要使用的确切 Task 工具参数。请勿自行执行工作。
~/.ghost/repos/<repo_id>/scans/<short_sha>/depsgit rev-parse --short HEAD(对于非 git 目录,回退到 YYYYMMDD)$ARGUMENTS
上面提供的任何值都将覆盖默认值。
运行此 Bash 命令来计算仓库特定的输出目录、创建它并定位技能文件:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
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}/deps" && cache_dir="${ghost_repo_dir}/cache" && mkdir -p "$scan_dir/findings" && skill_dir=$(find . -path '*skills/scan-deps/SKILL.md' 2>/dev/null | head -1 | xargs dirname) && echo "scan_dir=$scan_dir cache_dir=$cache_dir skill_dir=$skill_dir"
存储 scan_dir(~/.ghost/repos/ 下的绝对路径)、cache_dir(仓库级别的缓存目录)和 skill_dir(包含 agents/、scripts/ 等的技能目录的绝对路径)。
此步骤之后,您唯一剩下的工具是 Task。对于步骤 1–5,请勿使用 Bash、Read、Grep、Glob 或任何其他工具。
调用 Task 工具来初始化 wraith 二进制文件:
{
"description": "Initialize wraith 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>"
}
初始化代理将 wraith 安装到 ~/.ghost/bin/wraith(在 Windows 上是 wraith.exe)。
调用 Task 工具来发现仓库中的锁文件:
{
"description": "Discover lockfiles",
"subagent_type": "general-purpose",
"prompt": "You are the discover agent. Read and follow the instructions in <skill_dir>/agents/discover/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>"
}
发现代理会查找所有锁文件(go.mod、package-lock.json 等)并写入 <scan_dir>/lockfiles.json。
如果锁文件数量为 0 : 跳转到步骤 5(汇总),报告未找到锁文件。
调用 Task 工具来运行 wraith 扫描器:
{
"description": "Scan for vulnerabilities",
"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>"
}
扫描代理为每个锁文件执行 wraith 并写入 <scan_dir>/candidates.json。
如果候选漏洞数量为 0 : 跳转到步骤 5(汇总),报告未发现漏洞。
调用 Task 工具来分析漏洞候选项:
{
"description": "Analyze vulnerability 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>"
}
分析代理为每个候选项生成并行分析器以评估可利用性,并将发现文件写入 <scan_dir>/findings/。
调用 Task 工具来汇总发现结果:
{
"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>"
}
执行完所有任务后,向用户报告扫描结果。
如果任何 Task 调用失败,请重试一次。如果再次失败,则停止并报告失败。
每周安装次数
718
仓库
GitHub 星标数
370
首次出现时间
2026年2月20日
安全审计
安装于
claude-code586
codex210
gemini-cli209
kimi-cli209
cursor209
opencode209
You are the top-level orchestrator for Software Composition Analysis (SCA) 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.
~/.ghost/repos/<repo_id>/scans/<short_sha>/depsgit rev-parse --short HEAD (falls back to YYYYMMDD for non-git dirs)$ARGUMENTS
Any values provided above override the defaults.
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}/deps" && cache_dir="${ghost_repo_dir}/cache" && mkdir -p "$scan_dir/findings" && skill_dir=$(find . -path '*skills/scan-deps/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–5.
Call the Task tool to initialize the wraith binary:
{
"description": "Initialize wraith 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 wraith to ~/.ghost/bin/wraith (or wraith.exe on Windows).
Call the Task tool to discover lockfiles in the repository:
{
"description": "Discover lockfiles",
"subagent_type": "general-purpose",
"prompt": "You are the discover agent. Read and follow the instructions in <skill_dir>/agents/discover/agent.md.\n\n## Inputs\n- repo_path: <repo_path>\n- scan_dir: <scan_dir>"
}
The discover agent finds all lockfiles (go.mod, package-lock.json, etc.) and writes <scan_dir>/lockfiles.json.
If lockfile count is 0 : Skip to Step 5 (Summarize) with no lockfiles found.
Call the Task tool to run the wraith scanner:
{
"description": "Scan for vulnerabilities",
"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 executes wraith for each lockfile and writes <scan_dir>/candidates.json.
If candidate count is 0 : Skip to Step 5 (Summarize) with no vulnerabilities found.
Call the Task tool to analyze the vulnerability candidates:
{
"description": "Analyze vulnerability 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 to assess exploitability and writes finding files to <scan_dir>/findings/.
Call the Task tool to summarize the findings:
{
"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.
If any Task call fails, retry it once. If it fails again, stop and report the failure.
Weekly Installs
718
Repository
GitHub Stars
370
First Seen
Feb 20, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
claude-code586
codex210
gemini-cli209
kimi-cli209
cursor209
opencode209