archwall 把架构画全Every architecture, drawn in full

VVAH:用 AI 找漏洞、复核、修复、打分VVAH: AI that finds security bugs, checks them, fixes and grades

securitysastcoding-agentllm

VVAH overview: input is your code repo plus optional context files; 1 find where to look: S0 code map and S1 repo survey, S2 threat model, S3 chunks for 11 specialist lenses; 2 hunt and double-check: S4 AI reviewers per chunk with optional voting, S5 rule filter then one AI dedup, S6 a verifier tries to prove each finding wrong, with an optional live check; 3 report: S7 merges duplicates, S8 links attack chains and re-ranks, S9 writes Markdown and SARIF; 4 fix and grade, off by default: S10 proposes a minimal fix, S11 two AI reviewers grade it, and people review every finding and fix

VVAH 是 Visa 开源的工具,用 AI 找代码漏洞,再修复、打分。这里是社区分叉版。每条发现都只是线索,要人核对。

1. 找该看哪里。 AI 先跳过非生产文件。S0 画出输入到危险调用的路径,S1 摸清仓库,S2 做威胁模型,S3 把代码切块。

Phase 1: 1 inputs: your repo plus optional known CVEs, design controls and a CMDB export; 2 map the code: an AI pass skips non-production files, S0 static map of where input reaches risky calls, S1 read-only AI survey; 3 S2 threat model: assets, trust boundaries, ranked threats; 4 S3 split the work: risk, taint, specialist (11 lenses), catch-all and threat chunks
第一阶段:先搞清楚这个系统值钱在哪、外人从哪进来,再分派审查

2. 细查再复核。 S4 由 AI 逐块审查,专项块配 11 种视角之一,如访问控制。S5 用规则筛掉明显误报。S6 换新验证者专门证伪,只有真问题往下走。

Phase 2: 1 S4 an AI reviewer per chunk, guided by a language lens (42 languages) and a specialist lens (11 kinds), optional vote of 3 runs with 2 agreeing, on in the full profile only; 2 S5 rules first: test or mock paths, files that do not exist, low confidence, no source or sink, then one AI dedup call; 3 S6 a fresh verifier per finding: true positives get a CVSS score and go on, false positives are kept for audit; 4 optional live check (beta) that only adds evidence
第二阶段:多找,再狠狠地筛,留下站得住的

可选的现场验证(测试版)拿 Web API 类发现去打本机运行的应用,由独立评判者看真实流量下结论。它只补证据,不删发现。

Live check (beta, web APIs only, off by default): 1 turn it on: an API collection and a target on this machine, localhost only with no override, a reachability probe before any AI spend, safe mode skips destructive tests; 2 plan: can a web request test it, map it to an endpoint, pick a test by kind of weakness; 3 test and judge: send and look for a clear sign, an attacker agent tries a few more times within a budget, an independent judge sees only real traffic; 4 outcome: confirmed with a repro, not confirmed, needs review, static only; ev-replay re-runs a confirmed test after the fix; the static verifier still owns the verdict
现场验证:在本机拿运行中的应用实测,证据由独立评判者认定

3. 出报告。 S7 去重,S8 把小漏洞串成攻击链并重排,S9 写出 Markdown 和 SARIF,密钥会遮住。

Phase 3: 1 S7 merge duplicates: a rule pass for same file, type and nearby line, an AI pass for the same root cause; 2 S8 chain: link small bugs, re-rank by real exploitability, check combinations with known unpatched CVEs; 3 score and protect: CVSS 3.1 and CWE, optional CMDB business context, ATT&CK as context that adds no finding and changes no score, mask card numbers, SSNs and keys; 4 outputs in security-scan/: report.md, report.sarif, findings.json and an optional upload, the only way results leave besides the AI provider
第三阶段:去重、串链、排序,出一份人和工具都能读的报告

4. 修复和打分。 默认都关着。S10 给出最小修复,有策略闸门和紧急开关。

Fix, S10 (off by default): 1 start: verified findings from the scan report, turned on with --remediate or the remediate command, --top N for only the N worst; 2 plan and edit: a planner agent reads and plans a minimal fix, a fixer sub-agent edits files inside the repo, report-only mode proposes without edits; 3 safety rails: a policy gate blocks edits to CI, hooks and .git, a kill switch turns every fix into advice, no shell on purpose, a policy file that will not load means no edits; 4 fix record: finding_case.json, diff.patch with secrets masked, and a stopgap to try; S11 grades it next
修复:AI 只提最小改动,护栏决定它能碰什么

