audit-self

A command that performs a static security review of a Nova plug-in’s files, without running the code. It checks the plug-in manifest, shell hooks, agent definitions, skills, and commands against security rules.

In plain words
What is it for?
Run it to scan the whole plug-in or only its plug-in, hook, agent, skill, or command files. Use it when reviewing changes to the plug-in’s code and configuration.
Why use it?
Security problems can be spread across many plug-in files and be easy to miss in a normal review. This command groups findings by category and can use an additional adversarial review mode.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/teamspwk/nova/audit-self
Clone the repo
git clone --depth 1 https://github.com/TeamSPWK/nova
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,363 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00066 $0.03363
Opus 5 $0.00033 $0.01682
Sonnet 5 $0.00013 $0.00673
Haiku 4.5 $0.00007 $0.00336

Measured yesterday against content hash dda4892a01c3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

audit-self scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

dev/commands/audit-self.md · 268 lines

How it starts

The opening of the file, as written. The whole thing — 268 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/nova:audit-self

Nova 플러그인 자기 보안 진단 — 정적 분석 기반.

사용법

/nova:audit-self                      # 전체 5 카테고리 스캔 (~30K 토큰)
/nova:audit-self --category hooks     # 단일 카테고리만 (~6K 토큰)
/nova:audit-self --jury               # Red/Blue/Auditor 3에이전트 적대적 검증 (~50K 토큰, v5.23.0+)

비용

평균 1회 실행 ~30K 토큰 — 룰셋 30+ 룰 + 검사 대상 ~6900줄. --category {plugin|hooks|agents|skills|commands} 옵션으로 ~6K 토큰까지 축소 가능. 자주 호출 시 카테고리 분할 권장.

scan_targets

Phase 1 스캔 대상 — Glob 패턴으로 로드한 후 룰별 condition이 매칭되는 파일만 조건부 Read.

  • .claude-plugin/plugin.json — 플러그인 매니페스트
  • hooks/*.sh — 훅 셸 스크립트
  • agents/*.md — 에이전트 정의
  • skills/*/SKILL.md — 스킬 정의
  • commands/*.md — 슬래시커맨드 정의

exclusion_list

검사자/검사 대상 분리 원칙 — 메타-루프 가드 (R1 완화). 검사자(security-engineer)가 자기 정의를 검사하면 자가 합리화 편향이 발생하므로 명시 제외한다.

  • agents/security-engineer.md ← 검사자 자기 정의
  • commands/audit-self.md ← audit-self 커맨드 자기 정의 (메타 루프 회피)
  • docs/security-rules.md ← 룰셋 자체 (R10 공급망 무결성은 별도 처리, v5.23.0)

메타 노트: 검사자/검사 대상 분리 원칙이 깨지면 결과 무효. v5.23.0의 --jury Red/Blue/Auditor 위임으로 자기 검사를 외부화 예정.


Phase 1: 카테고리 스캔 (룰셋 로드 + 파일 Glob)

  1. docs/security-rules.md 로드 → 룰 스키마 파싱 (7 필드 — id/category/severity/condition/normal_example/risk_example/mitigation)
  2. --category {X} 지정 시 해당 카테고리 룰만 활성. 미지정 시 전체 활성
  3. scan_targets Glob 결과 수집 → exclusion_list 항목 제거
  4. 각 룰의 condition 1-liner를 활성 파일에 적용 (Read 도구로 조건부 로드)

Phase 2: security-engineer 호출

Agent 도구로 nova:security-engineer 서브에이전트를 spawn (Read/Glob/Grep만 — Edit/Write/Bash disallowed).

전달 컨텍스트:

mode: self-audit
scan_targets: <Phase 1 결과>
exclusion_list: <exclusion_list 항목>
active_rules: <카테고리 필터 적용된 룰 목록>
rules_doc: docs/security-rules.md

서브에이전트는 agents/security-engineer.md 의 "Nova 자기 코드 감사 모드" 섹션 규약을 따라 마크다운 리포트를 반환한다 (Critical/Warning/Info 분류).

Phase 2.5: --jury 분기 (v5.23.0+, ECC §P2-3 흡수)

--jury 플래그가 지정된 경우, Phase 2의 단일 security-engineer 결과를 3 페르소나 적대적 검증으로 보강한다. skills/jury/SKILL.md 모드 3 (보안 진단) 호출.

전달 컨텍스트:

mode: audit
target: nova-self-codebase
rules_doc: docs/security-rules.md
scan_targets: <Phase 1 결과>
exclusion_list: <exclusion_list 항목>
security_engineer_report: <Phase 2 결과>

Read the full file on GitHub · 268 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 268 lines · 66 tokens per session scan A dda4892a01c3

Subscribe to this mod's changes

audit-self is a command published in the GitHub repository TeamSPWK/nova (2 stars, last pushed 2d ago), licensed MIT. It adds 66 tokens to every session and 3,363 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.