ZeroLeaksDocs
API Reference

Reports

Retrieve prompt-scan reports and find agent report fields.

MethodReturns
reports.get(reportId)ScanReport
reports.getByScan(scanId)ScanReport
reports.list(options?)ReportListResponse
const report = await zeroleaks.reports.getByScan(scanId);

console.log(report.overallScore);
console.log(report.overallVulnerability);
console.log(report.findings);
console.log(report.recommendations);

The reports namespace only returns reports from prompt scans, all of which predate the prompt-scan retirement. They can include extraction and injection scores, findings, attack-family statistics, sandbox tool logs, exposed canaries, kill chains, prompt remediation, and knowledge-version metadata.

Runtime and endpoint scans return an AgentReport on the scan result from runtimeScans.get() or endpointScans.get(). It has overallScore, overallVulnerability, components (promptSecurity, toolSafety, multiTurnResilience, dataLeakage), attacksRun, summary, recommendations, conversationLog, boundaryAssurance (including secretsInContext, attackQuality, strategy, fingerprint, priorFingerprint, campaignStates, and searchTree), and containment. Runtime reports add toolTrace and target. See reports for field details.

@zeroleaks/sdk 0.3.0 or later exports a type for each part of the report: AgentReportComponent, AgentFinding, BoundaryAssurance, BoundaryInvariant, SecretsInContextSummary, SecretLeak, DefenseFingerprint, and CampaignState.