autospec-secaudit
Use when the user wants to scan generated code for security vulnerabilities, secret/credential leaks, IP/copyright/license violations, PII/data leaks, SQL injection, prompt injection, and backdoors. Runs as `/autospec-secaudit` (manual repo-wide sweep) or auto-fires after each autospec-run batch unless `~/.autospec/no-secaudit.flag` exists. Also powers the blocking Phase 4 per-PR gate.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- autospec-secaudit
- description
- Use when the user wants to scan generated code for security vulnerabilities, secret/credential leaks, IP/copyright/license violations, PII/data leaks, SQL injection, prompt injection, and backdoors. Runs as `/autospec-secaudit` (manual repo-wide sweep) or auto-fires after each autospec-run batch unless `~/.autospec/no-secaudit.flag` exists. Also powers the blocking Phase 4 per-PR gate.
02 资源文件 5
- 参考文档codex/prompt.md6.2 KB
- 脚本install.sh7.3 KB
- 参考文档opencode/agent.md6.6 KB
- 参考文档README.md1.5 KB
- 脚本uninstall.sh3.8 KB
03 SKILL.md 正文
<!-- BODY START -->
Self-update mode
Decide this purely from the request text the harness handed you. Do NOT
shell out to test the user's free-form request. Read the request, normalize
it in your reasoning (collapse whitespace, trim, lowercase), and if the result is
exactly update, this skill enters self-update mode and does NOT run the
normal pipeline.
- Detect harness by checking which install path exists for this skill:
- Claude Code:
~/.claude/skills/autospec-secaudit/SKILL.md - OpenCode:
~/.config/opencode/agent/autospec-secaudit.md - Codex CLI:
~/.codex/prompts/autospec-secaudit.md
- Claude Code:
- Re-install from
mainby piping the canonical installer:
Run this one-liner once; it refreshes all autospec skills across all harnesses.curl -fsSL https://raw.githubusercontent.com/berlinguyinca/autospec/main/bootstrap.sh | bash -s -- --skill all --harness all --update - Show the diff between the prior installed file(s) and the freshly fetched copy.
Stop mode
If the normalized request is exactly stop (or matches ^\s*stop(\s+--\w+)*\s*$),
do NOT run the pipeline. Write ~/.autospec/stop.flag so any running autospec
monitor halts after the current issue, then report that the stop sentinel was
written and exit.
Required capabilities & harness adapter
| Capability | Claude Code | OpenCode | Codex CLI | Fallback if missing |
|---|---|---|---|---|
| Subagent model tier | Tier A: opus + ultrathink |
Tier A: top-tier task + max reasoning |
Tier A: current top GPT + reasoning_effort=high |
Fall back UP on unavailability |
| Subagent dispatch policy | per AGENTS.md decision matrix | per AGENTS.md decision matrix | per AGENTS.md decision matrix | inline if subagents unavailable |
| Deterministic scanners | gitleaks, semgrep, trivy, license-checker via ensure-tool.sh |
same | same | LLM-only fallback per missing scanner (loud WARN) |
Triage runs on the spec-work tier. Model tier: TIER_A — confirm/triage findings with the top-tier reasoning model for the active harness (see row above).
Harness detection (run once at skill start, before the pipeline)
Detect your harness by checking available tools before scanning:
-
Claude Code — the
Agenttool with asubagent_typeparameter is available.TIER_A=opus+ultrathink(the alias, which resolves to the current Claude Opus generation)TIER_B=sonnet(the alias, which resolves to the current Claude Sonnet generation)
-
OpenCode — a
tasktool with model/tier configuration is available (nosubagent_type).TIER_A= top-tier task model + high reasoningTIER_B= smaller-tier task model + medium reasoning
-
Codex CLI — neither
Agentnor a configurabletasktool is available;apply_patchis the primary edit tool.TIER_A= current top GPT model +reasoning_effort=highTIER_B= the spark / cost-optimized variant of the configured model when one exists, else the configured model +reasoning_effort=medium
Fallback rule: If TIER_B is not available in your harness (model unknown, quota/capacity failure, authorization failure, or tool call returns an error for that model), silently retry the same dispatch with TIER_A. Preserve the parent context on retry; for Codex native subagents, fork/inherit the current conversation context and use the latest top GPT model instead of moving the work into the main session. Never ask the user.
Security triage runs on TIER_A. Hold TIER_A and TIER_B for the entire skill run.
When to invoke
- Manually:
/autospec-secauditfor a repo-wide sweep of the working tree. - Automatically: auto-fires after each
/autospec-runbatch unless~/.autospec/no-secaudit.flagexists. - As the Phase 4 gate engine (invoked by the implementer, not by a skill call).
Pipeline
- Ensure scanners —
ensure-tool.sh gitleaks semgrep trivy license-checker(best-effort; a failed install degrades that concern to LLM-only with a loud WARN — never silently skipped). - Scan — run
security-scan.sh --tree(sweep) or--diff <base>(branch). Both modes scan a git-gitignore-aware file list (tracked + untracked-not-ignored), so--treenever rescans its own prior.autospec/security/*.jsonloutput or other ignored trees (target/,node_modules/) as fabricated findings. Findings are emitted as gap JSON objects:{gap_id,dimension,severity,file,line,title,body,dedupe_key}. - LLM triage (Tier A) — for each finding: confirm real vs false-positive;
ADD findings scanners miss (PII in logs, prompt-injection sinks where
untrusted input reaches an LLM call, contextual backdoors). Assign final
severity(must-fix/nice-to-have). - Report — write
.autospec/secaudit.mdsummarizing findings by dimension with file:line and remediation. Loudly list any scanner that fell back to LLM-only. - File survivors — must-fix survivors above threshold are filed as
auto-implement,security,priority:highissues via the gap-filing path so they re-enter autospec.dedupe_keyprevents re-filing across batches.
Enforcement defaults
| Concern | dimension | Phase 4 gate | Auto-fix |
|---|---|---|---|
| Secrets / credentials | secrets | block | redact + flag rotation |
| Vulns / SQLi / cmd-injection / backdoors | vuln | block | yes, re-scan |
| Prompt injection | injection | advisory (deterministic; LLM triage blocks) | yes, re-scan |
| PII / data leaks | pii | advisory (deterministic; LLM triage blocks) | yes, re-scan |
| IP / copyright / license | license | advisory (deterministic; LLM triage blocks) | advisory fix (human confirms) |
| Dependency CVEs | cve | advisory (block only critical+fixable) | bump if trivial |
Finalization
Print the report path and a one-line summary:
secaudit: must-fix=<N> advisory=<N> scanners-degraded=<list>.
04 同仓库更多 Skills
trio-pass-skill
暂无简介
duo-pass-skill
暂无简介
duo-divergence-skill
暂无简介
autospec
Use when the user wants to ship a feature end-to-end across multiple commits — bootstraps repo if missing, brainstorms a design spec, decomposes into linked GitHub issues, or splits an existing spec into issues, then runs an autonomous implementation loop with auto-merge.
autospec-upgrade
Use when the user wants to upgrade an Angular, Next.js, or React project to the latest official versions safely — by locking observable behavior before touching versions, upgrading one major at a time with official codemods, and gating completion on mutation score rather than coverage theater.
autospec-ui-audit
Use when a React Router application needs a deterministic whole-site route inventory before UI, UX, navigation, or evidence auditing begins.