sec-af icon indicating copy to clipboard operation
sec-af copied to clipboard

Successful audits report zero cost despite paid phase executions

Open AbirAbbas opened this issue 3 weeks ago • 0 comments

What happened

On 2026-11-11, successful sec-af audits on main cee88c9f15cb with Go SDK v0.1.131 returned cost_usd zero while the control plane persisted nonzero harness and direct-LLM usage. The earlier quick audit recorded about $0.055 of usage. Zero report cost is an observed accounting defect; these runs do not establish a particular cost or duration cap being crossed.

Replication

Compare a completed sec-af.audit result with usage for its phase executions. An offline node test can script phase results and usage, then inspect the parent report's accumulated cost. No new paid audit was run during this verification.

Where

go/internal/node/audit.go: Node.runAudit calls separate recon, hunt, prove and remediation phase reasoners through callMap, then calls GenerateOutput on its parent orchestrator. It does not roll their usage into that orchestrator. go/internal/orch/output.go: GenerateOutput reads TotalCostUSD and CostBreakdown from the parent. The accounting proxy in go/internal/orch/budget.go belongs to a different, in-process orchestration path.

The fix

Roll phase usage into the parent report and make cost-based budget decisions use the same authoritative spend.

Acceptance

Through sec-af.audit with scripted nonzero phase usage, report matching nonzero total and phase costs and exercise any cost limit against those totals.

AbirAbbas avatar Nov 12 '26 11:11 AbirAbbas