gitnexus-taint-analysis

Explains and extends GitNexus's CFG, reaching-definitions, and interprocedural taint analysis subsystem.

1|Updated Jul 27, 2023
One-click install
npx skills add https://github.com/AlexTheGuitarGuy/.dotfiles --skill gitnexus-taint-analysis-alextheguitarguy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gitnexus-taint-analysis
Source: https://github.com/AlexTheGuitarGuy/.dotfiles/tree/main/claude/.claude/skills/gitnexus-taint-analysis
Command: npx skills add https://github.com/AlexTheGuitarGuy/.dotfiles --skill gitnexus-taint-analysis-alextheguitarguy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on GitNexus's opt-in --pdg program-analysis layers (control-flow graphs, reaching definitions, intra- and inter-procedural taint) requires deep knowledge of layered architecture, pure-solver contracts, and subtle correctness invariants; this Skill encodes that expertise so changes don't break parity, reintroduce OOM bugs, or create false negatives. ## Core Features & Use Cases - Architecture guidance: Documents the L1–L4 layered substrate (CFG, REACHING_DEF, intra-procedural taint, summary-based interprocedural taint) and the worker-built/main-thread-solved execution model. - Taint model extension: Explains how to add sources, sinks, and sanitizers across the TypeScript/JavaScript, Python, and Java model files, including the kind-set sanitizer model where neutralizes lists exact sink kinds. - Finding diagnosis: Covers known false-negative classes (closures, field flows, destructured params), the source-discriminated fixpoint state, and GitNexus-specific gotchas like the 0-based vs 1-based function/CFG line join. - Use Case: When a user asks "Why didn't explain find this flow?" or wants to add a new sink, the Skill provides the validation checklist (tsc, targeted vitest, golden byte-parity, benchmark fingerprint) required for any --pdg change. ## Quick Start Ask how the taint engine works or request help adding a new source or sink to the GitNexus taint model for a specific language.

Frequently Asked Questions about gitnexus-taint-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does interprocedural taint analysis work in GitNexus?▼

Interprocedural taint uses the functional summary method (Sharir-Pnueli 1981): each function is reduced to a compact summary of param-to-return, param-to-sink, and source-to-return edges, then composed over the resolved CALLS graph via a monotone fixpoint keyed by function, parameter, and source.

How do I add a new source or sink to a taint model?▼

Edit the model file for the target language: typescript-model.ts for TypeScript and JavaScript, python-model.ts for Python, or java-model.ts for Java. The spec is hashable data, sanitizers must list exact neutralized sink kinds, and you should add a fixture test under test/unit/taint/.

Why didn't the explain tool find an expected taint flow?▼

Common causes are documented false-negative classes: closures and callbacks, field or property flows, destructured parameters before tainted params, and unmodeled async threading. Absence of a finding is not proof of safety since the analysis is context-insensitive.

What are the limitations of summary-based taint analysis?▼

The approach is context-insensitive, merging return and call-site information into one summary per function, which can produce false positives. It also drops flows into callbacks, lacks field sensitivity, and over-attributes flows between same-named callees, though it never misses flows in those joins.

How do I validate a change to the --pdg analysis layers?▼

Run tsc cleanly, targeted vitest on test/unit/taint, test/unit/cfg, and test/integration/cfg, verify flag-off golden output is byte-identical, and check bench/cfg/measure.mjs for fingerprint drift. Worker-harvest shape changes bump the pdg cache namespace, not SCHEMA_BUMP.