Pipeline stages (S0 → S11)
S0 · Static Seed6 files · 114 functions · backend: local
Optional warm-up: a static scan traces how untrusted input could reach dangerous operations, so later AI stages focus there first.
pipeline/stages/callgraph_engine/__init__.py 262 LOCTree-sitter-native call-graph seed engine.
run()— Runs the run value._lang_of()— (internal helper) Provides the “lang of” logic._scan_repo()— (internal helper) Runs the repository value.
pipeline/stages/callgraph_engine/_annotator.py 452 LOCLLM-backed source/sink spec derivation for callgraph mode.
_Candidate— (internal) Represents the “Candidate” data/behaviour._as_float()— (internal helper) Provides the “as float” logic._cfg_get()— (internal helper) Provides the “config 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” logic._heuristic_source_kind()— (internal helper) Provides the “heuristic source kind” logic._heuristic_sink_kind()— (internal helper) Provides the “heuristic dangerous operation kind” logic._append_spec()— (internal helper) Adds detail to the spec value._seed_seen_sig()— (internal helper) Provides the “static 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 LOCNaive call graph + source→sink reachability.
_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 budget” logic._filter_paths_by_budget()— (internal helper) Checks / decides the paths by budget 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 “static seed source 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 reflection targets step._emit_reflection_taint_edges()— (internal helper) Builds / writes the reflection untrusted-data flow edges step._apply_reflection_to_taint()— (internal helper) Runs the reflection 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 framework symbol table step._apply_framework_markers()— (internal helper) Runs the framework markers step._emit_framework_entry_points()— (internal helper) Builds / writes the framework entry points step._apply_response_dataflow()— (internal helper) Runs the response dataflow step.build_taint_paths()— Builds / writes the untrusted-data flow paths step.
pipeline/stages/callgraph_engine/_rules.py 450 LOCConvert `sources.generated.yaml` / `sinks.generated.yaml` (semgrep-format
MatchSpec— Represents the “MatchSpec” data/behaviour.has_qualified()— Checks / decides the qualified value.has_module_attr()— Checks / decides the module attr step.
_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 “top 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 “spec 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 LOCPer-file tree-sitter scanner. Emits a :class:`FileIndex` containing:
CallSite— Represents the “CallSite” data/behaviour.FuncDef— Represents the “FuncDef” data/behaviour.ObservedCall— Represents the “ObservedCall” data/behaviour.VarAssignFact— Represents the “VarAssignFact” data/behaviour.ReturnFact— Represents the “ReturnFact” data/behaviour.CallArgFact— Represents the “CallArgFact” data/behaviour.FieldWriteFact— Represents the “FieldWriteFact” data/behaviour.FieldReadFact— Represents the “FieldReadFact” data/behaviour.ContainerWriteFact— Represents the “ContainerWriteFact” data/behaviour.FileIndex— Represents the “FileIndex” data/behaviour.LangPlugin— Represents the “LangPlugin” data/behaviour._get_cached_parser()— (internal helper) Looks up / reads the cached parser step._build_cfg_for_function()— (internal helper) Builds / writes the config 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 reflection facts” logic._java_extract_reflection_facts()— (internal helper) Provides the “java extract reflection facts” logic._cs_extract_reflection_facts()— (internal helper) Provides the “cs extract reflection facts” logic._py_extract_framework_markers()— (internal helper) Provides the “py extract framework markers” logic._java_extract_framework_markers()— (internal helper) Provides the “java extract framework markers” logic._cs_extract_framework_markers()— (internal helper) Provides the “cs extract framework markers” logic._py_extract_response_dataflow()— (internal helper) Provides the “py extract response dataflow” logic._java_extract_response_dataflow()— (internal helper) Provides the “java extract response dataflow” logic._cs_extract_response_dataflow()— (internal helper) Provides the “cs extract response dataflow” 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 “scope 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 spec” 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 spec 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 LOCStep 0 — Static seed.
SeedPackage— Represents the “SeedPackage” data/behaviour.__post_init__()— Python built-in method (`__post_init__`).__bool__()— Python built-in method (`__bool__`).
_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 report value.
S1 · Preprocess4 files · 64 functions · backend: cli
Surveys the whole repo and builds a map of files and how they call each other.
lang/ts_graph.py 477 LOCtree-sitter call-graph backend for ``step1.call_graph: tree_sitter``.
available()— Provides the “available” logic._normalize_lang_for_queries()— (internal helper) Reads and cleans up the lang for queries step._captures()— (internal helper) Provides the “captures” logic._compile()— (internal helper) Provides the “compile” logic._parse_file()— (internal helper) Reads and cleans up the file value._enclosing()— (internal helper) Provides the “enclosing” logic.build()— Builds / writes the build value.
pipeline/callgraph_consumer.py 554 LOCShared post-S2 callgraph consumers.
GraphView— Represents the “GraphView” data/behaviour.__init__()— Python built-in method (`__init__`).
_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 touched files” logic.seed_reachable_files()— Provides the “static seed reachable files” logic.seed_paths_by_file()— Provides the “static seed paths by file” logic.best_source_from_seed()— Provides the “best source from static seed” logic.seed_evidence_reachable_files()— Provides the “static seed evidence reachable files” logic.seed_evidence_by_file()— Provides the “static seed evidence by file” logic.best_source_from_evidence()— Provides the “best source 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 “graph qnodes by file” logic.reverse_edges()— Provides the “reverse edges” logic.qnodes_at()— Provides the “qnodes at” logic.neighborhood()— Provides the “neighborhood” logic.graph_view()— Provides the “graph view” logic.cfgs_for_function()— Provides the “cfgs for function” logic.reflection_facts_for_function()— Provides the “reflection facts for function” logic.reflection_facts_by_file()— Provides the “reflection facts by file” logic.condition_edges_in_evidence()— Provides the “condition edges in evidence” logic.reflection_edges_in_evidence()— Provides the “reflection edges in evidence” logic.framework_markers_for_function()— Provides the “framework markers for function” logic.route_facts_for_file()— Provides the “route facts for file” logic.response_dataflows_for_function()— Provides the “response dataflows for function” logic.
pipeline/stages/s1_autoexclude.py 368 LOCAuto-derive a per-target step1 exclusion overlay.
_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 LOCStep 1 — Claude CLI explores the repo agentically and emits a ContextPackage.
_exclusion_sets()— (internal helper) Provides the “exclusion sets” logic._seed_repo_kinds()— (internal helper) Provides the “static seed repository kinds” logic._should_escalate_gap_fill()— (internal helper) Checks / decides the escalate gap fill step.glob_hit()— Provides the “glob hit” logic._norm_rel()— (internal helper) Reads and cleans up the rel value._resolve_scope_path()— (internal helper) Checks / decides the scope path step._walk_repo()— (internal helper) Provides the “walk repository” logic._flatten_keys()— (internal helper) Reads and cleans up the keys value._shape_hash()— (internal helper) Provides the “shape hash” logic._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 “static seed covered languages” logic._merge_graph_artifacts()— (internal helper) Adds detail to the graph artifacts step._supplement_call_graph()— (internal helper) Provides the “supplement call graph” logic.run()— Runs the run value.
S2 · Threat Model4 files · 8 functions · backend: cli
Thinks like an attacker: assets, trust boundaries and ranked threats (STRIDE/OWASP).
injectors/__init__.py 15 LOC
No top-level classes or functions.
injectors/cve_feed.py 77 LOCLoad known CVEs from a JSON file. Format is intentionally simple — adapt
load_cves()— Looks up / reads the cves value.
injectors/design_controls.py 50 LOCLoad design controls (auth boundaries, sandboxes, mitigations) from YAML.
load_controls()— Looks up / reads the controls value.
pipeline/stages/s2_threatmodel.py 611 LOCStep 2 — Application threat model.
_repo_kind()— (internal helper) Provides the “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.
S3 · Decompose1 files · 38 functions · backend: cli
Turns the plan into a prioritised list of code areas to inspect.
pipeline/stages/s3_decompose.py 1521 LOCStep 3 — the strategist LLM receives the ContextPackage (no raw code) and produces a
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 source value._file_call_graph()— (internal helper) Provides the “file call graph” 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” 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 chunks step._pick_hop_files()— (internal helper) Checks / decides the hop files step._qnode_for_file_line()— (internal helper) Provides the “qnode for file line” logic._sink_qnodes_for_sink()— (internal helper) Provides the “dangerous operation qnodes for dangerous operation” logic._seed_paths_for_entry()— (internal helper) Provides the “static seed paths for entry” logic._add_taint_chunks()— (internal helper) Adds detail to the untrusted-data flow chunks step._bfs_to_sinks()— (internal helper) Provides the “bfs to sinks” logic._size_for()— (internal helper) Provides the “size for” logic._char_budget()— (internal helper) Provides the “char budget” logic._split_oversize_risk_chunks()— (internal helper) Reads and cleans up the oversize risk chunks 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 chunks step._add_specialist_chunks()— (internal helper) Adds detail to the specialist chunks 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 loc step._count_chars()— (internal helper) Provides the “count chars” logic._count_loc()— (internal helper) Provides the “count loc” logic.
S4 · Deep Dive5 files · 42 functions · backend: cli
Specialist AI lenses inspect each area (crypto, access-control, logic, batch/ETL, IaC).
lang/__init__.py 15 LOC
No top-level classes or functions.
lang/hints.py 1392 LOCLanguage-specific researcher hints + specialist researcher bodies.
is_iac_file()— Checks / decides the iac file step._read_head()— (internal helper) Looks up / reads the head value._sniff_lang()— (internal helper) Provides the “sniff lang” logic.detect_languages()— Looks up / reads the languages value._framework_blocks()— (internal helper) Provides the “framework blocks” logic.hints_for()— Provides the “hints for” logic.
lang/ts_graph.py 477 LOCtree-sitter call-graph backend for ``step1.call_graph: tree_sitter``.
available()— Provides the “available” logic._normalize_lang_for_queries()— (internal helper) Reads and cleans up the lang for queries step._captures()— (internal helper) Provides the “captures” logic._compile()— (internal helper) Provides the “compile” logic._parse_file()— (internal helper) Reads and cleans up the file value._enclosing()— (internal helper) Provides the “enclosing” logic.build()— Builds / writes the build value.
pipeline/stages/s4_deepdive.py 1518 LOCStep 4 — Deep-dive each chunk N times, then majority-vote.
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 chunks” 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 source 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 graph 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 “graph anchor lines for file” logic.
util/prompts.py 136 LOCShared prompt blocks used by s4 (researchers), s6 (verifiers), and s8 (chain analysis).
No top-level classes or functions.
S5 · Pre-filter1 files · 4 functions · backend: local
Drops weakly-evidenced guesses before spending money verifying them.
pipeline/stages/s5_prefilter.py 249 LOCStep 5 — Deterministic pre-filter.
_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.
S6 · Verify1 files · 9 functions · backend: cli
A sceptic tries to disprove each claimed flaw and scores how severe it is if real.
pipeline/stages/s6_verify.py 426 LOCStep 6 — Adversarial verification.
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 qnodes for candidate issue step._callgraph_context_for_finding()— (internal helper) Provides the “callgraph 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.
S7 · Dedup1 files · 9 functions · backend: cli
Merges duplicate reports of the same underlying issue.
pipeline/stages/s7_dedup.py 371 LOCStep 7 — Deduplication.
_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 “prefilter” 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 “graph context for candidate issue” logic.
S8 · Chain1 files · 11 functions · backend: cli
Connects individual weaknesses into realistic attack chains and re-ranks them.
pipeline/stages/s8_chain.py 519 LOCStep 8 — the chain-analysis LLM sees ALL findings together and:
_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 “sev 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 sev value.
S9 · SARIF5 files · 54 functions · backend: local
Adds standard scores/redaction and saves a machine-readable report.
report/__init__.py 15 LOC
No top-level classes or functions.
report/cvss.py 83 LOCCVSS 3.1 base-score calculator (FIRST.org spec §7).
_roundup1()— (internal helper) Provides the “roundup1” logic.score()— Checks / decides the score value.rating()— Provides the “rating” logic.
report/cwe.py 146 LOCCWE id → canonical MITRE name. Single source of truth for MD rendering,
cwe_name()— Provides the “weakness type name” logic.cwe_for()— Provides the “weakness type for” logic.cwe_label()— Provides the “weakness type label” logic.
report/enrich.py 1128 LOCReads a findings markdown that already contains CVSS 3.1 base vectors,
AppInfo— Represents the “AppInfo” data/behaviour.cr()— A small support routine (`cr`).ir()— A small support routine (`ir`).ar()— A small support routine (`ar`).mav()— Provides the “mav” logic.env_summary()— Provides the “environment summary” logic.
VsvsResult— Represents the “VsvsResult” data/behaviour.Finding— Represents the “candidate issue” data/behaviour._yes()— (internal helper) Provides the “yes” logic._nz()— (internal helper) A small support routine (`_nz`).normalize_app_id()— Reads and cleans up the app identifier step._csv_col()— (internal helper) Provides the “csv col” logic._cmdb_enrichment_differs()— (internal helper) Provides the “cmdb enrichment differs” logic.load_cmdb_csv()— Looks up / reads the cmdb csv step._pick()— (internal helper) Checks / decides the pick value._merge_with_parent()— (internal helper) Adds detail to the with parent step.lookup_app()— Looks up / reads the app value._cia()— (internal helper) Provides the “cia” logic._req()— (internal helper) Provides the “req” logic._temporal_e()— (internal helper) Provides the “temporal e” logic._temporal_rl()— (internal helper) Provides the “temporal rl” logic._temporal_rc()— (internal helper) Provides the “temporal rc” logic.round_up1()— Provides the “round up1” logic.parse_vector()— Reads and cleans up the vector value.cvss31_base_score()— Provides the “cvss31 base score” logic.qualitative()— Provides the “qualitative” logic._env_vector()— (internal helper) Provides the “environment vector” logic.vsvs_score()— Provides the “vsvs score” logic._contains_any()— (internal helper) Provides the “contains any” logic.offensive_priority_for()— Provides the “offensive priority for” logic.compute_offensive_priority()— Provides the “compute offensive priority” logic.annotate_md_cvss_vsvs()— Adds detail to the Markdown severity score vsvs step.annotate_md_offensive()— Adds detail to the Markdown offensive step.parse_findings()— Reads and cleans up the findings value._driver_rules()— (internal helper) Runs the rules value._cwe_taxonomy()— (internal helper) Provides the “weakness type taxonomy” logic._sarif_level()— (internal helper) Provides the “machine report level” logic._security_severity()— (internal helper) Provides the “security severity” logic._cvss_rating()— (internal helper) Provides the “severity score rating” logic.generate_sarif()— Provides the “generate machine report” logic.md_to_sarif()— Provides the “Markdown to machine report” logic.enrich()— Adds detail to the enrich value.main()— Runs the main value.
report/redact.py 336 LOCSensitive-data redaction for emitted reports (MD + SARIF).
_luhn()— (internal helper) Provides the “luhn” logic._cc_network()— (internal helper) Provides the “cc network” logic._ssn_valid()— (internal helper) Provides the “ssn valid” logic._bearer_credential()— (internal helper) Provides the “bearer credential” logic._redact_impl()— (internal helper) Hides sensitive data in the impl value.redact()— Hides sensitive data in the secret hiding value.redact_counts()— Hides sensitive data in the counts value.redact_tree()— Hides sensitive data in the tree value.
S10 · Remediate60 files · 143 functions · backend: deepagents
The repair crew: proposes a minimal fix per finding from a playbook and (in fix mode) applies it under a policy gate.
remediation_agent/__init__.py 43 LOCremediation_agent — remediation subpackage.
No top-level classes or functions.
remediation_agent/artifacts/__init__.py 58 LOCremediation_agent.artifacts — render and persist a remediation verdict to disk.
No top-level classes or functions.
remediation_agent/artifacts/diff/__init__.py 53 LOCremediation_agent.artifacts.diff — capture a scoped diff of the edited files.
No top-level classes or functions.
remediation_agent/artifacts/diff/gitcapture.py 140 LOCremediation_agent.artifacts.diff.gitcapture — real ``git diff`` capture.
changed_files_whole_tree()— Provides the “changed files whole tree” logic.capture_git_diff()— Provides the “capture git code change” logic.
remediation_agent/artifacts/diff/paths.py 73 LOCremediation_agent.artifacts.diff.paths — repo-relative path normalisation + confinement.
_norm_path()— (internal helper) Reads and cleans up the path value._safe_repo_path()— (internal helper) Provides the “safe repository path” logic.
remediation_agent/artifacts/diff/snapshot.py 57 LOCremediation_agent.artifacts.diff.snapshot — pre-edit file snapshots.
snapshot_files()— Provides the “snapshot files” logic.
remediation_agent/artifacts/diff/synth.py 100 LOCremediation_agent.artifacts.diff.synth — synthesized unified diff for non-git targets.
synth_unified_diff()— Provides the “synth unified code change” logic.
remediation_agent/artifacts/layout.py 35 LOCremediation_agent.artifacts.layout — file/folder names and schema constants.
No top-level classes or functions.
remediation_agent/artifacts/report.py 71 LOCremediation_agent.artifacts.report — assemble the canonical ``remediate_report.json``.
status_for()— Provides the “status for” logic.build_report()— Builds / writes the report value.
remediation_agent/artifacts/summary.py 46 LOCremediation_agent.artifacts.summary — the human-readable ``summary.md`` renderer.
render_summary()— Builds / writes the summary value.
remediation_agent/artifacts/validation.py 37 LOCremediation_agent.artifacts.validation — the empty s11 validation block.
empty_validation()— Provides the “empty validation” logic.
remediation_agent/artifacts/writer.py 92 LOCremediation_agent.artifacts.writer — orchestrate the per-finding on-disk layout.
write_verdict()— Builds / writes the pass/fail decision value.
remediation_agent/discovery.py 102 LOCremediation_agent.discovery — locate the scan report and select findings.
Layout— Represents the “Layout” data/behaviour.locate_report()— Looks up / reads the report value.cvss_score_of()— Provides the “severity score score of” logic.load_findings()— Looks up / reads the findings value.prepare_layout()— Provides the “prepare layout” logic.
remediation_agent/frameworks.py 90 LOCremediation_agent.frameworks — per-file language + per-repo framework detection.
language_for()— Provides the “language for” logic.detect_frameworks()— Looks up / reads the frameworks value.
remediation_agent/interactive/__init__.py 48 LOCremediation_agent.interactive — arrow-key issue picker for `vvaharness remediate -i`.
No top-level classes or functions.
remediation_agent/interactive/keys.py 75 LOCremediation_agent.interactive.keys — raw key input + decoding.
decode_key()— Provides the “decode key” logic._read_key()— (internal helper) Looks up / reads the key value.
remediation_agent/interactive/loop.py 147 LOCremediation_agent.interactive.loop — the interactive remediation loops.
_remediate_one()— (internal helper) Provides the “remediate one” logic.run_interactive()— Runs the interactive value._loop_tty()— (internal helper) Runs the tty value._loop_prompt()— (internal helper) Runs the prompt value.
remediation_agent/interactive/render.py 92 LOCremediation_agent.interactive.render — menu rendering + selection parsing.
render_rows()— Builds / writes the rows value._clear_and_draw()— (internal helper) Provides the “clear and draw” logic.parse_selection()— Reads and cleans up the selection value.
remediation_agent/models/__init__.py 34 LOCremediation_agent.models — the structured-output contract for one remediation.
No top-level classes or functions.
remediation_agent/models/change.py 24 LOCremediation_agent.models.change — one edited-file record in a remediation verdict.
Change— Represents the “Change” data/behaviour.
remediation_agent/models/gates.py 42 LOCremediation_agent.models.gates — the 3-gate evidence status block.
Gates— Represents the “Gates” data/behaviour.
remediation_agent/models/verdict.py 100 LOCremediation_agent.models.verdict — the per-finding ``RemediationVerdict`` contract.
RemediationVerdict— Represents the “RemediationVerdict” data/behaviour.schema_json_compact()— Provides the “schema data file compact” logic.coerce()— Reads and cleans up the coerce value.
remediation_agent/options.py 70 LOCremediation_agent.options — parse the ``remediate`` command's CLI flags.
RemediateOptions— Represents the “RemediateOptions” data/behaviour.parse_options()— Reads and cleans up the options value._mode_from()— (internal helper) Provides the “mode from” logic.
remediation_agent/playbook.py 154 LOCremediation_agent.playbook — fix-strategy resolver for the Remediation Agent.
Strategy— Represents the “Strategy” data/behaviour.as_prompt_block()— Provides the “as prompt block” logic.
Playbook— Represents the “Playbook” data/behaviour.__init__()— Python built-in method (`__init__`)._load()— (internal helper) Looks up / reads the load value.max_diff_lines()— Provides the “max code change lines” logic.max_files_touched()— Provides the “max files touched” logic.resolve()— Checks / decides the resolve value.guidance_for()— Provides the “guidance for” logic.
_default_playbook_path()— (internal helper) Provides the “default playbook path” logic.
remediation_agent/plugin_runner/__init__.py 330 LOCremediation_agent.plugin_runner — run the remediation method for one finding.
_run_sync()— (internal helper) Runs the sync value._debug_log()— (internal helper) Provides the “debug log” logic._terminal_stats()— (internal helper) Provides the “terminal stats” logic._debug_terminal()— (internal helper) Provides the “debug terminal” logic._report_recursion_limit()— (internal helper) Builds / writes the recursion limit step._verdict_extraction_prompt()— (internal helper) Provides the “pass/fail decision extraction prompt” logic._extract_verdict_from_history()— (internal helper) Reads and cleans up the pass/fail decision from history step._attempt_extraction()— (internal helper) Provides the “attempt extraction” logic._consume_deepagents()— (internal helper) Runs the deepagents value._virtualize_deepagents_prompt()— (internal helper) Provides the “virtualize deepagents prompt” logic._invoke_deepagents()— (internal helper) Runs the deepagents value._invoke()— (internal helper) Runs the invoke value.
remediation_agent/plugin_runner/helpers.py 76 LOCremediation_agent.plugin_runner.helpers — tool list, prompt build, verdict coerce.
_tools()— (internal helper) Provides the “tools” logic._build_user()— (internal helper) Builds / writes the user value._coerce_verdict()— (internal helper) Reads and cleans up the pass/fail decision value.
remediation_agent/plugin_runner/run.py 142 LOCremediation_agent.plugin_runner.run — the per-finding apply_plugin orchestration.
apply_plugin()— Runs the plugin value.
remediation_agent/plugin_runner/trace.py 68 LOCremediation_agent.plugin_runner.trace — --verbose stderr tracing helpers.
dump()— Builds / writes the dump value.dump_policy()— Builds / writes the policy value.
remediation_agent/policy/__init__.py 59 LOCremediation_agent.policy — wire the deterministic gate + playbook into the agent.
No top-level classes or functions.
remediation_agent/policy/context.py 104 LOCremediation_agent.policy.context — load the gate + playbook once per run.
PolicyContext— Represents the “PolicyContext” data/behaviour._sr()— (internal helper) A small support routine (`_sr`).policy_enabled()— Provides the “policy enabled” logic._resolve_input()— (internal helper) Checks / decides the input value.build_context()— Builds / writes the context value.
remediation_agent/policy/decide.py 84 LOCremediation_agent.policy.decide — the pre-gate (before any LLM call).
PreResult— Represents the “PreResult” data/behaviour.allowed()— Provides the “allowed” logic.
pre_decision()— Provides the “pre decision” logic.guidance_verdict()— Provides the “guidance pass/fail decision” logic.
remediation_agent/policy/postgate.py 195 LOCremediation_agent.policy.postgate — enforce path policy on the generated diff.
PostResult— Represents the “PostResult” data/behaviour.worktree_forbidden_matches()— Provides the “worktree forbidden matches” logic._gates_ok()— (internal helper) Checks / decides the ok value.enforce_post()— Provides the “enforce post” logic.
remediation_agent/policy/revert.py 120 LOCremediation_agent.policy.revert — roll back forbidden-path edits on disk.
_is_git_worktree()— (internal helper) Checks / decides the git worktree step._is_tracked()— (internal helper) Checks / decides the tracked value._within_repo()— (internal helper) Provides the “within repository” logic.revert_files()— Provides the “revert files” logic.
remediation_agent/policy_gate/__init__.py 63 LOCremediation_agent.policy_gate — deterministic eligibility gate.
No top-level classes or functions.
remediation_agent/policy_gate/action.py 43 LOCremediation_agent.policy_gate.action — the gate decision value types.
Action— Represents the “Action” data/behaviour.Decision— Represents the “Decision” data/behaviour.may_generate_patch()— Provides the “may generate patch” logic.
remediation_agent/policy_gate/diffscan.py 76 LOCremediation_agent.policy_gate.diffscan — diff inspection + verdict capping.
inspect_diff()— Provides the “inspect code change” logic.cap_verdict()— Provides the “cap pass/fail decision” logic.
remediation_agent/policy_gate/gate.py 133 LOCremediation_agent.policy_gate.gate — the deterministic eligibility gate.
RemediationGate— Represents the “RemediationGate” data/behaviour.__init__()— Python built-in method (`__init__`).deny_paths()— Provides the “deny paths” logic.forbid_patch_paths()— Provides the “forbid patch paths” logic.decide()— Checks / decides the decide value.patch_touches_forbidden()— Provides the “patch touches forbidden” logic.changed_paths_hit_deny()— Provides the “changed paths hit deny” logic.forbidden_files()— Provides the “forbidden files” logic.
_default_policy_path()— (internal helper) Provides the “default policy path” logic.
remediation_agent/policy_gate/loader.py 100 LOCremediation_agent.policy_gate.loader — parse the shipped remediation_policy.yaml.
PolicyData— Represents the “PolicyData” data/behaviour._norm_cwe()— (internal helper) Reads and cleans up the weakness type value.parse_policy()— Reads and cleans up the policy value.
remediation_agent/policy_gate/matching.py 45 LOCremediation_agent.policy_gate.matching — glob matching helpers.
_glob_match()— (internal helper) Provides the “glob match” logic._first_match()— (internal helper) Provides the “first match” logic.
remediation_agent/prompts.py 137 LOCremediation_agent.prompts — the remediation method as model-agnostic prompt text.
build_system()— Builds / writes the system value._policy_block()— (internal helper) Provides the “policy block” logic.build_user()— Builds / writes the user value.
remediation_agent/remediate.py 132 LOCremediation_agent.remediate — drive remediation from an existing scan report.
remediate()— Provides the “remediate” logic.
remediation_agent/report_augment/__init__.py 94 LOCAugment the combined SARIF + MD report with remediation results.
augment_reports()— Adds detail to the reports value._augment()— (internal helper) Adds detail to the augment value.
remediation_agent/report_augment/dto.py 158 LOCremediation_agent.report_augment.dto — load + classify the per-finding DTOs.
_skipped_dto()— (internal helper) Provides the “skipped per-finding fix record” logic._load_dtos()— (internal helper) Looks up / reads the dtos value._load_triage()— (internal helper) Looks up / reads the triage value._status_and_reason()— (internal helper) Provides the “status and reason” logic._finding_of()— (internal helper) Looks up / reads the of value._files_touched()— (internal helper) Provides the “files touched” logic._remediation_block()— (internal helper) Provides the “remediation block” logic.
remediation_agent/report_augment/locate.py 85 LOCremediation_agent.report_augment.locate — locate + copy the scan report.
_locate_scan_report()— (internal helper) Looks up / reads the scan report step._ensure_combined()— (internal helper) Checks / decides the combined value.
remediation_agent/report_augment/markdown.py 146 LOCremediation_agent.report_augment.markdown — add remediation sections to the MD copy.
_md_remediation_section()— (internal helper) Provides the “Markdown remediation section” logic._best_md_match()— (internal helper) Provides the “best Markdown match” logic._augment_md()— (internal helper) Adds detail to the Markdown value._augment_segment()— (internal helper) Adds detail to the segment value.
remediation_agent/report_augment/mdsafe.py 67 LOCremediation_agent.report_augment.mdsafe — escape untrusted text for Markdown.
_md_escape()— (internal helper) Provides the “Markdown escape” logic._md_code_span()— (internal helper) Provides the “Markdown code span” logic.
remediation_agent/report_augment/sarif.py 88 LOCremediation_agent.report_augment.sarif — add remediation blocks to the SARIF copy.
_result_loc()— (internal helper) Provides the “result loc” logic._match_by_loc()— (internal helper) Checks / decides the by loc step._match_by_title()— (internal helper) Checks / decides the by title step._match_sarif()— (internal helper) Checks / decides the machine report value._augment_sarif()— (internal helper) Adds detail to the machine report value.
remediation_agent/report_augment/summary.py 59 LOCremediation_agent.report_augment.summary — the report-level ``## Remediation Summary``.
_summary_counts()— (internal helper) Provides the “summary counts” logic._md_summary_section()— (internal helper) Provides the “Markdown summary section” logic.
remediation_agent/report_parser/__init__.py 49 LOCremediation_agent.report_parser — locate and parse the Markdown reports a scan produced.
No top-level classes or functions.
remediation_agent/report_parser/field_sections.py 72 LOCremediation_agent.report_parser.field_sections — regexes + section splitting.
_file_loc()— (internal helper) Provides the “file loc” logic._sections()— (internal helper) Provides the “sections” logic._first_code_block()— (internal helper) Provides the “first code block” logic.
remediation_agent/report_parser/fields.py 124 LOCremediation_agent.report_parser.fields — rich per-finding field extraction.
parse_finding_fields()— Reads and cleans up the candidate issue fields step.
remediation_agent/report_parser/finding.py 53 LOCremediation_agent.report_parser.finding — the ``Finding`` dataclass.
Finding— Represents the “candidate issue” data/behaviour.label()— Provides the “label” logic.slug()— Provides the “slug” logic.
remediation_agent/report_parser/ids.py 61 LOCremediation_agent.report_parser.ids — stable finding id + cheap CVSS extraction.
cvss_score_only()— Provides the “severity score score only” logic.finding_id()— Looks up / reads the identifier value.
remediation_agent/report_parser/locate.py 48 LOCremediation_agent.report_parser.locate — artefact folder names and scan-report discovery.
find_scan_dir()— Looks up / reads the scan dir step.latest_report()— Provides the “latest report” logic.
remediation_agent/report_parser/parse.py 105 LOCremediation_agent.report_parser.parse — finding-header parsing and the done-marker.
parse_findings()— Reads and cleans up the findings value.mark_done()— Provides the “mark done” logic.
remediation_agent/rule_paths.py 82 LOCLocate remediation rules across source, wheel, and user installs.
settings_path()— Provides the “settings path” logic.configured_inputs_dir()— Sets up / maintains the inputs dir step.save_inputs_dir()— Builds / writes the inputs dir step.candidate_inputs_dirs()— Looks up / reads the inputs dirs step.locate_rule()— Looks up / reads the rule value.missing_rules()— Provides the “missing rules” logic.validate_inputs_dir()— Checks / decides the inputs dir step.
remediation_agent/runner.py 147 LOCremediation_agent.runner — the per-finding processing loop.
model_banner()— Provides the “model banner” logic._finding_identity()— (internal helper) Looks up / reads the identity value.remediate_one()— Provides the “remediate one” logic.process_findings()— Runs the findings value.
remediation_agent/select/__init__.py 49 LOCremediation_agent.select — shared "top N by CVSS" finding selection.
No top-level classes or functions.
remediation_agent/select/pq.py 110 LOCremediation_agent.select.pq — the priority-queue "top N by CVSS" selector.
band_score()— Provides the “band score” logic.select_top_by_cvss()— Checks / decides the top by severity score step.select_top_logged()— Checks / decides the top logged step.
remediation_agent/select/topspec.py 123 LOCremediation_agent.select.topspec — parse + resolve the ``--top N`` cap.
_coerce_top_value()— (internal helper) Reads and cleans up the top value step.parse_top_arg()— Reads and cleans up the top arg step.cfg_top_n_findings()— Provides the “config top n findings” logic.resolve_top()— Checks / decides the top value.
S11 · Validate71 files · 220 functions · backend: deepagents
The inspection panel: a read-only adversarial panel grades each fix; scoring is deterministic.
pipeline/stages/s11_validate.py 56 LOCs11_validate — thin wrapper that hooks the validation package into the pipeline.
run()— Runs the run value.
validation/__init__.py 16 LOCAI SAST Finding Validation Orchestrator.
No top-level classes or functions.
validation/cli/__init__.py 160 LOCThe validation CLI entry point for ``vvaharness validate``.
_resolve_selection()— (internal helper) Checks / decides the selection value._resolve_config_path()— (internal helper) Checks / decides the config path step._is_nonempty_dir()— (internal helper) Checks / decides the nonempty dir step._check_path_guards()— (internal helper) Checks / decides the path guards step._dispatch()— (internal helper) Runs the dispatch value.main()— Runs the main value.
validation/cli/_model.py 202 LOCModel-resolution logic for the ``vvaharness validate`` command.
_validate_model_spec()— (internal helper) Checks / decides the model spec step._normalize_validate_backend()— (internal helper) Reads and cleans up the validate backend step._routes_to_anthropic()— (internal helper) Provides the “routes to anthropic” logic._check_persona_vendors()— (internal helper) Checks / decides the AI reviewer vendors step._load_validated_spec()— (internal helper) Looks up / reads the validated spec step._persona_spec_resolved()— (internal helper) Provides the “AI reviewer spec resolved” logic._apply_model_env()— (internal helper) Runs the model environment step.
validation/cli/_parser.py 104 LOCArgument parser and tunable-override helpers for ``vvaharness validate``.
_build_parser()— (internal helper) Builds / writes the parser value._tunable_overrides()— (internal helper) Provides the “tunable overrides” logic.
validation/cli/_patterns.py 22 LOCCompiled regex patterns for the cli package.
No top-level classes or functions.
validation/cli/_run.py 311 LOCCore validation execution: run_validation() and _validate_one().
Selection— Represents the “Selection” data/behaviour.ValidationRun— Represents the “ValidationRun” data/behaviour._is_hard_failure()— (internal helper) Checks / decides the hard failure step._safe()— (internal helper) Provides the “safe” logic._step_key()— (internal helper) Provides the “step key” logic._session_log_dest()— (internal helper) Provides the “session log dest” logic._persist_session_log()— (internal helper) Builds / writes the session log step._print_result()— (internal helper) Provides the “print result” logic._validate_one()— (internal helper) Checks / decides the one value._resume_hit()— (internal helper) Provides the “resume hit” logic._process_report()— (internal helper) Runs the report value._run_reports()— (internal helper) Runs the reports value._cleanup_workspace()— (internal helper) Reads and cleans up the workspace value._empty_selection_rc()— (internal helper) Provides the “empty selection rc” logic.run_validation()— Runs the validation value.
validation/config/__init__.py 34 LOCValidation agent configuration (the only place environment is read).
No top-level classes or functions.
validation/config/settings.py 189 LOCTyped configuration tree; all VVAHARNESS_* env access funnelled through _EnvScalars.
PathsConfig— Represents the “PathsConfig” data/behaviour.AgentConfig— Represents the “AgentConfig” data/behaviour.GheConfig— Represents the “GheConfig” data/behaviour.Config— Represents the “Config” data/behaviour._EnvScalars— (internal) Represents the “EnvScalars” data/behaviour._parse_tools()— (internal helper) Reads and cleans up the tools value._build_paths()— (internal helper) Builds / writes the paths value.load_config()— Looks up / reads the config value.
validation/constants/__init__.py 16 LOCConstant vocabularies for the validation agent (enums + path registry only).
No top-level classes or functions.
validation/constants/artifacts.py 171 LOCSingle source of truth for artifact names, DTO layout, and runtime environment keys.
No top-level classes or functions.
validation/constants/diff.py 48 LOCConstants for deterministic diff-based fact tools.
No top-level classes or functions.
validation/constants/paths.py 51 LOCValidation-path registry. Only the fix-validation path is supported.
PathConfig— Represents the “PathConfig” data/behaviour.resolve_path()— Checks / decides the path value.
validation/constants/pattern_sets.py 35 LOCConstants for deterministic pattern-scanning fact tools.
No top-level classes or functions.
validation/constants/policy.py 51 LOCValidation-specific harness policy values (read-only tool allow-list + write gate).
No top-level classes or functions.
validation/constants/scoring.py 58 LOCCanonical scoring weights and thresholds used directly by the scoring engine.
No top-level classes or functions.
validation/constants/synthesis.py 26 LOCConstants for deterministic persona-report consensus synthesis.
No top-level classes or functions.
validation/constants/test_inventory.py 34 LOCConstants for the deterministic test-inventory fact tool.
No top-level classes or functions.
validation/constants/tools.py 32 LOCConstant tool-name vocabularies for the validation agent.
No top-level classes or functions.
validation/enums/__init__.py 45 LOCDomain enums for vvaharness.validation.
No top-level classes or functions.
validation/enums/gates.py 63 LOCGate-evaluation enums for the fix-validation scoring path.
GateStatus— Represents the “GateStatus” data/behaviour.parse()— Reads and cleans up the parse value.
GateName— Represents the “GateName” data/behaviour.
validation/enums/paths.py 28 LOCValidation-path enum.
ValidationPath— Represents the “ValidationPath” data/behaviour.
validation/enums/readiness.py 30 LOCMerge-readiness enum derived from a ValidationScore.
MergeReadiness— Represents the “MergeReadiness” data/behaviour.
validation/enums/verdicts.py 47 LOCFix-validation verdict vocabulary emitted by the scoring engine and agent.
FixVerdict— Represents the “FixVerdict” data/behaviour.parse()— Reads and cleans up the parse value.
Answer— Represents the “Answer” data/behaviour.
validation/execution/__init__.py 20 LOCExecution package: plan execution pipeline.
No top-level classes or functions.
validation/execution/pipeline.py 71 LOCPlan execution pipeline: launch a fix-validation session and collect results.
_unverifiable()— (internal helper) Provides the “unverifiable” logic.execute_plan()— Runs the plan value.
validation/hints/__init__.py 19 LOCPer-CWE adversarial bypass hints for the validation agent.
No top-level classes or functions.
validation/hints/loader.py 101 LOCLoad per-CWE adversarial bypass hints from the operator-supplied ``inputs/`` file.
CweHints— Represents the “CweHints” data/behaviour.load()— Looks up / reads the load value.
_hints_path()— (internal helper) Provides the “hints path” logic._parse_hints()— (internal helper) Reads and cleans up the hints value._resolve_raw()— (internal helper) Checks / decides the raw value._registry()— (internal helper) Provides the “registry” logic.hints_for()— Provides the “hints for” logic.
validation/ingest/__init__.py 40 LOCDTO ingest layer: discover remediation reports and stage validation workspaces.
No top-level classes or functions.
validation/ingest/dto_loader.py 138 LOCDiscover and load remediation report DTOs from a target repository.
discover_reports()— Looks up / reads the reports value.load_report()— Looks up / reads the report value._load_report_safe()— (internal helper) Looks up / reads the report safe step._all_reports()— (internal helper) Provides the “all reports” logic._is_validatable()— (internal helper) Checks / decides the validatable value._cvss_score()— (internal helper) Provides the “severity score score” logic._top_by_cvss()— (internal helper) Provides the “top by severity score” logic._log_selection()— (internal helper) Provides the “log selection” logic.select_reports()— Checks / decides the reports value._select_by_id()— (internal helper) Checks / decides the by identifier step.
validation/ingest/errors.py 22 LOCIngest-layer error type.
IngestError— Represents the “IngestError” data/behaviour.
validation/ingest/manifest_builder.py 50 LOCMap a remediation report DTO onto the agent-facing validation manifest.
build_manifest()— Builds / writes the manifest value.
validation/ingest/workspace.py 96 LOCStage a pre-patched copy of the target repo and gate on applied remediation.
stage_workspace()— Builds / writes the workspace value._under_repo()— (internal helper) Provides the “under repository” logic._resolve_touched()— (internal helper) Checks / decides the touched value._any_touched_exists()— (internal helper) Provides the “any touched exists” logic.assert_remediation_applied()— Checks / decides the remediation applied step.
validation/io/__init__.py 15 LOC
No top-level classes or functions.
validation/io/_host_score.py 159 LOCDeterministic host-side scoring from host-persisted ``synthesized_gates.json``.
HostScore— Represents the “HostScore” data/behaviour._read_gates_text()— (internal helper) Looks up / reads the gates text step._parse_gates_array()— (internal helper) Reads and cleans up the gates array step._gates_by_tracking_id()— (internal helper) Checks / decides the by tracking identifier step.load_synthesized_gates()— Looks up / reads the synthesized gates step.effective_score()— Provides the “effective score” logic._gate_scores()— (internal helper) Checks / decides the scores value.host_score_for()— Provides the “host score for” logic.
validation/io/dto_writeback.py 157 LOCWrite the agentic verdict back into the remediation DTO's validation block.
_load_verdict()— (internal helper) Looks up / reads the pass/fail decision value._validation_block()— (internal helper) Provides the “validation block” logic._terminal_status()— (internal helper) Provides the “terminal status” logic._load_raw_dto()— (internal helper) Looks up / reads the raw per-finding fix record step._dump_raw_dto()— (internal helper) Builds / writes the raw per-finding fix record step.write_back_validation()— Builds / writes the back validation step.
validation/io/message_logger.py 152 LOCDrain a Harness streaming session to session.jsonl and return exit status.
_serialize()— (internal helper) Provides the “serialize” logic._agent_desc()— (internal helper) Provides the “agent desc” logic._log_key_event()— (internal helper) Provides the “log key event” logic._format_tool_use()— (internal helper) Builds / writes the tool use step._format_assistant_text()— (internal helper) Builds / writes the assistant text step._format_terminal()— (internal helper) Builds / writes the terminal value._fmt_session_init()— (internal helper) Provides the “fmt session init” logic._fmt_tool_use()— (internal helper) Provides the “fmt tool use” logic._fmt_assistant_text()— (internal helper) Provides the “fmt assistant text” logic._format_live()— (internal helper) Builds / writes the live value._print_live()— (internal helper) Provides the “print live” logic._process_message()— (internal helper) Runs the message value.stream_and_log()— Provides the “stream and log” logic.
validation/io/persona_report_stash.py 85 LOCExtract subagent persona reports from the parent graph state (DeepAgents or SDK/CLI).
_validate_candidates()— (internal helper) Checks / decides the candidates value.extract_subagent_reports()— Reads and cleans up the subagent reports step.
validation/io/result_collector.py 179 LOCCollect fix-validation results from the agent session output.
_files_needing_fixes()— (internal helper) Provides the “files needing fixes” logic._build_result()— (internal helper) Builds / writes the result value.collect_results()— Looks up / reads the results value._filter_affected_files()— (internal helper) Checks / decides the affected files step._load_manifest()— (internal helper) Looks up / reads the manifest value.collect_and_enrich()— Looks up / reads the and enrich step._enrich_tracking_id()— (internal helper) Adds detail to the tracking identifier step._enrich_result()— (internal helper) Adds detail to the result value.
validation/models/__init__.py 79 LOCPydantic data contracts and value types for the validation agent.
No top-level classes or functions.
validation/models/dto.py 95 LOCRemediation DTO (``remediate_report.json``) consumed by the validator; tolerant wire shape.
DtoFinding— Represents the “DtoFinding” data/behaviour._null_to_default()— (internal helper) Provides the “null to default” logic.
DtoPatch— Represents the “DtoPatch” data/behaviour.RemediationReport— Represents the “RemediationReport” data/behaviour.from_file()— Provides the “from file” logic.
_read_json()— (internal helper) Looks up / reads the data file value.
validation/models/manifest.py 73 LOCPer-finding workspace manifest (``manifest.json``); treated as a stable wire shape.
ManifestFinding— Represents the “ManifestFinding” data/behaviour.Manifest— Represents the “Manifest” data/behaviour.to_dict()— Provides the “to dict” logic.write()— Builds / writes the write value.from_file()— Provides the “from file” logic.
validation/models/output.py 90 LOCStrict structured-output schema for the read-only DeepAgents validation session.
GateEntry— Represents the “GateEntry” data/behaviour.SynthesizedGatesEntry— Represents the “SynthesizedGatesEntry” data/behaviour.OutputFinding— Represents the “OutputFinding” data/behaviour._coerce_csv()— (internal helper) Reads and cleans up the csv value.
ValidationOutput— Represents the “ValidationOutput” data/behaviour.
validation/models/persona_report.py 69 LOCPydantic wire shapes for native DeepAgents persona reports.
EvidenceAnchor— Represents the “EvidenceAnchor” data/behaviour._none_to_empty()— (internal helper) Provides the “none to empty” logic.
PersonaGateEntry— Represents the “PersonaGateEntry” data/behaviour._canonical_status()— (internal helper) Provides the “canonical status” logic.
PersonaReport— Represents the “PersonaReport” data/behaviour.
validation/models/plans.py 36 LOCExecution-plan value objects for the fix-validation path.
FixValidationPlan— Represents the “FixValidationPlan” data/behaviour.
validation/models/results.py 154 LOCHost-side validation result models and the agent report contract.
RunMetadata— Represents the “RunMetadata” data/behaviour.ValidationResult— Represents the “ValidationResult” data/behaviour.FixFindingReport— Represents the “FixFindingReport” data/behaviour._clamp_raw_score()— (internal helper) Provides the “clamp raw score” logic._coerce_merge_readiness()— (internal helper) Reads and cleans up the merge readiness step._redact_narrative()— (internal helper) Hides sensitive data in the narrative value.
ValidationReport— Represents the “ValidationReport” data/behaviour.from_file()— Provides the “from file” logic.
make_unverifiable()— Builds / writes the unverifiable value.
validation/models/scoring.py 140 LOCValue types shared between the scoring engine and the rest of the package.
RawEvidence— Represents the “RawEvidence” data/behaviour.RawCriterion— Represents the “RawCriterion” data/behaviour.VerdictRule— Represents the “VerdictRule” data/behaviour.ScoreResult— Represents the “ScoreResult” data/behaviour.ScoringConfig— Represents the “ScoringConfig” data/behaviour.ScoredGateEntry— Represents the “ScoredGateEntry” data/behaviour.EvidenceAnchor— Represents the “EvidenceAnchor” data/behaviour.GateResult— Represents the “GateResult” data/behaviour.ValidationScore— Represents the “ValidationScore” data/behaviour.
validation/report/__init__.py 19 LOCCombined-report augmentation: write validation results into the SARIF + MD report.
No top-level classes or functions.
validation/report/augment.py 340 LOCAugment the combined SARIF + MD report with validation results.
augment_reports()— Adds detail to the reports value._augment()— (internal helper) Adds detail to the augment value._locate_combined_report()— (internal helper) Looks up / reads the combined report step._status_label()— (internal helper) Provides the “status label” logic._status_word()— (internal helper) Provides the “status word” logic._parse_gates()— (internal helper) Reads and cleans up the gates value._validation_block()— (internal helper) Provides the “validation block” logic._norm_path()— (internal helper) Reads and cleans up the path value._result_loc()— (internal helper) Provides the “result loc” logic._match_by_loc()— (internal helper) Checks / decides the by loc step._match_by_title()— (internal helper) Checks / decides the by title step._match_sarif()— (internal helper) Checks / decides the machine report value._augment_sarif()— (internal helper) Adds detail to the machine report value._trim_dangling_escape()— (internal helper) Provides the “trim dangling escape” logic._md_escape()— (internal helper) Provides the “Markdown escape” logic._md_cell()— (internal helper) Provides the “Markdown cell” logic._gate_rows()— (internal helper) Checks / decides the rows value._md_validation_section()— (internal helper) Provides the “Markdown validation section” logic._ftitle()— (internal helper) Provides the “ftitle” logic._only()— (internal helper) Provides the “only” logic._best_md_match()— (internal helper) Provides the “best Markdown match” logic._augment_md()— (internal helper) Adds detail to the Markdown value._augment_segment()— (internal helper) Adds detail to the segment value.
validation/scoring/__init__.py 101 LOCPublic scoring API: parse raw gate dicts and return typed ValidationScore results.
_parse_gates()— (internal helper) Reads and cleans up the gates value._has_critical_failure()— (internal helper) Checks / decides the critical failure step.score_fix()— Checks / decides the fix value.derive_merge_readiness()— Provides the “derive merge readiness” logic._build_gate_results()— (internal helper) Builds / writes the rule check results step.
validation/scoring/_configs.py 54 LOCScoringConfig instance for the fix-validation path.
No top-level classes or functions.
validation/scoring/_engine.py 212 LOCConfig-driven scoring engine; re-exports scoring dataclasses for intra-package compat.
_str_from()— (internal helper) Provides the “str from” logic._int_or_none()— (internal helper) Provides the “int or none” logic._parse_evidence()— (internal helper) Reads and cleans up the evidence value.parse_raw_criterion()— Reads and cleans up the raw criterion step._shape_error()— (internal helper) Provides the “shape error” logic._renormalized_score()— (internal helper) Provides the “renormalized score” logic._critical_gate_error()— (internal helper) Provides the “critical rule check error” logic._cap_critical_fail()— (internal helper) Provides the “cap critical fail” logic._precheck()— (internal helper) Provides the “precheck” logic.score()— Checks / decides the score value._apply_verdicts()— (internal helper) Runs the verdicts value.
validation/scoring/_justify.py 112 LOCFix-path justification builder; tracker templates embed these phrasings — edit deliberately.
_confidence()— (internal helper) Provides the “confidence” logic._anchors_str()— (internal helper) Provides the “anchors str” logic._fixed_text()— (internal helper) Provides the “fixed text” logic._partial_text()— (internal helper) Provides the “partial text” logic._not_fixed_text()— (internal helper) Provides the “not fixed text” logic.build_fix_justification()— Builds / writes the fix justification step._collect_evidence_anchors()— (internal helper) Looks up / reads the evidence anchors step._files_needing_fixes()— (internal helper) Provides the “files needing fixes” logic._recommended_actions()— (internal helper) Provides the “recommended actions” logic.
validation/session/__init__.py 32 LOCValidation session package — launch and error hierarchy.
No top-level classes or functions.
validation/session/config_inject.py 88 LOCInject Claude runtime config files into a validation workspace.
_inject_hooks()— (internal helper) Provides the “inject hooks” logic._inject_tools()— (internal helper) Provides the “inject tools” logic.inject_claude_config()— Provides the “inject claude config” logic.
validation/session/errors.py 50 LOCDomain exception hierarchy for harness-backed validation sessions.
ValidationSessionError— Represents the “ValidationSessionError” data/behaviour.__init__()— Python built-in method (`__init__`).reason_string()— Provides the “reason string” logic.
validation/session/launch_prompt.py 110 LOCBuild the fix-validation launch prompt for a pre-staged workspace.
_score_line()— (internal helper) Checks / decides the line value._narrative_lines()— (internal helper) Provides the “narrative lines” logic._bypass_hint_lines()— (internal helper) Provides the “bypass hint lines” logic._append_finding_details()— (internal helper) Adds detail to the candidate issue details step.build_launch_prompt()— Builds / writes the launch prompt step.
validation/session/launcher.py 488 LOCExecute a single fix-validation session via the harness.
_build_env()— (internal helper) Builds / writes the environment value._persona_overrides()— (internal helper) Provides the “AI reviewer overrides” logic._resolve_binary()— (internal helper) Checks / decides the binary value._write_workspace_json()— (internal helper) Builds / writes the workspace data file step._write_validation_outputs()— (internal helper) Builds / writes the validation outputs step._write_host_synthesized_gates()— (internal helper) Builds / writes the host synthesized gates step.build_validation_options()— Builds / writes the validation options step._injects_claude_config()— (internal helper) Provides the “injects claude config” logic._rules_section()— (internal helper) Provides the “rules section” logic._synthesizes_gates_on_host()— (internal helper) Provides the “synthesizes gates on host” logic._synthesis_section()— (internal helper) Provides the “synthesis section” logic._load_system_prompt()— (internal helper) Looks up / reads the system prompt step._failure_reason()— (internal helper) Provides the “failure reason” logic._run_and_check()— (internal helper) Runs the and check step._log_stream()— (internal helper) Provides the “log stream” logic.launch_session()— Provides the “launch session” logic.
validation/session/rules.py 60 LOCRead the bundled validation rules as prompt text.
_rules_text()— (internal helper) Provides the “rules text” logic.orchestrator_rules_text()— Provides the “orchestrator rules text” logic.persona_rules_text()— Provides the “AI reviewer rules text” logic.
validation/session/setup.py 73 LOCAssemble the validation-specific values injected into the shared harness.
validation_skill_root()— Provides the “validation skill root” logic.validation_write_gate()— Provides the “validation write rule check” logic.
validation/subagents/__init__.py 23 LOCBundled subagent definitions loaded at import time from .md authoring files.
No top-level classes or functions.
validation/subagents/_frontmatter.py 97 LOCParse YAML frontmatter from subagent .md authoring files without a pyyaml dependency.
SubagentFrontmatterMeta— Represents the “SubagentFrontmatterMeta” data/behaviour._append_list_item()— (internal helper) Adds detail to the list item step._apply_key_line()— (internal helper) Runs the key line step._classify_line()— (internal helper) Provides the “classify line” logic.parse_frontmatter()— Reads and cleans up the frontmatter value.
validation/subagents/_loader.py 126 LOCLoad subagent definitions from bundled .md authoring files.
_build_subagent_definition()— (internal helper) Builds / writes the subagent definition step._iter_bundled_files()— (internal helper) Provides the “iter bundled files” logic.load_agents()— Looks up / reads the agents value._assert_all_found()— (internal helper) Checks / decides the all found step.
validation/synthesis/__init__.py 16 LOCHost-side deterministic synthesis of persona reports.
No top-level classes or functions.
validation/synthesis/_consensus.py 141 LOCDeterministic synthesis of persona gate reports into host-owned gate verdicts.
SynthesizedGate— Represents the “SynthesizedGate” data/behaviour._most_conservative_status()— (internal helper) Provides the “most conservative status” logic.synthesize_gates_for_finding()— Provides the “synthesize gates for candidate issue” logic.
validation/tools/__init__.py 16 LOCDeterministic read-only tools for the validation agent.
No top-level classes or functions.
validation/tools/_scope.py 94 LOCShared in-scope file iteration for validation fact tools.
_in_excluded_dir()— (internal helper) Provides the “in excluded dir” logic._has_excluded_ext()— (internal helper) Checks / decides the excluded ext step._escapes_workspace()— (internal helper) Provides the “escapes workspace” logic.iter_in_scope_files()— Provides the “iter in scope files” logic.
validation/tools/deep_tools.py 110 LOCValidation's DeepAgents tool-builder: generic readers + deterministic fact tools.
_fact_tools()— (internal helper) Provides the “fact tools” logic.build_validation_tools()— Builds / writes the validation tools step.
validation/tools/diff_facts.py 160 LOCDeterministic, read-only diff fact tools for validation subagents.
FileChange— Represents the “FileChange” data/behaviour._DiffParser— (internal) Represents the “DiffParser” data/behaviour.__init__()— Python built-in method (`__init__`)._close_added_run()— (internal helper) Provides the “close added run” logic._close_file()— (internal helper) Provides the “close file” logic._consume_hunk_line()— (internal helper) Runs the hunk line step.feed()— Provides the “feed” logic.finish()— Provides the “finish” logic.
DiffImpactMap— Represents the “DiffImpactMap” data/behaviour._without_git_prefix()— (internal helper) Provides the “without git prefix” logic._marker_path()— (internal helper) Provides the “marker path” logic.parse_diff_patch()— Reads and cleans up the code change patch step.diff_touched()— Provides the “code change touched” logic.changed_lines()— Provides the “changed lines” logic.build_diff_impact_map()— Builds / writes the code change impact map step.
validation/tools/pattern_scanner.py 69 LOCDeterministic pattern scanner for validation subagents.
pattern_scan()— Provides the “pattern scan” logic.
validation/tools/test_inventory.py 76 LOCDeterministic test-inventory fact tool for validation subagents.
_is_test_file()— (internal helper) Checks / decides the test file step._negative_markers()— (internal helper) Provides the “negative markers” logic.test_inventory()— Provides the “test inventory” logic.
Cross-cutting
Backends (used by every model stage)0 files
The switchboard every model-backed stage calls: routes each role to cli / sdk / openai / deepagents and enforces per-route tool limits.
Generated from the source tree. A stage may share files with a module (e.g. S10 = the whole remediation_agent package). For a module-first view see module-graph.html; for the full repo drill-down see codeviz.