zeroize-audit
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.
Security Assessment
Detected risks:
About zeroize-audit
The zeroize-audit skill is a security-focused auditing tool designed to identify improper handling of sensitive data in C, C++, and Rust codebases. Its primary purpose is to detect missing zeroization of secrets such as cryptographic keys, passwords, tokens, seeds, nonces, credentials, and other confidential values. In addition to finding absent cleanup operations, it analyzes whether intended zeroization routines have been removed or weakened by compiler optimizations, such as dead-store elimination. Findings related to optimization-induced removal require supporting compiler evidence from LLVM IR or assembly analysis.
The skill provides multiple layers of analysis to verify secure memory cleanup. Its capabilities include assembly-level inspection for stack retention and register spills, data-flow tracking of secret copies, heap allocator security warnings, semantic LLVM IR analysis for optimization effects such as loop unrolling, and control-flow graph analysis to verify cleanup coverage across execution paths. It can also generate runtime validation tests and produces structured JSON reports. Advanced analyses can be enabled selectively, including assembly analysis, semantic IR analysis, and control-flow verification. The skill operates in a read-only manner against the target codebase and writes analysis artifacts only to a temporary working directory.
This skill is intended for security engineers, cryptography developers, auditors, and teams maintaining security-critical software. Common use cases include auditing cryptographic implementations, reviewing authentication systems, validating secure handling of personally identifiable information (PII), investigating memory safety concerns involving secrets, and verifying that sensitive data is consistently wiped across normal and error-handling paths. It is best suited for projects with a valid build context and compilable translation units.
FAQ
What types of codebases can zeroize-audit analyze?
The skill supports C, C++, and Rust codebases. Analysis requires either a compile_commands.json file for C/C++ projects or a Cargo.toml file for Rust projects.
Can the skill prove that a zeroization operation was optimized away?
Yes. Findings that claim a wipe was optimized away require supporting compiler evidence, such as LLVM IR or assembly-level differences showing the removal or weakening of the zeroization.
Does zeroize-audit modify the source code being audited?
No. The skill operates in a read-only manner against the target codebase and only writes analysis artifacts to a temporary working directory.
What are the requirements for running the analysis?
The target project must have a valid build context and compilable translation units. C/C++ analysis typically requires compile_commands.json, while Rust analysis requires a Cargo.toml manifest.
Are all advanced findings available in every environment?
Not necessarily. Some advanced analyses depend on optional features such as assembly emission, semantic LLVM IR analysis, control-flow graph analysis, or Serena MCP availability. Certain findings may be downgraded for review when required semantic capabilities are unavailable.
All Files
48 filesInstall zeroize-audit
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
trailofbits/skills