Repository navigation
Description
⚠️ Scope amendment (2026-07-02): stage 8 is emission + CPG only — slicing & taint move to the SDKFamily-wide boundary now standard (cldk-forge PR #7,
dataflow-graphs.md § provider/client boundaryanddataflow-construction.md § Stage 8; reference codellm-devkit/codeanalyzer-java#171): the analyzer emits the graph substrate; client analyses are frontend SDK queries.Superseded here → filed as codellm-devkit/python-sdk#229 (the shared, language-agnostic client-analysis engine; the Rust model pack lands with the consuming SDK): the Slicing task, the Taint task, the
taint_flowsoutput, and the client gates (interprocedural slice set / source→sink + sanitizer / witness paths) — those are now SDK-side gates.Stays in this task: the Emission bullet —
-a 3+--graphs cfg,dfg,pdg,sdg(strict validation) +--graph-field-depth, theprogram_graphssection, and recording the shared vocabulary in SCHEMA_DECISIONS.md — plus the CPG projection if in scope. TheSUMMARYedges those queries rely on are built in the stages 5–7 rung (#24) and remain analyzer-side. Keep a source→sink fixture so the SDK can assert taint over it. Retitled: stage 8 is now emission/CPG, not slicing/taint.
Part of #9. Phase 3 — native dataflow.
Learning goals
API design for analyses-as-queries; models-as-data (serde again, now with JSON-Schema validation
of user input); keeping a public contract stable while internals churn.
Task
- Emission:
-a 3(implies-a 2) +--graphs cfg,dfg,pdg,sdg(strict validation — an
unknown graph name exits non-zero) +--graph-field-depth(default 3). Aprogram_graphs
section in analysis.json, schema-versioned, keyed by canonical(signature, node_id)— same
signatures as the symbol table. Record the shared node/edge vocabulary in SCHEMA_DECISIONS.md;
the cross-language parity clause binds: Rust-specific additions are additive. - Slicing: context-sensitive backward slice via the two-phase HRB traversal over the SDG
(phase 1 ascends PARAM_IN/CALL, phase 2 descends PARAM_OUT — SUMMARY edges carry you across
calls without re-descending). - Taint: labeled reachability over the SDG; sanitizers block propagation; sources/sinks/
sanitizers/library models supplied AS DATA (built-in pack < config file < flags) with JSON
Schema validation;taint_flowsoutput section with lazily-reconstructed witness paths and
the model id that justified each hop (explainability). -a 1/-a 2wall-clock must stay unaffected (CI-check a timing budget on the fixture).
Gate (client gates)
- Interprocedural slice through the a → b → c chain matches the hand-computed set (SUMMARY edges
proven used: the slice must NOT contain callee-internal nodes phase 1 would leak). - The fixture's source→sink taint flow is found; the SAME flow with a sanitizer interposed is
NOT. Witness path names every hop. -a 3analysis.json validates;--graphs bogusexits non-zero.
Activity
rahlk commentedon Jul 2, 2026
Scope amendment: the analyzer is a pure graph provider — taint/slicing move to the frontend SDK
Establishing a design principle now applied across the
codeanalyzer-*family (first shipped in codeanalyzer-java #171/#172, and now baked into the cldk-forge skillset):The analyzer emits the graph substrate and stops there. Client analyses (taint, slicing, reachability) are NOT analyzer features — they are queries run in the frontend SDK over the emitted graph.
Concretely, this reframes the level-3 scope of this issue:
program_graphs— CFG/PDG/SDG keyed by(signature, node_id)— including transitiveSUMMARYedges (Horwitz–Reps–Binkley).SUMMARYedges are the one "precompute flow as edges" that belongs here: they're keyed on data dependence, not on any source/sink policy, so they're reusable across every taint config and are exactly what make the frontend's queries context-sensitive.taint_flowsoutput. These are reachability queries over the graph; a taint result is keyed on a policy that changes far faster than the graph, so baking it into the analyzer would couple the universal artifact to one policy and force a re-emit on every model-pack edit. This is Joern's factoring too — the CPG stores the dependence substrate;reachableByis a query, not materialized all-pairs taint edges.Suggested action: retitle/rescope this issue to the graph substrate (drop "and taint analysis"; keep CFG/PDG/SDG +
SUMMARYedges + the CPG projection), and file the slicing/taint work as a separate issue against the SDK (python-sdk/typescript-sdk), per the frontend contract (cf. codellm-devkit/python-sdk#228).The forge references now encode this:
codeanalyzer-backend(dataflow-graphs.md § provider/client boundary, the issue template,dataflow-construction.md § Stage 8) builds only the graph;cldk-sdk-frontend(SKILL.md § Client analyses,sdk-testing.md § 3b) owns slicing/taint as the SDK query surface.[-]16 — Level 3, stage 8: emission (-a 3), slicing & taint as SDG queries[/-][+]16 — Level 3, stage 8: emission (-a 3) & CPG; slicing/taint move to the SDK[/+]