zeroize-audit

Detect missing or optimized-away zeroization in C/C++ and Rust using LLVM IR and assembly evidence.

Updated May 2, 2026
One-click install
npx skills add https://github.com/ayehiaa/my-travel-assistant --skill zeroize-audit-ayehiaa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zeroize-audit
Source: https://github.com/ayehiaa/my-travel-assistant/tree/main/.agents/skills/zeroize-audit
Command: npx skills add https://github.com/ayehiaa/my-travel-assistant --skill zeroize-audit-ayehiaa

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml>=6.0, and includes references (resource) components.

What problem does it solve?

It helps you detect missing zeroization of secrets and cases where secure wiping is weakened or removed by compiler optimizations, so sensitive data is not left lingering in memory.

Core Features & Use Cases

  • Source-level audit: Finds absent or partial zeroization, missing cleanup on some paths, and insecure heap allocation patterns for C/C++ and Rust.
  • Compiler-level evidence: Detects when wipes disappear after optimization using mandatory IR/assembly evidence, including control-flow dominance checks and semantic IR checks.
  • PoC-backed validation: Generates and validates proof-of-concept programs and produces a structured final report (human-readable markdown plus machine-readable JSON).
  • Use cases: Auditing cryptographic code, authentication/password handling flows, and security-critical cleanup logic across C/C++ and Rust.

Quick Start

Use the zeroize-audit skill to audit your repository for missing or optimized-away zeroization by providing your repo path along with the required C/C++ compile database or the Rust Cargo manifest.

Frequently Asked Questions about zeroize-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect if compiler optimizations remove zeroization of sensitive data in C/C++ or Rust?

To detect optimized-away zeroization of sensitive data, you can audit your source code alongside compiler evidence from LLVM IR and assembly. This process validates that secure wipes survive optimization by checking control-flow dominance and semantic IR across all execution paths.

Why does the compiler optimize away my secure memory wiping of secrets?

Compiler optimizations often remove secure memory wiping because dead-store elimination treats zeroization of local variables as unnecessary after their last read. Analyzing LLVM IR and assembly evidence proves whether sensitive data wipes actually survive optimization or are silently removed.

What do I need to audit cryptographic code for missing zeroization using compiler evidence?

To audit cryptographic code for missing zeroization, you must provide your repository path and the required build context: a C/C++ compile database (compile_commands.json) or a Rust Cargo manifest. This enables source scanning and LLVM IR/assembly analysis.

Can I verify heap and stack retention risks for sensitive data across all execution paths?

You can verify heap and stack retention risks for sensitive data by scanning for absent or partial zeroization and missing cleanup across all execution paths. The audit generates PoC-backed validation and outputs structured JSON plus a markdown report with IR/ASM/CFG evidence.

What is the best way to prove sensitive wipes survive optimization in security audits?

The best way to prove sensitive wipes survive optimization is combining source-level scanning with mandatory compiler-level evidence from LLVM IR and assembly. This approach detects insecure heap allocation patterns and validates proof-of-concept programs for security-critical cleanup logic.