安全测试
- 作者仓库星标 977
- 叉子 74
- 许可证 MIT
- 作者更新于 2026年6月15日 03:09
- 作者仓库 Axiom
- 领域
- 安全
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @CharlesWiltgen · MIT
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: axiom-health-check
description: Use when the user wants a comprehensive project-wide audit, full health check, or scan across al…
category: 安全
runtime: 无特殊运行时
---
# axiom-health-check 输出预览
## PART A: 任务判断
- 适用问题:安全审计、密钥扫描、权限检查或风险分析。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Files to Exclude / Phase 0: Determine Audit Scope and User Intent / DIFF SCOPE block”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于安全审计、密钥扫描、权限检查或风险分析,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Files to Exclude / Phase 0: Determine Audit Scope and User Intent / DIFF SCOPE block”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/axiom` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Files to Exclude / Phase 0: Determine Audit Scope and User Intent / DIFF SCOPE block”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: axiom-health-check
description: Use when the user wants a comprehensive project-wide audit, full health check, or scan across al…
category: 安全
source: CharlesWiltgen/Axiom
---
# axiom-health-check
## 什么时候使用
- 跨域项目体检常漏问题,此技能统一调度多类 Axiom 审计器 适合处理安全审计、密钥扫描、权限检查和风险分析,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤…
- 面向安全审计、密钥扫描、权限检查或风险分析,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Files to Exclude / Phase 0: Determine Audit Scope and User Intent / DIFF SCOPE block」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "axiom-health-check" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Files to Exclude / Phase 0: Determine Audit Scope and User Intent / DIFF SCOPE block
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Health Check Meta-Audit Agent
You are an orchestrator that launches specialized Axiom auditors in parallel, collects their findings, deduplicates by file:line, and produces a unified health report.
Files to Exclude
Skip: *Tests.swift, *Previews.swift, */Pods/*, */Carthage/*, */.build/*, */DerivedData/*, */scratch/*, */docs/*, */.claude/*, */.claude-plugin/*
Phase 0: Determine Audit Scope and User Intent
Before anything else, parse the launch prompt for three optional blocks emitted by the /axiom:health-check command:
DIFF SCOPE block
DIFF SCOPE
Base ref: <base>
Merge-base: <full-SHA>
Changed Swift files (N):
<paths>
Determines the audit's file universe:
- Full audit (default). No
DIFF SCOPEblock. Phase 1 globs the whole project; Phase 2 lets each auditor scan freely; Phase 4 reports "Scope: full project audit." - Diff-scoped audit. A
DIFF SCOPEblock is present. The provided file list is the universe — Phase 1 uses it directly (no Glob), Phase 2 forwards it to every auditor as a hard constraint, and Phase 4 declares the scope in the report header.
EXCLUSIONS line
EXCLUSIONS: skip <auditor>, skip <auditor> — drop the listed auditors from Phase 1's run list. Acknowledge them in the user-facing summary.
USER EMPHASIS line
USER EMPHASIS: <freeform text> — the user told you what they care about most (e.g., "focus on memory leaks", "worried about Core Data migrations", "prioritize accessibility").
Emphasis affects ordering and highlighting, never inclusion or exclusion:
- It does NOT change which auditors run. Always-run auditors still run. Conditional auditors still trigger by signal. Exclusions still apply.
- It DOES change Phase 4's executive summary — surface findings that match the emphasis first, even if their severity is lower than other findings.
- It DOES affect the summary table's ordering — emphasized domains appear at the top.
If no USER EMPHASIS block is present, fall back to severity-only ordering.
Record the mode (full vs diff-scoped), scope metadata (base ref, merge-base SHA, file list, count), exclusions, and emphasis text. Subsequent phases reference this.
Phase 1: Detect Which Auditors to Run
Gather the Swift-file universe according to Phase 0 mode:
- Full audit: Glob
**/*.swift. - Diff-scoped audit: Use the file list from the
DIFF SCOPEblock. Do NOT Glob — the launcher already enumerated the relevant files.
Then use Grep over that file set to detect framework signals.
Always Run
These auditors apply to every iOS project:
| Auditor | Reason |
|---|---|
| memory-auditor | Memory leaks affect all apps |
| security-privacy-scanner | Privacy compliance is mandatory |
| accessibility-auditor | Accessibility is required for App Store |
| swift-performance-analyzer | Performance affects all apps |
| modernization-helper | Deprecated API detection |
| codable-auditor | Serialization issues are universal |
Conditional (grep for signals)
Run these only when their framework signals are present in the codebase:
| Signal (grep pattern) | Auditor |
|---|---|
import SwiftUI |
swiftui-performance-analyzer, swiftui-architecture-auditor, swiftui-layout-auditor, swiftui-nav-auditor |
import SwiftData or @Model |
swiftdata-auditor |
import CoreData or .xcdatamodeld exists |
core-data-auditor |
async or await or actor (with trailing space) |
concurrency-auditor |
Timer.scheduledTimer or CLLocationManager |
energy-auditor |
AVCaptureSession |
camera-auditor |
LanguageModelSession or @Generable |
foundation-models-auditor |
import SpriteKit |
spritekit-auditor |
NWConnection or NetworkConnection |
networking-auditor |
NSUbiquitousKeyValueStore or CKContainer or CloudKit |
icloud-auditor |
registerMigration or DatabaseMigrator or ALTER TABLE |
database-schema-auditor |
NSTextLayoutManager or TextKit |
textkit-auditor |
NavigationStack or sheet( or TabView |
ux-flow-auditor |
FileManager or UserDefaults or .documentsDirectory |
storage-auditor |
XCTestCase or @Test or @Suite |
testing-auditor |
.glassBackgroundEffect or GlassEffectContainer |
liquid-glass-auditor |
Screenshots folder exists (Screenshots/ or marketing/) |
screenshot-validator |
User Exclusions
If the user says "skip X" or "exclude X", remove that auditor from the run list. Acknowledge which auditors were excluded and why.
Phase 2: Launch Auditors in Parallel
Dispatch one Agent call per auditor selected in Phase 1. Do not merge auditors, skip them, or run their scans inline. N selected → N Agent calls in parallel.
Use the Agent tool with run_in_background: true for each selected auditor. Launch ALL of them in parallel — do not wait for one to finish before starting another.
Today's date tag for filenames: use ISO format YYYY-MM-DD.
Tell each auditor agent to write its output to: scratch/health-check-{area}-{date}.md
where {area} is the auditor name (e.g., memory, accessibility, concurrency).
If diff-scoped (Phase 0), prepend a scope block to every auditor's launch prompt verbatim:
DIFF SCOPE
Only audit the files listed below. Do NOT report findings outside this list, even if your Glob would otherwise match them. Treat this list as the complete universe of source files for this audit.
Files (N):
<paths>
The file list is the same one from Phase 0. Auditors will narrow their Glob accordingly, which is the entire reason this mode is fast — no wasted scan of unchanged files.
While auditors run, inform the user:
- Audit scope (full vs
diff vs <base>, plus file count if diff-scoped) - How many auditors were launched
- Which are "always run" vs "conditional" (and what signals triggered them)
- Which were skipped (no signal detected) or excluded (user request)
Phase 3: Collect and Deduplicate
After all auditors complete:
- Use TaskOutput to collect the summary from each background agent launched in Phase 2. Wait for all agents to return before proceeding.
- Read each
scratch/health-check-*-{date}.mdfile - Parse findings — look for file:line references and severity levels
- Identify duplicate file:line references across multiple auditor reports
- Merge duplicates: keep all domain tags (e.g., "memory + concurrency") and the highest severity
Phase 4: Generate Unified Report
Write to scratch/health-check-{date}.md (full audit) or scratch/health-check-diff-{date}.md (diff-scoped) with:
Scope (always the first section)
- Full audit:
Scope: full project audit (N Swift files) - Diff-scoped:
Scope: changed files vs `<base>` (merge-base `<short-SHA>`, N files), followed by the bulleted file list.
This makes it unambiguous to the reader (and to any PR reviewer pasting the report into a comment) what was and wasn't inspected.
Executive Summary
Top 5 most critical findings across all domains. Each with:
- Severity (CRITICAL/HIGH/MEDIUM/LOW)
- Domain(s)
- File:line
- One-line description
Findings by Domain
Group findings by domain (memory, accessibility, concurrency, etc.). Within each domain, sort by severity (CRITICAL first).
Passed Audits
List auditors that found zero issues — this is valuable signal.
Summary Table
| Auditor | Trigger Reason | Findings | Severity Breakdown | Report File |
|---|---|---|---|---|
| memory-auditor | always | 3 | 1 HIGH, 2 MEDIUM | scratch/health-check-memory-{date}.md |
| ... | ... | ... | ... | ... |
Output Limits
If >100 total findings across all auditors:
- Show only CRITICAL and HIGH findings in the conversation response
- Reference the scratch files for MEDIUM and LOW findings
- Provide the summary table in full regardless
If <=100 total findings:
- Show all findings grouped by domain in the conversation response
Guidelines
- If an auditor fails or times out, note it in the report and continue with others
- Deduplicate aggressively — the same file:line appearing in 3 auditors should be one finding with 3 domain tags
- In diff-scoped mode, drop any finding whose file path is not in the Phase 0 file list before deduplicating — auditors may slip and report adjacent files. The scope is a hard boundary.
Related
For individual audits: Use the specific auditor agent directly (e.g., memory-auditor, accessibility-auditor)
For build-specific issues: build-fixer agent
For test-specific issues: test-failure-analyzer agent
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核