Awesome-omni-skills zeroize-audit
zeroize-audit \u2014 Claude Skill workflow skill. Use this skill when the user needs Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C/C++/Rust code handling secrets, keys, passwords, or other sensitive data and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.
git clone https://github.com/diegosouzapw/awesome-omni-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/zeroize-audit" ~/.claude/skills/diegosouzapw-awesome-omni-skills-zeroize-audit && rm -rf "$T"
skills/zeroize-audit/SKILL.mdzeroize-audit — Claude Skill
Overview
This public intake copy packages
plugins/antigravity-awesome-skills-claude/skills/zeroize-audit from https://github.com/sickn33/antigravity-awesome-skills into the native Omni Skills editorial shape without hiding its origin.
Use it when the operator needs the upstream workflow, support files, and repository context to stay intact while the public validator and private enhancer continue their normal downstream flow.
This intake keeps the copied upstream files intact and uses
metadata.json plus ORIGIN.md as the provenance anchor for review.
zeroize-audit — Claude Skill
Imported source sections that did not map cleanly to the public headings are still preserved below or in the support files. Notable imported sections: Purpose, Scope, Inputs, Prerequisites, Approved Wipe APIs, Finding Capabilities.
When to Use This Skill
Use this section as the trigger filter. It should make the activation boundary explicit before the operator loads files, runs commands, or opens a pull request.
- Auditing cryptographic implementations (keys, seeds, nonces, secrets)
- Reviewing authentication systems (passwords, tokens, session data)
- Analyzing code that handles PII or sensitive credentials
- Verifying secure cleanup in security-critical codebases
- Investigating memory safety of sensitive data handling
- General code review without security focus
Operating Table
| Situation | Start here | Why it matters |
|---|---|---|
| First-time use | | Confirms repository, branch, commit, and imported path before touching the copied workflow |
| Provenance review | | Gives reviewers a plain-language audit trail for the imported source |
| Workflow execution | | Starts with the smallest copied file that materially changes execution |
| Supporting context | | Adds the next most relevant copied source file without loading the entire package |
| Handoff decision | | Helps the operator switch to a stronger native skill when the task drifts |
Workflow
This workflow is intentionally editorial and operational at the same time. It keeps the imported source useful to the operator while still satisfying the public intake standards that feed the downstream enhancer flow.
- Confirm the user goal, the scope of the imported workflow, and whether this skill is still the right router for the task.
- Read the overview and provenance files before loading any copied upstream support files.
- Load only the references, examples, prompts, or scripts that materially change the outcome for the current request.
- Execute the upstream workflow while keeping provenance and source boundaries explicit in the working notes.
- Validate the result against the upstream expectations and the evidence you can point to in the copied files.
- Escalate or hand off to a related skill when the work moves out of this imported workflow's center of gravity.
- Before merge or closure, record what was used, what changed, and what the reviewer still needs to verify.
Imported Workflow Notes
Imported: Purpose
Detect missing zeroization of sensitive data in source code and identify zeroization that is removed or weakened by compiler optimizations (e.g., dead-store elimination), with mandatory LLVM IR/asm evidence. Capabilities include:
- Assembly-level analysis for register spills and stack retention
- Data-flow tracking for secret copies
- Heap allocator security warnings
- Semantic IR analysis for loop unrolling and SSA form
- Control-flow graph analysis for path coverage verification
- Runtime validation test generation
Examples
Example 1: Ask for the upstream workflow directly
Use @zeroize-audit to handle <task>. Start from the copied upstream workflow, load only the files that change the outcome, and keep provenance visible in the answer.
Explanation: This is the safest starting point when the operator needs the imported workflow, but not the entire repository.
Example 2: Ask for a provenance-grounded review
Review @zeroize-audit against metadata.json and ORIGIN.md, then explain which copied upstream files you would load first and why.
Explanation: Use this before review or troubleshooting when you need a precise, auditable explanation of origin and file selection.
Example 3: Narrow the copied support files before execution
Use @zeroize-audit for <task>. Load only the copied references, examples, or scripts that change the outcome, and name the files explicitly before proceeding.
Explanation: This keeps the skill aligned with progressive disclosure instead of loading the whole copied package by default.
Example 4: Build a reviewer packet
Review @zeroize-audit using the copied upstream files plus provenance, then summarize any gaps before merge.
Explanation: This is useful when the PR is waiting for human review and you want a repeatable audit packet.
Best Practices
Treat the generated public skill as a reviewable packaging layer around the upstream repository. The goal is to keep provenance explicit and load only the copied source material that materially improves execution.
- Keep the imported skill grounded in the upstream repository; do not invent steps that the source material cannot support.
- Prefer the smallest useful set of support files so the workflow stays auditable and fast to review.
- Keep provenance, source commit, and imported file paths visible in notes and PR descriptions.
- Point directly at the copied upstream files that justify the workflow instead of relying on generic review boilerplate.
- Treat generated examples as scaffolding; adapt them to the concrete task before execution.
- Route to a stronger native skill when architecture, debugging, design, or security concerns become dominant.
Troubleshooting
Problem: The operator skipped the imported context and answered too generically
Symptoms: The result ignores the upstream workflow in
plugins/antigravity-awesome-skills-claude/skills/zeroize-audit, fails to mention provenance, or does not use any copied source files at all.
Solution: Re-open metadata.json, ORIGIN.md, and the most relevant copied upstream files. Load only the files that materially change the answer, then restate the provenance before continuing.
Problem: The imported workflow feels incomplete during review
Symptoms: Reviewers can see the generated
SKILL.md, but they cannot quickly tell which references, examples, or scripts matter for the current task.
Solution: Point at the exact copied references, examples, scripts, or assets that justify the path you took. If the gap is still real, record it in the PR instead of hiding it.
Problem: The task drifted into a different specialization
Symptoms: The imported skill starts in the right place, but the work turns into debugging, architecture, design, security, or release orchestration that a native skill handles better. Solution: Use the related skills section to hand off deliberately. Keep the imported provenance visible so the next skill inherits the right context instead of starting blind.
Related Skills
- Use when the work is better handled by that native specialization after this imported skill establishes context.@00-andruia-consultant-v2
- Use when the work is better handled by that native specialization after this imported skill establishes context.@10-andruia-skill-smith-v2
- Use when the work is better handled by that native specialization after this imported skill establishes context.@20-andruia-niche-intelligence-v2
- Use when the work is better handled by that native specialization after this imported skill establishes context.@3d-web-experience-v2
Additional Resources
Use this support matrix and the linked files below as the operator packet for this imported skill. They should reflect real copied source material, not generic scaffolding.
| Resource family | What it gives the reviewer | Example path |
|---|---|---|
| copied reference notes, guides, or background material from upstream | |
| worked examples or reusable prompts copied from upstream | |
| upstream helper scripts that change execution or validation | |
| routing or delegation notes that are genuinely part of the imported package | |
| supporting assets or schemas copied from the source package | |
Imported Reference Notes
Imported: Cross-Reference Convention
IDs are namespaced per agent to prevent collisions during parallel execution:
| Entity | Pattern | Assigned By |
|---|---|---|
| Sensitive object (C/C++) | – | |
| Sensitive object (Rust) | – (Rust namespace) | |
| Source finding (C/C++) | | |
| Source finding (Rust) | | |
| IR finding (C/C++) | | |
| ASM finding (C/C++) | | |
| CFG finding | | |
| Semantic IR finding | | |
| Rust MIR finding | | |
| Rust LLVM IR finding | | |
| Rust assembly finding | | |
| Translation unit | | Orchestrator |
| Final finding | | |
Every finding JSON object includes
related_objects, related_findings, and evidence_files fields for cross-referencing between agents.
Imported: Scope
- Read-only against the target codebase (does not modify audited code; writes analysis artifacts to a temporary working directory).
- Produces a structured report (JSON).
- Requires valid build context (
) and compilable translation units.compile_commands.json - "Optimized away" findings only allowed with compiler evidence (IR/asm diff).
Imported: Inputs
See
{baseDir}/schemas/input.json for the full schema. Key fields:
| Field | Required | Default | Description |
|---|---|---|---|
| yes | — | Repo root |
| no | | Path to for C/C++ analysis. Required if is not set. |
| no | | Path to for Rust crate analysis. Required if is not set. |
| no | — | YAML defining heuristics and approved wipes |
| no | | Optimization levels for IR comparison. O1 is the diagnostic level: if a wipe disappears at O1 it is simple DSE; O2 catches more aggressive eliminations. |
| no | | Languages to analyze |
| no | — | Limit on translation units processed from compile DB |
| no | | , , or — controls Serena MCP usage |
| no | | Downgrade , , and to when MCP is unavailable |
| no | — | Timeout budget for MCP semantic queries |
| no | all 11 exploitable | Finding categories for which to generate PoCs. C/C++ findings: all 11 categories supported. Rust findings: only , , and are supported; other Rust categories are marked . |
| no | | Output directory for generated PoCs |
| no | | Enable assembly emission and analysis (Step 8); produces , . Auto-disabled if is missing. |
| no | | Enable semantic LLVM IR analysis (Step 9); produces |
| no | | Enable control-flow graph analysis (Step 10); produces , |
| no | | Enable runtime test harness generation (Step 11) |
Imported: Prerequisites
Before running, verify the following. Each has a defined failure mode.
C/C++ prerequisites:
| Prerequisite | Failure mode if missing |
|---|---|
at path | Fail fast — do not proceed |
on PATH | Fail fast — IR/ASM analysis impossible |
on PATH (for Serena) | If : fail. If : continue without MCP; downgrade affected findings per Confidence Gating rules. |
| Fail fast — cannot extract per-TU flags |
| Fail fast — IR analysis impossible |
| Warn and skip assembly findings (STACK_RETENTION, REGISTER_SPILL) |
| Warn and treat as MCP unavailable |
| Warn and use raw MCP output |
Rust prerequisites:
| Prerequisite | Failure mode if missing |
|---|---|
at path | Fail fast — do not proceed |
passes | Fail fast — crate must be buildable |
on PATH | Fail fast — nightly required for MIR and LLVM IR emission |
on PATH | Fail fast — required to run Python analysis scripts |
| Warn — run preflight manually. Checks all tools, scripts, nightly, and optionally . Use for machine-readable output, to also validate the crate builds. |
| Fail fast — MIR analysis impossible (, , supported; can be file or directory) |
| Fail fast — LLVM IR analysis impossible ( required; , supported; must be ) |
| Warn and skip assembly findings (, ). Supports , , , , ; can be file or directory. |
| Warn and skip MIR-level optimization comparison. Accepts 2+ MIR files, normalizes, diffs pairwise, and reports first opt level where zeroize/drop-glue patterns disappear. |
| Warn and skip semantic source analysis |
| Warn and skip dangerous API scan |
| Warn and skip MIR analysis |
| Warn and skip LLVM IR analysis |
| Warn and skip Rust assembly analysis (, , drop-glue checks). Dispatches to (production) or (EXPERIMENTAL — AArch64 findings require manual verification). |
| Required by for x86-64 analysis; warn and skip if missing |
| Required by for AArch64 analysis (EXPERIMENTAL); warn and skip if missing |
Common prerequisite:
| Prerequisite | Failure mode if missing |
|---|---|
| Fail fast — PoC generation is mandatory |
Imported: Approved Wipe APIs
The following are recognized as valid zeroization. Configure additional entries in
{baseDir}/configs/.
C/C++
explicit_bzeromemset_sSecureZeroMemoryOPENSSL_cleansesodium_memzero- Volatile wipe loops (pattern-based; see
involatile_wipe_patterns
){baseDir}/configs/default.yaml - In IR:
with volatile flag, volatile stores, or non-elidable wipe callllvm.memset
Rust
trait (zeroize::Zeroize
method)zeroize()
wrapper (drop-based)Zeroizing<T>
derive macroZeroizeOnDrop
Imported: Finding Capabilities
Findings are grouped by required evidence. Only attempt findings for which the required tooling is available.
| Finding ID | Description | Requires | PoC Support |
|---|---|---|---|
| No zeroization found in source | Source only | Yes (C/C++ + Rust) |
| Incorrect size or incomplete wipe | Source only | Yes (C/C++ + Rust) |
| Zeroization missing on some control-flow paths (heuristic) | Source only | Yes (C/C++ only) |
| Sensitive data copied without zeroization tracking | Source + MCP preferred | Yes (C/C++ + Rust) |
| Secret uses insecure allocator (malloc vs. secure_malloc) | Source only | Yes (C/C++ only) |
| Compiler removed zeroization | IR diff required (never source-only) | Yes |
| Stack frame may retain secrets after return | Assembly required (C/C++); LLVM IR + evidence (Rust); assembly corroboration upgrades to | Yes (C/C++ only) |
| Secrets spilled from registers to stack | Assembly required (C/C++); LLVM IR +call-site evidence (Rust); assembly corroboration upgrades to | Yes (C/C++ only) |
| Error-handling paths lack cleanup | CFG or MCP required | Yes |
| Wipe doesn't dominate all exits | CFG or MCP required | Yes |
| Unrolled loop wipe is incomplete | Semantic IR required | Yes |
Imported: Agent Architecture
The analysis pipeline uses 11 agents across 8 phases, invoked by the orchestrator (
{baseDir}/prompts/task.md) via Task. Agents write persistent finding files to a shared working directory (/tmp/zeroize-audit-{run_id}/), enabling parallel execution and protecting against context pressure.
| Agent | Phase | Purpose | Output Directory |
|---|---|---|---|
| Phase 0 | Preflight checks (tools, toolchain, compile DB, crate build), config merge, workdir creation, TU enumeration | |
| Phase 1, Wave 1 (C/C++ only) | Resolve symbols, types, and cross-file references via Serena MCP | |
| Phase 1, Wave 2a (C/C++ only) | Identify sensitive objects, detect wipes, validate correctness, data-flow/heap | |
| Phase 1, Wave 2b (Rust only, parallel with 2a) | Rustdoc JSON trait-aware analysis + dangerous API grep | |
| Phase 2, Wave 3 (C/C++ only, N parallel) | Per-TU IR diff, assembly, semantic IR, CFG analysis | |
| Phase 2, Wave 3R (Rust only, single agent) | Crate-level MIR, LLVM IR, and assembly analysis | |
| Phase 3 (interim) + Phase 6 (final) | Collect findings from all agents, apply confidence gates; merge PoC results and produce final report | |
| Phase 4 | Craft bespoke proof-of-concept programs (C/C++: all categories; Rust: MISSING_SOURCE_ZEROIZE, SECRET_COPY, PARTIAL_WIPE) | |
| Phase 5 | Compile and run all PoCs | |
| Phase 5 | Verify each PoC proves its claimed finding | |
| Phase 7 (optional) | Generate runtime validation test harnesses | |
The orchestrator reads one per-phase workflow file from
{baseDir}/workflows/ at a time, and maintains orchestrator-state.json for recovery after context compression. Agents receive configuration by file path (config_path), not by value.
Execution flow
Phase 0: 0-preflight agent — Preflight + config + create workdir + enumerate TUs → writes orchestrator-state.json, merged-config.yaml, preflight.json Phase 1: Wave 1: 1-mcp-resolver (skip if mcp_mode=off OR language_mode=rust) Wave 2a: 2-source-analyzer (C/C++ only; skip if no compile_db) ─┐ parallel Wave 2b: 2b-rust-source-analyzer (Rust only; skip if no cargo_manifest) ─┘ Phase 2: Wave 3: 3-tu-compiler-analyzer x N (C/C++ only; parallel per TU) Wave 3R: 3b-rust-compiler-analyzer (Rust only; single crate-level agent) Phase 3: Wave 4: 4-report-assembler (mode=interim → findings.json; reads all agent outputs) Phase 4: Wave 5: 5-poc-generator (C/C++: all categories; Rust: MISSING_SOURCE_ZEROIZE, SECRET_COPY, PARTIAL_WIPE; other Rust findings: poc_supported=false) Phase 5: PoC Validation & Verification Step 1: 5b-poc-validator agent (compile and run all PoCs) Step 2: 5c-poc-verifier agent (verify each PoC proves its claimed finding) Step 3: Orchestrator presents verification failures to user via AskUserQuestion Step 4: Orchestrator merges all results into poc_final_results.json Phase 6: Wave 6: 4-report-assembler (mode=final → merge PoC results, final-report.md) Phase 7: Wave 7: 6-test-generator (optional) Phase 8: Orchestrator — Return final-report.md
Imported: Detection Strategy
Analysis runs in two phases. For complete step-by-step guidance, see
{baseDir}/references/detection-strategy.md.
| Phase | Steps | Findings produced | Required tooling |
|---|---|---|---|
| Phase 1 (Source) | 1–6 | , , , , | Source + compile DB |
| Phase 2 (Compiler) | 7–12 | , , , †, ‡, ‡ | , IR/ASM tools |
* requires
enable_asm=true (default)
† requires enable_semantic_ir=true
‡ requires enable_cfg=true
Imported: Output Format
Each run produces two outputs:
— Comprehensive markdown report (primary human-readable output)final-report.md
— Structured JSON matchingfindings.json
(for machine consumption and downstream tools){baseDir}/schemas/output.json
Markdown Report Structure
The markdown report (
final-report.md) contains these sections:
- Header: Run metadata (run_id, timestamp, repo, compile_db, config summary)
- Executive Summary: Finding counts by severity, confidence, and category
- Sensitive Objects Inventory: Table of all identified objects with IDs, types, locations
- Findings: Grouped by severity then confidence. Each finding includes location, object, all evidence (source/IR/ASM/CFG), compiler evidence details, and recommended fix
- Superseded Findings: Source findings replaced by CFG-backed findings
- Confidence Gate Summary: Downgrades applied and overrides rejected
- Analysis Coverage: TUs analyzed, agent success/failure, features enabled
- Appendix: Evidence Files: Mapping of finding IDs to evidence file paths
Structured JSON
The
findings.json file follows the schema in {baseDir}/schemas/output.json. Each Finding object:
{ "id": "ZA-0001", "category": "OPTIMIZED_AWAY_ZEROIZE", "severity": "high", "confidence": "confirmed", "language": "c", "file": "src/crypto.c", "line": 42, "symbol": "key_buf", "evidence": "store volatile i8 0 count: O0=32, O2=0 — wipe eliminated by DSE", "compiler_evidence": { "opt_levels": ["O0", "O2"], "o0": "32 volatile stores targeting key_buf", "o2": "0 volatile stores (all eliminated)", "diff_summary": "All volatile wipe stores removed at O2 — classic DSE pattern" }, "suggested_fix": "Replace memset with explicit_bzero or add compiler_fence(SeqCst) after the wipe", "poc": { "file": "generated_pocs/ZA-0001.c", "makefile_target": "ZA-0001", "compile_opt": "-O2", "requires_manual_adjustment": false, "validated": true, "validation_result": "exploitable" } }
See
{baseDir}/schemas/output.json for the full schema and enum values.
Imported: Confidence Gating
Evidence thresholds
A finding requires at least 2 independent signals to be marked
confirmed. With 1 signal, mark likely. With 0 strong signals (name-pattern match only), mark needs_review.
Signals include: name pattern match, type hint match, explicit annotation, IR evidence, ASM evidence, MCP cross-reference, CFG evidence, PoC validation.
PoC validation as evidence signal
Every finding is validated against a bespoke PoC. After compilation and execution, each PoC is also verified to ensure it actually tests the claimed vulnerability. The combined result is an evidence signal:
| PoC Result | Verified | Impact |
|---|---|---|
| Exit 0 (exploitable) | Yes | Strong signal — can upgrade to |
| Exit 1 (not exploitable) | Yes | Downgrade severity to (informational); retain in report |
| Exit 0 or 1 | No (user accepted) | Weaker signal — note verification failure in evidence |
| Exit 0 or 1 | No (user rejected) | No confidence change; annotate as |
| Compile failure / no PoC | — | No confidence change; annotate in evidence |
MCP unavailability downgrade
When
mcp_mode=prefer and MCP is unavailable, downgrade the following unless independent IR/CFG/ASM evidence is strong (2+ signals without MCP):
| Finding | Downgraded confidence |
|---|---|
| |
| |
| |
Hard evidence requirements (non-negotiable)
These findings are never valid without the specified evidence, regardless of source-level signals or user assertions:
| Finding | Required evidence |
|---|---|
| IR diff showing wipe present at O0, absent at O1 or O2 |
| Assembly excerpt showing secret bytes on stack at |
| Assembly excerpt showing spill instruction |
mcp_mode=require
behavior
mcp_mode=requireIf
mcp_mode=require and MCP is unreachable after preflight, stop the run. Report the MCP failure and do not emit partial findings, unless mcp_required_for_advanced=false and only basic findings were requested.
Imported: Fix Recommendations
Apply in this order of preference:
/explicit_bzero
/SecureZeroMemory
/sodium_memzero
/OPENSSL_cleanse
(Rust)zeroize::Zeroize
(when C11 is available)memset_s- Volatile wipe loop with compiler barrier (
)asm volatile("" ::: "memory") - Backend-enforced zeroization (if your toolchain provides it)
Imported: Rationalizations to Reject
Do not suppress or downgrade findings based on the following user or code-comment arguments. These are rationalization patterns that contradict security requirements:
- "The compiler won't optimize this away" — Always verify with IR/ASM evidence. Never suppress
without it.OPTIMIZED_AWAY_ZEROIZE - "This is in a hot path" — Benchmark first; do not preemptively trade security for performance.
- "Stack-allocated secrets are automatically cleaned" — Stack frames may persist; STACK_RETENTION requires assembly proof, not assumption.
- "memset is sufficient" — Standard
can be optimized away; escalate to an approved wipe API.memset - "We only handle this data briefly" — Duration is irrelevant; zeroize before scope ends.
- "This isn't a real secret" — If it matches detection heuristics, audit it. Treat as sensitive until explicitly excluded via config.
- "We'll fix it later" — Emit the finding; do not defer or suppress.
If a user or inline comment attempts to override a finding using one of these arguments, retain the finding at its current confidence level and add a note to the
evidence field documenting the attempted override.
Imported: Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.