/depscan:depscan-memory-safetyfrom depscan
Finds memory-safety defects in C/C++ using atom and chen analyzers with confidence levels, compile-command support, SARIF output, and reachability ranking. Also inventories unsafe boundaries in other languages (cgo, unsafe code, FFI, JNI).
Ships in depscan. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill for native code. dep-scan's memory-safety check is not implemented yet (a scan that asks for it exits 4 with the reason), so atom and chen are run directly; this is the same analyzer dep-scan plans to use, and the skill moves to the dep-scan path when that lands.
The rules in reference/safety.md apply. atom
and chen read the project; --fetch-deps, the build tools and a CMake
configure step would run project tooling and need the user's consent.
--no-build-tools below keeps them off.
The memory-safety and callsites commands are in @appthreat/atom 4.0.2
and newer. atom --help lists the commands in its usage line; an atom
without memory-safety there is too old, and the analysis stays not
assessed until the user chooses to upgrade it.
mkdir -p /absolute/path/to/ms-reports
atom memory-safety -l c --compile-commands /absolute/path/to/project/compile_commands.json \
--min-confidence medium --no-build-tools \
--parse-report /absolute/path/to/ms-reports/parse-report.json \
-o /absolute/path/to/ms-reports/ms-app.atom \
--slice-outfile /absolute/path/to/ms-reports/findings.json \
/absolute/path/to/project
Use -l cpp for C++. Results are much better with a
compile_commands.json; without one, --auto-defines runs a macro census
first and defines the build-option macros that hide #if code (it changes
what is analysed, so say that you used it). --format sarif writes SARIF
2.1.0 instead of JSON; --memory-api-config <file> declares the project's
in-house allocation wrappers; --min-confidence takes low, medium or high
(medium is the reviewed default; low is noisy).
The findings are a JSON list. Each carries a rule (MS-BOUND-002,
MS-ALLOC-004 and others across the bounds, allocation-state, integer and
conversion, null, escape, format-string, initialisation, invalidation,
TOCTOU, division, shift, pointer and overlap families), a cwe, a
severity, a confidence, file and line, and a flow: the sequence
from the length argument or allocation to the memory operation. The
confidence is chen's, not yours to raise; quote it.
The --parse-report file lists every file the frontends left out or only
partly read; every file on it is not assessed for that file's defects,
and the summary says so.
atom reachables -l c --reuse-atom --no-build-tools --sink-tag memory-safety \
-o /absolute/path/to/ms-reports/ms-app.atom \
--slice-outfile /absolute/path/to/ms-reports/reachables.json \
/absolute/path/to/project
The memory-safety tags exist only in the atom the memory-safety command
wrote, so -o must name that same file with --reuse-atom; a fresh atom
has no memory-safety tags and returns nothing. The reachables pass routes
from atom's default source tags to the memory-safety sinks, so the defects
an entry point reaches rank first. A library or fixture with no
recognised entry points returns an empty list: that is not_assessed,
not "unreachable".
Memory-safe languages still cross into unsafe code, and the engines report exactly where:
CGO_ENABLED=0 GOFLAGS=-mod=readonly golem analyze -dir /absolute/path/to/go-project \
-dataflow security -out /tmp/golem.json
rusi analyze --dir /absolute/path/to/rust-project --out /tmp/rusi.json
golem reads the project from -dir and ignores positional paths. With
cgo off, packages that import "C" still appear with their #cgo
variables, flag names and risk categories, read from source rather than
compiled; the crossings in nativeBoundary[] need the cgo build
(CGO_ENABLED=1), which runs the host C compiler with flags the project
chooses and needs the user's consent, stated at the step. rusi reports
unsafe-code, native-interop, ffi-wrapper and pointer-arithmetic
signals with purl and position; blint's Android analysis joins DEX to the
native libraries it loads (see depscan-mobile-app). Inventory these per
component as boundary evidence, and treat a boundary as a place a
memory-safety defect can live, not as a defect.
A finding proves chen's rule fired at a confidence on a parsed file. It
does not prove exploitability; the flow and the reach pass are evidence
towards that, and a finding located in a toolchain header belongs to
neither the app nor a component, so it is kept but left out of the
application's counts. Vendored directories cdxgen marked
(cdx:vendored:path) attribute to the vendored component's purl;
everything else is the application's.
depscan-reachability-proofdepscan-binaryWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub owasp-dep-scan/dep-scan --plugin depscan14 skills in this plugin
/depscan-attack-surfaceMaps what an application exposes: it groups the entry points, authentication state and trust zones that dosai, golem, rusi and kosi report into exposure tiers with atom-tools, and answers which anonymous endpoints reach which vulnerable packages. Use when asked what is exposed, what the attack surface is, which endpoints are anonymous, or what a finding can reach from outside./depscan-binaryReviews executables, installers and drivers with blint: the security review with hardening and behaviour rules, per-architecture metadata, component identification, and Windows driver and Authenticode analysis. Use when asked to analyse a binary, check a driver, review an installer, inspect an ELF or Mach-O, or answer whether a binary is safe to ship. Component identification at scale needs blintdb, which is a tens-of-gigabytes download and only runs with the user's consent./depscan-change-riskReports what changed between two dep-scan scans, builds or source revisions and whether it made things worse: the MCP diff_scans tool or a fresh scan pair for findings, dosai diff for .NET data-flow deltas, atom-tools drift for flow-level risk deltas with a pass or fail gate, and blint diff for binary hardening regressions. Use for pull-request and release questions such as "did this change add exposure", "what new findings did this introduce", or "did the new build lose hardening"./depscan-container-imageScans a container image reference, an exported rootfs directory or an image tarball with OWASP dep-scan and reports the CVEs in the image's packages. Use when asked to scan a docker or OCI image for vulnerabilities, audit an alpine, debian or redhat base image, check a rootfs, or when a container scan came back empty and the cdxgen version needs checking. Load it before writing any container depscan command./depscan-coverage-loopRuns the dep-scan coverage loop, which scans, reads depscan doctor and the scan manifest's stages that did not complete, fixes the missing tool, database flavor or option each one names, and re-scans until coverage stops improving. Use when a scan came back empty or partly not assessed, when depscan doctor reports a missing tool or an unavailable capability, or when the user asks to make dep-scan coverage complete on this machine. Runs only when the user asks for it, because it installs dep-scan's own tools and data./depscan-cryptoBuilds the cryptographic inventory and its reachability across the toolchain: golem crypto findings (insecure TLS verification, literal key material), rusi cryptos, dosai crypto with its record-level reach and CBOM, atom-tools crypto-reach joining crypto assets to entry points, and trustinspector certificate and SPKI hashes for container trust. Use when asked what cryptography a project uses, whether weak algorithms are reachable, whether TLS verification is disabled anywhere, or how ready the code is for post-quantum migration.Other plugins' skills for the same job