Visa Vulnerability Agentic Harness (VVAH) — Code Graph

Readable, self-contained view generated by codeviz. Click any row to expand · works with or without JavaScript.

226files
12modules
45,985lines
154classes
987functions

Module dependency graph

G validation validation vvaharness vvaharness validation->vvaharness 51 remediation_agent remediation_agent remediation_agent->vvaharness 41 backends backends backends->vvaharness 20 pipeline pipeline pipeline->vvaharness 17 orchestrator orchestrator orchestrator->vvaharness 9 util util util->vvaharness 4 rules rules rules->vvaharness 3 injectors injectors injectors->vvaharness 2 report report report->vvaharness 1 lang lang lang->vvaharness 1

Drill-down — module → file → function

backends36 files · 5,596 LOC
vvaharness/backends/__init__.py 15 LOC

No top-level classes or functions.

vvaharness/backends/_tls.py 47 LOCShared TLS-config coercion for the backend clients.
  • coerce_verify() — Reads and cleans up the verify value.
vvaharness/backends/agent_sdk.py 345 LOCClaude Agent SDK backend for *mutating* agentic roles (the Remediation Agent's
  • _resolve_within_root() — (internal helper) Checks / decides the within root step.
  • _within_root() — (internal helper) Provides the “within root” logic.
  • _sdk_env() — (internal helper) Provides the “SDK connection environment” logic.
  • _redact_tool_output() — (internal helper) Hides sensitive data in the tool output step.
  • _build_redaction_hooks() — (internal helper) Builds / writes the redaction hooks step.
  • _build_options() — (internal helper) Builds / writes the options value.
  • _run() — (internal helper) Runs the run value.
  • agentic() — Provides the “agentic” logic.
vvaharness/backends/claude_cli.py 1052 LOCWrapper around the `claude` CLI. All model calls go through here.
  • GuardrailBlocked — Represents the “GuardrailBlocked” data/behaviour.
  • aborted() — Provides the “aborted” logic.
  • _kill_tree() — (internal helper) Provides the “kill tree” logic.
  • abort() — Provides the “abort” logic.
  • reset_abort() — Sets up / maintains the abort value.
  • _check_guardrail() — (internal helper) Checks / decides the guardrail value.
  • _parse_envelope() — (internal helper) Reads and cleans up the envelope value.
  • _find_claude_cmd() — (internal helper) Looks up / reads the claude cmd step.
  • _cli_capabilities() — (internal helper) Provides the “command-line capabilities” logic.
  • _safe_permission_mode() — (internal helper) Provides the “safe permission mode” logic.
  • _tail() — (internal helper) Provides the “tail” logic.
  • _short_cmd() — (internal helper) Provides the “short cmd” logic.
  • _extract_envelope_error() — (internal helper) Reads and cleans up the envelope error step.
  • _format_cli_error() — (internal helper) Builds / writes the command-line error step.
  • _build_tls_env() — (internal helper) Builds / writes the tls environment step.
  • configure() — Sets up / maintains the configure value.
  • _run() — (internal helper) Runs the run value.
  • _run_streaming() — (internal helper) Runs the streaming value.
  • stream_trace() — Provides the “stream trace” logic.
  • _is_pending_result() — (internal helper) Checks / decides the pending result step.
  • _terminal_result_fields() — (internal helper) Provides the “terminal result fields” logic.
  • _is_transient_failure() — (internal helper) Checks / decides the transient failure step.
  • _run_with_retry() — (internal helper) Runs the with retry step.
  • prompt() — Provides the “prompt” logic.
  • agentic() — Provides the “agentic” logic.
  • parse_json_response() — Reads and cleans up the data file response step.
vvaharness/backends/harness/__init__.py 71 LOCShared agent-harness abstraction.

No top-level classes or functions.

vvaharness/backends/harness/base.py 40 LOCAbstract Harness contract every agent runtime must implement.
  • Harness — Represents the “Harness” data/behaviour.
    • run_oneshot() — Runs the oneshot value.
    • run_streaming() — Runs the streaming value.
vvaharness/backends/harness/claude/__init__.py 20 LOCClaude Agent SDK backend for validation harness.

No top-level classes or functions.

vvaharness/backends/harness/claude/client.py 190 LOCClaudeHarness: Claude Agent SDK concrete implementation of Harness.
  • ClaudeHarness — Represents the “ClaudeHarness” data/behaviour.
    • run_oneshot() — Runs the oneshot value.
    • run_streaming() — Runs the streaming value.
  • _extract_sdk_persona_reports() — (internal helper) Reads and cleans up the SDK connection persona reports step.
  • _wrap_sdk_error() — (internal helper) Provides the “wrap SDK connection error” logic.
vvaharness/backends/harness/claude/options.py 185 LOCTranslate harness option dataclasses into ``ClaudeAgentOptions``.
  • _to_effort() — (internal helper) Provides the “to effort” logic.
  • _to_setting_sources() — (internal helper) Provides the “to setting sources” logic.
  • _permissions_callback() — (internal helper) Provides the “permissions callback” logic.
  • _to_agent_definition() — (internal helper) Provides the “to agent definition” logic.
  • _build_output_format() — (internal helper) Builds / writes the output format step.
  • _sanitize_schema() — (internal helper) Hides sensitive data in the schema value.
  • _resolve_output_schema() — (internal helper) Checks / decides the output schema step.
  • _base_opts() — (internal helper) Provides the “base opts” logic.
  • _apply_agents() — (internal helper) Runs the agents value.
  • build_oneshot_sdk_options() — Builds / writes the oneshot SDK connection options step.
  • build_streaming_sdk_options() — Builds / writes the streaming SDK connection options step.
vvaharness/backends/harness/claude/translate.py 116 LOCSDK message translation: Claude Agent SDK types → HarnessMessage variants.
  • translate_init() — Reads and cleans up the init value.
  • translate_assistant() — Reads and cleans up the assistant value.
  • translate_tool_result() — Reads and cleans up the tool result step.
  • translate_result() — Reads and cleans up the result value.
  • _translate_system() — (internal helper) Reads and cleans up the system value.
  • _translate_user() — (internal helper) Reads and cleans up the user value.
  • translate() — Reads and cleans up the translate value.
vvaharness/backends/harness/contract/__init__.py 65 LOCNeutral contract types shared across all backend implementations.

No top-level classes or functions.

vvaharness/backends/harness/contract/_compat.py 27 LOC``StrEnum`` re-export for the shared harness contract.

No top-level classes or functions.

vvaharness/backends/harness/contract/effort.py 38 LOCAgent reasoning-effort vocabulary passed through to the SDK.
  • EffortLevel — Represents the “EffortLevel” data/behaviour.
    • parse() — Reads and cleans up the parse value.
vvaharness/backends/harness/contract/errors.py 51 LOCHarness-owned exception hierarchy wrapping SDK-specific error classes.
  • HarnessError — Represents the “HarnessError” data/behaviour.
  • HarnessCLINotFoundError — Represents the “HarnessCLINotFoundError” data/behaviour.
  • HarnessConnectionError — Represents the “HarnessConnectionError” data/behaviour.
  • HarnessProcessError — Represents the “HarnessProcessError” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
  • HarnessJSONDecodeError — Represents the “HarnessJSONDecodeError” data/behaviour.
  • HarnessMessageParseError — Represents the “HarnessMessageParseError” data/behaviour.
vvaharness/backends/harness/contract/messages.py 114 LOCHarness-owned message types for streaming sessions.
  • HarnessSessionInit — Represents the “HarnessSessionInit” data/behaviour.
  • HarnessAssistantText — Represents the “HarnessAssistantText” data/behaviour.
  • HarnessToolUse — Represents the “HarnessToolUse” data/behaviour.
  • HarnessToolResult — Represents the “HarnessToolResult” data/behaviour.
  • HarnessResult — Represents the “HarnessResult” data/behaviour.
  • OneShotResult — Represents the “OneShotResult” data/behaviour.
vvaharness/backends/harness/contract/options.py 102 LOCHarness-level options for one-shot and streaming invocations.
  • OneShotOptions — Represents the “OneShotOptions” data/behaviour.
  • StreamingOptions — Represents the “StreamingOptions” data/behaviour.
vvaharness/backends/harness/contract/permissions/__init__.py 23 LOCPermission gate components for validation sessions.

No top-level classes or functions.

vvaharness/backends/harness/contract/permissions/_decision.py 29 LOCImmutable result of a permission evaluation.
  • PermissionDecision — Represents the “PermissionDecision” data/behaviour.
vvaharness/backends/harness/contract/permissions/_evaluate.py 70 LOCPermission evaluation predicates used by PermissionsPolicy.
  • _resolve_write_path() — (internal helper) Checks / decides the write path step.
  • _under_target() — (internal helper) Provides the “under target” logic.
  • evaluate_write() — Provides the “evaluate write” logic.
vvaharness/backends/harness/contract/permissions/_policy.py 71 LOCPermissionsPolicy dataclass + defaults for the deny-by-default validation gate.
  • PermissionsPolicy — Represents the “PermissionsPolicy” data/behaviour.
    • _evaluate_simple() — (internal helper) Provides the “evaluate simple” logic.
    • evaluate() — Provides the “evaluate” logic.
vvaharness/backends/harness/contract/setting_source.py 28 LOCClaude settings-source vocabulary passed through to the SDK.
  • SettingSource — Represents the “SettingSource” data/behaviour.
vvaharness/backends/harness/contract/subagents.py 39 LOCHarness-owned mirror of SDK ``AgentDefinition``, insulated from SDK imports.
  • SubagentDefinition — Represents the “SubagentDefinition” data/behaviour.
vvaharness/backends/harness/contract/tool_policy.py 31 LOCDeclarative allowed/denied tool-list policy for harness sessions.
  • ToolPolicy — Represents the “ToolPolicy” data/behaviour.
vvaharness/backends/harness/deepagents/__init__.py 37 LOCDeepAgents validation backend (additive alternative to claude_agent_sdk).
  • __getattr__() — Python built-in method (`__getattr__`).
vvaharness/backends/harness/deepagents/client.py 117 LOCDeepAgents implementation of the validation Harness contract.
  • DeepAgentHarness — Represents the “DeepAgentHarness” data/behaviour.
    • run_oneshot() — Runs the oneshot value.
    • run_streaming() — Runs the streaming value.
  • _safe_get_snapshot() — (internal helper) Provides the “safe get snapshot” logic.
vvaharness/backends/harness/deepagents/limits.py 27 LOCLoop-budget constants for the DeepAgents backend.

No top-level classes or functions.

vvaharness/backends/harness/deepagents/options.py 575 LOCTranslate harness options into DeepAgents / LangGraph configuration.
  • _ModelKey — (internal) Represents the “ModelKey” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • __eq__() — Python built-in method (`__eq__`).
    • __hash__() — Python built-in method (`__hash__`).
  • _RecursionCounter — (internal) Represents the “RecursionCounter” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • next() — Provides the “next” logic.
  • _anthropic_key() — (internal helper) Provides the “anthropic key” logic.
  • _anthropic_base() — (internal helper) Provides the “anthropic base” logic.
  • _openai_key() — (internal helper) Provides the “openai key” logic.
  • _openai_base() — (internal helper) Provides the “openai base” logic.
  • _openai_ssl_context() — (internal helper) Provides the “openai ssl context” logic.
  • _openai_http_client() — (internal helper) Provides the “openai http client” logic.
  • _openai_http_async_client() — (internal helper) Provides the “openai http async client” logic.
  • build_model() — Builds / writes the model value.
  • build_model_cached() — Builds / writes the model cached step.
  • _tool_policy() — (internal helper) Provides the “tool policy” logic.
  • _build_session_tools() — (internal helper) Builds / writes the session tools step.
  • _subagent_tools() — (internal helper) Provides the “subagent tools” logic.
  • _subagent_tool_names() — (internal helper) Provides the “subagent tool names” logic.
  • get_subagent_specs() — Looks up / reads the subagent specs step.
  • _filesystem_permissions() — (internal helper) Provides the “filesystem permissions” logic.
  • _session_backend() — (internal helper) Provides the “session backend” logic.
  • _skill_sources() — (internal helper) Provides the “skill sources” logic.
  • _make_config() — (internal helper) Builds / writes the config value.
  • _create_agent() — (internal helper) Builds / writes the agent value.
  • build_subagents() — Builds / writes the subagents value.
  • _pydantic_response_format() — (internal helper) Provides the “pydantic response format” logic.
  • _strategy_for() — (internal helper) Provides the “strategy for” logic.
  • _response_format() — (internal helper) Provides the “response format” logic.
  • _build_streaming_graph() — (internal helper) Builds / writes the streaming graph step.
  • build_streaming_agent() — Builds / writes the streaming agent step.
  • _oneshot_response_format() — (internal helper) Provides the “oneshot response format” logic.
  • _build_oneshot_graph() — (internal helper) Builds / writes the oneshot graph step.
  • build_oneshot_options() — Builds / writes the oneshot options step.
vvaharness/backends/harness/deepagents/redaction.py 119 LOCRead-only session middleware: redact file content, remove the write tools.
  • RedactToolResults — Represents the “RedactToolResults” data/behaviour.
    • wrap_tool_call() — Provides the “wrap tool call” logic.
    • awrap_tool_call() — Provides the “awrap tool call” logic.
  • ExcludeTools — Represents the “ExcludeTools” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • _filter() — (internal helper) Checks / decides the filter value.
    • wrap_model_call() — Provides the “wrap model call” logic.
    • awrap_model_call() — Provides the “awrap model call” logic.
  • _redact_message() — (internal helper) Hides sensitive data in the message value.
  • _tool_name() — (internal helper) Provides the “tool name” logic.
  • read_only_middleware() — Looks up / reads the only middleware step.
vvaharness/backends/harness/deepagents/tools.py 81 LOCLogical->native tool-name mapping for the DeepAgents backend.
  • _allowed_tool_names() — (internal helper) Provides the “allowed tool names” logic.
  • native_tool_names() — Provides the “native tool names” logic.
  • build_tools() — Builds / writes the tools value.
vvaharness/backends/harness/deepagents/translate.py 166 LOCTranslate DeepAgents / LangGraph state and messages into HarnessMessage types.
  • _extract_text() — (internal helper) Reads and cleans up the text value.
  • _tool_calls() — (internal helper) Provides the “tool calls” logic.
  • translate_final_state() — Reads and cleans up the final state step.
  • _messages_from_event() — (internal helper) Provides the “messages from event” logic.
  • translate_stream_events() — Reads and cleans up the stream events step.
  • make_terminal_result() — Builds / writes the terminal result step.
vvaharness/backends/harness/genai.py 22 LOCShared constants for the deepagents backend.

No top-level classes or functions.

vvaharness/backends/harness/registry.py 80 LOCBackend registry: maps ``via`` strings to lazy Harness factory callables.
  • _make_claude() — (internal helper) Builds / writes the claude value.
  • _make_deepagents() — (internal helper) Builds / writes the deepagents value.
  • get_harness() — Looks up / reads the harness value.
vvaharness/backends/llm.py 110 LOCBackend dispatcher. All step files import prompt()/agentic() from HERE,
  • resolve() — Checks / decides the resolve value.
  • prompt() — Provides the “prompt” logic.
  • agentic() — Provides the “agentic” logic.
vvaharness/backends/localtools.py 289 LOCLocal, sandboxed implementations of the READ-ONLY Read / Glob / Grep tools
  • _jail() — (internal helper) Provides the “jail” logic.
  • _read() — (internal helper) Looks up / reads the read value.
  • _glob() — (internal helper) Provides the “glob” logic.
  • _grep() — (internal helper) Provides the “grep” logic.
  • schemas_for() — Provides the “schemas for” logic.
  • anthropic_schemas_for() — Provides the “anthropic schemas for” logic.
  • supported() — Provides the “supported” logic.
  • execute() — Runs the execute value.
vvaharness/backends/oai.py 623 LOCOpenAI backend. Third `via:` option alongside cli/sdk — same public surface:
  • _summarise_status_error() — (internal helper) Provides the “summarise status error” logic.
  • _scrub_secrets() — (internal helper) Hides sensitive data in the secrets value.
  • _cause_chain() — (internal helper) Provides the “cause chain” logic.
  • configure() — Sets up / maintains the configure value.
  • _get_client() — (internal helper) Looks up / reads the client value.
  • _is_transient_status() — (internal helper) Checks / decides the transient status step.
  • prompt() — Provides the “prompt” logic.
  • _record_usage() — (internal helper) Provides the “record usage” logic.
  • _cap_tool_result() — (internal helper) Provides the “cap tool result” logic.
  • _shrink_history() — (internal helper) Provides the “shrink history” logic.
  • agentic() — Provides the “agentic” logic.
  • _summ() — (internal helper) Provides the “summ” logic.
vvaharness/backends/sdk.py 581 LOCAnthropic SDK backend. Mirrors the public surface of backends/claude_cli.py:
  • configure() — Sets up / maintains the configure value.
  • _get_client() — (internal helper) Looks up / reads the client value.
  • _supports_temperature() — (internal helper) Provides the “supports temperature” logic.
  • _is_transient_sdk() — (internal helper) Checks / decides the transient SDK connection step.
  • prompt() — Provides the “prompt” logic.
  • _assistant_blocks() — (internal helper) Provides the “assistant blocks” logic.
  • _with_cache_marker() — (internal helper) Provides the “with cache marker” logic.
  • _summ() — (internal helper) Provides the “summ” logic.
  • agentic() — Provides the “agentic” logic.
config1 files · 292 LOC
vvaharness/config/__init__.py 292 LOCConfig loader. Reads config.yaml, expands ${ENV:-default} placeholders.
  • Config — Represents the “Config” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • __getattr__() — Python built-in method (`__getattr__`).
    • __getitem__() — Python built-in method (`__getitem__`).
    • __repr__() — Python built-in method (`__repr__`).
  • _expand_env() — (internal helper) Provides the “expand environment” logic.
  • _expand() — (internal helper) Provides the “expand” logic.
  • _deep_merge() — (internal helper) Provides the “deep merge” logic.
  • load() — Looks up / reads the load value.
  • _replace_merge() — (internal helper) Provides the “replace merge” logic.
  • _append_merge() — (internal helper) Adds detail to the merge value.
  • is_network_path() — Checks / decides the network path step.
  • apply_step1_overlay() — Runs the step1 overlay step.
injectors3 files · 142 LOC
vvaharness/injectors/__init__.py 15 LOC

No top-level classes or functions.

vvaharness/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.
vvaharness/injectors/design_controls.py 50 LOCLoad design controls (auth boundaries, sandboxes, mitigations) from YAML.
  • load_controls() — Looks up / reads the controls value.
lang3 files · 1,884 LOC
vvaharness/lang/__init__.py 15 LOC

No top-level classes or functions.

vvaharness/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.
vvaharness/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.
orchestrator11 files · 3,341 LOC
vvaharness/orchestrator/__init__.py 93 LOC

No top-level classes or functions.

vvaharness/orchestrator/batch.py 689 LOC
  • _module_name_from() — (internal helper) Provides the “module name from” logic.
  • _is_remote() — (internal helper) Checks / decides the remote value.
  • _scrub_url_secrets() — (internal helper) Hides sensitive data in the url secrets step.
  • _md_cell() — (internal helper) Provides the “Markdown cell” logic.
  • _stash_url_for() — (internal helper) Provides the “stash url for” logic.
  • _state_root() — (internal helper) Provides the “state root” logic.
  • _ref_id() — (internal helper) Provides the “ref identifier” logic.
  • _stage_marker_path() — (internal helper) Builds / writes the marker path step.
  • _write_stage_marker() — (internal helper) Builds / writes the stage marker step.
  • _stage_dir_bound() — (internal helper) Builds / writes the dir bound step.
  • _assign_slugs() — (internal helper) Provides the “assign slugs” logic.
  • _check_manifest_size() — (internal helper) Checks / decides the manifest size step.
  • _parse_repo_csv() — (internal helper) Reads and cleans up the repository csv step.
  • _parse_repo_file() — (internal helper) Reads and cleans up the repository file step.
  • _with_token() — (internal helper) Provides the “with token” logic.
  • _acquire_repo() — (internal helper) Provides the “acquire repository” logic.
  • run_batch() — Runs the batch value.
  • _stage_repo() — (internal helper) Builds / writes the repository value.
  • _app_module_name() — (internal helper) Provides the “app module name” logic.
  • _run_batch_grouped() — (internal helper) Runs the batch grouped step.
  • _render_batch_summary() — (internal helper) Builds / writes the batch summary step.
vvaharness/orchestrator/checkpoints.py 255 LOC
  • _S4Ckpt — (internal) Represents the “S4Ckpt” data/behaviour.
  • _validate_schema() — (internal helper) Checks / decides the schema value.
  • _schema_for() — (internal helper) Provides the “schema for” logic.
  • save_ckpt() — Builds / writes the ckpt value.
  • load_ckpt() — Looks up / reads the ckpt value.
  • run_id_for() — Runs the identifier for step.
  • prune_checkpoints() — Sets up / maintains the checkpoints value.
vvaharness/orchestrator/cleanup.py 80 LOC
  • _rmtree_rw() — (internal helper) Provides the “rmtree rw” logic.
  • _preserve_set() — (internal helper) Provides the “preserve set” logic.
  • _purge_clone() — (internal helper) Provides the “purge clone” logic.
vvaharness/orchestrator/cmdb.py 69 LOC
  • _cmdb_path() — (internal helper) Provides the “cmdb path” logic.
  • _set_cmdb_path() — (internal helper) Provides the “set cmdb path” logic.
  • _load_app_profile() — (internal helper) Looks up / reads the app profile step.
vvaharness/orchestrator/config_paths.py 89 LOC
  • _app_root() — (internal helper) Provides the “app root” logic.
  • _default_config() — (internal helper) Provides the “default config” logic.
  • _packaged_default() — (internal helper) Provides the “packaged default” logic.
  • _path_within() — (internal helper) Provides the “path within” logic.
  • _resolve_against() — (internal helper) Checks / decides the against value.
  • _iter_model_roles() — (internal helper) Provides the “iter model roles” logic.
vvaharness/orchestrator/enrich_findings.py 60 LOC
  • _prefix_path() — (internal helper) Provides the “prefix path” logic.
  • _prefix_ref() — (internal helper) Provides the “prefix ref” logic.
  • _enrich_findings() — (internal helper) Adds detail to the findings value.
vvaharness/orchestrator/entry.py 273 LOC
  • _top_arg() — (internal helper) Provides the “top arg” logic.
  • _resolve_auto_step1() — (internal helper) Checks / decides the auto step1 step.
  • main() — Runs the main value.
vvaharness/orchestrator/preflight.py 477 LOC
  • _mask() — (internal helper) Hides sensitive data in the mask value.
  • configure_backends() — Sets up / maintains the backends value.
  • _reachable_despite_token_cap() — (internal helper) Provides the “reachable despite token cap” logic.
  • _post_scan_only() — (internal helper) Provides the “post scan only” logic.
  • _report_credential_gap() — (internal helper) Provides the “report credential gap” logic.
  • check_backends() — Checks / decides the backends value.
  • _agentic_role_tools() — (internal helper) Provides the “agentic role tools” logic.
  • _probe_agentic_roles() — (internal helper) Provides the “probe agentic roles” logic.
  • probe_backends() — Provides the “probe backends” logic.
vvaharness/orchestrator/scan.py 707 LOC
  • _head_sha() — (internal helper) Provides the “head content hash” logic.
  • _hydrate_ctx_callgraph_from_store() — (internal helper) Provides the “hydrate context callgraph from store” logic.
  • scan_repo() — Runs the repository value.
  • _ranked_to_ra_finding() — (internal helper) Checks / decides the to ra finding step.
  • _run_remediation() — (internal helper) Runs the remediation value.
  • _run_validation() — (internal helper) Runs the validation value.
  • _remediate_preflight() — (internal helper) Provides the “remediate preflight” logic.
  • _validate_preflight() — (internal helper) Checks / decides the preflight value.
vvaharness/orchestrator/store.py 549 LOCorchestrator.store — SQLite state store.
  • db_path() — Provides the “database path” logic.
  • connect() — Sets up / maintains the connect value.
  • _migrate() — (internal helper) Sets up / maintains the migrate value.
  • register_run() — Sets up / maintains the run value.
  • _qnode() — (internal helper) Provides the “qnode” logic.
  • _split_qnode() — (internal helper) Reads and cleans up the qnode value.
  • _line_from_site() — (internal helper) Provides the “line from site” logic.
  • _graph_rows() — (internal helper) Provides the “graph rows” logic.
  • save_callgraph() — Builds / writes the callgraph value.
  • load_callgraph() — Looks up / reads the callgraph value.
  • reset_run() — Sets up / maintains the run value.
  • delete_run() — Sets up / maintains the run value.
pipeline18 files · 14,185 LOC
vvaharness/pipeline/__init__.py 15 LOC

No top-level classes or functions.

vvaharness/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 “seed reachable files” logic.
  • seed_paths_by_file() — Provides the “seed paths by file” logic.
  • best_source_from_seed() — Provides the “best source 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 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.
vvaharness/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.
vvaharness/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 cwe 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 sink kind” logic.
  • _append_spec() — (internal helper) Adds detail to the spec 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.
vvaharness/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 sink 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 “cwe 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 taint 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 source taint” 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 taint evidence for path step.
  • _apply_condition_taint() — (internal helper) Runs the condition taint 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 taint edges step.
  • _apply_reflection_to_taint() — (internal helper) Runs the reflection to taint 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 taint paths step.
vvaharness/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.
vvaharness/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 sink 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.
vvaharness/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 sarif value.
vvaharness/pipeline/stages/s11_validate.py 56 LOCs11_validate — thin wrapper that hooks the validation package into the pipeline.
  • run() — Runs the run value.
vvaharness/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.
vvaharness/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 “seed repository kinds” logic.
  • _should_escalate_gap_fill() — (internal helper) Provides the “should escalate gap fill” logic.
  • 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 “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.
vvaharness/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.
vvaharness/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 chunk 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) Provides the “report threat coverage” logic.
  • _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 “threat text” logic.
  • _matches_threat_surface() — (internal helper) Checks / decides the threat surface step.
  • _candidate_files_for_threat() — (internal helper) Provides the “candidate files for threat” logic.
  • _add_threat_surface_fallback_chunks() — (internal helper) Adds detail to the threat 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 “sink qnodes for sink” logic.
  • _seed_paths_for_entry() — (internal helper) Provides the “seed paths for entry” logic.
  • _add_taint_chunks() — (internal helper) Adds detail to the taint 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) Provides the “report chunk loc” logic.
  • _count_chars() — (internal helper) Provides the “count chars” logic.
  • _count_loc() — (internal helper) Provides the “count loc” logic.