S11 由两个 AI 评审按四项加权检查打分,根因最重。

Grade, S11: 1 find fix records to grade, discovery uses no AI; off in the default scan, the validate command runs it any time; 2 read-only review panel: an orchestrator, a security architect checks the root cause, a penetration tester tries to get around the fix, a cross-repo reviewer joins only for fixes across 2 or more repos; 3 four weighted checks: root cause 43%, every instance 25%, no new bugs 19%, best practice 14%; 4 verdict: fixed at 0.80 or more, partially fixed at 0.50 or more, not fixed below 0.50, inconclusive when reviewers split; a root-cause or new-bug check that fails or is partial caps it at partially fixed; the case becomes validated, failed or open
打分:两个 AI 评审按四项加权检查,根因最重要

每步在配置里各选模型:Claude、OpenAI 或开源模型。默认只要一个 Anthropic 密钥。

Models: 1 every AI step is a setting: detection S0 to S9, fix S10, grading panel S11 and 4 live-check roles, swapped in config with no code change; 2 four routes: cli, sdk, openai, deepagents, the default profile uses deepagents everywhere; 3 providers: Anthropic Claude, OpenAI or a compatible gateway, open-weight models, the default needs one Anthropic key; 4 what each AI may touch: one-shot steps get no tools, explorers and verifiers are read-only, the fixer edits inside the repo, no shipped profile grants a shell
模型:每一步各选各的,权限按步骤收紧

运行边跑边存,中断不白花钱;每次都记下模型、token 和成本。

Day to day: 1 commands: setup and doctor check first, estimate previews cost with no spend, scan runs the pipeline, remediate and validate fix and grade, ev-replay re-tests a fix, status and gc show progress and clean up; 2 many repos: repos.csv with one row per repo, clone and group for one report per app, batch_summary.md; 3 never lose paid work: checkpoints per chunk and per finding, resume by default and --fresh to start over, guards on commit and config, stored in SQLite outside the repo; 4 audit and data: run_manifest_*.json with models, tokens and cost, code goes to the AI provider so use approved endpoints, report folders get a local ignore rule
日常使用:先估成本,断了能续,每次运行都留账

VVAH is Visa's open-source harness that uses AI models to find security weaknesses in code, propose fixes and grade them. This is a community fork. Every finding is a lead for a person to check, not a final answer.

1. Find where to look. An AI pass skips non-production files. S0 maps where input reaches risky calls, S1 surveys the repo, S2 builds a threat model, and S3 splits the code into chunks.

Phase 1: 1 inputs: your repo plus optional known CVEs, design controls and a CMDB export; 2 map the code: an AI pass skips non-production files, S0 static map of where input reaches risky calls, S1 read-only AI survey; 3 S2 threat model: assets, trust boundaries, ranked threats; 4 S3 split the work: risk, taint, specialist (11 lenses), catch-all and threat chunks
Phase 1: learn what is valuable and where outsiders get in, then hand out the review work

2. Hunt and double-check. In S4 an AI reviewer reads each chunk. Specialist chunks get one of 11 lenses, such as access control. S5 drops obvious mistakes with plain rules. In S6 a fresh verifier tries to prove each finding wrong. Only true positives go on.

Phase 2: 1 S4 an AI reviewer per chunk, guided by a language lens (42 languages) and a specialist lens (11 kinds), optional vote of 3 runs with 2 agreeing, on in the full profile only; 2 S5 rules first: test or mock paths, files that do not exist, low confidence, no source or sink, then one AI dedup call; 3 S6 a fresh verifier per finding: true positives get a CVSS score and go on, false positives are kept for audit; 4 optional live check (beta) that only adds evidence
Phase 2: cast a wide net, then filter hard so what is left holds up

An optional live check (beta) tests web-API findings against a copy of the app on the same machine. A separate judge decides from the real traffic. It adds proof and never removes a finding.

