跳到正文
Skillpedia
安全48k · #6238

zeroize-audit

它能做什么

这个工具会检查你的程序代码(C、C++、Rust),确保密码或密钥等敏感信息在使用后被彻底清除。它会排查这些数据可能泄露或没有被正确清除的漏洞,即使编译器对代码进行了优化也不例外。

适用场景

  • ✓审查处理敏感数据(密码、密钥等)的代码时。
  • ✓验证关键程序中敏感数据的清理是否安全时。
  • ✓审计加密实现和身份验证系统时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/zeroize-audit/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/zeroize-audit/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“检查我的 C++ 代码是否存在敏感数据泄露,并确保密码被正确擦除。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会在多个层级分析代码,包括机器码(汇编),以精确查看敏感数据如何被处理以及是否被擦除。它还会对比开启和未开启优化的代码,找出只在更快的版本中才会出现的问题。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Supporting material availability

This catalog copy contains the inline guidance below, but does not include the following supporting paths. They are external prerequisites, not bundled files:

Ask for the original supporting material or an existing installation before using a step that depends on these paths; this catalog does not identify a verified download source for them. Resolve each path relative to that installation, inspect its contents, and verify any applicable license and execution prerequisites. Do not run a command or claim a referenced procedure was followed until its required file exists. Do not fabricate the missing scripts or treat an unrelated file with the same name as equivalent. Independent steps fully documented here can proceed within the user’s authorized scope; report any dependent step as unavailable.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

zeroize-audit — Claude Skill

When to Use

  • 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

When NOT to Use

  • General code review without security focus
  • Performance optimization (unless related to secure wiping)
  • Refactoring tasks not related to sensitive data
  • Code without identifiable secrets or sensitive values

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

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 (compile_commands.json) and compilable translation units.
  • "Optimized away" findings only allowed with compiler evidence (IR/asm diff).

Inputs

See {baseDir}/schemas/input.json for the full schema. Key fields:

Field Required Default Description
path yes — Repo root
compile_db no null Path to compile_commands.json for C/C++ analysis. Required if cargo_manifest is not set.
cargo_manifest no null Path to Cargo.toml for Rust crate analysis. Required if compile_db is not set.
config no — YAML defining heuristics and approved wipes
opt_levels no ["O0","O1","O2"] 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.
languages no ["c","cpp","rust"] Languages to analyze
max_tus no — Limit on translation units processed from compile DB
mcp_mode no prefer off, prefer, or require — controls Serena MCP usage
mcp_required_for_advanced no true Downgrade SECRET_COPY, MISSING_ON_ERROR_PATH, and NOT_DOMINATING_EXITS to needs_review when MCP is unavailable
mcp_timeout_ms no — Timeout budget for MCP semantic queries

…

常见问题

什么是“归零化”(zeroization)?

归零化是指用零或其他无害的值覆写敏感数据,使其无法被恢复,从而清除敏感数据。

为什么编译器可能会删除归零化操作?

编译器会优化代码使其运行更快。如果编译器判断被擦除的数据之后不再需要,就可能删除这条擦除指令以节省运行时间,这可能带来安全风险。

使用这个工具需要获得许可吗?

需要。这个工具仅用于教育目的或经过授权的安全评估。使用前你必须获得系统所有者明确的书面许可。

详情

作者的原始描述

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.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#6238
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能