vvaharness/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 chunk” 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 taint 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 chunk 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 taint 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.
vvaharness/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.
vvaharness/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) Provides the “candidate qnodes for finding” logic.
  • _callgraph_context_for_finding() — (internal helper) Provides the “callgraph context for finding” logic.
  • _build_user_prompt() — (internal helper) Builds / writes the user prompt step.
  • _parse_verdict() — (internal helper) Reads and cleans up the verdict value.
  • _drop() — (internal helper) Provides the “drop” logic.
vvaharness/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 finding” logic.
vvaharness/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 finding” 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) Provides the “hydrate report” logic.
  • _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.
remediation_agent60 files · 5,410 LOC
vvaharness/remediation_agent/__init__.py 43 LOCremediation_agent — remediation subpackage.

No top-level classes or functions.

vvaharness/remediation_agent/artifacts/__init__.py 58 LOCremediation_agent.artifacts — render and persist a remediation verdict to disk.

No top-level classes or functions.

vvaharness/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.

vvaharness/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.
vvaharness/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.
vvaharness/remediation_agent/artifacts/diff/snapshot.py 57 LOCremediation_agent.artifacts.diff.snapshot — pre-edit file snapshots.
  • snapshot_files() — Provides the “snapshot files” logic.
vvaharness/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.
vvaharness/remediation_agent/artifacts/layout.py 35 LOCremediation_agent.artifacts.layout — file/folder names and schema constants.

