Module: vvaharness/pipeline
Role. The assembly line. Each stage transforms the previous stage's artifact, from static seed to SARIF report, plus the tree-sitter call-graph engine that feeds them.
Size. 18 files · ~14,185 LOC.
This is the heart of VVAH — the nine detection stages plus the static call-graph
engine. Code goes in; a ranked, evidence-backed report comes out. The stages are ordered and each
has a single job: map, threat-model, plan, deep-dive, filter, verify, dedup, chain, and emit.
The callgraph_engine is a language-aware static analyser (tree-sitter) that traces how untrusted
data could reach dangerous operations, focusing the AI where it matters.
Explain-it-simply. The conveyor belt of specialists. Each station does one inspection and passes the part along.
Data-flow (this module)
Technical details
Each sN_*.py file exposes a run(...) entry consumed by orchestrator/scan.py.
s1_preprocess builds the ContextPackage; s2_threatmodel the ThreatModel; s3_decompose
the TaskManifest; s4_deepdive runs specialist lenses per chunk (with optional N-run voting);
s5_prefilter applies deterministic gates (plus an optional semantic pre-dedup); s6_verify is
adversarial TRUE/FP + CVSS; s7_dedup deterministic+semantic dedup; s8_chain builds exploit
chains and re-ranks into a FinalReport; s9 is deterministic SARIF (implemented in the report
layer). s1_autoexclude derives a per-target exclusion overlay; s11_validate is a thin wrapper
hooking the validation package into the pipeline. The callgraph_engine/ sub-package is the
static core: _scan.py (~2,900 LOC) is the per-file tree-sitter scanner emitting FileIndex
(calls, taint facts, reflection, framework markers); _graph.py (~2,080 LOC) builds the
interprocedural graph and source→sink reachability; _rules.py loads source/sink/sanitizer specs;
_annotator.py is optional LLM spec derivation. callgraph_consumer.py provides shared read-only
graph views (GraphView) to S3 and S5–S8.
File map (quick scan)
| File | LOC | Purpose |
|---|---|---|
pipeline/__init__.py |
15 | — |
pipeline/callgraph_consumer.py |
554 | Shared post-S2 callgraph consumers. |
pipeline/stages/callgraph_engine/__init__.py |
262 | Tree-sitter-native call-graph seed engine. |
pipeline/stages/callgraph_engine/_annotator.py |
452 | LLM-backed source/sink spec derivation for callgraph mode. |
pipeline/stages/callgraph_engine/_graph.py |
2077 | Naive call graph + source→sink reachability. |
pipeline/stages/callgraph_engine/_rules.py |
450 | Convert sources.generated.yaml / sinks.generated.yaml (semgrep-format |
pipeline/stages/callgraph_engine/_scan.py |
2911 | Per-file tree-sitter scanner. Emits a :class:FileIndex containing: |
pipeline/stages/s0_seed.py |
277 | Step 0 — Static seed. |
pipeline/stages/s11_validate.py |
56 | s11_validate — thin wrapper that hooks the validation package into the pipeline. |
pipeline/stages/s1_autoexclude.py |
368 | Auto-derive a per-target step1 exclusion overlay. |
pipeline/stages/s1_preprocess.py |
1548 | Step 1 — Claude CLI explores the repo agentically and emits a ContextPackage. |
pipeline/stages/s2_threatmodel.py |
611 | Step 2 — Application threat model. |
pipeline/stages/s3_decompose.py |
1521 | Step 3 — the strategist LLM receives the ContextPackage (no raw code) and produces a |
pipeline/stages/s4_deepdive.py |
1518 | Step 4 — Deep-dive each chunk N times, then majority-vote. |
pipeline/stages/s5_prefilter.py |
249 | Step 5 — Deterministic pre-filter. |
pipeline/stages/s6_verify.py |
426 | Step 6 — Adversarial verification. |
pipeline/stages/s7_dedup.py |
371 | Step 7 — Deduplication. |
pipeline/stages/s8_chain.py |
519 | Step 8 — the chain-analysis LLM sees ALL findings together and: |
Files & functions, explained
Every class and function below has a one-line plain-English note — readable whether you write code or not. _name marks an internal helper.
pipeline/__init__.py
15 LOC. Utility / support module.
No top-level classes or functions (package init / constants).
pipeline/callgraph_consumer.py
554 LOC. Shared post-S2 callgraph consumers.
Classes
- GraphView — Represents the “GraphView” data/behaviour used in this file.
Functions
- _q_file() — (internal helper) Provides the “q file” logic.
- _q_name() — (internal helper) Provides the “q name” logic.
- parse_hop() — Reads and cleans up the hop value.
- _norm_file() — (internal helper) reads and cleans up the file value.
- _file_from_ref() — (internal helper) Provides the “file from ref” logic.
- _evidence_touched_files() — (internal helper) Provides the “evidence changed files” logic.
- seed_reachable_files() — Provides the “seed reachable files” logic.
- seed_paths_by_file() — Provides the “seed paths by file” logic.
- best_source_from_seed() — Provides the “best untrusted input point from seed” logic.
- seed_evidence_reachable_files() — Provides the “seed evidence reachable files” logic.
- seed_evidence_by_file() — Provides the “seed evidence by file” logic.
- best_source_from_evidence() — Provides the “best untrusted input point from evidence” logic.
- entry_anchor_lines() — Provides the “entry anchor lines” logic.
- build_span_index() — Builds / writes the span index step.
- graph_qnodes_by_file() — Provides the “code relationship map nodes in the code graph by file” logic.
- reverse_edges() — Provides the “reverse edges” logic.
- qnodes_at() — Provides the “nodes in the code graph at” logic.
- neighborhood() — Provides the “neighborhood” logic.
- graph_view() — Provides the “code relationship map view” logic.
- cfgs_for_function() — Provides the “cfgs for function” logic.
- reflection_facts_for_function() — Provides the “dynamic code lookup facts for function” logic.
- reflection_facts_by_file() — Provides the “dynamic code lookup facts by file” logic.
- condition_edges_in_evidence() — Provides the “condition edges in evidence” logic.
- reflection_edges_in_evidence() — Provides the “dynamic code lookup edges in evidence” logic.
- framework_markers_for_function() — Provides the “web framework markers for function” logic.
- route_facts_for_file() — Provides the “web URL route facts for file” logic.
- response_dataflows_for_function() — Provides the “response dataflows for function” logic.
pipeline/stages/callgraph_engine/__init__.py
262 LOC. Tree-sitter-native call-graph seed engine.
Functions
- run() — Runs the run value.
- _lang_of() — (internal helper) Provides the “lang of” logic.
- _scan_repo() — (internal helper) runs the code repository value.
pipeline/stages/callgraph_engine/_annotator.py
452 LOC. LLM-backed source/sink spec derivation for callgraph mode.
Classes
- _Candidate — (internal) Represents the “Candidate” data/behaviour used in this file.
Functions
- _as_float() — (internal helper) Provides the “as float” logic.
- _cfg_get() — (internal helper) Provides the “code control-flow get” logic.
- _norm_cwe() — (internal helper) reads and cleans up the weakness type value.
- _semantic_family() — (internal helper) Provides the “semantic family” logic.
- _owasp_labels() — (internal helper) Provides the “owasp labels” logic.
- _collect_candidates() — (internal helper) looks up / reads the candidates value.
- _build_prompt_batch() — (internal helper) builds / writes the prompt batch step.
- _parse_results() — (internal helper) reads and cleans up the results value.
- _tok() — (internal helper) Provides the “token/cost estimate” logic.
- _heuristic_source_kind() — (internal helper) Provides the “heuristic untrusted input point kind” logic.
- _heuristic_sink_kind() — (internal helper) Provides the “heuristic dangerous operation kind” logic.
- _append_spec() — (internal helper) adds detail to the rule specification value.
- _seed_seen_sig() — (internal helper) Provides the “seed seen sig” logic.
- supplement_with_heuristics() — Provides the “supplement with heuristics” logic.
- detect_specs() — Looks up / reads the specs value.
pipeline/stages/callgraph_engine/_graph.py
2077 LOC. Naive call graph + source→sink reachability.
Functions
- _score_path() — (internal helper) checks / decides the path value.
- _extract_sink_family() — (internal helper) reads and cleans up the dangerous operation family step.
- _effective_global_budget() — (internal helper) Provides the “effective global spending limit” logic.
- _filter_paths_by_budget() — (internal helper) checks / decides the paths by spending limit step.
- _cwe_num() — (internal helper) Provides the “weakness type num” logic.
- _is_high_risk() — (internal helper) checks / decides the high risk step.
- _prefix_score() — (internal helper) Provides the “prefix score” logic.
- _compatible_taint_pair() — (internal helper) Provides the “compatible untrusted-data flow pair” logic.
- _resolve_called_fids() — (internal helper) checks / decides the called fids step.
- _edge_confidence() — (internal helper) Provides the “edge confidence” logic.
- _fn_id() — (internal helper) Provides the “fn identifier” logic.
- _fid_name() — (internal helper) Provides the “fid name” logic.
- _param_symbol() — (internal helper) Provides the “param symbol” logic.
- _fact_fid() — (internal helper) Provides the “fact fid” logic.
- _call_targets_for_fact() — (internal helper) Provides the “call targets for fact” logic.
- _has_phase1_facts_for_path() — (internal helper) checks / decides the phase1 facts for path step.
- _find_matching_call_facts() — (internal helper) looks up / reads the matching call facts step.
- _seed_source_taint() — (internal helper) Provides the “seed untrusted input point untrusted-data flow” logic.
- _apply_field_writes() — (internal helper) runs the field writes step.
- _apply_field_reads() — (internal helper) runs the field reads step.
- _apply_container_writes() — (internal helper) runs the container writes step.
- _apply_sanitizers() — (internal helper) runs the sanitizers value.
- _apply_local_aliases() — (internal helper) runs the local aliases step.
- _call_tainted_arg_slots() — (internal helper) Provides the “call tainted arg slots” logic.
- _callee_may_return_tainted() — (internal helper) Provides the “callee may return tainted” logic.
- _apply_return_to_local() — (internal helper) runs the return to local step.
- _transfer_closure() — (internal helper) Provides the “transfer closure” logic.
- _build_taint_evidence_for_path() — (internal helper) builds / writes the untrusted-data flow evidence for path step.
- _apply_condition_taint() — (internal helper) runs the condition untrusted-data flow step.
- _condition_edge_confidence() — (internal helper) Provides the “condition edge confidence” logic.
- _solve_with_cfgs() — (internal helper) Provides the “solve with cfgs” logic.
- _resolve_reflection_targets() — (internal helper) checks / decides the dynamic code lookup targets step.
- _emit_reflection_taint_edges() — (internal helper) builds / writes the dynamic code lookup untrusted-data flow edges step.
- _apply_reflection_to_taint() — (internal helper) runs the dynamic code lookup to untrusted-data flow step.
- _build_symbol_table() — (internal helper) builds / writes the symbol table step.
- _build_framework_symbol_table() — (internal helper) builds / writes the web framework symbol table step.
- _apply_framework_markers() — (internal helper) runs the web framework markers step.
- _emit_framework_entry_points() — (internal helper) builds / writes the web framework entry points step.
- _apply_response_dataflow() — (internal helper) runs the response data movement step.
- build_taint_paths() — Builds / writes the untrusted-data flow paths step.
pipeline/stages/callgraph_engine/_rules.py
450 LOC. Convert sources.generated.yaml / sinks.generated.yaml (semgrep-format
Classes
- MatchSpec — Represents the “MatchSpec” data/behaviour used in this file.
- has_qualified() — Checks / decides the qualified value.
- has_module_attr() — Checks / decides the module attr step.
Functions
- _normalize_family() — (internal helper) reads and cleans up the family value.
- _owasp_2025_labels() — (internal helper) Provides the “owasp 2025 labels” logic.
- _norm_langs() — (internal helper) reads and cleans up the langs value.
- _extract_methods_from_regex() — (internal helper) reads and cleans up the methods from regex step.
- _metavar_methods() — (internal helper) Provides the “metavar methods” logic.
- _top_pattern_string() — (internal helper) Provides the “highest-priority pattern string” logic.
- _walk_pattern_leaves() — (internal helper) Provides the “walk pattern leaves” logic.
- _walk_rule_keys() — (internal helper) Provides the “walk rule keys” logic.
- _translation_flags() — (internal helper) Provides the “translation flags” logic.
- _try_module_attr() — (internal helper) Provides the “try module attr” logic.
- _spec_from_rule() — (internal helper) Provides the “rule specification from rule” logic.
- _load() — (internal helper) looks up / reads the load value.
- load_rulepacks() — Looks up / reads the rulepacks value.
pipeline/stages/callgraph_engine/_scan.py
2911 LOC. Per-file tree-sitter scanner. Emits a :class:FileIndex containing:
Classes
- CallSite — Represents the “CallSite” data/behaviour used in this file.
- FuncDef — Represents the “FuncDef” data/behaviour used in this file.
- ObservedCall — Represents the “ObservedCall” data/behaviour used in this file.
- VarAssignFact — Represents the “VarAssignFact” data/behaviour used in this file.
- ReturnFact — Represents the “ReturnFact” data/behaviour used in this file.
- CallArgFact — Represents the “CallArgFact” data/behaviour used in this file.
- FieldWriteFact — Represents the “FieldWriteFact” data/behaviour used in this file.
- FieldReadFact — Represents the “FieldReadFact” data/behaviour used in this file.
- ContainerWriteFact — Represents the “ContainerWriteFact” data/behaviour used in this file.
- FileIndex — Represents the “FileIndex” data/behaviour used in this file.
- LangPlugin — Represents the “LangPlugin” data/behaviour used in this file.
Functions
- _get_cached_parser() — (internal helper) looks up / reads the cached parser step.
- _build_cfg_for_function() — (internal helper) builds / writes the code control-flow for function step.
- _extract_control_flow_nodes() — (internal helper) reads and cleans up the control flow nodes step.
- _py_extract_reflection_facts() — (internal helper) Provides the “py extract dynamic code lookup facts” logic.
- _java_extract_reflection_facts() — (internal helper) Provides the “java extract dynamic code lookup facts” logic.
- _cs_extract_reflection_facts() — (internal helper) Provides the “cs extract dynamic code lookup facts” logic.
- _py_extract_framework_markers() — (internal helper) Provides the “py extract web framework markers” logic.
- _java_extract_framework_markers() — (internal helper) Provides the “java extract web framework markers” logic.
- _cs_extract_framework_markers() — (internal helper) Provides the “cs extract web framework markers” logic.
- _py_extract_response_dataflow() — (internal helper) Provides the “py extract response data movement” logic.
- _java_extract_response_dataflow() — (internal helper) Provides the “java extract response data movement” logic.
- _cs_extract_response_dataflow() — (internal helper) Provides the “cs extract response data movement” logic.
- _py_text() — (internal helper) Provides the “py text” logic.
- _py_leftmost_identifier() — (internal helper) Provides the “py leftmost identifier” logic.
- _py_snippet() — (internal helper) Provides the “py snippet” logic.
- _py_extract() — (internal helper) Provides the “py extract” logic.
- _text_of() — (internal helper) Provides the “text of” logic.
- _snippet_at() — (internal helper) Provides the “snippet at” logic.
- _scope_at() — (internal helper) Provides the “in-scope set at” logic.
- _java_leftmost() — (internal helper) Provides the “java leftmost” logic.
- _java_extract() — (internal helper) Provides the “java extract” logic.
- _js_leftmost() — (internal helper) Provides the “js leftmost” logic.
- _js_extract() — (internal helper) Provides the “js extract” logic.
- _go_leftmost() — (internal helper) Provides the “go leftmost” logic.
- _go_import_spec() — (internal helper) Provides the “go import rule specification” logic.
- _go_extract() — (internal helper) Provides the “go extract” logic.
- _cs_leftmost() — (internal helper) Provides the “cs leftmost” logic.
- _cs_extract() — (internal helper) Provides the “cs extract” logic.
- _semantic_sink_override() — (internal helper) Provides the “semantic dangerous operation override” logic.
- _match_call() — (internal helper) checks / decides the call value.
- _build_spec_index() — (internal helper) builds / writes the rule specification index step.
- _py_extract_field_facts() — (internal helper) Provides the “py extract field facts” logic.
- _java_extract_field_facts() — (internal helper) Provides the “java extract field facts” logic.
- _cs_extract_field_facts() — (internal helper) Provides the “cs extract field facts” logic.
- scan_file() — Runs the file value.
pipeline/stages/s0_seed.py
277 LOC. Step 0 — Static seed.
Classes
- SeedPackage — Represents the “SeedPackage” data/behaviour used in this file.
- __post_init__() — Python built-in method (__post_init__).
- __bool__() — Python built-in method (__bool__).
Functions
- _filter_step0_languages() — (internal helper) checks / decides the step0 languages step.
- run() — Runs the run value.
- _resolve_rulepacks() — (internal helper) checks / decides the rulepacks value.
- _parse_sarif() — (internal helper) reads and cleans up the machine-readable report value.
pipeline/stages/s11_validate.py
56 LOC. s11_validate — thin wrapper that hooks the validation package into the pipeline.
Functions
- run() — Runs the run value.
pipeline/stages/s1_autoexclude.py
368 LOC. Auto-derive a per-target step1 exclusion overlay.
Functions
- _survey() — (internal helper) Provides the “survey” logic.
- _extract_yaml() — (internal helper) reads and cleans up the config file value.
- _norm_list() — (internal helper) reads and cleans up the list value.
- run() — Runs the run value.
pipeline/stages/s1_preprocess.py
1548 LOC. Step 1 — Claude CLI explores the repo agentically and emits a ContextPackage.
Functions
- _exclusion_sets() — (internal helper) Provides the “skip list sets” logic.
- _seed_repo_kinds() — (internal helper) Provides the “seed code repository kinds” logic.
- _should_escalate_gap_fill() — (internal helper) checks / decides the widen scope gap fill step.
- glob_hit() — Provides the “file pattern hit” logic.
- _norm_rel() — (internal helper) reads and cleans up the rel value.
- _resolve_scope_path() — (internal helper) checks / decides the in-scope set path step.
- _walk_repo() — (internal helper) Provides the “walk code repository” logic.
- _flatten_keys() — (internal helper) reads and cleans up the keys value.
- _shape_hash() — (internal helper) reads and cleans up the hash value.
- _suspicious_set() — (internal helper) Provides the “suspicious set” logic.
- _rep_score() — (internal helper) Provides the “rep score” logic.
- _dedup_configs() — (internal helper) Provides the “duplicate removal configs” logic.
- q_join() — Provides the “q join” logic.
- q_split() — Provides the “q split” logic.
- q_file() — Provides the “q file” logic.
- q_name() — Provides the “q name” logic.
- _resolve_py_import_module() — (internal helper) checks / decides the py import module step.
- _scan_imports() — (internal helper) runs the imports value.
- _file_matches_import() — (internal helper) Provides the “file matches import” logic.
- _resolve_callee_files() — (internal helper) checks / decides the callee files step.
- _scan_defs() — (internal helper) runs the defs value.
- _seed_covered_languages() — (internal helper) Provides the “seed covered languages” logic.
- _merge_graph_artifacts() — (internal helper) adds detail to the code relationship map artifacts step.
- _supplement_call_graph() — (internal helper) Provides the “supplement call code relationship map” logic.
- run() — Runs the run value.
pipeline/stages/s2_threatmodel.py
611 LOC. Step 2 — Application threat model.
Functions
- _repo_kind() — (internal helper) Provides the “code repository kind” logic.
- _baseline_block() — (internal helper) Provides the “baseline block” logic.
- _read_capped() — (internal helper) looks up / reads the capped value.
- _gather_evidence() — (internal helper) looks up / reads the evidence value.
- _build_user_prompt() — (internal helper) builds / writes the user prompt step.
- run() — Runs the run value.
pipeline/stages/s3_decompose.py
1521 LOC. Step 3 — the strategist LLM receives the ContextPackage (no raw code) and produces a
Functions
- run() — Runs the run value.
- _normalize_chunk_files() — (internal helper) reads and cleans up the analysis unit files step.
- _is_source() — (internal helper) checks / decides the untrusted input point value.
- _file_call_graph() — (internal helper) Provides the “file call code relationship map” logic.
- _cohesive_groups() — (internal helper) Provides the “cohesive groups” logic.
- _report_threat_coverage() — (internal helper) builds / writes the attack scenario coverage step.
- _tok() — (internal helper) Provides the “token/cost estimate” logic.
- _is_config_file() — (internal helper) checks / decides the config file step.
- _threat_text() — (internal helper) Provides the “attack scenario text” logic.
- _matches_threat_surface() — (internal helper) checks / decides the attack scenario surface step.
- _candidate_files_for_threat() — (internal helper) looks up / reads the files for attack scenario step.
- _add_threat_surface_fallback_chunks() — (internal helper) adds detail to the attack scenario surface fallback analysis units step.
- _pick_hop_files() — (internal helper) checks / decides the hop files step.
- _qnode_for_file_line() — (internal helper) Provides the “a node in the code graph for file line” logic.
- _sink_qnodes_for_sink() — (internal helper) Provides the “dangerous operation nodes in the code graph for dangerous operation” logic.
- _seed_paths_for_entry() — (internal helper) Provides the “seed paths for entry” logic.
- _add_taint_chunks() — (internal helper) adds detail to the untrusted-data flow analysis units step.
- _bfs_to_sinks() — (internal helper) Provides the “bfs to dangerous operations” logic.
- _size_for() — (internal helper) Provides the “size for” logic.
- _char_budget() — (internal helper) Provides the “char spending limit” logic.
- _split_oversize_risk_chunks() — (internal helper) reads and cleans up the oversize risk analysis units step.
- _pack() — (internal helper) Provides the “pack” logic.
- _catchall_eligible() — (internal helper) Provides the “catchall eligible” logic.
- _lang_of_file() — (internal helper) Provides the “lang of file” logic.
- _reachable_files() — (internal helper) Provides the “reachable files” logic.
- _reachable_only_too_sparse() — (internal helper) Provides the “reachable only too sparse” logic.
- _add_catchall_chunks() — (internal helper) adds detail to the catchall analysis units step.
- _add_specialist_chunks() — (internal helper) adds detail to the specialist analysis units step.
- _has_batch_surface() — (internal helper) checks / decides the batch surface step.
- _scan_any() — (internal helper) runs the any value.
- _has_authz_surface() — (internal helper) checks / decides the authz surface step.
- _gate_specialists() — (internal helper) checks / decides the specialists value.
- _mk_specialist() — (internal helper) Provides the “mk specialist” logic.
- _specialist_focus_entry_points() — (internal helper) Provides the “specialist focus entry points” logic.
- _mk_catchall() — (internal helper) Provides the “mk catchall” logic.
- _report_chunk_loc() — (internal helper) builds / writes the analysis unit lines of code step.
- _count_chars() — (internal helper) Provides the “count chars” logic.
- _count_loc() — (internal helper) Provides the “count lines of code” logic.
pipeline/stages/s4_deepdive.py
1518 LOC. Step 4 — Deep-dive each chunk N times, then majority-vote.
Functions
- build_research_lens() — Builds / writes the research lens step.
- build_system_prompt() — Builds / writes the system prompt step.
- _effective_runs() — (internal helper) Provides the “effective runs” logic.
- run() — Runs the run value.
- _deepdive_chunk() — (internal helper) Provides the “deepdive analysis unit” logic.
- _collapse_across_chunks() — (internal helper) Provides the “collapse across analysis units” logic.
- _single_run() — (internal helper) Provides the “single run” logic.
- _trust_context_block() — (internal helper) Provides the “trust context block” logic.
- _build_prompt() — (internal helper) builds / writes the prompt value.
- _norm_rel_path() — (internal helper) reads and cleans up the rel path step.
- _parse_ref_file_line() — (internal helper) reads and cleans up the ref file line step.
- _short_symbol() — (internal helper) Provides the “short symbol” logic.
- _compact_taint_evidence_block() — (internal helper) Provides the “compact untrusted-data flow evidence block” logic.
- _build_confirm_refute_prompt() — (internal helper) builds / writes the confirm refute prompt step.
- _mask_pan() — (internal helper) hides sensitive data in the pan value.
- _redact_source() — (internal helper) hides sensitive data in the untrusted input point value.
- _load_chunk_code() — (internal helper) looks up / reads the analysis unit code step.
- _slice_mode() — (internal helper) Provides the “slice mode” logic.
- _load_graph_slice() — (internal helper) looks up / reads the code relationship map slice step.
- _load_taint_slice() — (internal helper) looks up / reads the untrusted-data flow slice step.
- _merge_ranges() — (internal helper) adds detail to the ranges value.
- _count_lines() — (internal helper) Provides the “count lines” logic.
- _neighbor_context() — (internal helper) Provides the “neighbor context” logic.
- _excerpt() — (internal helper) Provides the “excerpt” logic.
- _load_files_full() — (internal helper) looks up / reads the files full step.
- _load_sliding_window() — (internal helper) looks up / reads the sliding window step.
- _windows_for_entrypoints() — (internal helper) Provides the “windows for entrypoints” logic.
- _windows_for_anchors() — (internal helper) Provides the “windows for anchors” logic.
- _graph_anchor_lines_for_file() — (internal helper) Provides the “code relationship map anchor lines for file” logic.
pipeline/stages/s5_prefilter.py
249 LOC. Step 5 — Deterministic pre-filter.
Functions
- _is_secret_class() — (internal helper) checks / decides the secret class step.
- _gate() — (internal helper) checks / decides the rule check value.
- _ast_backfill_evidence() — (internal helper) Provides the “ast backfill evidence” logic.
- run() — Runs the run value.
pipeline/stages/s6_verify.py
426 LOC. Step 6 — Adversarial verification.
Functions
- run() — Runs the run value.
- _verify_one() — (internal helper) checks / decides the one value.
- _controls_for() — (internal helper) Provides the “controls for” logic.
- _callers_of() — (internal helper) Provides the “callers of” logic.
- _candidate_qnodes_for_finding() — (internal helper) looks up / reads the nodes in the code graph for candidate issue step.
- _callgraph_context_for_finding() — (internal helper) Provides the “map of which code calls what context for candidate issue” logic.
- _build_user_prompt() — (internal helper) builds / writes the user prompt step.
- _parse_verdict() — (internal helper) reads and cleans up the pass/fail decision value.
- _drop() — (internal helper) Provides the “drop” logic.
pipeline/stages/s7_dedup.py
371 LOC. Step 7 — Deduplication.
Functions
- _make_dup_location() — (internal helper) builds / writes the dup location step.
- _dedup_locations() — (internal helper) Provides the “duplicate removal locations” logic.
- _attach_duplicates() — (internal helper) adds detail to the duplicates value.
- _collapse_trivial() — (internal helper) Provides the “collapse trivial” logic.
- prefilter() — Provides the “early filter” logic.
- run() — Runs the run value.
- _semantic_dedup() — (internal helper) Provides the “semantic duplicate removal” logic.
- _parse_dedup_output() — (internal helper) reads and cleans up the duplicate removal output step.
- _graph_context_for_finding() — (internal helper) Provides the “code relationship map context for candidate issue” logic.
pipeline/stages/s8_chain.py
519 LOC. Step 8 — the chain-analysis LLM sees ALL findings together and:
Functions
- _reachability_for_finding() — (internal helper) Provides the “reachability for candidate issue” logic.
- run() — Runs the run value.
- _coerce_list_payload() — (internal helper) reads and cleans up the list payload step.
- _unranked_report() — (internal helper) Provides the “unranked report” logic.
- _hydrate_report() — (internal helper) reads and cleans up the report value.
- _build_prompt() — (internal helper) builds / writes the prompt value.
- _sev_from_band() — (internal helper) Provides the “severity from band” logic.
- _final_severity() — (internal helper) Provides the “final severity” logic.
- _offensive_rank() — (internal helper) Provides the “offensive rank” logic.
- _severity_sort_order() — (internal helper) Provides the “severity sort order” logic.
- _coerce_sev() — (internal helper) reads and cleans up the severity value.
See also: HLD · LLD · Data Flow · module index.