zeroize-audit

Detect missing or compiler-optimized zeroization in C, C++, and Rust source code.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill zeroize-audit-manuelbrandner85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: zeroize-audit
Source: https://github.com/manuelbrandner85/Weltenbibliothekapp/tree/main/.agents/skills/zeroize-audit
Command: npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill zeroize-audit-manuelbrandner85

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires clang, uv, uvx, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the critical security risk of sensitive data (like cryptographic keys or passwords) remaining in memory after use because compiler optimizations or improper cleanup routines failed to zeroize the memory.

Core Features & Use Cases

  • Compiler-Level Analysis: Detects when compilers remove zeroization code during optimization (Dead Store Elimination).
  • Assembly & IR Verification: Provides evidence-based auditing using LLVM IR and assembly analysis to confirm if secrets are spilled to registers or retained on the stack.
  • Use Case: Use this to verify that your cryptographic library's secret-wiping functions are not being optimized away by the compiler, ensuring compliance with security standards.

Quick Start

Run the zeroize-audit skill on the current repository to generate a security report identifying missing or optimized-away zeroization patterns.

Frequently Asked Questions about zeroize-audit

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

FAQPage Schema
Why does the compiler remove my memory zeroization code in C and C++?

Compilers remove zeroization code through Dead Store Elimination, an optimization that deletes writes to variables never read again. This leaves sensitive cryptographic keys or credentials retained in stack memory or CPU registers.

How do I audit sensitive data zeroization in Rust and C++?

Audit sensitive data zeroization by analyzing LLVM IR and assembly outputs to verify control-flow and confirm secrets are not spilled to registers. This detects missing or compiler-optimized zeroization in cryptographic implementations.

Does this zeroization audit require clang to inspect LLVM IR?

Yes, clang is required to perform the assembly-level inspection and LLVM IR comparison needed to detect secret retention. You also need uv, uvx, and jq to run the scripts and process the generated security report.

What's the best way to verify if secret-wiping functions are optimized away?

The best way to verify if secret-wiping functions are optimized away is through evidence-based auditing using LLVM IR and assembly analysis. This confirms if secrets are physically retained on the stack despite source code cleanup routines.

When do I need assembly-level inspection for memory safety?

You need assembly-level inspection for memory safety when verifying cryptographic implementations and credential handling for security compliance. It proves whether compiler optimizations removed zeroization patterns that source code review alone cannot detect.