No top-level classes or functions.

vvaharness/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.
vvaharness/remediation_agent/artifacts/summary.py 46 LOCremediation_agent.artifacts.summary — the human-readable ``summary.md`` renderer.
  • render_summary() — Builds / writes the summary value.
vvaharness/remediation_agent/artifacts/validation.py 37 LOCremediation_agent.artifacts.validation — the empty s11 validation block.
  • empty_validation() — Provides the “empty validation” logic.
vvaharness/remediation_agent/artifacts/writer.py 92 LOCremediation_agent.artifacts.writer — orchestrate the per-finding on-disk layout.
  • write_verdict() — Builds / writes the verdict value.
vvaharness/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 “cvss score of” logic.
  • load_findings() — Looks up / reads the findings value.
  • prepare_layout() — Provides the “prepare layout” logic.
vvaharness/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.
vvaharness/remediation_agent/interactive/__init__.py 48 LOCremediation_agent.interactive — arrow-key issue picker for `vvaharness remediate -i`.

No top-level classes or functions.

vvaharness/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.
vvaharness/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.
vvaharness/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.
vvaharness/remediation_agent/models/__init__.py 34 LOCremediation_agent.models — the structured-output contract for one remediation.

No top-level classes or functions.

vvaharness/remediation_agent/models/change.py 24 LOCremediation_agent.models.change — one edited-file record in a remediation verdict.
  • Change — Represents the “Change” data/behaviour.