Live check (beta, web APIs only, off by default): 1 turn it on: an API collection and a target on this machine, localhost only with no override, a reachability probe before any AI spend, safe mode skips destructive tests; 2 plan: can a web request test it, map it to an endpoint, pick a test by kind of weakness; 3 test and judge: send and look for a clear sign, an attacker agent tries a few more times within a budget, an independent judge sees only real traffic; 4 outcome: confirmed with a repro, not confirmed, needs review, static only; ev-replay re-runs a confirmed test after the fix; the static verifier still owns the verdict
Live check: test against the running app on this machine; an independent judge rules on the evidence

3. Report. S7 merges duplicates. S8 links small bugs into attack chains and re-ranks them. S9 writes Markdown for people and SARIF for tools, with secrets masked.

Phase 3: 1 S7 merge duplicates: a rule pass for same file, type and nearby line, an AI pass for the same root cause; 2 S8 chain: link small bugs, re-rank by real exploitability, check combinations with known unpatched CVEs; 3 score and protect: CVSS 3.1 and CWE, optional CMDB business context, ATT&CK as context that adds no finding and changes no score, mask card numbers, SSNs and keys; 4 outputs in security-scan/: report.md, report.sarif, findings.json and an optional upload, the only way results leave besides the AI provider
Phase 3: dedupe, chain, rank, and write one report for people and tools

4. Fix and grade. Both are off in the default profile. S10 proposes a minimal fix, behind a policy gate and a kill switch.

Fix, S10 (off by default): 1 start: verified findings from the scan report, turned on with --remediate or the remediate command, --top N for only the N worst; 2 plan and edit: a planner agent reads and plans a minimal fix, a fixer sub-agent edits files inside the repo, report-only mode proposes without edits; 3 safety rails: a policy gate blocks edits to CI, hooks and .git, a kill switch turns every fix into advice, no shell on purpose, a policy file that will not load means no edits; 4 fix record: finding_case.json, diff.patch with secrets masked, and a stopgap to try; S11 grades it next
Fix: the AI proposes a minimal change; guard rails decide what it may touch

In S11 two AI reviewers grade the fix on four weighted checks. Root cause counts most.

Grade, S11: 1 find fix records to grade, discovery uses no AI; off in the default scan, the validate command runs it any time; 2 read-only review panel: an orchestrator, a security architect checks the root cause, a penetration tester tries to get around the fix, a cross-repo reviewer joins only for fixes across 2 or more repos; 3 four weighted checks: root cause 43%, every instance 25%, no new bugs 19%, best practice 14%; 4 verdict: fixed at 0.80 or more, partially fixed at 0.50 or more, not fixed below 0.50, inconclusive when reviewers split; a root-cause or new-bug check that fails or is partial caps it at partially fixed; the case becomes validated, failed or open
Grade: two AI reviewers, four weighted checks, root cause counts most

Each step picks its own model and route in config: Claude, OpenAI or open-weight models. The default profile needs one Anthropic key.

Models: 1 every AI step is a setting: detection S0 to S9, fix S10, grading panel S11 and 4 live-check roles, swapped in config with no code change; 2 four routes: cli, sdk, openai, deepagents, the default profile uses deepagents everywhere; 3 providers: Anthropic Claude, OpenAI or a compatible gateway, open-weight models, the default needs one Anthropic key; 4 what each AI may touch: one-shot steps get no tools, explorers and verifiers are read-only, the fixer edits inside the repo, no shipped profile grants a shell
Models: each step picks its own, and each gets only the access it needs

Runs save progress as they go, so a crash loses little paid work. Each run records its models, tokens and cost.

Day to day: 1 commands: setup and doctor check first, estimate previews cost with no spend, scan runs the pipeline, remediate and validate fix and grade, ev-replay re-tests a fix, status and gc show progress and clean up; 2 many repos: repos.csv with one row per repo, clone and group for one report per app, batch_summary.md; 3 never lose paid work: checkpoints per chunk and per finding, resume by default and --fresh to start over, guards on commit and config, stored in SQLite outside the repo; 4 audit and data: run_manifest_*.json with models, tokens and cost, code goes to the AI provider so use approved endpoints, report folders get a local ignore rule
Day to day: estimate first, resume after a crash, and every run leaves a record

来源Source: github.com

← 全部架构← All architectures