memory-safety-c-cpp

memory-safety-c-cpp is a skill for Claude Code, Codex from provos/ironcurtain. It costs 113 tokens per session (4,486 once invoked), scanned A, original, Apache-2.0.

A reference guide to memory-safety bugs in native C and C++ programs, including standard names, arithmetic patterns, and common pointer mistakes.

In plain words
What is it for?
Use it when examining suspected memory corruption, planning tests or harnesses, or interpreting sanitizer findings such as buffer overflows and use-after-free errors.
Why use it?
It gives an investigation a shared vocabulary for describing bugs and linking them to detection tools and root causes. The supplied excerpt does not show the add-on performing the analysis itself.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when examining suspected memory corruption, planning tests or harnesses, or interpreting sanitizer findings such as buffer overflows and use-after-free errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/provos/ironcurtain/memory-safety-c-cpp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add provos/ironcurtain --skill memory-safety-c-cpp
Clone the repo
git clone --depth 1 https://github.com/provos/ironcurtain

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-safety-c-cpp

README.md
[![agentmods](https://agentmods.dev/badge/skills/provos/ironcurtain/memory-safety-c-cpp/github.svg)](https://agentmods.dev/skills/provos/ironcurtain/memory-safety-c-cpp)
Your own site
<a href="https://agentmods.dev/skills/provos/ironcurtain/memory-safety-c-cpp"><img src="https://agentmods.dev/badge/skills/provos/ironcurtain/memory-safety-c-cpp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-safety-c-cpp

Your own site · 80×15
<a href="https://agentmods.dev/skills/provos/ironcurtain/memory-safety-c-cpp"><img src="https://agentmods.dev/badge/skills/provos/ironcurtain/memory-safety-c-cpp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,486 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 7 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 152
    Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.
    Fix: Remove any instruction telling the agent to never refuse or always comply. The agent must retain the ability to decline unsafe, out-of-scope, or harmful requests.
  • medium Prompt Injection · line 14
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 16
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 26
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 17
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 19
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
  • medium Prompt Injection · line 28
    Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
    Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.04486
Opus 5.5 $0.00045 $0.01794
Sonnet 5.5 $0.00023 $0.00897
Haiku 4.5 $0.00011 $0.00449

Measured 1mo ago against content hash b3c5e3177560, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

memory-safety-c-cpp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/workflow/workflows/vuln-discovery/skills/memory-safety-c-cpp/SKILL.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Memory-Safety Bugs in C/C++

Reference vocabulary for native C/C++ code with sanitizer support. Catalogs the bug classes, patterns, and exploitability factors a memory-safety investigation needs to reason about.

Bug-class taxonomy

Identifiers below are the canonical IDs to use when naming a bug class in any artifact. Map each to the oracle that catches it and the root-cause CWE.

Bug class Oracle Root-cause CWE Where it lives
heap_overflow ASAN heap-buffer-overflow CWE-122 Read or write past a heap allocation
stack_overflow ASAN stack-buffer-overflow CWE-121 Read or write past a stack frame buffer
out_of_bounds_read ASAN OOB-read CWE-125 Generic OOB load — distinct from heap/stack only by site
out_of_bounds_write ASAN OOB-write CWE-787 Generic OOB store
use_after_free ASAN heap-use-after-free CWE-416 Pointer dereferenced after the allocation it pointed to was freed
double_free ASAN attempting double-free CWE-415 free() called twice on the same allocation
integer_overflow UBSAN signed-integer-overflow / unsigned-integer-overflow CWE-190 Arithmetic produces a value outside the type's range
type_confusion ASAN OOB or UBSAN vptr CWE-843 A value is interpreted as a different type than it was created with — frequently across vtable / dispatch-table boundaries
format_string ASAN OOB / UBSAN CWE-134 Attacker-controlled bytes reach the format-spec argument of a printf-family call
null_deref SIGSEGV (caught by ASAN as SEGV on unknown address 0x000000000000) CWE-476 Dereference of a pointer the attacker can force to NULL
uninitialized_memory MSan use-of-uninitialized-value CWE-457 Read of memory before it was written
race_condition TSAN data race CWE-362 Concurrent unsynchronized access (a TOCTOU is a special case where the racing accesses are check-then-use)
memory_leak LSan / ASAN leak report CWE-401 Heap allocation lost without free()

Read the full file on GitHub · 168 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 168 lines · 113 tokens per session scan A b3c5e3177560

Subscribe to this mod's changes

memory-safety-c-cpp is a skill published in the GitHub repository provos/ironcurtain (614 stars, last pushed yesterday), licensed Apache-2.0. It adds 113 tokens to every session and 4,486 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.