vvaharness/remediation_agent/models/gates.py 42 LOCremediation_agent.models.gates — the 3-gate evidence status block.
  • Gates — Represents the “Gates” data/behaviour.
vvaharness/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.
vvaharness/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.
vvaharness/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.
vvaharness/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) Provides the “report recursion limit” logic.
  • _verdict_extraction_prompt() — (internal helper) Provides the “verdict extraction prompt” logic.
  • _extract_verdict_from_history() — (internal helper) Reads and cleans up the verdict from history step.
  • _attempt_extraction() — (internal helper) Provides the “attempt extraction” logic.
  • _consume_deepagents() — (internal helper) Provides the “consume deepagents” logic.
  • _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.
vvaharness/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 verdict value.
vvaharness/remediation_agent/plugin_runner/run.py 142 LOCremediation_agent.plugin_runner.run — the per-finding apply_plugin orchestration.
  • apply_plugin() — Runs the plugin value.
vvaharness/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.
vvaharness/remediation_agent/policy/__init__.py 59 LOCremediation_agent.policy — wire the deterministic gate + playbook into the agent.

No top-level classes or functions.

vvaharness/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.
vvaharness/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 verdict” logic.
vvaharness/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.
vvaharness/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.
vvaharness/remediation_agent/policy_gate/__init__.py 63 LOCremediation_agent.policy_gate — deterministic eligibility gate.

