ghost-scan-code by ghostsecurity/skills
npx skills add https://github.com/ghostsecurity/skills --skill ghost-scan-code您可以在代码仓库中发现安全问题。此技能规划要扫描的漏洞向量,然后对每个项目执行这些扫描。
quick(默认)、balanced 或 full — 可通过 $ARGUMENTS 覆盖$ARGUMENTS
注意: 如果提供了参数,可用于自定义扫描工作流程。例如,如果用户指定了特定的向量集、向量数量、特定的候选文件、需要重点关注的区域、候选文件数量等,请确保将相关细节传递给技能中的相应步骤。
计算仓库特定的输出目录:
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"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
$cache_dir/repo.md — 如果文件缺失,请先运行仓库上下文技能,然后继续。depth 设置为 quickdepth 为 full,则警告用户完整扫描将使用显著更多的令牌,并要求他们在继续之前确认。如果他们拒绝,则回退到 balanced。如果 $scan_dir/plan.md 已存在,则跳至下一步。
否则,使用 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
使用 10 分钟超时。如果命令超时,请重新运行 — 脚本将从上次中断处恢复。如果连续 3 次因相同错误而失败,则停止并报告失败。
验证: 在继续之前,确保 $scan_dir/plan.md 存在且至少包含一个 ## Project: 部分。
如果 $scan_dir/nominations.md 不存在,则通过读取 $scan_dir/plan.md 来生成它,并为每个项目部分(## Project: <base_path> (<type>))解析“推荐扫描”表格。对于每一行,提取“代理”和“向量”列。写入 $scan_dir/nominations.md — 每行对应一个(项目、代理、向量)组合。跳过扫描表格为空的项目。
# 提名
- [ ] <base_path> (<type>) | <agent> | <vector>
- [ ] <base_path> (<type>) | <agent> | <vector>
...
如果 $scan_dir/nominations.md 已存在,则将每个顶级任务 - [x] 更改为 - [ ]。保持每个项目下所有缩进行/子任务不变。
使用 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
使用 10 分钟超时。如果命令超时,请重新运行 — 脚本将从上次中断处恢复。如果连续 3 次因相同错误而失败,则停止并报告失败。
验证: 在继续之前,确保 $scan_dir/nominations.md 至少包含一个 - [x] 行。
读取 $scan_dir/nominations.md。对于每个在已勾选的 - [x] 行下的候选文件,将其追加到 $scan_dir/analyses.md(跳过已列在 analyses.md 中的候选文件)。
- [ ] <base_path> (<type>) | <agent> | <vector> | <candidate_file>
创建发现目录:
mkdir -p $scan_dir/findings
使用 scripts/loop.sh:
bash <path-to-loop.sh> $scan_dir analyzer.md "" 5 $cache_dir
使用 10 分钟超时。如果命令超时,请重新运行 — 脚本将从上次中断处恢复。如果连续 3 次因相同错误而失败,则停止并报告失败。
验证: 在继续之前,确保 $scan_dir/analyses.md 至少包含一个 - [x] 行。
列出 $scan_dir/findings/ 中的所有 .md 文件。如果不存在任何文件,则写入 no-findings.md 摘要并停止。
使用 scripts/loop.sh:
bash <path-to-loop.sh> $scan_dir verifier.md "" 5 $cache_dir
使用 10 分钟超时。如果命令超时,请重新运行 — 脚本将从上次中断处恢复。如果连续 3 次因相同错误而失败,则停止并报告失败。
所有步骤完成后,报告扫描结果:
$scan_dir/findings/ 中的所有发现文件每周安装次数
1.0K
仓库
GitHub 星标数
368
首次出现时间
2026年2月20日
安全审计
安装于
claude-code756
codex403
gemini-cli402
opencode402
github-copilot401
kimi-cli401
You find security issues in a repository. This skill plans which vulnerability vectors to scan, then executes those scans against each project.
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.
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"
$cache_dir/repo.md — if missing, run the repo-context skill first and then continue.depth to quick if not provideddepth 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.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.
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.
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.
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
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.
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.
After all steps complete, report the scan results:
$scan_dir/findings/Weekly Installs
1.0K
Repository
GitHub Stars
368
First Seen
Feb 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code756
codex403
gemini-cli402
opencode402
github-copilot401
kimi-cli401
PRD生成器:AI驱动产品需求文档工具,快速创建清晰可执行PRD
737 周安装
Devcontainer 设置技能:一键创建预配置开发容器,集成 Claude Code 和语言工具
739 周安装
Plankton代码质量工具:Claude Code自动格式化与Linter强制执行系统
741 周安装
ML Pipeline专家指南:生产级机器学习流水线架构、编排与自动化部署
741 周安装
Tavily API 网络搜索技能 - AI 优化搜索,获取结构化实时网络数据
742 周安装
Playwright 开发指南:微软官方自动化测试框架架构、API 与打包教程
745 周安装