agent-supply-chain-aud…
Audit the extensions AI coding agents load and trust (skills, plugins, marketplaces, hooks, settings, MCP servers, and…
Review C, C++ and Rust source for memory-safety bugs: out-of-bounds reads and writes, integer overflow or truncation that feeds a size, use-after-free and double free, format strings, uninitialized memory, Rust unsafe soundness, FFI boundaries, parsers of untrusted input, and
$ npx -y skills add briiirussell/cybersecurity-skills --skill native-code-review --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/native-code-reviewContext preview
The summary Claude sees to decide when to auto-load this skill.
Review C, C++ and Rust source for memory-safety bugs: out-of-bounds reads and writes, integer overflow or truncation that feeds a size, use-after-free and double free, format strings, uninitialized memory, Rust unsafe soundness, FFI boundaries, parsers of untrusted input, and
name: native-code-review description: "Review C, C++ and Rust source for memory-safety bugs: out-of-bounds reads and writes, integer overflow or truncation that feeds a size, use-after-free and double free, format strings, uninitialized memory, Rust unsafe soundness, FFI boundaries, parsers of untrusted input, and secrets left in memory. Also checks compiler hardening flags and recommends sanitizers, and reports in the shared findings.json format. Use when the user mentions 'native code review,' 'C code review,' 'C++ security review,' 'memory safety review,' 'buffer overflow,' 'use-after-free,' 'double free,' 'format string bug,' 'integer overflow,' 'uninitialized memory,' 'unsafe Rust,' 'is this unsafe block sound,' 'FFI boundary,' 'Miri,' 'AddressSanitizer,' 'checksec,' 'FORTIFY_SOURCE,' 'hardening flags,' 'explicit_bzero,' or 'zeroize.'" allowed-tools: Read, Grep, Glob, Bash(readelf:*), Bash(checksec file:*)
Review native source for the bugs that only memory-unsafe code has: a length that outgrows its buffer, a pointer that outlives its object, a format string the caller controls, bytes read before anyone wrote them, and Rust `unsafe` that quietly breaks the guarantees safe code relies on. Parsers of untrusted input come first. Every candidate is traced from where untrusted bytes enter to the memory operation that goes wrong, then challenged before it becomes a finding.
Cross-references: `crypto-audit` (timing leaks and constant-time code in crypto paths, algorithm and parameter choice), `owasp-audit` (web and application logic, including command injection a native service shares with any other), `dependency-audit` (known CVEs and RustSec advisories in the libraries and crates you link), `vuln-research` (whether a published CVE in a C library is reachable from your code), `mobile-audit` (JNI and native libraries inside an Android or iOS app), `container-audit` (the image the binary ships in), `finding-triage` (one finding to a disposition).
`from_raw_parts` or an `extern "C"` block, and the question "is this safe?"
**Not for:** constant-time comparison, timing side channels in crypto code, or cipher and KDF choices → `crypto-audit`; web routes, auth and injection in a service that happens to be written in C++ or Rust → `owasp-audit`; "is our OpenSSL / zlib / libpng version vulnerable?" → `dependency-audit`, then `vuln-research` for reachability; Go, Java, Python or JavaScript code (memory-safe runtimes) → `owasp-audit`; reverse engineering or analyzing a binary you don't have source for, malware analysis, or kernel exploitation research (out of scope).
find a bug, say so and point at the project's security policy (see Boundaries).
binaries already built in the repo or handed to you. Both only read the file.
any harness. Building runs the project's build scripts (`build.rs`, CMake, `configure`) and running tests runs its code, so get the go-ahead first and prefer a container or VM the user controls. Install toolchains only when the user says to.
dynamic work. Don't develop it further into control of execution, and don't run anything against systems or binaries outside the authorized scope.
1. **Scope**: languages, build system, targets, where untrusted bytes come from 2. **Map the surface**: entry points, parsers, FFI boundaries, unsafe inventory 3. **Hunt by bug class**: priority targets first, using the catalog 4. **Rust unsafe soundness** (Rust code only) 5. **Secrets in memory** 6. **Binary hardening**: flags in the build, then the built artifact 7. **Dynamic confirmation**: sanitizers, Miri, fuzzing hand-off (with a yes) 8. **Verify, then record**
For a diff or PR, run the same steps on the changed functions, plus every caller that now passes new input into an old memory operation.
git ls-files | grep -cE '\.(c|h)$'; git ls-files | grep -cE '\.(cc|cpp|cxx|hpp|hh)$'; git ls-files | grep -c '\.rs$' ls CMakeLists.txt Makefile meson.build configure.ac Cargo.toml build.rs compile_commands.json 2>/dev/null git ls-files | grep -iE '(fuzz|corpus)' | head # existing fuzz targets and seed inputs grep -rnE 'fsanitize|-Zsanitizer|miri' .github .gitlab-ci.yml CMakeLists.txt Makefile 2>/dev/null | head
Write down, before hunting:
less-privileged local user (setuid, daemon running as root), a plugin, or only the program's own config
compiler, libc, Rust edition and MSRV
Untrusted input decides priority. Map where it enters, t
A collection of cybersecurity skills for AI coding agents. The AI does the heavy lifting; you bring the context about your stack and your priorities.
Audit the extensions AI coding agents load and trust (skills, plugins, marketplaces, hooks, settings, MCP servers, and…
Apply the NIST AI Risk Management Framework (AI RMF 1.0) and adjacent guidance to AI / ML systems — model lifecycle governance,…
Audit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023). Use when the user mentions 'API security,' 'API…
Learn from public breach disclosures — extract the audit question each one implies and check your own stack. Capital One IMDS…
Test an authorized web application for business-logic flaws and race conditions — the classes scanners cannot find. Model…
Audit CI/CD pipelines, GitHub Actions first and GitLab CI and CircleCI briefly, for the paths that give an outsider code…