No top-level classes or functions.

vvaharness/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.
vvaharness/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 verdict” logic.
vvaharness/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.
vvaharness/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 cwe value.
  • parse_policy() — Reads and cleans up the policy value.
vvaharness/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.
vvaharness/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.
vvaharness/remediation_agent/remediate.py 132 LOCremediation_agent.remediate — drive remediation from an existing scan report.
  • remediate() — Provides the “remediate” logic.
vvaharness/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.
vvaharness/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 data 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.
vvaharness/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.
vvaharness/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.
vvaharness/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.
vvaharness/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 sarif value.
  • _augment_sarif() — (internal helper) Adds detail to the sarif value.
vvaharness/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.
vvaharness/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.

vvaharness/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.
vvaharness/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 finding fields step.
vvaharness/remediation_agent/report_parser/finding.py 53 LOCremediation_agent.report_parser.finding — the ``Finding`` dataclass.
  • Finding — Represents the “Finding” data/behaviour.
    • label() — Provides the “label” logic.
    • slug() — Provides the “slug” logic.
vvaharness/remediation_agent/report_parser/ids.py 61 LOCremediation_agent.report_parser.ids — stable finding id + cheap CVSS extraction.
  • cvss_score_only() — Provides the “cvss score only” logic.
  • finding_id() — Looks up / reads the identifier value.
vvaharness/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.
vvaharness/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.
vvaharness/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() — Provides the “candidate inputs dirs” logic.
  • locate_rule() — Looks up / reads the rule value.
  • missing_rules() — Provides the “missing rules” logic.
  • validate_inputs_dir() — Checks / decides the inputs dir step.
vvaharness/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.
vvaharness/remediation_agent/select/__init__.py 49 LOCremediation_agent.select — shared "top N by CVSS" finding selection.

No top-level classes or functions.

vvaharness/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 cvss step.
  • select_top_logged() — Checks / decides the top logged step.
vvaharness/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.
report5 files · 1,708 LOC
vvaharness/report/__init__.py 15 LOC

No top-level classes or functions.

vvaharness/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.
vvaharness/report/cwe.py 146 LOCCWE id → canonical MITRE name. Single source of truth for MD rendering,
  • cwe_name() — Provides the “cwe name” logic.
  • cwe_for() — Provides the “cwe for” logic.
  • cwe_label() — Provides the “cwe label” logic.
vvaharness/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 “Finding” 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 cvss 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 “cwe taxonomy” logic.
  • _sarif_level() — (internal helper) Provides the “sarif level” logic.
  • _security_severity() — (internal helper) Provides the “security severity” logic.
  • _cvss_rating() — (internal helper) Provides the “cvss rating” logic.
  • generate_sarif() — Provides the “generate sarif” logic.
  • md_to_sarif() — Provides the “Markdown to sarif” logic.
  • enrich() — Adds detail to the enrich value.
  • main() — Runs the main value.
vvaharness/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.
rules4 files · 2,508 LOC
vvaharness/rules/__init__.py 255 LOCFirst-party CWE knowledge plus explicit external overlays.
  • CweKB — Represents the “CweKB” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • __len__() — Python built-in method (`__len__`).
    • __contains__() — Python built-in method (`__contains__`).
    • load() — Looks up / reads the load value.
    • _overlay_list() — (internal helper) Provides the “overlay list” logic.
    • _kb_files() — (internal helper) Provides the “knowledge base files” logic.
    • _read() — (internal helper) Looks up / reads the read value.
    • _merge() — (internal helper) Adds detail to the merge value.
    • for_cwes() — Provides the “for cwes” logic.
    • prompt_block() — Provides the “prompt block” logic.
  • _filter_lang() — (internal helper) Checks / decides the lang value.
