Download for MacApple silicon, macOS 14+
Skill

numeric-trust-boundary

@thejefflarson Updated 2026-07-31

Detects untrusted numeric input that flows through a conversion, cast, or parser into a length, size, index, or authorization comparison without bounds-checking the post-conversion value. Use when writing or modifying code that calls atoi/strtol/parseInt/strconv.Atoi on user-supplied or network-supplied input, casts between signed and unsigned integer types, narrows an integer width before a bounds check, or uses an untrusted integer as an allocation size, array index, file offset, length argument to memcpy, or comparison gate for authorization or permission decisions.

llmssecurityskills

Install

With your agent

Install OMGSkills skill "thejefflarson/soundcheck:.claude/skills/numeric-trust-boundary" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/thejefflarson/soundcheck /tmp/soundcheck && ln -s /tmp/soundcheck/.claude/skills/numeric-trust-boundary ~/.claude/skills/numeric-trust-boundary

From README

Numeric Trust Boundary (CWE-190, CWE-194, CWE-704, CWE-20) What this checks Plain numeric-conversion bugs (parser returns zero on garbage, divide-by-zero, float equality) are correctness issues that standard linters catch. This skill targets the security subset: an untrusted integer (from a string parser, a wire-protocol length field, a JSON number) that flows into a length, size, index, or permission sink without a bounds check on the post-conversion value. Local pattern only — conversion within a function or two of the sink. Vulnerable patterns Sign-extension when a narrow signed value is cast into a width-or-size type — a byte of 0xFF becomes a huge unsigned length. A string-to-integer parser whose error indicator is the same value as legitimate zero, used as an authorization or identity key without checking the parse-failure flag. Width truncation inside a bounds check — the narrowed value passes the check, but the full-width value is used at the sink.