Adversarial verify
Adversarial verification of code changes — probes target files for vulnerabilities through edge cases, error paths, security boundaries, and concurrency attacks. Use when you want to stress-test implementation correctness or validate defensive robustness before shipping.From its SKILL.md
npx -y skills add shuymn/skills --skill adversarial-verifyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
7.5 KB, ~1.6k tokens by cl100k_base, as published. Nobody here has run it
Path Resolution
<skill-root>means the directory containing thisSKILL.md.- Resolve
scripts/...andreferences/...relative to<skill-root>, not the caller's current working directory. - When executing local helpers, use explicit paths such as
<skill-root>/scripts/....
Constraints
- Do NOT modify implementation code. Write only the adversarial report and attack test files. Reason: modifying code during adversarial verification would invalidate evidence and conflate "finding vulnerabilities" with "fixing them."
- Attack test files must be clearly separated from production tests (use a dedicated directory or naming convention such as
*_adversarial_test.*).
Precondition Check
Before starting adversarial verification, confirm preconditions:
- Verify all target files exist in the repository. If any target file is missing, stop as
BLOCKED. - Verify
<skill-root>/references/attack-vectors.mdexists. If missing, stop asBLOCKED.
Tier-Based Invocation Policy
| Risk Tier | Invocation | Minimum Probes | Attack Scope |
|---|---|---|---|
| Critical | Mandatory | 3 | All applicable categories |
| Sensitive | Mandatory | 2 | Category 1 (Input Boundary) + most relevant 1 additional category |
| Standard (impl) | Conditional Mandatory | 1 | Most relevant 1 category |
| Standard (non-impl) | Optional | — | User-selected |
Implementation file definition: Standard (impl) applies when at least one target file is implementation code rather than docs/tests-only scaffolding.
Input
- Target files (required): Repository-relative paths of files to verify.
- Change description (required): Description of what changed, its impact scope, and the rationale behind the change.
- Risk tier (optional): Critical / Sensitive / Standard. Defaults to Sensitive when omitted.
Procedure
- Generate Header: Write verification metadata directly:
- Mode: adversarial-verify
- Target Files: list of target files
- Risk Tier: Critical / Sensitive / Standard
- Verified At: UTC timestamp (obtain via
date -u +"%Y-%m-%dT%H:%M:%SZ")
- Load Context: Read all user-provided target files and
<skill-root>/references/attack-vectors.md(including the optional## Maintainer-Curated Extension Vectorssection when present). - Select Attack Categories: Based on the change description and the content of target files, select applicable attack categories from the reference. Do NOT blindly apply all categories — choose only those relevant to the actual change. If
## Maintainer-Curated Extension Vectorscontains vectors matching the change characteristics, include them as additional probe targets regardless of the selected categories. - Execute Attacks: For each selected attack vector:
- Design a concrete test or probe targeting the implementation.
- Create the test file (naming:
*_adversarial_test.*or in a dedicatedadversarial/directory). - Execute the test/probe.
- Record: attack vector, test file, command executed, exit code, result (DEFENDED / VULNERABLE), evidence.
- Enforce tier minimums:
- Critical: execute at least 3 probes.
- Sensitive: execute at least 2 probes including Category 1 (Input Boundary) and the most relevant additional category.
- Standard (impl): execute at least 1 probe using the most relevant category.
- Standard (non-impl): no minimum probe count.
[required]vector coverage — this step defines coverage obligations;attack-vectors.mdprovides the tags.[required]marks minimum-coverage vectors; non-required vectors remain applicable and should be probed when relevant — the tag does not grant skip permission.- Critical / Sensitive: cover all
[required]vectors within selected categories. For each: (a) execute a probe, or (b) document why it is non-applicable. Uncovered[required]vectors without documented rationale →Overall Verdict: FAIL. - Standard (impl): cover the single most relevant
[required]vector in the selected category. - Standard (non-impl): no
[required]coverage obligation.
- Critical / Sensitive: cover all
- Coverage Gate: Verify
[required]vector coverage procedurally:- Identify all
[required]vectors within selected categories fromattack-vectors.md. - Cross-reference each against the Attack Summary table entries.
- Standard: no
[required]coverage obligation — proceed. - Sensitive / Critical: if any
[required]vector is uncovered without documented N/A rationale →Overall Verdict: FAIL.
- Identify all
- Compute Verdict:
Overall Verdict: PASSonly when ALL attack probes result in DEFENDED and the Coverage Gate is PASS. Any VULNERABLE or coverage FAIL →Overall Verdict: FAIL. - Write Report: Output to
adversarial-report.md. - Write file paths in repository-relative form. If you mention a skill helper command, render it as
scripts/<name>.sh, never an absolute filesystem path.
Edge Cases
- Zero applicable attack categories: If the Selection Guidance table yields no relevant categories for the change area, apply tier-based fallbacks:
- Critical / Sensitive: categories 1 (Input Boundary) and 2 (Error Handling) as baseline.
- Standard (impl): category 1 (Input Boundary) only (1 probe minimum).
- Standard (non-impl): user judgment (optional invocation). Record the rationale for limited applicability in the report.
- Missing test infrastructure: If the project lacks a test framework or runtime needed to execute attack probes, stop as
BLOCKEDand request the user to set up the necessary infrastructure. Do not skip attacks because tooling is absent. - Attack probe budget:
- Critical: minimum 3 probes, target 3-8, cap at 15.
- Sensitive: minimum 2 probes, target 2-4, cap at 8.
- Standard (impl): minimum 1 probe, target 1-2, cap at 4.
- Standard (non-impl): choose probe count by scope and document rationale.
On FAIL
- Report specific vulnerabilities with reproduction steps.
- The user is responsible for fixing identified vulnerabilities and re-running adversarial verification.
- If the run reveals a reusable attack vector, record it in the adversarial report and propose a separate skill-maintenance task. Do NOT edit
<skill-root>/references/attack-vectors.mdduring adversarial verification.
Output Format
# Adversarial Verification Report
## Verification Metadata
- **Mode**: adversarial-verify
- **Target Files**: [list]
- **Risk Tier**: [tier]
- **Verified At**: [UTC timestamp]
- **Overall Verdict**: PASS | FAIL
## Attack Summary
| # | Category | Attack Vector | Required? | Test File | Command | Exit Code | Result | Evidence |
|---|----------|--------------|-----------|-----------|---------|-----------|--------|----------|
| 1 | [category] | [vector] | yes/no | [file] | `[command]` | [code] | DEFENDED/VULNERABLE | [brief evidence] |
## Vulnerabilities Found
<!-- Only present when Overall Verdict is FAIL -->
| # | Attack Vector | Severity | Reproduction | Suggested Fix |
|---|--------------|----------|--------------|---------------|
| 1 | [vector] | [critical/high/medium] | [steps] | [suggestion] |
## Decision
- Adversarial verification: PASS/FAIL
- Reason: [rationale]
What ships with it: 1 file
6.6 KB alongside SKILL.md
references/
- attack-vectors.md6.6 KB