vvaharness/rules/build_kb.py 1667 LOCOffline corpus → ``*.kb.yaml`` compiler.
  • _compact() — (internal helper) Provides the “compact” logic.
  • _scoped() — (internal helper) Provides the “scoped” logic.
  • _entry() — (internal helper) Provides the “entry” logic.
  • _flatten() — (internal helper) Reads and cleans up the flatten value.
  • extract_semgrep() — Reads and cleans up the semgrep value.
  • extract_findsecbugs() — Reads and cleans up the findsecbugs value.
  • _ql_role() — (internal helper) Provides the “ql role” logic.
  • extract_codeql() — Reads and cleans up the codeql value.
  • _mad_signature() — (internal helper) Provides the “mad signature” logic.
  • _extract_codeql_mad() — (internal helper) Reads and cleans up the codeql mad step.
  • _collapse() — (internal helper) Provides the “collapse” logic.
  • write_kb() — Builds / writes the knowledge base value.
  • _guess_ep_kind() — (internal helper) Provides the “guess ep kind” logic.
  • _slug() — (internal helper) Provides the “slug” logic.
  • _guess_sink_kind() — (internal helper) Provides the “guess sink kind” logic.
  • _canonical_family() — (internal helper) Provides the “canonical family” logic.
  • _semantic_family_from_sink() — (internal helper) Provides the “semantic family from sink” logic.
  • _semantic_family_from_source() — (internal helper) Provides the “semantic family from source” logic.
  • _owasp_2025_labels() — (internal helper) Provides the “owasp 2025 labels” logic.
  • _source_meta() — (internal helper) Provides the “source meta” logic.
  • _sink_meta() — (internal helper) Provides the “sink meta” logic.
  • _print_rule_quality_summary() — (internal helper) Provides the “print rule quality summary” logic.
  • _parse_lang_list() — (internal helper) Reads and cleans up the lang list step.
  • _load_rule_file() — (internal helper) Looks up / reads the rule file step.
  • _normalize_callgraph_rule() — (internal helper) Reads and cleans up the callgraph rule step.
  • _prepare_callgraph_rules() — (internal helper) Provides the “prepare callgraph rules” logic.
  • _strip_taint_keys() — (internal helper) Provides the “strip taint keys” logic.
  • _lift_pattern_sources() — (internal helper) Provides the “lift pattern sources” logic.
  • extract_semgrep_source_rules() — Reads and cleans up the semgrep source rules step.
  • _lift_pattern_sinks() — (internal helper) Provides the “lift pattern sinks” logic.
  • extract_semgrep_sink_rules() — Reads and cleans up the semgrep sink rules step.
  • _git_sha_for() — (internal helper) Provides the “git content hash for” logic.
  • _artifact_provenance() — (internal helper) Provides the “artifact provenance” logic.
  • write_sources_yaml() — Builds / writes the sources config file step.
  • write_sinks_yaml() — Builds / writes the sinks config file step.
  • _import_pattern() — (internal helper) Provides the “import pattern” logic.
  • _call_pattern() — (internal helper) Provides the “call pattern” logic.
  • extract_codeql_source_rules() — Reads and cleans up the codeql source rules step.
  • extract_codeql_sink_rules() — Reads and cleans up the codeql sink rules step.
  • _fsb_sink_langs() — (internal helper) Provides the “fsb sink langs” logic.
  • _jvm_to_source_class() — (internal helper) Provides the “jvm to source class” logic.
  • extract_findsecbugs_sink_rules() — Reads and cleans up the findsecbugs sink rules step.
  • main() — Runs the main value.
vvaharness/rules/families.py 142 LOCShared semantic-family, CWE and language vocabulary for the rule/callgraph stages.
  • norm_cwe() — Reads and cleans up the cwe value.
  • canonical_family() — Provides the “canonical family” logic.
  • owasp_labels() — Provides the “owasp labels” logic.
  • resolve_semantic_family() — Checks / decides the semantic family step.
  • canonical_lang() — Provides the “canonical lang” logic.
vvaharness/rules/generic_pack.py 444 LOCGeneric OWASP/CWE taint knowledge base.
  • _generic_entries() — (internal helper) Provides the “generic entries” logic.
  • _generic_llm_model() — (internal helper) Provides the “generic AI model model” logic.
  • refine_generic_entries_with_llm() — Provides the “refine generic entries with AI model” logic.
  • write_generic_kb() — Builds / writes the generic knowledge base step.
util9 files · 1,784 LOC
vvaharness/util/__init__.py 29 LOC

No top-level classes or functions.

vvaharness/util/environment.py 565 LOCEnvironment readiness engine shared by ``vvaharness setup`` and
  • Check — Represents the “Check” data/behaviour.
  • _is_set() — (internal helper) Checks / decides the set value.
  • _looks_like_jwt() — (internal helper) Provides the “looks like jwt” logic.
  • python_check() — Provides the “python check” logic.
  • tool_check() — Provides the “tool check” logic.
  • _claude_code_login_present() — (internal helper) Provides the “claude code login present” logic.
  • agent_checks() — Provides the “agent checks” logic.
  • dep_checks() — Provides the “dep checks” logic.
  • credential_checks() — Provides the “credential checks” logic.
  • _gateway_check() — (internal helper) Checks / decides the check value.
  • detect_gateway() — Looks up / reads the gateway value.
  • detect_ca_cert() — Looks up / reads the ca cert step.
  • recommend_profile() — Provides the “recommend profile” logic.
  • dotenv_check() — Provides the “dotenv check” logic.
  • config_check() — Provides the “config check” logic.
  • remediation_inputs_check() — Provides the “remediation inputs check” logic.
  • _backend_credential_ok() — (internal helper) Provides the “backend credential ok” logic.
  • _remediate_checks() — (internal helper) Provides the “remediate checks” logic.
  • _validate_checks() — (internal helper) Checks / decides the checks value.
  • tls_check() — Provides the “tls check” logic.
  • run_checks() — Runs the checks value.
  • summarize() — Provides the “summarize” logic.
vvaharness/util/errlog.py 140 LOCStructured error log shared across pipeline stages.
  • configure() — Sets up / maintains the configure value.
  • current_path() — Provides the “current path” logic.
  • counts_by_stage() — Provides the “counts by stage” logic.
  • log() — Provides the “log” logic.
vvaharness/util/json_extract.py 166 LOCPull a JSON object/array out of a model response that may have prose around it.
  • _repair_invalid_escapes() — (internal helper) Provides the “repair invalid escapes” logic.
  • _balanced_span() — (internal helper) Provides the “balanced span” logic.
  • extract_json() — Reads and cleans up the data file value.
vvaharness/util/metrics.py 140 LOCBuild ScanMetrics from pipeline state. Kept out of the orchestrator so the main
  • now_iso() — Provides the “now iso” logic.
  • build() — Builds / writes the build value.
  • _loc() — (internal helper) Provides the “loc” logic.
vvaharness/util/prompts.py 136 LOCShared prompt blocks used by s4 (researchers), s6 (verifiers), and s8 (chain analysis).

No top-level classes or functions.

vvaharness/util/scan_progress.py 318 LOCvvaharness.util.scan_progress — per-file scan observability.
  • ChunkProgress — Represents the “ChunkProgress” data/behaviour.
  • ScanProgress — Represents the “ScanProgress” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • from_cfg() — Provides the “from config” logic.
    • stage_started() — Builds / writes the started value.
    • stage_done() — Builds / writes the done value.
    • stage_note() — Builds / writes the note value.
    • discovered() — Looks up / reads the discovered value.
    • queued() — Provides the “queued” logic.
    • scanning() — Runs the scanning value.
    • scanned() — Runs the scanned value.
    • print_summary() — Provides the “print summary” logic.
    • _emit() — (internal helper) Builds / writes the emit value.
vvaharness/util/status.py 183 LOCPer-stage status reporting for the scan pipeline.
  • _Spinner — (internal) Represents the “Spinner” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • start() — Provides the “start” logic.
    • _run() — (internal helper) Runs the run value.
    • stop() — Provides the “stop” logic.
  • _is_tty() — (internal helper) Checks / decides the tty value.
  • json_logs_enabled() — Provides the “data file logs enabled” logic.
  • emit_event() — Builds / writes the event value.
  • stage() — Builds / writes the stage value.
vvaharness/util/tokens.py 107 LOCProcess-wide token accounting shared by every model backend (cli + sdk).
  • _TokenCounter — (internal) Represents the “TokenCounter” data/behaviour.
    • __init__() — Python built-in method (`__init__`).
    • phase() — Provides the “phase” logic.
    • add() — Adds detail to the add value.
    • reset() — Sets up / maintains the reset value.
    • snapshot() — Provides the “snapshot” logic.
  • _bucket() — (internal helper) Provides the “bucket” logic.
