一键导入
security-audit
BatchBox 插件安全审查。触发词: 安全审查, security audit, 代码审查, 密钥泄露, SSRF, 路径穿越, XSS, 供应链安全, gitleaks, bandit。执行三层审计:自动化扫描 → 检查清单 → LLM 深度审计。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
BatchBox 插件安全审查。触发词: 安全审查, security audit, 代码审查, 密钥泄露, SSRF, 路径穿越, XSS, 供应链安全, gitleaks, bandit。执行三层审计:自动化扫描 → 检查清单 → LLM 深度审计。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
pytest testing patterns for Python. Triggers on: pytest, fixture, mark, parametrize, mock, conftest, test coverage, unit test, integration test, pytest.raises, relative import, ImportError attempted relative import, sys.modules fake package, importlib.import_module, patch.object.
Generate videos using ComfyUI with Wan 2.2, FramePack, or AnimateDiff. Handles image-to-video, text-to-video, talking heads, and motion-controlled animation. Use when creating any video content from character images or text descriptions.
Generate ComfyUI workflow JSON from natural language descriptions. Validates against installed models/nodes before output. Use when building custom ComfyUI workflows from scratch or modifying existing ones.
| name | security-audit |
| description | BatchBox 插件安全审查。触发词: 安全审查, security audit, 代码审查, 密钥泄露, SSRF, 路径穿越, XSS, 供应链安全, gitleaks, bandit。执行三层审计:自动化扫描 → 检查清单 → LLM 深度审计。 |
| compatibility | Python 3.9+, Windows PowerShell. 需要 bandit (pip install bandit)。 |
| allowed-tools | Read Write Bash |
| depends-on | [] |
| related-skills | ["python-pytest-ops"] |
针对 ComfyUI-Custom-Batchbox 仓库的专用安全审查框架。
当用户请求以下操作时激活此 SKILL:
运行自动化扫描脚本,获取机器可检测的安全问题:
# 在项目根目录执行
powershell -ExecutionPolicy Bypass -File .agents/skills/security-audit/scripts/run_security_scan.ps1
脚本会自动执行:
eval/exec/os.system/subprocess/yaml.load 等危险模式AIzaSy, sk-, AKIA, -----BEGIN)open() + 外部输入拼接innerHTML/outerHTML/document.write 等 XSS 风险print/logger 中可能包含密钥的输出.gitignore 中扫描结果输出到控制台。审查者需要阅读结果,对每个 finding 判断是误报还是真实问题。
读取 checklists/ 目录中的 13 个检查清单,按维度逐项核查。每个清单包含:
13 个维度:
| # | 维度 | 清单文件 | 自动化 |
|---|---|---|---|
| 1 | 密钥管理 | secrets_management.md | 🟢 高 |
| 2 | API 安全 | api_security.md | 🟡 中 |
| 3 | 路径安全 | file_path_security.md | 🟢 高 |
| 4 | 上传下载 | upload_download_security.md | 🟡 中 |
| 5 | 前端安全 | frontend_security.md | 🟢 高 |
| 6 | 并发稳定 | concurrency_stability.md | 🔴 低 |
| 7 | 崩溃恢复 | crash_recovery.md | 🔴 低 |
| 8 | 配置序列化 | config_serialization.md | 🟢 高 |
| 9 | 日志隐私 | logging_privacy.md | 🟢 高 |
| 10 | 供应链 | supply_chain.md | 🟢 高 |
| 11 | GitHub 发布 | github_publish.md | 🟢 高 |
| 12 | 共享缓存 | shared_cache_security.md | 🟡 中 |
| 13 | 机房部署 | fleet_deployment.md | 🔴 低 |
自动化和清单无法覆盖的深层问题,需要由你(Agent)通过代码阅读和语义理解来审查:
threading.local() 使用是否正确覆盖所有共享状态审查完成后,输出报告应包含:
# BatchBox 安全审查报告 (第 N 次)
## 执行摘要
- 整体风险等级: [低/中/高/严重]
- 自动化扫描发现: X 项 (Y 项误报)
- 检查清单通过率: XX/YY
- 深度审计发现: Z 项
## 发现清单
### P0 (立即处理)
### P1 (尽快处理)
### P2 (计划处理)
## 与上次审查对比
- 新增风险: ...
- 已修复: ...
- 持续存在: ...
审查时重点关注以下文件:
config_manager.py — 加密配置管理,密钥加解密crypto_utils.py — AES-256-GCM 加密工具adapters/generic.py — API 请求构建,密钥注入__init__.py — HTTP 路由注册,请求处理account/ — 账号认证系统gcs_cache.py — GCS 上传缓存 + NAS 共享oss_cache.py — OSS 上传缓存 + NAS 共享gemini_files_cache.py — Gemini Files API 缓存 + NAS 共享web/dynamic_params.js — 核心交互逻辑web/blur_upscale.js — 模糊放大交互web/settings_panel.js — 设置面板api_config.yaml — API 端点配置secrets.yaml — 加密密钥存储.gitignore — 发布安全./references/threat_model.md — BatchBox 威胁模型./references/asset_inventory.md — 资产清单./references/past_findings.md — 历次审查发现汇总