Security Scan
Perform a lightweight security review before trusting, publishing, or installing a skill.
What this skill does
Use this skill to:
- - inspect a skill directory for obviously dangerous code patterns
- look for likely hardcoded credentials or tokens
- flag risky file permissions
- produce a concise risk summary with recommended next steps
This skill is intentionally conservative and lightweight. Treat findings as review signals, not proof of compromise.
What this skill does not do
Do not claim capabilities that are not present in the bundled resources.
This skill does not provide:
- - true sandbox execution
- system call tracing
- network traffic capture
- dependency CVE resolution from external databases
- automatic approval or rejection logic
If deeper reverse engineering or threat analysis is needed, do a manual review and use stronger external tooling.
Bundled resource
scripts/scan.sh
Run the included shell scanner for a quick static pass:
CODEBLOCK0
The script currently checks for:
- - suspicious function names such as
eval(, exec(, system(, and INLINECODE4 - simple hardcoded-secret patterns
- world-writable files
Because the script uses grep-style heuristics, expect both false positives and false negatives.
Recommended workflow
1. Scope the review
Confirm what you are reviewing:
- - target directory
- whether it is a skill, script bundle, or general code folder
- whether the goal is publish review, install review, or a quick sanity check
2. Run the quick scan
From the skill directory:
CODEBLOCK1
If the target is the current directory:
CODEBLOCK2
3. Review the findings manually
Do not stop at raw matches. Inspect the surrounding code and decide whether each finding is:
- - expected and justified
- suspicious but explainable
- high-risk and likely unacceptable
Pay special attention to:
- - shell execution that touches untrusted input
- outbound network access
- credential handling
- writes outside the working directory
- self-modifying or persistence-oriented behavior
4. Give a practical verdict
Summarize the result in plain language using a simple rubric:
- - Low risk: no meaningful issues found in this lightweight review
- Needs review: suspicious patterns or ambiguous findings require manual inspection before trust
- High risk: clear dangerous behavior, likely secrets, or unjustified execution patterns
5. Recommend next actions
Examples:
- - publish/install as-is
- publish/install only after removing a flagged pattern
- rotate exposed credentials
- request source clarification from the author
- escalate to deeper manual or sandboxed analysis
Reporting pattern
Use a compact structure like this:
CODEBLOCK3
Triage guidance
Usually high risk
- - obvious credential material checked into the repo
- hidden or unjustified command execution
- code that downloads and runs remote content
- writes to sensitive locations without a clear reason
Usually medium risk
- - use of shell execution with unclear input handling
- overly broad file permissions
- suspicious obfuscation or encoded payloads
- installer/update logic that is hard to verify quickly
Usually low risk
- - benign matches in docs or examples
- helper scripts that use shell commands in a narrow, understandable way
- false positives from regex scanning
Practical cautions
- - Prefer a short, evidence-based verdict over dramatic claims.
- Quote the matched lines or file paths when useful.
- If confidence is low, say so explicitly.
- Do not claim the scan is comprehensive.
- For publish decisions, err on the side of requiring cleanup when the skill still contains templates, TODOs, placeholder claims, or unverified commands.
安全扫描
在信任、发布或安装技能之前,执行一次轻量级安全审查。
本技能的功能
使用本技能可以:
- - 检查技能目录中是否存在明显危险的代码模式
- 查找可能硬编码的凭据或令牌
- 标记有风险的文件权限
- 生成简洁的风险摘要及建议的后续步骤
本技能有意保持保守和轻量。请将发现结果视为审查信号,而非安全受损的证据。
本技能不提供的功能
请勿声称本技能具备捆绑资源中未包含的能力。
本技能不提供:
- - 真正的沙箱执行
- 系统调用追踪
- 网络流量捕获
- 来自外部数据库的依赖项CVE解析
- 自动批准或拒绝逻辑
如需进行更深层的逆向工程或威胁分析,请进行手动审查并使用更强大的外部工具。
捆绑资源
scripts/scan.sh
运行附带的Shell扫描器进行快速静态检查:
bash
bash scripts/scan.sh /path/to/target
该脚本当前检查的内容包括:
- - 可疑函数名称,如eval(、exec(、system(和spawn(
- 简单的硬编码密钥模式
- 全局可写文件
由于脚本使用grep风格的启发式方法,预计会出现误报和漏报。
推荐工作流程
1. 界定审查范围
确认您正在审查的内容:
- - 目标目录
- 是技能、脚本包还是通用代码文件夹
- 目标是发布审查、安装审查还是快速合理性检查
2. 运行快速扫描
在技能目录中执行:
bash
bash scripts/scan.sh /path/to/target
如果目标是当前目录:
bash
bash scripts/scan.sh .
3. 手动审查发现结果
不要停留在原始匹配结果上。检查周围的代码,判断每个发现结果属于:
特别注意:
- - 涉及不可信输入的Shell执行
- 出站网络访问
- 凭据处理
- 对工作目录之外的写入操作
- 自修改或持久化导向的行为
4. 给出实用结论
使用简单的评估标准,用通俗语言总结结果:
- - 低风险: 本次轻量审查未发现重大问题
- 需审查: 可疑模式或模糊发现需要手动检查后才能信任
- 高风险: 明显的危险行为、疑似密钥或不当的执行模式
5. 建议后续操作
示例:
- - 按原样发布/安装
- 移除标记模式后再发布/安装
- 轮换暴露的凭据
- 向作者请求源代码澄清
- 升级为更深入的手动或沙箱分析
报告格式
使用如下紧凑结构:
text
安全扫描摘要
- - 目标:<路径>
- 结果:低风险 | 需审查 | 高风险
- 发现:
- <发现1>
- <发现2>
- - 置信度:低 | 中 | 高
- 建议操作:<后续步骤>
分类指导
通常高风险
- - 仓库中检入了明显的凭据材料
- 隐藏或无正当理由的命令执行
- 下载并运行远程内容的代码
- 无明确原因写入敏感位置
通常中风险
- - 输入处理不明确的Shell执行
- 过于宽泛的文件权限
- 可疑的混淆或编码载荷
- 难以快速验证的安装/更新逻辑
通常低风险
- - 文档或示例中的良性匹配
- 以有限且可理解的方式使用Shell命令的辅助脚本
- 正则扫描产生的误报
实用注意事项
- - 优先使用简短、基于证据的结论,而非夸张的声明。
- 在必要时引用匹配的行或文件路径。
- 如果置信度低,请明确说明。
- 不要声称扫描是全面的。
- 对于发布决策,当技能仍包含模板、待办事项、占位声明或未经验证的命令时,倾向于要求清理。