validation70 files · 6,480 LOC
vvaharness/validation/__init__.py 16 LOCAI SAST Finding Validation Orchestrator.

No top-level classes or functions.

vvaharness/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.
vvaharness/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 persona vendors step.
  • _load_validated_spec() — (internal helper) Looks up / reads the validated spec step.
  • _persona_spec_resolved() — (internal helper) Provides the “persona spec resolved” logic.
  • _apply_model_env() — (internal helper) Runs the model environment step.
vvaharness/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.
vvaharness/validation/cli/_patterns.py 22 LOCCompiled regex patterns for the cli package.

No top-level classes or functions.

vvaharness/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.
vvaharness/validation/config/__init__.py 34 LOCValidation agent configuration (the only place environment is read).

No top-level classes or functions.

vvaharness/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.
vvaharness/validation/constants/__init__.py 16 LOCConstant vocabularies for the validation agent (enums + path registry only).

No top-level classes or functions.

vvaharness/validation/constants/artifacts.py 171 LOCSingle source of truth for artifact names, DTO layout, and runtime environment keys.

No top-level classes or functions.

vvaharness/validation/constants/diff.py 48 LOCConstants for deterministic diff-based fact tools.

No top-level classes or functions.

vvaharness/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.
vvaharness/validation/constants/pattern_sets.py 35 LOCConstants for deterministic pattern-scanning fact tools.

No top-level classes or functions.

vvaharness/validation/constants/policy.py 51 LOCValidation-specific harness policy values (read-only tool allow-list + write gate).

No top-level classes or functions.

vvaharness/validation/constants/scoring.py 58 LOCCanonical scoring weights and thresholds used directly by the scoring engine.

No top-level classes or functions.

vvaharness/validation/constants/synthesis.py 26 LOCConstants for deterministic persona-report consensus synthesis.

No top-level classes or functions.

vvaharness/validation/constants/test_inventory.py 34 LOCConstants for the deterministic test-inventory fact tool.

No top-level classes or functions.

vvaharness/validation/constants/tools.py 32 LOCConstant tool-name vocabularies for the validation agent.

No top-level classes or functions.

vvaharness/validation/enums/__init__.py 45 LOCDomain enums for vvaharness.validation.

No top-level classes or functions.

vvaharness/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.
vvaharness/validation/enums/paths.py 28 LOCValidation-path enum.
  • ValidationPath — Represents the “ValidationPath” data/behaviour.
vvaharness/validation/enums/readiness.py 30 LOCMerge-readiness enum derived from a ValidationScore.
  • MergeReadiness — Represents the “MergeReadiness” data/behaviour.
vvaharness/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.
vvaharness/validation/execution/__init__.py 20 LOCExecution package: plan execution pipeline.

No top-level classes or functions.

vvaharness/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.
vvaharness/validation/hints/__init__.py 19 LOCPer-CWE adversarial bypass hints for the validation agent.

No top-level classes or functions.

vvaharness/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.
vvaharness/validation/ingest/__init__.py 40 LOCDTO ingest layer: discover remediation reports and stage validation workspaces.

No top-level classes or functions.

vvaharness/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 “cvss score” logic.
  • _top_by_cvss() — (internal helper) Provides the “top by cvss” 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.
vvaharness/validation/ingest/errors.py 22 LOCIngest-layer error type.
  • IngestError — Represents the “IngestError” data/behaviour.
vvaharness/validation/ingest/manifest_builder.py 50 LOCMap a remediation report DTO onto the agent-facing validation manifest.
  • build_manifest() — Builds / writes the manifest value.
vvaharness/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.
vvaharness/validation/io/__init__.py 15 LOC

No top-level classes or functions.

vvaharness/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.
vvaharness/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 verdict 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 data record step.
  • _dump_raw_dto() — (internal helper) Builds / writes the raw data record step.
  • write_back_validation() — Builds / writes the back validation step.
vvaharness/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.
vvaharness/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.
vvaharness/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.
vvaharness/validation/models/__init__.py 79 LOCPydantic data contracts and value types for the validation agent.

No top-level classes or functions.

vvaharness/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.
vvaharness/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.
vvaharness/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.
vvaharness/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.
vvaharness/validation/models/plans.py 36 LOCExecution-plan value objects for the fix-validation path.
  • FixValidationPlan — Represents the “FixValidationPlan” data/behaviour.
vvaharness/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.
vvaharness/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.
vvaharness/validation/report/__init__.py 19 LOCCombined-report augmentation: write validation results into the SARIF + MD report.

No top-level classes or functions.

vvaharness/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 sarif value.
  • _augment_sarif() — (internal helper) Adds detail to the sarif 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.
vvaharness/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.
vvaharness/validation/scoring/_configs.py 54 LOCScoringConfig instance for the fix-validation path.

No top-level classes or functions.

vvaharness/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.
vvaharness/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.
vvaharness/validation/session/__init__.py 32 LOCValidation session package — launch and error hierarchy.

No top-level classes or functions.

vvaharness/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.
vvaharness/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.
vvaharness/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 finding details step.
  • build_launch_prompt() — Builds / writes the launch prompt step.
vvaharness/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 “persona 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.
vvaharness/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 “persona rules text” logic.
vvaharness/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.
vvaharness/validation/subagents/__init__.py 23 LOCBundled subagent definitions loaded at import time from .md authoring files.

No top-level classes or functions.

vvaharness/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.
vvaharness/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.
vvaharness/validation/synthesis/__init__.py 16 LOCHost-side deterministic synthesis of persona reports.

No top-level classes or functions.

vvaharness/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 finding” logic.
vvaharness/validation/tools/__init__.py 16 LOCDeterministic read-only tools for the validation agent.

No top-level classes or functions.

vvaharness/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.
vvaharness/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.
vvaharness/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) Provides the “consume hunk line” logic.
    • 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.
vvaharness/validation/tools/pattern_scanner.py 69 LOCDeterministic pattern scanner for validation subagents.
  • pattern_scan() — Provides the “pattern scan” logic.
vvaharness/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.
vvaharness6 files · 2,655 LOC
vvaharness/__init__.py 24 LOCvvaharness — agentic SAST pipeline.

No top-level classes or functions.

vvaharness/__main__.py 19 LOC

No top-level classes or functions.

vvaharness/agentdoc.py 85 LOCPackaged AI-agent operating instructions.
  • gemini_doc() — Provides the “gemini doc” logic.
vvaharness/cli.py 499 LOCvvaharness CLI entry point — `scan`, `doctor`, `estimate`.
  • _doctor() — (internal helper) Provides the “doctor” logic.
  • _estimate() — (internal helper) Provides the “estimate” logic.
  • _gc() — (internal helper) A small support routine (`_gc`).
  • _validate() — (internal helper) Checks / decides the validate value.
  • _remediate() — (internal helper) Provides the “remediate” logic.
  • _config_path_from() — (internal helper) Provides the “config path from” logic.
  • _check_python() — (internal helper) Checks / decides the python value.
  • _repo_from() — (internal helper) Provides the “repository from” logic.
  • _load_dotenv() — (internal helper) Looks up / reads the dotenv value.
  • _install_agents() — (internal helper) Provides the “install agents” logic.
  • _setup() — (internal helper) Sets up / maintains the setup value.
  • _prompt_for_remediation_inputs() — (internal helper) Provides the “prompt for remediation inputs” logic.
  • _print_help() — (internal helper) Provides the “print help” logic.
  • main() — Runs the main value.
