Index of every page on this site: llms.txt
All skills
oaustegard avatar

/hunting-failing-inputs

@b9eb735
Run it yourself

Finds inputs that make a parser, decoder or WGSL compute shader index out of bounds or overflow, using Z3. Use for "can this crash", "find an input that breaks this", or when fuzzing found nothing on code that reads untrusted bytes.

Use this Skill: https://skilld.dev/gh/oaustegard/claude-skills/hunting-failing-inputs

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

README.md

≈698 tokens on demand. Your agent reads this file only when SKILL.md points to it.

hunting-failing-inputs

Find inputs that make a parser, decoder or WGSL compute shader index out of bounds, slice past its end, divide by zero or overflow. Each operation that can fail on bad input (a trap) is modelled in Z3. A satisfying input is then replayed inside a strict harness that makes silent failures loud.

It finds the inputs random fuzzing misses: those that reach a trap only through a narrow arithmetic condition, such as a length field that wraps, or a negative index that Python or JavaScript silently accepts.

Languages

Language Trap listing Strict harness
Python scripts/list_traps.py scripts/strict.py
JavaScript / TypeScript scripts/list_traps.py scripts/strict.mjs
C scripts/list_traps.py ASan + UBSan, input in an exact-size malloc
WGSL scripts/list_traps.py scripts/wgsl_guard.py (counts bad indexes in an _oob buffer)
Go scripts/bce_targets.py (from -d=ssa/check_bce) d = d[:len(d):len(d)]

Quick start

python3 -m pip install z3-solver tree-sitter-language-pack
SKILL=/mnt/skills/user/hunting-failing-inputs
python3 $SKILL/scripts/list_traps.py parser.py --func parse_record
python3 $SKILL/scripts/selftest.py      # optional; SKIP means a missing toolchain

Then model one pure function with scripts/z3traps.py, copying the nearest example in examples/<lang>/. Each language's failure semantics and the predicate for each trap kind are in references/<lang>.md.

What a result means

  • A sat that fails at the trap inside the strict harness is a bug, with a reproducer.
  • unsat means none was found within the stated length bound, not "safe". It counts only alongside a negative control that went sat.
  • unknown, or a model that needs more than about 15 unrolled iterations, is reported as unmodelled.

Related skills

  • building-property-tests: wrong results that no precondition expresses, checked against a reference model.
  • gating: whether an existing check can go red at all.

Contents

Path What
SKILL.md The procedure, routing, verification and failure modes
scripts/z3traps.py Harness, trap predicates per language, literal rendering
scripts/list_traps.py, scripts/bce_targets.py Trap listing (tree-sitter; Go via the compiler)
scripts/strict.py, strict.mjs, wgsl_guard.py Strict harnesses
references/<lang>.md Semantics and predicates for Python, JavaScript, C, WGSL and Go
examples/<lang>/ A planted-bug model and reproducer per language

The method follows the Google Developers blog post "Catch Go bugs that fuzzing misses with Gemini and a constraint solver" (2026-11-12). This skill generalises it from Go to five languages.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning5d3 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    This skill provides a suite of static analysis tools and formal verification models using the Z3 constraint solver to detect out-of-bounds access and overflow bugs in various programming languages. It focuses on finding inputs that trigger silent failures or undefined behavior by replaying them in strict harnesses.

  • Socket5d

    1 alert: gptAnomaly

  • Snyk5d

    Risk: LOW · No issues

Signed by skilld at b9eb735. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last week
metadata
{
  "version": "0.3.2"
}

README badge

README badge for oaustegard/claude-skills/hunting-failing-inputs