vvaharness/manifest.py 179 LOCRun-level scan manifest (vvaharness).
  • _scrub_argv() — (internal helper) Hides sensitive data in the argv value.
  • _git_sha() — (internal helper) Provides the “git content hash” logic.
  • _models() — (internal helper) Provides the “models” logic.
  • _config_sha256() — (internal helper) Provides the “config sha256” logic.
  • capture() — Provides the “capture” logic.
vvaharness/models.py 1849 LOCData contracts passed between pipeline steps.
  • CVE — Represents the “CVE” data/behaviour.
  • Control — Represents the “Control” data/behaviour.
    • _v_kind() — (internal helper) Provides the “v kind” logic.
  • AppProfile — Represents the “AppProfile” data/behaviour.
    • to_prompt_block() — Provides the “to prompt block” logic.
  • Asset — Represents the “Asset” data/behaviour.
    • _v_sensitivity() — (internal helper) Provides the “v sensitivity” logic.
  • TrustBoundary — Represents the “TrustBoundary” data/behaviour.
  • Threat — Represents the “Threat” data/behaviour.
    • _v_actor() — (internal helper) Provides the “v actor” logic.
    • _v_impact() — (internal helper) Provides the “v impact” logic.
    • _v_likelihood() — (internal helper) Provides the “v likelihood” logic.
  • ThreatModel — Represents the “ThreatModel” data/behaviour.
    • to_prompt_block() — Provides the “to prompt block” logic.
    • to_compact_prompt_block() — Provides the “to compact prompt block” logic.
  • EntryPoint — Represents the “EntryPoint” data/behaviour.
    • _v_kind() — (internal helper) Provides the “v kind” logic.
  • Sink — Represents the “Sink” data/behaviour.
    • _v_line() — (internal helper) Provides the “v line” logic.
  • ModuleInfo — Represents the “ModuleInfo” data/behaviour.
    • _v_loc() — (internal helper) Provides the “v loc” logic.
  • TaintSymbolRef — Represents the “TaintSymbolRef” data/behaviour.
  • TaintTransferEdge — Represents the “TaintTransferEdge” data/behaviour.
    • _coerce_unknown_kind() — (internal helper) Reads and cleans up the unknown kind step.
  • TaintEvidencePath — Represents the “TaintEvidencePath” data/behaviour.
  • CFGNode — Represents the “CFGNode” data/behaviour.
  • CFG — Represents the “config” data/behaviour.
  • ConditionTaintEdge — Represents the “ConditionTaintEdge” data/behaviour.
    • _v_condition_text() — (internal helper) Provides the “v condition text” logic.
  • ReflectionFact — Represents the “ReflectionFact” data/behaviour.
    • _v_line() — (internal helper) Provides the “v line” logic.
    • _v_call_type() — (internal helper) Provides the “v call type” logic.
  • ReflectionTaintEdge — Represents the “ReflectionTaintEdge” data/behaviour.
    • _v_confidence() — (internal helper) Provides the “v confidence” logic.
  • FrameworkMarkerFact — Represents the “FrameworkMarkerFact” data/behaviour.
    • _v_line() — (internal helper) Provides the “v line” logic.
    • _v_marker_type() — (internal helper) Provides the “v marker type” logic.
    • _v_framework() — (internal helper) Provides the “v framework” logic.
    • _v_confidence() — (internal helper) Provides the “v confidence” logic.
  • RouteTaintFact — Represents the “RouteTaintFact” data/behaviour.
    • _v_line() — (internal helper) Provides the “v line” logic.
    • _v_framework() — (internal helper) Provides the “v framework” logic.
  • ResponseDataflowFact — Represents the “ResponseDataflowFact” data/behaviour.
    • _v_line() — (internal helper) Provides the “v line” logic.
    • _v_framework() — (internal helper) Provides the “v framework” logic.
    • _v_response_type() — (internal helper) Provides the “v response type” logic.
  • FrameworkTaintEdge — Represents the “FrameworkTaintEdge” data/behaviour.
    • _v_marker_type() — (internal helper) Provides the “v marker type” logic.
    • _v_framework() — (internal helper) Provides the “v framework” logic.
    • _v_confidence() — (internal helper) Provides the “v confidence” logic.
  • ContextPackage — Represents the “ContextPackage” data/behaviour.
    • ast_context_view() — Provides the “ast context view” logic.
    • to_prompt_block() — Provides the “to prompt block” logic.
    • to_decompose_prompt_block() — Provides the “to decompose prompt block” logic.
    • _function_sites_block() — (internal helper) Provides the “function sites block” logic.
    • _call_graph_block() — (internal helper) Provides the “call graph block” logic.
    • _call_graph_block_full() — (internal helper) Provides the “call graph block full” logic.
    • _signatures_block() — (internal helper) Provides the “signatures block” logic.
  • ChunkSize — Represents the “ChunkSize” data/behaviour.
  • Chunk — Represents the “Chunk” data/behaviour.
    • _v_size() — (internal helper) Provides the “v size” logic.
    • _v_rank() — (internal helper) Provides the “v rank” logic.
  • TaskManifest — Represents the “TaskManifest” data/behaviour.
    • sorted_chunks() — Provides the “sorted chunks” logic.
  • VulnClass — Represents the “VulnClass” data/behaviour.
  • DupLocation — Represents the “DupLocation” data/behaviour.
  • Finding — Represents the “Finding” data/behaviour.
    • _v_confidence() — (internal helper) Provides the “v confidence” logic.
    • canonical_key() — Provides the “canonical key” logic.
  • Severity — Represents the “Severity” data/behaviour.
  • Chain — Represents the “Chain” data/behaviour.
  • RankedFinding — Represents the “RankedFinding” data/behaviour.
  • DroppedFinding — Represents the “DroppedFinding” data/behaviour.
  • ScopeEntry — Represents the “ScopeEntry” data/behaviour.
  • ScanMetrics — Represents the “ScanMetrics” data/behaviour.
    • coverage_pct() — Provides the “coverage pct” logic.
    • verification_precision_pct() — Provides the “verification precision pct” logic.
  • FinalReport — Represents the “FinalReport” data/behaviour.
    • to_markdown() — Provides the “to markdown” logic.
    • _render_unreachable_appendix() — (internal helper) Builds / writes the unreachable appendix step.
    • _render_threat_model() — (internal helper) Builds / writes the threat model step.
    • _render_metrics() — (internal helper) Builds / writes the metrics value.
    • _render_scan_health() — (internal helper) Builds / writes the scan health step.
    • _render_scope_appendix() — (internal helper) Builds / writes the scope appendix step.
  • _demote_md_headings() — (internal helper) Provides the “demote Markdown headings” logic.
  • _md_cell() — (internal helper) Provides the “Markdown cell” logic.
  • _norm() — (internal helper) Reads and cleans up the norm value.
  • _coerce_enum() — (internal helper) Reads and cleans up the enum value.
  • _coerce_int() — (internal helper) Reads and cleans up the int value.
  • _coerce_confidence() — (internal helper) Reads and cleans up the confidence value.

Generated by codeviz — a single-file, dependency-free tool. Re-run on any repo: python codeviz.py --root . --name "Project"