{
  "observedAtUtc": "2026-10-29T06:02:38.110262+00:00",
  "claimAudit": [
    {
      "id": "C01",
      "claim": "This document-stage warning-severity checker grades recorded poc_quality booleans, not actual PoC execution or semantic adequacy. Initial advisory=true is changed to false for actual quality gaps or store load errors; do not promise universally nonblocking behavior.",
      "sources": [
        "pkg/workflow/workflow_poc_quality_checked.go",
        "pkg/audit/audit.go"
      ]
    },
    {
      "id": "C02",
      "claim": "Current rules/model/help have11 numbered keys: control_test3, operational_path_verified10, reachability_verified11. Catalog poc_quality_verified still has10-item prose and Rule10 safe-path wording. Do not renumber or equate the distinct sources; this reference does not complete that catalog obligation. POC-QUALITY-CHECKLIST.md referenced in comments/help was not found in this checkout.",
      "sources": [
        "pkg/workflow/workflow_poc_quality_checked.go",
        "pkg/model/known_issue.go",
        "docs/help/checks/poc_quality_checked.md",
        "pkg/catalog/data/domain/audit_process/poc_quality_verified.yaml"
      ]
    },
    {
      "id": "C03",
      "claim": "Candidates are filtered. Active records are open, reviewed or empty status. Scope unions any severity/code_severity/bounty_severity meeting medium default with external-report presence or case-insensitive submit substring. min_severity none/all/all-active applies all active. Source_report and recognized source-only legacy candidate provenance do not itself establish external reporting. Rewording disposition cannot remove a retained external report block.",
      "sources": [
        "pkg/workflow/workflow_poc_quality_checked.go",
        "pkg/model/relay.go",
        "pkg/model/known_issue.go",
        "pkg/workflow/known_issue_evidence_store.go",
        "pkg/workflow/known_issue_policy.go"
      ]
    },
    {
      "id": "C04",
      "claim": "Non-Web3 projects skip three rules: quantitative_impact,untrusted_attacker,attacker_profitability. enabled:true forces full11. enabled:false is a real per-check stage skip via tri-state policy, not only Web3 relaxation; generic disabled list also skips. Default medium is not explicit YAML in this fixture.",
      "sources": [
        "pkg/workflow/workflow_poc_quality_checked.go",
        "pkg/workflow/web3_detect.go",
        "pkg/model/requirement.go",
        "pkg/workflow/config.go",
        "pkg/workflow/workflow.go"
      ]
    },
    {
      "id": "C05",
      "claim": "True answers are accepted before N/A processing. For false answers only keys4/7/11 allow a nonblank case/whitespace-normalized N/A reason; reachability N/A is refused for non-none cve_surface,CVSS vector,matched name/class security tokens,attacker_input or non-none sanitizer. Core false rules remain gaps even with N/A reason. No companion poc_quality_exemption path is consumed here.",
      "sources": [
        "pkg/workflow/workflow_poc_quality_checked.go",
        "pkg/workflow/workflow_security_relevance_consistent.go"
      ]
    },
    {
      "id": "C06",
      "claim": "Nil project/no eligible issue yields PASS, not proof of checked real behavior. Missing block is a gap; false applicable rules generate details. Sorted detail strings may appear1,11,5 rather than numeric order. failed_rule_inc includes non-missing-block video findings too, not an invariant11-rule cell denominator. Load errors produce fail row with warning severity/nonadvisory and operational no-cache marker; aggregate converts warning-severity fail to warning.",
      "sources": [
        "pkg/workflow/workflow_poc_quality_checked.go",
        "pkg/audit/audit.go",
        "pkg/workflow/workflow.go"
      ]
    },
    {
      "id": "C07",
      "claim": "Video policy off/absent returns no video gaps. Otherwise visible judgement/reason and attached strict manifests/digests are checked; always or required_for_visible can require a video. This validates fields/digests, not actual video content/narration truth. Reason byte-length checks should not be restated as Unicode-rune checks.",
      "sources": [
        "pkg/workflow/workflow_poc_video.go",
        "pkg/model/review_config.go",
        "pkg/contribreview/video.go",
        "pkg/contribreview/dossier.go"
      ]
    },
    {
      "id": "C08",
      "claim": "Cache descriptor keys known-issue corpus,config,Web3 detection. Actual Run opts out when configured video manifest/file reads occur; stale descriptor comment also mentions Web3 outside dependencies but live dependency already keys it. --no-cache bypasses lookup, not all derived writes. Operational errors noncacheable. Native3 runs actually report bypass and persist results/cache artifacts.",
      "sources": [
        "pkg/workflow/check_descriptors.go",
        "pkg/workflow/workflow_poc_quality_checked.go",
        "pkg/workflow/workflow.go"
      ]
    },
    {
      "id": "C09",
      "claim": "Audit CLI default fail-level warn can be project-overridden when flag absent; explicit --fail-level warn governs this campaign. Actual nonadvisory warning produces exit2; error threshold ignores warnings,errors yield1. Do not derive branch protection or communication/submission approval from a CLI exit.",
      "sources": [
        "cmd/proof/audit.go",
        "pkg/audit/audit.go",
        "pkg/workflow/ki_promotion_helpers.go"
      ]
    },
    {
      "id": "C10",
      "claim": "Supported visible editable intake values audit and business-logic exist. Use /demo?engagement=audit&interest=business-logic; prefill JS only recognizes existing options and does not lock them. No form submission performed.",
      "sources": [
        "website/demo.html",
        "website/assets/engagement-intake.js"
      ]
    }
  ],
  "files": [
    {
      "path": "pkg/workflow/workflow_poc_quality_checked.go",
      "sha256": "52650d7b81193289af7c2ebab9ea9bbae356cfb34af9387e549284f086e8f53c",
      "bytes": 30783,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 100,
          "endLine": 340,
          "text": "\t\"github.com/probelabs/proof/pkg/repo\"\n)\n\n// pocQualityCheckedCheck implements the ACC-15 PoC quality gate.\n// See the package comment for policy.\n//\n// Implements: ACC-15\ntype pocQualityCheckedCheck struct{}\n\n// Implements: SYS-REQ-260718-SV4N\nfunc (c *pocQualityCheckedCheck) Name() string { return \"poc_quality_checked\" }\n\n// Implements: SYS-REQ-260718-SV4N\nfunc (c *pocQualityCheckedCheck) Stage() Stage { return StageDocument }\n\n// Implements: SYS-REQ-260718-SV4N\nfunc (c *pocQualityCheckedCheck) Severity() CheckSeverity { return SeverityWarning }\n\n// pocqRule is one of the 11 PoC quality checklist rules: a 1-indexed number\n// (matching POC-QUALITY-CHECKLIST.md ordering), the YAML key in\n// model.PoCQuality, a short human label, and a pointer-driven accessor over\n// the struct so the check stays in lockstep with the model.\ntype pocqRule struct {\n\tNumber  int\n\tYAMLKey string\n\tLabel   string\n\tGet     func(*model.PoCQuality) bool\n\t// NAAllowed marks a rule as eligible to be declared not_applicable (with a\n\t// required justification) for findings whose threat model makes it\n\t// definitionally N/A: the attacker-trust-model rules (untrusted_attacker,\n\t// attacker_profitability) and reachability_verified \u2014 the latter only for a\n\t// local-behavioral / non-reachability finding, never a security/exploit-class\n\t// one (pocqNARefusedFor enforces that: cve_surface none or unset, no CVSS\n\t// vector, no attacker_input or sanitizer, not security-named). Integrity-core\n\t// rules must always be satisfied.\n\tNAAllowed bool\n\t// Web3Only marks a rule as meaningful only for Web3/DeFi codebases that\n\t// custody deployed value: quantitative_impact (token balances before/after),\n\t// untrusted_attacker (a separate on-chain signer with no privileged role),\n\t// and attacker_profitability (attacker cost vs on-chain revenue). On a\n\t// non-Web3 project these three are categorically inapplicable, so they are\n\t// skipped rather than reported as gaps \u2014 mirroring the deployment_tvl_verified\n\t// auto-skip (ACC-09) via the same isWeb3Project detector. The other eight\n\t// rules (control test, reproducible, honest severity, operational path,\n\t// reachability, \u2026) still apply to every project. Issue #952, #1012.\n\tWeb3Only bool\n\t// FailHint, when set, is appended to the \"not satisfied\" finding for this\n\t// rule to name the concrete failure mode a reviewer should look for \u2014 e.g.\n\t// that a unit/library reproducer starting past the ingress guard does not\n\t// satisfy a reachability-class rule. Issue #1012.\n\tFailHint string\n}\n\n// pocqRules is the canonical ordered list of the 11 PoC quality rules. The\n// order mirrors POC-QUALITY-CHECKLIST.md / model.PoCQuality and is the order\n// the finding details are emitted in.\n//\n// Implements: ACC-15\nvar pocqRules = []pocqRule{\n\t{Number: 1, YAMLKey: \"real_infrastructure\", Label: \"real infrastructure (the real running service over its real protocol, not an SDK/unit call)\", Get: func(q *model.PoCQuality) bool { return q.RealInfrastructure }},\n\t{Number: 2, YAMLKey: \"quantitative_impact\", Label: \"quantitative impact\", Get: func(q *model.PoCQuality) bool { return q.QuantitativeImpact }, Web3Only: true},\n\t{Number: 3, YAMLKey: \"control_test\", Label: \"control test\", Get: func(q *model.PoCQuality) bool { return q.ControlTest }},\n\t{Number: 4, YAMLKey: \"untrusted_attacker\", Label: \"untrusted attacker\", Get: func(q *model.PoCQuality) bool { return q.UntrustedAttacker }, NAAllowed: true, Web3Only: true},\n\t{Number: 5, YAMLKey: \"current_deployment_relevance\", Label: \"current deployment relevance (reachable by the modeled attacker through the real entry point past access controls, verified end-to-end)\", Get: func(q *model.PoCQuality) bool { return q.CurrentDeploymentRelevance }, FailHint: \"showing only that the vulnerable code path exists, without demonstrating the modeled attacker reaching it end-to-end through the real entry point past access controls, does not satisfy this rule for a reachability-class finding\"},\n\t{Number: 6, YAMLKey: \"honest_severity\", Label: \"honest severity\", Get: func(q *model.PoCQuality) bool { return q.HonestSeverity }},\n\t{Number: 7, YAMLKey: \"attacker_profitability\", Label: \"attacker profitability\", Get: func(q *model.PoCQuality) bool { return q.AttackerProfitability }, NAAllowed: true, Web3Only: true},\n\t{Number: 8, YAMLKey: \"reproducible\", Label: \"reproducible\", Get: func(q *model.PoCQuality) bool { return q.Reproducible }},\n\t{Number: 9, YAMLKey: \"no_inflation\", Label: \"no inflation\", Get: func(q *model.PoCQuality) bool { return q.NoInflation }},\n\t{Number: 10, YAMLKey: \"operational_path_verified\", Label: \"operational path verified\", Get: func(q *model.PoCQuality) bool { return q.OperationalPathVerified }},\n\t{Number: 11, YAMLKey: \"reachability_verified\", Label: \"reachability verified (exploit reproduced through the product's real entry point / attack surface, traversing the access-control & input-validation layer, not a downstream/library/unit harness that starts past the guard)\", Get: func(q *model.PoCQuality) bool { return q.ReachabilityVerified }, NAAllowed: true, FailHint: \"a library/unit reproducer that starts past the guard and bypasses the ingress access-control layer does not satisfy this rule for a reachability-class finding\"},\n}\n\n// pocqFinding is one in-scope KI \u2014 in scope by severity grade, by being\n// submitted, or both \u2014 whose PoC quality review is missing OR has one or more\n// false/missing boolean rules. The details slice carries the per-rule findings\n// (or the single missing-block finding) so the audit-table row for the KI\n// surfaces every gap in one row rather than N.\ntype pocqFinding struct {\n\tid      string\n\tdetails []string\n}\n\n// Run walks every active KnownIssue, keeps those in the union scope (severity\n// meets the configured min_severity threshold OR the KI is being submitted),\n// then asserts the 11-rule PoC quality gate on that set. See the package\n// comment for policy.\n//\n// Implements: ACC-15\n// Implements: SYS-REQ-260718-SV4N\nfunc (c *pocQualityCheckedCheck) Run(_ context.Context, project *repo.Project, cfg *WorkflowConfig) CheckResult {\n\tcr := CheckResult{Name: c.Name(), Severity: c.Severity(), Advisory: true}\n\tif project == nil {\n\t\tcr.Status = \"pass\"\n\t\tcr.Summary = \"no project loaded\"\n\t\treturn cr\n\t}\n\tall, err := knownissues.ListKnownIssuesIn(evidenceSnapshot(cfg), project.Root)\n\tall = knownIssuesForChecks(all)\n\tif err != nil {\n\t\tcr.Status = \"fail\"\n\t\tcr.Advisory = false\n\t\tcr.Summary = fmt.Sprintf(\"load known issues: %v\", err)\n\t\tMarkOperationalError(&cr, \"the known-issue store could not be loaded\")\n\t\treturn cr\n\t}\n\t// Default threshold: medium (rank 3). Configurable via\n\t// project.checks.poc_quality_checked.min_severity in proof.yaml. The\n\t// sentinel `none` (issue #1012) is the apply-to-all-active option: it drops\n\t// the severity floor entirely so EVERY active KI is in scope regardless of\n\t// grade or submission state, for teams that want the checklist run on the\n\t// whole ledger. The default and every real severity value are unchanged.\n\tminSeverity := \"medium\"\n\tif cfg != nil && cfg.PoCQualityMinSeverity != \"\" {\n\t\tminSeverity = cfg.PoCQualityMinSeverity\n\t}\n\tapplyToAll := pocqApplyToAllActive(minSeverity)\n\tminRank := pocqSeverityOrder[strings.ToLower(minSeverity)]\n\tif minRank == 0 {\n\t\tminRank = pocqSeverityOrder[\"medium\"] // fallback\n\t}\n\t// Web3/DeFi detection (issue #952): on a non-Web3 project the three\n\t// on-chain-only PoC rules (quantitative_impact / untrusted_attacker /\n\t// attacker_profitability) are skipped per rule below, mirroring the\n\t// deployment_tvl_verified auto-skip (ACC-09). An explicit opt-in via\n\t// checks.poc_quality_checked.enabled: true forces the full 11-rule rubric.\n\texplicitWeb3 := isExplicitlyEnabled(cfg, \"poc_quality_checked\")\n\tweb3 := explicitWeb3 || isWeb3Project(project)\n\tvar (\n\t\tfindings      []pocqFinding\n\t\tinScope       int\n\t\tinScopeSubmit int\n\t\tfailedRules   int\n\t\tmissingBlock  int\n\t\t// readsUndeclared is true when the verdict read an input that no\n\t\t// declared cache domain covers: a video_evidence manifest and its\n\t\t// video file. The run then opts out of the audit cache. The Web3\n\t\t// detection is keyed (web3_detection).\n\t\treadsUndeclared bool\n\t)\n\tfor _, ki := range all {\n\t\tif ki == nil || !knownIssueActive(ki) {\n\t\t\tcontinue\n\t\t}\n\t\t// Union scope: severity grade OR reported externally. Either alone is\n\t\t// enough; a KI on both limbs is reported on the severity limb, the\n\t\t// stronger statement about the finding itself. The apply-to-all-active\n\t\t// option (min_severity: none) is a third, superseding limb: every active\n\t\t// KI is in scope regardless of grade or submission.\n\t\tbySeverity := pocqMeetsThreshold(ki, minRank)\n\t\tbyExternal := knownIssueGoesExternal(ki)\n\t\tif !applyToAll && !bySeverity && !byExternal {\n\t\t\tcontinue\n\t\t}\n\t\tinScope++\n\t\tif !bySeverity && byExternal {\n\t\t\tinScopeSubmit++\n\t\t}\n\t\tf := pocqAuditKI(ki, bySeverity, byExternal, minSeverity, applyToAll, web3)\n\t\tif pocqReadsVideoFiles(project, ki) {\n\t\t\treadsUndeclared = true\n\t\t}\n\t\t// Video evidence is part of PoC quality for issue validation when the\n\t\t// project's policy asks for it (project.review.video_evidence.issue_validation).\n\t\tif vd := pocqVideoDetails(project, ki); len(vd) > 0 {\n\t\t\tif f == nil {\n\t\t\t\tf = &pocqFinding{id: ki.ID}\n\t\t\t}\n\t\t\tf.details = append(f.details, vd...)\n\t\t}\n\t\tif f == nil {\n\t\t\tcontinue\n\t\t}\n\t\t// Tally missing-block vs per-rule findings for the metadata block.\n\t\tfor _, d := range f.details {\n\t\t\tif strings.Contains(d, \"no PoC quality review\") {\n\t\t\t\tmissingBlock++\n\t\t\t} else {\n\t\t\t\tfailedRules++\n\t\t\t}\n\t\t}\n\t\tfindings = append(findings, *f)\n\t}\n\tscopeDesc := fmt.Sprintf(\"at or above %s severity, or being submitted\", minSeverity)\n\tif applyToAll {\n\t\tscopeDesc = \"every active known issue (min_severity: none)\"\n\t}\n\tif len(findings) == 0 {\n\t\tcr.Status = \"pass\"\n\t\tif inScope == 0 {\n\t\t\tcr.Summary = fmt.Sprintf(\"no active known issue is %s\", scopeDesc)\n\t\t} else {\n\t\t\tcr.Summary = fmt.Sprintf(\"%d in-scope known issue(s) (%s) all carry a clean 11-rule PoC quality review\", inScope, scopeDesc)\n\t\t}\n\t\tif readsUndeclared {\n\t\t\tcr.Metadata = map[string]any{\"audit_cacheable\": false}\n\t\t}\n\t\treturn cr\n\t}\n\tsort.Slice(findings, func(i, j int) bool { return findings[i].id < findings[j].id })\n\n\t// One IssueID per flagged KI; details carry the per-rule findings so a\n\t// reviewer sees every gap in the row.\n\tcr.Status = \"warn\"\n\tcr.Advisory = false\n\tcr.IssueCount = len(findings)\n\tfor _, f := range findings {\n\t\tcr.IssueIDs = append(cr.IssueIDs, f.id)\n\t\tfor _, d := range f.details {\n\t\t\tcr.Details = append(cr.Details, d)\n\t\t}\n\t}\n\tsort.Strings(cr.Details)\n\tcr.Summary = fmt.Sprintf(\n\t\t\"%d of %d in-scope known issue(s) (%s) have PoC quality gaps (%d missing block, %d failed rule(s)). ACC-15.\",\n\t\tlen(findings), inScope, scopeDesc, missingBlock, failedRules)\n\tcr.Metadata = map[string]any{\n\t\t\"poc_quality_checked\": map[string]any{\n\t\t\t\"in_scope\":     inScope,\n\t\t\t\"min_severity\": minSeverity,\n\t\t\t\"flagged\":      len(findings),\n\t\t\t// in_scope_submitting_only counts the KIs the union added:\n\t\t\t// below the severity threshold, in scope purely because they\n\t\t\t// are being submitted. It is the size of the hole this check\n\t\t\t// used to leave open.\n\t\t\t\"in_scope_submitting_only\": inScopeSubmit,\n\t\t\t\"missing_block\":            missingBlock,\n\t\t\t\"failed_rule_inc\":          failedRules,\n\t\t\t\"apply_to_all_active\":      applyToAll,\n\t\t},\n\t}\n\tif readsUndeclared {\n\t\tcr.Metadata[\"audit_cacheable\"] = false\n\t}\n\treturn cr\n}\n\n// pocqReadsVideoFiles reports whether pocqVideoDetails opens files for ki: the\n// issue-validation video policy is set and ki lists video_evidence manifests.\n//\n// Implements: SYS-REQ-1085\nfunc pocqReadsVideoFiles(project *repo.Project, ki *model.KnownIssue) bool {\n"
        },
        {
          "startLine": 350,
          "endLine": 565,
          "text": "var pocqSeverityOrder = map[string]int{\n\t\"informational\": 1,\n\t\"low\":           2,\n\t\"medium\":        3,\n\t\"high\":          4,\n\t\"critical\":      5,\n}\n\n// pocqSeverityRank returns the numeric rank of a severity string, defaulting\n// to 0 for unknown/empty values. If any of the KI's severity fields\n// (severity, code_severity, bounty_severity) meets the threshold, the KI is\n// in scope. This ensures that a finding graded \"low bounty / high code\" is\n// still checked (the code_severity indicates real risk).\n// Implements: SYS-REQ-260718-SV4N\nfunc pocqSeverityRank(s string) int {\n\treturn pocqSeverityOrder[strings.ToLower(strings.TrimSpace(s))]\n}\n\n// pocqApplyToAllActive reports whether the configured min_severity selects the\n// apply-to-all-active mode (issue #1012): the sentinel `none` (also accepting\n// the `all` / `all-active` aliases so the option is discoverable) drops the\n// severity floor so every active KI is in scope regardless of grade or\n// submission. Any real severity value (or empty) returns false, preserving the\n// default union scope.\n// Implements: SYS-REQ-260718-SV4N\nfunc pocqApplyToAllActive(minSeverity string) bool {\n\tswitch strings.ToLower(strings.TrimSpace(minSeverity)) {\n\tcase \"none\", \"all\", \"all-active\":\n\t\treturn true\n\t}\n\treturn false\n}\n\n// pocqMeetsThreshold reports whether ANY of the KI's severity fields meets\n// or exceeds the configured minimum severity rank.\n// Implements: SYS-REQ-260718-SV4N\nfunc pocqMeetsThreshold(ki *model.KnownIssue, minRank int) bool {\n\tif ki == nil {\n\t\treturn false\n\t}\n\treturn pocqSeverityRank(string(ki.Severity)) >= minRank ||\n\t\tpocqSeverityRank(string(ki.CodeSeverity)) >= minRank ||\n\t\tpocqSeverityRank(string(ki.BountySeverity)) >= minRank\n}\n\n// pocqNAJustification returns the trimmed not_applicable justification recorded\n// for a rule yaml_key on a PoC quality block, or \"\" when none is present. A\n// blank/whitespace reason counts as absent \u2014 an N/A declaration is only honored\n// when it carries an actual reason.\n//\n// Implements: ACC-15\n// Implements: SYS-REQ-260718-SV4N\nfunc pocqNAJustification(q *model.PoCQuality, yamlKey string) string {\n\tif q == nil || len(q.NotApplicable) == 0 {\n\t\treturn \"\"\n\t}\n\tfor k, v := range q.NotApplicable {\n\t\tif strings.EqualFold(strings.TrimSpace(k), yamlKey) {\n\t\t\treturn strings.TrimSpace(v)\n\t\t}\n\t}\n\treturn \"\"\n}\n\n// KnownIssueSecurityClass lists why ki is a security/exploit-class finding:\n// a cve_surface other than none or unset, a CVSS vector, a security token\n// in its name or classification (matchedSecurityTokens \u2014 the matcher\n// security_relevance_consistent uses), an attacker_input, or a sanitizer\n// other than \"none\". Empty means the KI is plainly\n// non-security. A reviewer-stamped security_relevance_justification does not\n// change it: the justification silences the naming check, it does not make\n// an exploit-class finding's reachability optional.\n//\n// Implements: ACC-15\n// Implements: SW-REQ-261011-9R0J\nfunc KnownIssueSecurityClass(ki *model.KnownIssue) []string {\n\tif ki == nil {\n\t\treturn nil\n\t}\n\tvar why []string\n\tif !cveSurfaceIsNone(ki.CVESurface) {\n\t\twhy = append(why, fmt.Sprintf(\"cve_surface %s\", strings.TrimSpace(string(ki.CVESurface))))\n\t}\n\tif strings.TrimSpace(ki.CVSS) != \"\" {\n\t\twhy = append(why, \"a CVSS vector\")\n\t}\n\tif tok := matchedSecurityTokens(ki); len(tok) > 0 {\n\t\twhy = append(why, \"security-named (\"+strings.Join(tok, \",\")+\")\")\n\t}\n\t// An attacker-controlled input, or a sanitizer on the path, is an attack\n\t// surface whatever the KI's name and cve_surface say.\n\tif strings.TrimSpace(ki.AttackerInput) != \"\" {\n\t\twhy = append(why, \"an attacker_input\")\n\t}\n\tif s := strings.ToLower(strings.TrimSpace(ki.Sanitizer)); s != \"\" && s != \"none\" {\n\t\twhy = append(why, \"a sanitizer\")\n\t}\n\treturn why\n}\n\n// pocqNARefusedFor is the gap line when an N/A-eligible rule r declared\n// not_applicable on ki may not be N/A on it, else \"\". reachability_verified\n// is N/A only on a plainly non-security KI (KnownIssueSecurityClass empty):\n// for a security/exploit-class finding the exploit must be shown reaching\n// the code through the real entry point.\n//\n// Implements: ACC-15\n// Implements: SW-REQ-261011-9R0J\nfunc pocqNARefusedFor(ki *model.KnownIssue, r pocqRule) string {\n\tif r.YAMLKey != \"reachability_verified\" {\n\t\treturn \"\"\n\t}\n\twhy := KnownIssueSecurityClass(ki)\n\tif len(why) == 0 {\n\t\treturn \"\"\n\t}\n\treturn fmt.Sprintf(\n\t\t\"KI %s: PoC quality rule %d (%s / %q) marked not_applicable but the KI is security-class (%s); reachability_verified is N/A only for a plainly non-security finding (cve_surface none or unset, no CVSS vector, no attacker_input or sanitizer, not security-named). ACC-15.\",\n\t\tki.ID, r.Number, r.Label, r.YAMLKey, strings.Join(why, \"; \"))\n}\n\n// pocqAuditKI returns a pocqFinding for a single in-scope KI, or nil if the\n// KI carries a `poc_quality` block with all applicable booleans true. The\n// finding's details list is the canonical, order-stable list of gaps: a single\n// missing-block entry when `poc_quality` is nil, otherwise one entry per\n// false/missing rule in the rule-number order of pocqRules.\n//\n// bySeverity / byExternal / applyToAll name WHICH limb put this KI in scope, so\n// the missing-block message tells the author what to change: a severity re-grade\n// only helps on the severity limb, is no remedy at all for a KI in scope because\n// it is being submitted, and none of the levers help a KI pulled in purely by\n// the apply-to-all-active option.\n//\n// Implements: ACC-15\n// Implements: SYS-REQ-260718-SV4N\n// Implements: SYS-REQ-260720-FK2M\n// Implements: SW-REQ-261011-9R0J\nfunc pocqAuditKI(ki *model.KnownIssue, bySeverity, byExternal bool, minSeverity string, applyToAll, isWeb3 bool) *pocqFinding {\n\tif ki == nil {\n\t\treturn nil\n\t}\n\tif ki.PoCQuality == nil {\n\t\treason := \"is an active known issue (poc_quality_checked min_severity: none \u2014 apply-to-all-active)\"\n\t\tif bySeverity {\n\t\t\treason = fmt.Sprintf(\"is at or above the min_severity threshold (%s)\", minSeverity)\n\t\t} else if byExternal {\n\t\t\treason = \"is being submitted (submission block or `submit` in disposition)\"\n\t\t}\n\t\treturn &pocqFinding{\n\t\t\tid: ki.ID,\n\t\t\tdetails: []string{\n\t\t\t\tfmt.Sprintf(\"KI %s %s but has no PoC quality review (expected poc_quality block with 11 boolean rules). ACC-15.\", ki.ID, reason),\n\t\t\t},\n\t\t}\n\t}\n\tvar gaps []string\n\tfor _, r := range pocqRules {\n\t\t// Web3-only rules (quantitative_impact / untrusted_attacker /\n\t\t// attacker_profitability) are categorically inapplicable to a non-Web3\n\t\t// project \u2014 do not require them there. The eight general PoC-quality\n\t\t// rules still apply. Issue #952.\n\t\tif r.Web3Only && !isWeb3 {\n\t\t\tcontinue\n\t\t}\n\t\tif r.Get(ki.PoCQuality) {\n\t\t\tcontinue\n\t\t}\n\t\t// A rule may be declared not_applicable to this finding's threat model,\n\t\t// but ONLY when the rule is N/A-eligible AND a non-empty justification is\n\t\t// recorded. This is honest for e.g. untrusted_attacker on a semi-trusted\n\t\t// privileged-role finding, or reachability_verified on a local-behavioral\n\t\t// (non-reachability) correctness defect, and is what dissolves a standing\n\t\t// waiver \u2014 but it must never let an integrity-core rule (reproducible,\n\t\t// no_inflation, honest_severity, \u2026) slip, and never accept a bare N/A with\n\t\t// no reason.\n\t\tif reason := pocqNAJustification(ki.PoCQuality, r.YAMLKey); reason != \"\" {\n\t\t\tif r.NAAllowed {\n\t\t\t\t// reachability_verified is never N/A for a security/exploit-class\n\t\t\t\t// finding: the N/A is honored only on a plainly non-security KI.\n\t\t\t\tif why := pocqNARefusedFor(ki, r); why != \"\" {\n\t\t\t\t\tgaps = append(gaps, why)\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t// N/A claimed on a rule that must always hold \u2192 still a gap, and flag\n\t\t\t// the misuse so it cannot silently pass.\n\t\t\tgaps = append(gaps, fmt.Sprintf(\n\t\t\t\t\"KI %s: PoC quality rule %d (%s / %q) marked not_applicable but this rule is integrity-core and cannot be N/A. ACC-15.\",\n\t\t\t\tki.ID, r.Number, r.Label, r.YAMLKey))\n\t\t\tcontinue\n\t\t}\n\t\tmsg := fmt.Sprintf(\n\t\t\t\"KI %s: PoC quality rule %d (%s / %q) not satisfied\",\n\t\t\tki.ID, r.Number, r.Label, r.YAMLKey)\n\t\tif r.FailHint != \"\" {\n\t\t\tmsg += \"; \" + r.FailHint\n\t\t}\n\t\tgaps = append(gaps, msg+\". ACC-15.\")\n\t}\n\tif len(gaps) == 0 {\n\t\treturn nil\n\t}\n\treturn &pocqFinding{id: ki.ID, details: gaps}\n}\n\n// GuidanceFor surfaces the policy + remediation for the audit guidance pane.\n// Implements: ACC-15\n// Implements: SYS-REQ-260718-SV4N\nfunc (c *pocQualityCheckedCheck) GuidanceFor(result CheckResult) *Guidance {\n\treturn &Guidance{\n\t\tWhat: result.Summary,\n\t\tWhy: \"Two kinds of KI need a quality-reviewed PoC, and ACC-15 scopes to the union of \" +\n\t\t\t\"both. A KI graded at or above the configured min_severity (default: medium) \" +\n\t\t\t\"asserts an impact worth acting on. A KI that is being submitted \u2014 already filed \" +\n\t\t\t\"(a `submission` block) or marked for filing (`submit` in `disposition`) \u2014 is going \" +\n\t\t\t\"in front of a judging committee, which scrutinizes the PoC regardless of the grade \" +\n"
        },
        {
          "startLine": 570,
          "endLine": 618,
          "text": "\t\t\t\"reproducibility; no inflation; operational path verification; reachability verified: \" +\n\t\t\t\"the exploit reproduces through the real entry point past the ingress access-control \" +\n\t\t\t\"layer, not a library/unit harness that starts past the guard) the finding rests on the claim alone. \" +\n\t\t\t\"This is the classic shape that \" +\n\t\t\t\"gets rejected at triage (SEC-28 was the case where Rule 10 caught a PoC that needed \" +\n\t\t\t\"trusted-actor deviation). The submitting limb closes a real hole: a low-severity \" +\n\t\t\t\"filing used to be checked by nobody, because ACC-15 skipped it on grade and \" +\n\t\t\t\"submission_validated (ACC-11) only confirms the poc_quality block EXISTS, never \" +\n\t\t\t\"that its booleans are all true. Both checks now read the same submitting predicate. \" +\n\t\t\t\"The check does not independently verify the PoC (that is manual) and never blocks \" +\n\t\t\t\"\u2014 it only warns.\",\n\t\tHow: \"For each flagged KnownIssue, choose ONE remediation:\\n\" +\n\t\t\t\"  1. Run the 11-rule PoC quality checklist (the ground-the-claim path): set\\n\" +\n\t\t\t\"     poc_quality.real_infrastructure / quantitative_impact / control_test /\\n\" +\n\t\t\t\"     untrusted_attacker / current_deployment_relevance / honest_severity /\\n\" +\n\t\t\t\"     attacker_profitability / reproducible / no_inflation /\\n\" +\n\t\t\t\"     operational_path_verified / reachability_verified ALL to true, with a Notes\\n\" +\n\t\t\t\"     line citing where each was verified. reachability_verified (Rule 11) means\\n\" +\n\t\t\t\"     the exploit reproduces through the product's real entry point past the ingress\\n\" +\n\t\t\t\"     access-control & input-validation layer, not a downstream/library/unit harness\\n\" +\n\t\t\t\"     that starts past the guard; it is N/A-eligible ONLY for a local-behavioral /\\n\" +\n\t\t\t\"     non-reachability finding via poc_quality.not_applicable.reachability_verified\\n\" +\n\t\t\t\"     with a reason (a bare N/A is ignored), and never on a security-class KI\\n\" +\n\t\t\t\"     (a cve_surface other than none, a CVSS vector, an attacker_input, a\\n\" +\n\t\t\t\"     sanitizer, or a security-named KI).\\n\" +\n\t\t\t\"     Pay particular attention to control_test (Rule 3) and\\n\" +\n\t\t\t\"     operational_path_verified (Rule 10) \u2014 both require a NEGATIVE control test\\n\" +\n\t\t\t\"     asserting the safe / intended path does NOT trigger the impact.\\n\" +\n\t\t\t\"  2. Correct the severity grade, if and only if the grade is genuinely wrong:\\n\" +\n\t\t\t\"     a KI in scope ONLY on the severity limb leaves scope when ALL of severity /\\n\" +\n\t\t\t\"     code_severity / bounty_severity fall below min_severity. Only do this with a\\n\" +\n\t\t\t\"     severity_basis that justifies the lower grade \u2014 downgrading to silence the\\n\" +\n\t\t\t\"     check is severity dishonesty. Alternatively raise\\n\" +\n\t\t\t\"     project.checks.poc_quality_checked.min_severity in proof.yaml if the whole\\n\" +\n\t\t\t\"     project's threshold is set too low (or set it to `none` to run the checklist\\n\" +\n\t\t\t\"     on every active KI regardless of grade or submission).\\n\" +\n\t\t\t\"A KI in scope on the SUBMITTING limb is not helped by either: re-grading does not\\n\" +\n\t\t\t\"remove it, and once a `submission` block records an actual filing, rewording\\n\" +\n\t\t\t\"`disposition` does not un-file it. Run the checklist, or withdraw the submission.\\n\" +\n\t\t\t\"Inbound source_report and reference-only legacy candidate provenance do not\\n\" +\n\t\t\t\"count as disclosure. Migrate recognized legacy provenance with: proof\\n\" +\n\t\t\t\"known-issue edit <KI-ID> --set-source-report <original-reference>. Actual\\n\" +\n\t\t\t\"disclosures and the independent severity threshold still apply.\\n\" +\n\t\t\t\"Re-run: proof audit --check poc_quality_checked.\\n\" +\n\t\t\t\"Severity is WARNING (advisory, non-blocking) \u2014 adopting projects surface\\n\" +\n\t\t\t\"pre-existing unreviewed submissions as tracked debt rather than surprise-blocking\\n\" +\n\t\t\t\"errors.\",\n\t\tDocs: \"docs/help/checks/poc_quality_checked.md\",\n\t}\n"
        }
      ]
    },
    {
      "path": "pkg/model/known_issue.go",
      "sha256": "1df1cc603cd6ad0b9365fc8c9afc92b8d206e9bddbc3fd3aed9a3c9dd9102a08",
      "bytes": 107964,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 865,
          "endLine": 957,
          "text": "// `poc_quality_checked` (StageDocument, warning) requires every active KI whose\n// `disposition` contains \"submit\" to carry this block with all 11 booleans true\n// \u2014 a submitted finding shall not rest on a PoC that has not passed the quality\n// checklist. The checklist is the machine-readable mirror of\n// POC-QUALITY-CHECKLIST.md:\n//\n//  1. real_infrastructure          \u2014 Exercises the real running service over\n//     its real protocol / entry point (an HTTP request to the live server, a\n//     transaction against the deployed contract), not an SDK/unit call that\n//     invokes internal handlers directly.\n//  2. quantitative_impact          \u2014 Shows token balances before/after\n//  3. control_test                 \u2014 Includes a control test proving correct\n//     behavior under intended usage\n//  4. untrusted_attacker           \u2014 Attacker is a separate signer with no\n//     privileged role\n//  5. current_deployment_relevance \u2014 The trigger is reachable by the modeled\n//     attacker through the real entry point past access controls (verified\n//     end-to-end), not merely that the vulnerable code path exists in the\n//     current deployment.\n//  6. honest_severity              \u2014 PoC test names match demonstrated impact\n//  7. attacker_profitability       \u2014 Attacker cost vs revenue analyzed\n//  8. reproducible                 \u2014 Runs with a single command in <5 min\n//  9. no_inflation                 \u2014 Severity in submission matches PoC\n//  10. operational_path_verified   \u2014 Safe/intended path tested (the Rule 10\n//     that caught SEC-28)\n//  11. reachability_verified       \u2014 The exploit is reproduced through the\n//     product's real entry point / attack surface, traversing the\n//     access-control & input-validation layer the modeled attacker faces \u2014\n//     not a downstream/library/unit harness that starts past the guard. This\n//     is the universal reachability rule: none of the other ten requires the\n//     exploit to reproduce past the ingress access-control layer, which is the\n//     gap it closes.\n//\n// `Notes` carries free-form context the author wants surfaced alongside the\n// checklist (e.g. why a rule is waivable, link to the test, etc.). Optional\n// pointer (nil = no PoC quality review recorded) so KIs that do not need this\n// load and round-trip unchanged.\n//\n// Implements: ACC-15 (poc_quality_checked).\ntype PoCQuality struct {\n\tRealInfrastructure         bool   `yaml:\"real_infrastructure\" json:\"real_infrastructure\"`\n\tQuantitativeImpact         bool   `yaml:\"quantitative_impact\" json:\"quantitative_impact\"`\n\tControlTest                bool   `yaml:\"control_test\" json:\"control_test\"`\n\tUntrustedAttacker          bool   `yaml:\"untrusted_attacker\" json:\"untrusted_attacker\"`\n\tCurrentDeploymentRelevance bool   `yaml:\"current_deployment_relevance\" json:\"current_deployment_relevance\"`\n\tHonestSeverity             bool   `yaml:\"honest_severity\" json:\"honest_severity\"`\n\tAttackerProfitability      bool   `yaml:\"attacker_profitability\" json:\"attacker_profitability\"`\n\tReproducible               bool   `yaml:\"reproducible\" json:\"reproducible\"`\n\tNoInflation                bool   `yaml:\"no_inflation\" json:\"no_inflation\"`\n\tOperationalPathVerified    bool   `yaml:\"operational_path_verified\" json:\"operational_path_verified\"`\n\tReachabilityVerified       bool   `yaml:\"reachability_verified\" json:\"reachability_verified\"`\n\tNotes                      string `yaml:\"notes,omitempty\" json:\"notes,omitempty\"`\n\n\t// NotApplicable records rules that are definitionally N/A to THIS finding's\n\t// threat model, each keyed by rule yaml_key with a REQUIRED non-empty\n\t// justification. Two families of rule may be N/A:\n\t//\n\t//   - attacker-trust-model rules (untrusted_attacker, attacker_profitability):\n\t//     e.g. a semi-trusted privileged-role finding whose \"attacker\" is a\n\t//     trusted signer makes the unprivileged-attacker rule definitionally N/A \u2014\n\t//     marking it here (with a reason) is honest, where forcing the boolean\n\t//     true would lie and leaving it false would force a standing waiver.\n\t//   - reachability_verified, but ONLY for a local-behavioral / non-reachability\n\t//     finding: a correctness defect with no trust-boundary crossing (e.g. a\n\t//     pure function that miscomputes for an input any caller may already pass)\n\t//     has no ingress access-control layer to traverse, so end-to-end\n\t//     reachability is definitionally N/A. It must NEVER be N/A for a\n\t//     security/exploit-class finding \u2014 there the whole question is whether the\n\t//     modeled attacker can reach the sink \u2014 so the justification has to state\n\t//     WHY the finding is non-reachability-class.\n\t//\n\t// Integrity-core rules (reproducible, no_inflation, honest_severity, real\n\t// infrastructure, control_test, operational_path_verified, quantitative_impact,\n\t// current_deployment_relevance) are NEVER N/A-eligible; listing them here is\n\t// ignored and still fails the gate. An entry with an empty reason is ignored.\n\tNotApplicable map[string]string `yaml:\"not_applicable,omitempty\" json:\"not_applicable,omitempty\"`\n}\n\n// OnChainStatus records the deployment-grounded verification state for a\n// KnownIssue whose severity claim rests on real production impact (ACC-09).\n// The `deployment_tvl_verified` audit check (StageDocument, warning) requires\n// every high/critical-severity KI to cite verified production TVL via this\n// block \u2014 a headline severity that names production-scale impact shall not\n// rest on the claim alone.\n//\n//   - `production_tvl` \u2014 whether the deployment TVL cited for this KI has been\n//     independently verified (operator judgment today; on-chain verification\n//     is a future enhancement). The audit check gates high/critical severity\n//     on this being `true`.\n//   - `tvl`            \u2014 free-form citation of the verified TVL figure/source\n//     (e.g. a DeFiLlama URL, a snapshot, an on-chain call hash).\n//   - `deployed_version` \u2014 the contract/code version the TVL was verified\n//     against, so a later deploy that changes the surface re-trips the gate.\n"
        },
        {
          "startLine": 1409,
          "endLine": 1508,
          "text": "// ACC-15 (poc_quality_checked).\n// Implements: SYS-REQ-260720-FK2M\nfunc (k *KnownIssue) ExternalReports() []ExternalReport {\n\tif k == nil {\n\t\treturn nil\n\t}\n\tvar out []ExternalReport\n\tif k.UpstreamReport != nil && !k.HasLegacyCandidateSourceReport() {\n\t\tout = append(out, k.UpstreamReport.AsExternalReport())\n\t}\n\tif k.Submission != nil {\n\t\tout = append(out, k.Submission.AsExternalReport())\n\t}\n\treturn out\n}\n\n// HasExternalReport reports whether this finding has left the ledger at all \u2014\n// disclosed to a vendor, filed to a contest, or both. Presence of the block is\n// the signal: an incomplete block still means somebody sent this somewhere,\n// except for source-only legacy candidate provenance.\n//\n// Implements: ACC-11 (submission_validated), ACC-15 (poc_quality_checked).\n// Implements: SYS-REQ-260720-FK2M\nfunc (k *KnownIssue) HasExternalReport() bool {\n\treturn k != nil && (k.Submission != nil || (k.UpstreamReport != nil && !k.HasLegacyCandidateSourceReport()))\n}\n\n// SourceOnlyReference returns a legacy source locator only when the block has\n// no disclosure metadata. Reference and tracker_url may hold the same value;\n// distinct locators are ambiguous and must not be discarded during migration.\n// This shape alone does not establish candidate origin or exclude disclosure.\nfunc (u *UpstreamReport) SourceOnlyReference() string {\n\tif u == nil || strings.TrimSpace(u.Vendor) != \"\" || strings.TrimSpace(u.Channel) != \"\" ||\n\t\tstrings.TrimSpace(u.ReportedAt) != \"\" || strings.TrimSpace(u.ReportedBy) != \"\" ||\n\t\tu.Response != nil || len(u.Rechecks) != 0 || u.Schedule != nil {\n\t\treturn \"\"\n\t}\n\tref, tracker := strings.TrimSpace(u.Reference), strings.TrimSpace(u.TrackerURL)\n\tif ref != \"\" && tracker != \"\" && ref != tracker {\n\t\treturn \"\"\n\t}\n\tif ref != \"\" {\n\t\treturn u.Reference\n\t}\n\treturn u.TrackerURL\n}\n\n// HasLegacyCandidateSourceReport recognizes the old CLI/docs' inbound provenance:\n// a nonblank upstream reference or tracker URL with NO other metadata, on a current\n// candidate or a record whose history explicitly establishes candidate origin.\n// A venue, date, reporter, response, recheck or schedule keeps the block\n// external, even when the record began as a candidate. Missing history alone\n// never establishes candidate origin for a promoted record.\nfunc (k *KnownIssue) HasLegacyCandidateSourceReport() bool {\n\tif k == nil || strings.TrimSpace(k.UpstreamReport.SourceOnlyReference()) == \"\" {\n\t\treturn false\n\t}\n\t// Once provenance is explicit, a different locator belongs to the\n\t// disclosure block (for example an anchor added during promotion).\n\tif source := strings.TrimSpace(k.SourceReport); source != \"\" && source != strings.TrimSpace(k.UpstreamReport.SourceOnlyReference()) {\n\t\treturn false\n\t}\n\tif k.Status == KnownIssueStatusCandidate {\n\t\treturn true\n\t}\n\tfor _, h := range k.History {\n\t\taction := strings.ToLower(strings.TrimSpace(h.Action))\n\t\tif action != \"created\" && action != \"edit\" {\n\t\t\tcontinue\n\t\t}\n\t\tdetail := strings.ToLower(strings.TrimSpace(h.Detail))\n\t\t// The prose marker is the original documented candidate YAML example.\n\t\tif action == \"created\" && (detail == \"candidate\" || detail == \"status=candidate\" || strings.HasPrefix(detail, \"candidate from source report;\")) {\n\t\t\treturn true\n\t\t}\n\t\t// Transition tokens are a structured prefix, before all free-text edit\n\t\t// values (which can themselves contain spaces, commas and marker text).\n\t\tfields := strings.SplitN(detail, \",\", 3)\n\t\tif action == \"edit\" && len(fields) >= 2 && fields[0] == \"from-status=candidate\" {\n\t\t\tswitch fields[1] {\n\t\t\tcase \"set-status=open\", \"set-status=reviewed\", \"set-status=withdrawn\":\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t}\n\treturn false\n}\n\n// SourceReportReference returns inbound provenance, preferring source_report\n// over the source-only legacy candidate shape. It never reads disclosure\n// metadata as provenance and does not mutate the persisted record.\nfunc (k *KnownIssue) SourceReportReference() string {\n\tif k == nil {\n\t\treturn \"\"\n\t}\n\tif strings.TrimSpace(k.SourceReport) != \"\" {\n\t\treturn k.SourceReport\n\t}\n\tif k.HasLegacyCandidateSourceReport() {\n\t\treturn k.UpstreamReport.SourceOnlyReference()\n"
        }
      ]
    },
    {
      "path": "pkg/model/relay.go",
      "sha256": "3cbf71c8fb2dfbb48b174f98ae293879c76754ca8fc61449d4df96958b43fe4e",
      "bytes": 8435,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 178,
          "endLine": 190,
          "text": "// KnownIssueStatesDefect reports whether ki states a defect that is in\n// force: it is open or reviewed (an unset status reads as open). A\n// candidate is not confirmed, and a fixed or withdrawn issue no longer\n// states a defect.\n//\n// Implements: SYS-REQ-261018-GA9Y, SYS-REQ-1260\nfunc KnownIssueStatesDefect(ki *KnownIssue) bool {\n\tif ki == nil {\n\t\treturn false\n\t}\n\treturn ki.Status == KnownIssueStatusOpen || ki.Status == KnownIssueStatusReviewed || ki.Status == \"\"\n}\n\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/known_issue_evidence_store.go",
      "sha256": "7dbc2d16e29de11d8f52ed947cb11ae858213921523d07c63b01be4feaaeb84f",
      "bytes": 2699,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 61,
          "endLine": 74,
          "text": "// knownIssuesForChecks excludes reports that have not yet been reproduced from\n// workflow gates. Their optional evidence and severity claims cannot establish\n// a finding, an exemption, or a closure until the record is promoted.\nfunc knownIssuesForChecks(issues []*model.KnownIssue) []*model.KnownIssue {\n\tfiltered := make([]*model.KnownIssue, 0, len(issues))\n\tfor _, ki := range issues {\n\t\tif ki != nil && ki.Status != model.KnownIssueStatusCandidate {\n\t\t\tfiltered = append(filtered, ki)\n\t\t}\n\t}\n\treturn filtered\n}\n\n// hasConfirmedKnownIssueLink keeps reference identity separate from gate credit.\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/known_issue_policy.go",
      "sha256": "a3e14f5b8ae7d15da8e74ca3fde01c5286c91360adc01affd96d1704b88edf3a",
      "bytes": 11672,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 229,
          "endLine": 279,
          "text": "// to be leaving \u2014 the ledger for an outside party. It is THE answer to \"has\n// this finding been reported externally?\"; there is no second one.\n//\n// SHARED POLICY \u2014 do not duplicate. `submission_validated` (ACC-11) uses it as\n// its entire trigger, and `poc_quality_checked` (ACC-15) unions it with its\n// severity threshold. There must not be a second one: ACC-11 and ACC-15\n// previously drifted apart because each carried its own copy, and a KI could\n// be in scope for one gate's vocabulary and out of scope for the other's with\n// nothing to catch it.\n//\n// Two signals, either of which is sufficient:\n//\n//  1. ANY external report block is present \u2014 `upstream_report` (a vendor\n//     disclosure) or `submission` (a contest / bounty filing), via\n//     model.KnownIssue.HasExternalReport. This is EXTERNAL REALITY: the\n//     finding was actually sent somewhere. It is the stronger signal and it\n//     outranks whatever the prose says, which is the point: a finding can be\n//     filed, format-accepted, and live on a public tracker while\n//     `disposition` still reads \"investigating\".\n//\n//     BOTH blocks count, deliberately. The pre-filing gates ask whether the\n//     finding is real, whether the behavior is intended, whether master\n//     already fixed it, and whether the PoC holds up. Every one of those\n//     questions is exactly as load-bearing when the finding is emailed to a\n//     vendor as when it is filed to a contest \u2014 sending an unvalidated\n//     finding wastes somebody else's time either way. Reading only\n//     `submission` left every disclosed KI invisible to the gate.\n//\n//  2. `disposition` contains the case-insensitive substring \"submit\". This is\n//     STATED INTENT, and it is kept because it is the only signal available\n//     BEFORE anything is sent \u2014 the window in which the pre-filing gates most\n//     need to fire. It matches \"submitting\", \"submit\", \"resubmit\",\n//     \"pre-submit review\".\n//\n// A nil KI returns false, as does the common case of an empty disposition and\n// no external report block. Inbound source_report and reference-only legacy\n// candidate provenance are excluded by the model predicate.\n//\n// Implements: ACC-11\n// Implements: ACC-15\n// Implements: SYS-REQ-260718-D7DN\n// Implements: SYS-REQ-260720-FK2M\nfunc knownIssueGoesExternal(ki *model.KnownIssue) bool {\n\tif ki == nil {\n\t\treturn false\n\t}\n\tif ki.HasExternalReport() {\n\t\treturn true\n\t}\n\treturn strings.Contains(strings.ToLower(ki.Disposition), \"submit\")\n}\n"
        }
      ]
    },
    {
      "path": "pkg/model/requirement.go",
      "sha256": "26711a030ec2f87f1de038d4bb8f9b05d21e7d42008cfdf078b19823d0f37e6e",
      "bytes": 317519,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 3468,
          "endLine": 3476,
          "text": "\tDifferentialConformance DifferentialConformanceCheckConfig `yaml:\"differential_conformance,omitempty\" json:\"differential_conformance,omitempty\"`\n\t// PoCQualityChecked (ACC-15) gates the poc_quality_checked audit check.\n\t// MinSeverity overrides the default severity threshold (\"medium\"); a KI\n\t// is in scope when ANY of its severity / code_severity / bounty_severity\n\t// fields meets or exceeds MinSeverity. Accepted values:\n\t// informational | low | medium | high | critical. Empty/invalid falls\n\t// back to \"medium\".\n\tPoCQualityChecked PoCQualityCheckedCheckConfig `yaml:\"poc_quality_checked,omitempty\" json:\"poc_quality_checked,omitempty\"`\n\t// DeploymentTvlVerified (ACC-09) gates the deployment_tvl_verified audit\n"
        },
        {
          "startLine": 3572,
          "endLine": 3584,
          "text": "// PoCQualityCheckedCheckConfig (ACC-15) preserves poc_quality_checked policy\n// from project.checks.poc_quality_checked in proof.yaml. MinSeverity is the\n// severity floor at or above which an active KnownIssue is in scope; the\n// default is \"medium\" when unset or unrecognized.\ntype PoCQualityCheckedCheckConfig struct {\n\tMinSeverity string `yaml:\"min_severity,omitempty\" json:\"min_severity,omitempty\"`\n\t// Enabled is a tri-state pointer (issue #952): unset means auto-detect\n\t// (the three Web3-only PoC rules are enforced only on Web3/DeFi projects),\n\t// while an explicit true forces the full 10-rule rubric on any project.\n\tEnabled *bool `yaml:\"enabled,omitempty\" json:\"enabled,omitempty\"`\n}\n\n// DeploymentTvlVerifiedCheckConfig (ACC-09) preserves deployment_tvl_verified\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/config.go",
      "sha256": "257d57877f43018cf8247b9f636b95fbdf683e82583376d31ef090d5b88388d6",
      "bytes": 54387,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 890,
          "endLine": 1007,
          "text": "\n// IsCheckListedDisabled reports whether the project-level\n// `project.checks.disabled: [...]` list names the check. It is the narrower of\n// the two opt-out mechanisms; IsCheckDisabledByPolicy is the decision, this is\n// only used to word the resulting skip summary.\n// Implements: SYS-REQ-260720-FEDP\nfunc IsCheckListedDisabled(checks model.ProjectChecksConfig, checkName string) bool {\n\tfor _, name := range checks.Disabled {\n\t\tif name == checkName {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\n// Implements: SYS-REQ-260720-FEDP\nfunc IsCheckDisabledByPolicy(checks model.ProjectChecksConfig, checkName string) bool {\n\tif IsCheckListedDisabled(checks, checkName) {\n\t\treturn true\n\t}\n\t// Per-check explicit `enabled: false` opt-out for default-on checks\n\t// that carry a tri-state Enabled pointer. Without this gate the\n\t// per-check config slot is silently ignored \u2014 issue #454 surfaced\n\t// the bug for property_based_test_coverage: setting\n\t//   project.checks.property_based_test_coverage:\n\t//     enabled: false\n\t// did NOT suppress the check, leaving auditors unable to opt out of\n\t// a check that emits misleading output on a corpus the enumerator\n\t// cannot see.\n\t//\n\t// Every check with a tri-state `enabled:` key goes through this arm,\n\t// including the ones that ALSO short-circuit inside their own Run()\n\t// (CheckManagesOwnEnablement). One user intent \u2014 \"do not run this check\" \u2014\n\t// must produce one status, and a check that evaluated nothing reports\n\t// `skip`, never `pass`: `pass` asserts \"I checked this and it is fine\",\n\t// which a switched-off check has not established. The check-specific\n\t// wording those checks used to carry is not lost \u2014 it lives in the\n\t// descriptor catalog (CheckDisabledSummary) and is emitted with the skip.\n\tif isCheckExplicitlyDisabled(checks, checkName) {\n\t\treturn true\n\t}\n\t// Disabled-by-default checks (e.g. property_fixtures_exist,\n\t// flip_fixtures_exist, fixture_staleness_clean,\n\t// code_signal_obligations_reviewed) are skipped\n\t// unless the project explicitly opts in via\n\t// project.checks.<check>.enabled = true.\n\tif IsCheckDisabledByDefault(checkName) && !isCheckExplicitlyEnabled(checks, checkName) {\n\t\treturn true\n\t}\n\treturn false\n}\n\n// checkEnabledOverride reports the project's explicit `enabled:` setting for a\n// check, resolved GENERICALLY: the check id is matched against the yaml tags of\n// model.ProjectChecksConfig and the matching policy struct's `Enabled` field is\n// read. Hand-written switches over check ids were the previous mechanism and\n// they drifted \u2014 a check would document `proof config set\n// project.checks.<id>.enabled true` in its own help output while the switch\n// never listed it, so the setting did nothing.\n//\n// The second return value distinguishes \"the project said something\" from\n// \"unset\":\n//   - Enabled *bool (tri-state, default-on checks): nil => unset; otherwise the\n//     pointee is the explicit value.\n//   - Enabled bool (opt-in checks): true => explicit opt-in; false is the zero\n//     value and therefore indistinguishable from unset, so it is NOT explicit.\n//\n// Implements: SYS-REQ-260720-FEDP\nfunc checkEnabledOverride(checks model.ProjectChecksConfig, checkName string) (bool, bool) {\n\tv := reflect.ValueOf(checks)\n\tt := v.Type()\n\tfor i := 0; i < t.NumField(); i++ {\n\t\ttag := t.Field(i).Tag.Get(\"yaml\")\n\t\tif strings.Split(tag, \",\")[0] != checkName {\n\t\t\tcontinue\n\t\t}\n\t\tfield := v.Field(i)\n\t\tif field.Kind() != reflect.Struct {\n\t\t\treturn false, false\n\t\t}\n\t\tenabled := field.FieldByName(\"Enabled\")\n\t\tif !enabled.IsValid() {\n\t\t\treturn false, false\n\t\t}\n\t\tswitch enabled.Kind() {\n\t\tcase reflect.Bool:\n\t\t\treturn enabled.Bool(), enabled.Bool()\n\t\tcase reflect.Pointer:\n\t\t\tif enabled.IsNil() || enabled.Elem().Kind() != reflect.Bool {\n\t\t\t\treturn false, false\n\t\t\t}\n\t\t\treturn enabled.Elem().Bool(), true\n\t\t}\n\t\treturn false, false\n\t}\n\treturn false, false\n}\n\n// isCheckExplicitlyDisabled reports whether the project has set the\n// per-check `enabled: false` opt-out for a default-on check with a\n// tri-state Enabled pointer. nil and `true` keep the default-on behavior;\n// only an explicit `false` opts the check out via this path.\n//\n// Implements: SYS-REQ-260627-FN1F AC-011 (enabled:false honored)\nfunc isCheckExplicitlyDisabled(checks model.ProjectChecksConfig, checkName string) bool {\n\tvalue, explicit := checkEnabledOverride(checks, checkName)\n\treturn explicit && !value\n}\n\n// isCheckExplicitlyEnabled reports whether the project has opted in to a\n// disabled-by-default check.\n// Implements: SYS-REQ-260720-FEDP\nfunc isCheckExplicitlyEnabled(checks model.ProjectChecksConfig, checkName string) bool {\n\tvalue, explicit := checkEnabledOverride(checks, checkName)\n\treturn explicit && value\n}\n\n// deps returns the CheckDeps from the config, or nil if cfg is nil.\n"
        },
        {
          "startLine": 1148,
          "endLine": 1162,
          "text": "\t\tFuzz: project.Manifest.Project.Commands.Fuzz,\n\t\tLint: project.Manifest.Project.Commands.Lint,\n\t}\n\tcfg.Checks = project.Manifest.Project.Checks\n\t// ACC-15: surface project.checks.poc_quality_checked.min_severity as a\n\t// flat field on WorkflowConfig so the check consumes it without reaching\n\t// into model types. Empty keeps the poc_quality_checked default (\"medium\").\n\tcfg.PoCQualityMinSeverity = strings.TrimSpace(cfg.Checks.PoCQualityChecked.MinSeverity)\n\tif manifestCfg.BaseBranch != \"\" {\n\t\tcfg.BaseBranch = manifestCfg.BaseBranch\n\t}\n\t// SYS-REQ-1393: surface the configurable production-branch matcher used by\n\t// the init-time branch/mode policy. Empty leaves the default applied at\n\t// enforcement time (DefaultProductionBranchPatterns).\n\tcfg.ProductionBranches = append([]string(nil), manifestCfg.ProductionBranches...)\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/web3_detect.go",
      "sha256": "da86e6ee995d60df81773186148930ad6664fecf30cb3d963002b8ca2300ba48",
      "bytes": 13622,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 25,
          "endLine": 170,
          "text": "\n// web3DetectMaxWalkDepth caps how deep the file-extension walk descends. The\n// goal is \"are there ANY .sol files in the project's source tree?\" without\n// scanning huge node_modules / target / vendor subtrees. 1 = top-level only,\n// 2 = one level of subdirectory (covers `src/`, `contracts/`, `programs/`),\n// and so on.\nconst web3DetectMaxWalkDepth = 2\n\n// web3SkipDirs are directory basenames the walk never enters \u2014 they are\n// dependency caches where stray .sol files would be false-positive signals.\nvar web3SkipDirs = map[string]struct{}{\n\t\"node_modules\": {},\n\t\".git\":         {},\n\t\"target\":       {},\n\t\"vendor\":       {},\n\t\"dist\":         {},\n\t\"build\":        {},\n\t\".next\":        {},\n\t\".cache\":       {},\n}\n\n// web3CargoDeps are Cargo.toml dependency name prefixes that mark a Rust\n// project as Web3. Matched as ASCII-case-insensitive substrings of the\n// dependency key (so `ethers`, `ethers-contract`, `ethers-signer` all match).\nvar web3CargoDeps = []string{\n\t\"ethers\",\n\t\"solana-program\",\n\t\"solana-sdk\",\n\t\"anchor-lang\",\n\t\"cosmwasm-std\",\n\t\"soroban-sdk\",\n\t\"stellar-contract\",\n\t\"sui-sdk\",\n\t\"aptos-sdk\",\n\t\"near-sdk\",\n\t\"web30\",\n\t\"web3\",\n}\n\n// web3NodeDeps are package.json dependency name fragments that mark a JS/TS\n// project as Web3. Matched as ASCII-case-insensitive substrings of the\n// dependency key.\nvar web3NodeDeps = []string{\n\t\"ethers\",\n\t\"web3\",\n\t\"hardhat\",\n\t\"@truffle\",\n\t\"@nomiclabs/hardhat\",\n\t\"@openzeppelin\",\n\t\"@solana\",\n\t\"@cosmjs\",\n\t\"@stellar\",\n\t\"@aptos\",\n\t\"@near\",\n\t\"viem\",\n\t\"foundry\",\n\t\"@typechain/ethers\",\n}\n\n// web3ProviderKeys are signal provider keys (project.signals.providers.<key>)\n// that mark a project as Web3 \u2014 configuring Slither or solc is a stronger\n// signal than source-file extensions because it implies the project actually\n// runs the analyzer.\nvar web3ProviderKeys = map[string]struct{}{\n\t\"slither\":         {},\n\t\"solc\":            {},\n\t\"mythril\":         {},\n\t\"forge\":           {},\n\t\"anchor\":          {},\n\t\"sealevel\":        {},\n\t\"cosmossdk\":       {},\n\t\"cargo-build-sbf\": {},\n}\n\n// isWeb3Project reports whether the loaded project looks like a Web3/DeFi\n// project, using the cheap-and-conservative signal cascade documented in the\n// package comment. Returns false on a nil project.\n//\n// Implements: ACC-09 (auto-detection)\n// Implements: SYS-REQ-260718-TQM9\nfunc isWeb3Project(project *repo.Project) bool {\n\tif project == nil {\n\t\treturn false\n\t}\n\troot := project.Root\n\tif root == \"\" {\n\t\treturn false\n\t}\n\n\t// Signals 1-5 read files under the root.\n\tif web3FilesDetected(root) {\n\t\treturn true\n\t}\n\n\t// Signal 6: Web3 signal providers configured (slither/solc/etc.).\n\tif projectHasWeb3SignalProviders(project) {\n\t\treturn true\n\t}\n\n\treturn false\n}\n\n// web3FilesDetected answers the signals of the Web3 detection that read files\n// under root (signals 1-5 of the package comment).\n//\n// Implements: SYS-REQ-260718-TQM9\nfunc web3FilesDetected(root string) bool {\n\t// Signal 1: Solidity source files in the (filtered) source tree.\n\tif hasFilesWithExtension(root, \".sol\") {\n\t\treturn true\n\t}\n\n\t// Signal 2: Foundry or Hardhat config at the project root.\n\tif fileExists(filepath.Join(root, \"foundry.toml\")) {\n\t\treturn true\n\t}\n\tif matchesGlob(root, \"hardhat.config.*\") {\n\t\treturn true\n\t}\n\n\t// Signal 3: Solana / Anchor program config.\n\tif fileExists(filepath.Join(root, \"Anchor.toml\")) {\n\t\treturn true\n\t}\n\n\t// Signal 4: Cargo.toml Web3 dependencies (Rust smart-contract projects).\n\tif cargoHasWeb3Deps(filepath.Join(root, \"Cargo.toml\")) {\n\t\treturn true\n\t}\n\n\t// Signal 5: package.json Web3 dependencies (JS/TS smart-contract projects).\n\treturn packageJsonHasWeb3Deps(filepath.Join(root, \"package.json\"))\n}\n\n// Web3DetectionKey returns the answer of the file signals of the Web3\n// detection for the project: the only part of the detection that no\n// proof.yaml key holds. A check whose verdict rests on the detection\n// declares DependencyWeb3Detection, and the audit cache hashes this value.\n// The checks read the files only through this answer, so the answer is a\n// complete key for them.\n//\n// Implements: SYS-REQ-1085\nfunc Web3DetectionKey(project *repo.Project) string {\n\tif project == nil || project.Root == \"\" {\n\t\treturn \"web3-files:no-project\"\n\t}\n"
        },
        {
          "startLine": 374,
          "endLine": 415,
          "text": "}\n\n// isExplicitlyEnabled reports whether the named check is explicitly opted-in\n// via project.checks.<name>.enabled: true in proof.yaml. Used by the\n// deployment_tvl_verified / known_issue_template_transfer / poc_quality_checked\n// checks to honour a manual override on non-Web3 projects. Returns false when\n// the config is nil, unset, or explicitly false.\n//\n// Implements: ACC-09\n// Implements: SYS-REQ-260718-TQM9\nfunc isExplicitlyEnabled(cfg *WorkflowConfig, checkName string) bool {\n\tif cfg == nil {\n\t\treturn false\n\t}\n\tswitch checkName {\n\tcase \"deployment_tvl_verified\":\n\t\tenabled := cfg.Checks.DeploymentTvlVerified.Enabled\n\t\treturn enabled != nil && *enabled\n\tcase \"known_issue_template_transfer\":\n\t\t// #952/#956: honour an explicit opt-in so the DeFi precision/floor\n\t\t// keyword-suggestion limb still fires on a non-Web3 project when the\n\t\t// author sets checks.known_issue_template_transfer.enabled: true.\n\t\tenabled := cfg.Checks.KnownIssueTemplateTransfer.Enabled\n\t\treturn enabled != nil && *enabled\n\tcase \"poc_quality_checked\":\n\t\t// #952: honour an explicit opt-in so the three Web3-only PoC rules\n\t\t// (quantitative_impact / untrusted_attacker / attacker_profitability)\n\t\t// are still enforced on a non-Web3 project when the author sets\n\t\t// checks.poc_quality_checked.enabled: true.\n\t\tenabled := cfg.Checks.PoCQualityChecked.Enabled\n\t\treturn enabled != nil && *enabled\n\tcase \"obligation_evidence_complete\":\n\t\t// #294: honour an explicit opt-in so a Go-only language-constrained\n\t\t// evidence type (today `lemma` on invariant_preservation) stays\n\t\t// REQUIRED even on a non-Go implementing context when the author sets\n\t\t// checks.obligation_evidence_complete.enabled: true.\n\t\tenabled := cfg.Checks.ObligationEvidenceComplete.Enabled\n\t\treturn enabled != nil && *enabled\n\tdefault:\n\t\treturn false\n\t}\n}\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/workflow_security_relevance_consistent.go",
      "sha256": "d4c4c4f0d04f66c036114eac97c9c42afeda3ad12a5ebd75bfe3366e2853a905",
      "bytes": 9888,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 52,
          "endLine": 119,
          "text": "// KnownIssue's NAME a security claim. Matched against a normalized (lowercased,\n// separator-folded) join of the NAMING and CLASSIFICATION fields so\n// `cross_tenant`, `cross-tenant`, and `cross tenant` all match one token.\nvar securityRelevanceTokens = []string{\n\t\"ssrf\",\n\t\"exfil\",\n\t\"credential\",\n\t\"auth-override\",\n\t\"idor\",\n\t\"cross-tenant\",\n\t\"secret\",\n}\n\n// matchedSecurityTokens returns the security tokens present in the KI's NAMING\n// and CLASSIFICATION fields \u2014 `id`, `title`, `risk`, `defect_class` \u2014 in\n// declaration order. Empty when the KI is not security-named.\n//\n// PROSE-MATCH REGRESSION THIS FIXES. The haystack used to include the free-form\n// `description`. A KnownIssue's description is where the author REASONS about\n// the finding, including reasoning about why it is NOT a security issue \u2014 and\n// that reasoning necessarily uses security vocabulary. The corpus offender\n// matched `secret` on \"controlling them requires Redis write access plus the\n// gateway secret \u2014 this is NOT an unauthenticated request path\", i.e. it was\n// flagged as a hidden security claim by the very sentence that assessed it out\n// of the security band. Across the reference corpus, 24 of the 38 records the\n// check considered \"security-named\" matched ONLY in prose, and the token\n// appeared in the title of just 1 of the 13 findings.\n//\n// Being flagged for writing an honest non-security assessment teaches authors\n// to stop writing them, which costs the audit the exact reasoning it wants. The\n// check is about what a record is NAMED and CLASSIFIED as, so it reads only\n// those fields:\n//\n//   - id + title: the author's NAME for the finding, which is the whole premise\n//     (\"a finding whose name is a security claim\").\n//   - risk + defect_class: the author's CLASSIFICATION of it \u2014 closed-vocabulary\n//     fields where a security token is a deliberate categorisation, never\n//     argument.\n//\n// Implements: SYS-REQ-260813-0PMF\nfunc matchedSecurityTokens(ki *model.KnownIssue) []string {\n\tfolder := strings.NewReplacer(\"_\", \"-\", \" \", \"-\")\n\thaystack := folder.Replace(strings.ToLower(strings.Join([]string{\n\t\tki.ID,\n\t\tki.Title,\n\t\tki.Risk,\n\t\tki.DefectClass,\n\t}, \"\\n\")))\n\tvar matched []string\n\tfor _, tok := range securityRelevanceTokens {\n\t\tif strings.Contains(haystack, tok) {\n\t\t\tmatched = append(matched, tok)\n\t\t}\n\t}\n\treturn matched\n}\n\n// cveSurfaceIsNone reports whether the KI's cve_surface leaves it invisible to\n// the security lens: unset or the explicit `none` band.\n// Implements: SYS-REQ-260813-0PMF\nfunc cveSurfaceIsNone(surface model.KnownIssueCVESurface) bool {\n\ts := model.KnownIssueCVESurface(strings.TrimSpace(string(surface)))\n\treturn s == \"\" || s == model.KnownIssueCVESurfaceNone\n}\n\n// securityRelevanceConsistentFinding returns the finding line for a\n// security-named KnownIssue that lacks a CVSS vector and/or a non-none\n// cve_surface with no reviewer-stamped justification, or ok=false when the KI is\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/workflow_poc_video.go",
      "sha256": "77f81521cd61b3352db8e40d20ad0b86b3633df2d67d33b5d081162edbd0b4fc",
      "bytes": 3475,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 1,
          "endLine": 80,
          "text": "// Video evidence for known-issue validation (poc_quality_checked): when\n// project.review.video_evidence.issue_validation is not off, an in-scope KI\n// records its user-visible behaviour judgement (visible_behaviour), and its\n// video_evidence manifests (role narrated-video-evidence) must validate \u2014\n// strict schema, matching file digest. A video is required when the policy is\n// always, or required_for_visible and the issue is user-visible. Video is\n// evidence; it is never a comment-text rule.\n//\n// Implements: SW-REQ-261008-CRDS\npackage workflow\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/probelabs/proof/pkg/contribreview\"\n\t\"github.com/probelabs/proof/pkg/model\"\n\t\"github.com/probelabs/proof/pkg/repo\"\n)\n\n// pocqVideoDetails returns the video-evidence findings of one in-scope KI.\nfunc pocqVideoDetails(project *repo.Project, ki *model.KnownIssue) []string {\n\tif project == nil || project.Manifest == nil || ki == nil || ki.Status == model.KnownIssueStatusCandidate {\n\t\treturn nil\n\t}\n\tpolicy := project.Manifest.Project.Review.VideoPolicy(model.VideoFlowIssueValidation)\n\tif policy == \"\" || policy == model.VideoPolicyOff {\n\t\treturn nil\n\t}\n\tif !model.ValidVideoPolicy(policy) {\n\t\treturn []string{fmt.Sprintf(\"project.review.video_evidence.issue_validation %q is not a policy (want off | optional | required_for_visible | always)\", policy)}\n\t}\n\tvar out []string\n\tvb := ki.VisibleBehaviour\n\tswitch {\n\tcase vb == nil:\n\t\tout = append(out, fmt.Sprintf(\"KI %s has no visible_behaviour judgement (user_visible: true|false + reason) \u2014 video policy %s for issue validation\", ki.ID, policy))\n\tcase len(strings.TrimSpace(vb.Reason)) < 10:\n\t\tout = append(out, fmt.Sprintf(\"KI %s visible_behaviour.reason must say why (10+ chars)\", ki.ID))\n\t}\n\tvisible := vb != nil && vb.UserVisible\n\tfor _, rel := range ki.VideoEvidence {\n\t\tout = append(out, pocqVideoManifestProblems(project.Root, ki.ID, rel)...)\n\t}\n\tif contribreview.VideoRequired(policy, visible) && len(ki.VideoEvidence) == 0 {\n\t\tout = append(out, fmt.Sprintf(\"KI %s needs video evidence (policy %s%s): produce it with role narrated-video-evidence and list the manifest under video_evidence (`proof change dossier video --manifest-out <path>`)\", ki.ID, policy, map[bool]string{true: \", user-visible\", false: \"\"}[visible]))\n\t}\n\treturn out\n}\n\n// pocqVideoManifestProblems validates one KI video manifest (a path relative\n// to the project root; its file is relative to the manifest's directory).\nfunc pocqVideoManifestProblems(root, kiID, rel string) []string {\n\tp, ok := contribreview.CleanArtifactPath(rel)\n\tif !ok {\n\t\treturn []string{fmt.Sprintf(\"KI %s video_evidence %q must be a project-relative path\", kiID, rel)}\n\t}\n\tfull := filepath.Join(root, filepath.FromSlash(p))\n\tb, err := os.ReadFile(full)\n\tif err != nil {\n\t\treturn []string{fmt.Sprintf(\"KI %s video_evidence %s: %v\", kiID, p, err)}\n\t}\n\tvar m contribreview.VideoManifest\n\tif err := contribreview.DecodeStrict(p, b, &m); err != nil {\n\t\treturn []string{fmt.Sprintf(\"KI %s video_evidence: %v\", kiID, err)}\n\t}\n\tdigest := \"\"\n\tif fp, ok := contribreview.CleanArtifactPath(m.File); ok {\n\t\tif vb, err := os.ReadFile(filepath.Join(filepath.Dir(full), filepath.FromSlash(fp))); err == nil && len(vb) > 0 {\n\t\t\tdigest = contribreview.DigestBytes(vb)\n\t\t}\n\t}\n\tvar out []string\n\tfor _, prob := range contribreview.ValidateVideoManifest(m, digest, \"\") {\n\t\tout = append(out, fmt.Sprintf(\"KI %s video_evidence %s: %s\", kiID, p, prob))\n\t}\n\treturn out\n}\n"
        }
      ]
    },
    {
      "path": "pkg/model/review_config.go",
      "sha256": "330d5f27a3642e527863942d8373d7e2ea2a9c191864933ff7abf4139e9e63f2",
      "bytes": 23129,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 160,
          "endLine": 225,
          "text": "\t// VideoPolicyAlways: a video artifact is always required.\n\tVideoPolicyAlways = \"always\"\n)\n\n// Video-evidence flows.\nconst (\n\tVideoFlowIssueValidation = \"issue_validation\"\n\tVideoFlowPRReview        = \"pr_review\"\n\tVideoFlowPRCreation      = \"pr_creation\"\n)\n\n// VideoEvidenceConfig is proof.yaml `project.review.video_evidence`: whether a\n// narrated video (role narrated-video-evidence) is part of the EVIDENCE for a\n// flow. Video is evidence-level, never a comment-text rule.\n//\n//\tproject:\n//\t  review:\n//\t    video_evidence:\n//\t      issue_validation: required_for_visible  # known-issue validation (poc_quality_checked)\n//\t      pr_review: required_for_visible         # contributor-PR review (pr_review_v1)\n//\t      pr_creation: optional                   # our own PR descriptions (lint-description --kind pr)\n//\n// Each value is off | optional | required_for_visible | always. An unset\n// flow is off \u2014 except pr_creation, where an unset value keeps the\n// description standard's existing video rule unchanged.\ntype VideoEvidenceConfig struct {\n\tIssueValidation string `yaml:\"issue_validation,omitempty\" json:\"issue_validation,omitempty\"`\n\tPRReview        string `yaml:\"pr_review,omitempty\" json:\"pr_review,omitempty\"`\n\tPRCreation      string `yaml:\"pr_creation,omitempty\" json:\"pr_creation,omitempty\"`\n}\n\n// ValidVideoPolicy reports whether v is a known policy (\"\" counts as unset).\n//\n// Implements: SW-REQ-261008-CRDS\nfunc ValidVideoPolicy(v string) bool {\n\tswitch v {\n\tcase \"\", VideoPolicyOff, VideoPolicyOptional, VideoPolicyRequiredForVisible, VideoPolicyAlways:\n\t\treturn true\n\t}\n\treturn false\n}\n\n// VideoPolicy returns the configured policy of flow, normalized (\"\" when\n// unset; callers decide what unset means for their flow).\n//\n// Implements: SW-REQ-261008-CRDS\nfunc (r ReviewProjectConfig) VideoPolicy(flow string) string {\n\tc := r.VideoEvidence\n\tif c == nil {\n\t\treturn \"\"\n\t}\n\tvar v string\n\tswitch flow {\n\tcase VideoFlowIssueValidation:\n\t\tv = c.IssueValidation\n\tcase VideoFlowPRReview:\n\t\tv = c.PRReview\n\tcase VideoFlowPRCreation:\n\t\tv = c.PRCreation\n\t}\n\treturn strings.ToLower(strings.TrimSpace(v))\n}\n\n// DescriptionConfig is proof.yaml `project.review.descriptions`:\n//\n//\tproject:\n"
        }
      ]
    },
    {
      "path": "pkg/contribreview/video.go",
      "sha256": "b86ec75c0453457ecfb95c4b6ed1fad69b422a2057a43f01498029fdeeeb054e",
      "bytes": 10558,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 25,
          "endLine": 157,
          "text": "\tFileVideoEvidence    = \"video-evidence.json\"\n)\n\n// VideoProducerRole is the role that produces video evidence.\nconst VideoProducerRole = \"narrated-video-evidence\"\n\n// Video policies (mirror model.VideoPolicy*; kept here so this package stays\n// a standard-library leaf).\nconst (\n\tVideoPolicyOff                = \"off\"\n\tVideoPolicyOptional           = \"optional\"\n\tVideoPolicyRequiredForVisible = \"required_for_visible\"\n\tVideoPolicyAlways             = \"always\"\n)\n\n// VisibleBehaviour is visible-behaviour.json: the reviewer's judgement.\ntype VisibleBehaviour struct {\n\tUserVisible bool   `json:\"userVisible\" doc:\"does the change alter behaviour a user can see (UI, output, prompts, timing they notice)?\"`\n\tReason      string `json:\"reason\" doc:\"why (10+ chars): what a user sees change, or why nothing visible changes\"`\n\tJudgedBy    string `json:\"judgedBy\" doc:\"identity that made the judgement\"`\n\tJudgedAt    string `json:\"judgedAt\" doc:\"RFC 3339 UTC\"`\n\tJudgedHead  string `json:\"judgedHead\" doc:\"the live PR head the judgement was made at\"`\n}\n\n// VideoEvidence is video-evidence.json: the dossier's video manifests.\ntype VideoEvidence struct {\n\tVideos []VideoManifest `json:\"videos\"`\n}\n\n// VideoManifest describes one video evidence artifact.\ntype VideoManifest struct {\n\tSchema          string    `json:\"schema\" doc:\"always reqproof.video-evidence.v1\"`\n\tFile            string    `json:\"file\" doc:\"the video file, relative to the dossier (PR flows) or to the manifest's directory (known issues)\"`\n\tDigest          string    `json:\"digest\" doc:\"sha256:<hex> of the file; must match\"`\n\tMediaType       string    `json:\"mediaType\" enum:\"video/mp4,video/webm,image/gif,application/x-asciicast\"`\n\tDurationSeconds int       `json:\"durationSeconds\" doc:\"length of the recording (> 0)\"`\n\tBefore          VideoSide `json:\"before\" doc:\"the BEFORE side: the tree / commit shown and what it shows\"`\n\tAfter           VideoSide `json:\"after\" doc:\"the AFTER side: the tree / commit shown and what it shows\"`\n\tSetup           string    `json:\"setup\" doc:\"how it was staged: OS, compositor / session (e.g. headless sway), versions, fixtures\"`\n\tDoesNotShow     []string  `json:\"doesNotShow\" doc:\"what the video does NOT show (stubs, untested paths, hardware not used); at least one entry\"`\n\tProducedByRole  string    `json:\"producedByRole\" enum:\"narrated-video-evidence\"`\n\tProducedBy      string    `json:\"producedBy\" doc:\"identity that produced it\"`\n\tProducedAt      string    `json:\"producedAt\" doc:\"RFC 3339 UTC\"`\n\tNarrated        bool      `json:\"narrated,omitempty\" doc:\"carries a synced voiceover\"`\n\tPRHead          string    `json:\"prHead,omitempty\" doc:\"PR flows: the live PR head the AFTER side shows (must equal the live head)\"`\n\tPublishedURL    string    `json:\"publishedUrl,omitempty\" doc:\"where the video is published (the comment should link it)\"`\n\tCaveats         []string  `json:\"caveats,omitempty\"`\n}\n\n// VideoSide is one side of a before / after video.\ntype VideoSide struct {\n\tCommit string `json:\"commit\" doc:\"the commit (7-40 hex) whose tree is shown\"`\n\tShows  string `json:\"shows\" doc:\"what this side shows, in plain words (10+ chars)\"`\n}\n\n// VideoManifestSchema tags a video manifest.\nconst VideoManifestSchema = \"reqproof.video-evidence.v1\"\n\nvar (\n\treHexCommit = regexp.MustCompile(`^[0-9a-fA-F]{7,40}$`)\n\tvideoMedia  = map[string]bool{\"video/mp4\": true, \"video/webm\": true, \"image/gif\": true, \"application/x-asciicast\": true}\n)\n\n// ValidateVideoManifest checks one manifest; fileDigest is the digest of the\n// file as found (\"\" when the file is missing), liveHead the PR head for PR\n// flows (\"\" for issue flows).\nfunc ValidateVideoManifest(m VideoManifest, fileDigest, liveHead string) []string {\n\tvar p []string\n\tif m.Schema != VideoManifestSchema {\n\t\tp = append(p, fmt.Sprintf(\"schema %q (want %s)\", m.Schema, VideoManifestSchema))\n\t}\n\tswitch {\n\tcase strings.TrimSpace(m.File) == \"\":\n\t\tp = append(p, \"file is empty\")\n\tcase fileDigest == \"\":\n\t\tp = append(p, \"file \"+m.File+\" is missing or empty\")\n\tcase m.Digest != fileDigest:\n\t\tp = append(p, fmt.Sprintf(\"digest %s does not match the file (%s): the video changed after the manifest \u2014 re-record the manifest\", clip(m.Digest, 19), clip(fileDigest, 19)))\n\t}\n\tif !videoMedia[m.MediaType] {\n\t\tp = append(p, fmt.Sprintf(\"mediaType %q (want video/mp4 | video/webm | image/gif | application/x-asciicast)\", m.MediaType))\n\t}\n\tif m.DurationSeconds <= 0 {\n\t\tp = append(p, \"durationSeconds must be > 0\")\n\t}\n\tfor _, side := range []struct {\n\t\tname string\n\t\ts    VideoSide\n\t}{{\"before\", m.Before}, {\"after\", m.After}} {\n\t\tif !reHexCommit.MatchString(strings.TrimSpace(side.s.Commit)) {\n\t\t\tp = append(p, side.name+\".commit must be a commit SHA (7-40 hex)\")\n\t\t}\n\t\tif len(strings.TrimSpace(side.s.Shows)) < 10 {\n\t\t\tp = append(p, side.name+\".shows must say what it shows (10+ chars)\")\n\t\t}\n\t}\n\tif len(strings.TrimSpace(m.Setup)) < 10 {\n\t\tp = append(p, \"setup must say how it was staged (10+ chars)\")\n\t}\n\tif len(nonEmpty(m.DoesNotShow)) == 0 {\n\t\tp = append(p, \"doesNotShow must list at least one thing the video does not show\")\n\t}\n\tif m.ProducedByRole != VideoProducerRole {\n\t\tp = append(p, fmt.Sprintf(\"producedByRole %q (want %s: proof role show %s)\", m.ProducedByRole, VideoProducerRole, VideoProducerRole))\n\t}\n\tif strings.TrimSpace(m.ProducedBy) == \"\" {\n\t\tp = append(p, \"producedBy is empty\")\n\t}\n\tif _, err := time.Parse(time.RFC3339, strings.TrimSpace(m.ProducedAt)); err != nil {\n\t\tp = append(p, \"producedAt must be RFC 3339\")\n\t}\n\tif liveHead != \"\" && !SameSHA(m.PRHead, liveHead) && !SameSHA(m.After.Commit, liveHead) {\n\t\tp = append(p, fmt.Sprintf(\"the AFTER side shows %s, the PR head is now %s: record it again at the current head (prHead)\", short(orNone(m.PRHead)), short(liveHead)))\n\t}\n\tif m.PublishedURL != \"\" {\n\t\tif ok, why := PinnedLink(m.PublishedURL); !ok {\n\t\t\tp = append(p, \"publishedUrl \"+why)\n\t\t}\n\t}\n\treturn p\n}\n\n// VideoRequired reports whether policy needs a video for a judgement.\nfunc VideoRequired(policy string, userVisible bool) bool {\n\tswitch policy {\n\tcase VideoPolicyAlways:\n\t\treturn true\n\tcase VideoPolicyRequiredForVisible:\n\t\treturn userVisible\n\t}\n\treturn false\n}\n\n"
        }
      ]
    },
    {
      "path": "pkg/contribreview/dossier.go",
      "sha256": "18bf292784fb503db2b856214e099b483e4d63a512c070ae4954c8db11de6a5a",
      "bytes": 32053,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 700,
          "endLine": 723,
          "text": "func CleanArtifactPath(p string) (string, bool) {\n\tp = strings.TrimSpace(filepath.ToSlash(p))\n\tif p == \"\" || strings.HasPrefix(p, \"/\") || filepath.IsAbs(p) || (len(p) > 1 && p[1] == ':') {\n\t\treturn \"\", false\n\t}\n\tc := filepath.ToSlash(filepath.Clean(p))\n\tif c == \".\" || c == \"..\" || strings.HasPrefix(c, \"../\") {\n\t\treturn \"\", false\n\t}\n\treturn c, true\n}\n\n// Digest is the sha256 of text, \"sha256:<hex>\" (the comment digest every\n// binding uses).\nfunc Digest(text string) string {\n\tsum := sha256.Sum256([]byte(text))\n\treturn \"sha256:\" + hex.EncodeToString(sum[:])\n}\n\n// DigestBytes is Digest of raw bytes.\nfunc DigestBytes(b []byte) string {\n\tsum := sha256.Sum256(b)\n\treturn \"sha256:\" + hex.EncodeToString(sum[:])\n}\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/check_descriptors.go",
      "sha256": "762fdc944b0e5a14434b59065553a9a2124b7e77db46c534576e8a8d30955965",
      "bytes": 263611,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 1556,
          "endLine": 1563,
          "text": "\t\"known_issue_reproducer_present_and_resolves\": {\"warn\"},\n\t// poc_quality_checked runs nothing: it grades the PoC quality block of\n\t// each known issue in scope against the config and the Web3 detection\n\t// (web3_detection). A run that reads a video evidence manifest opts out;\n\t// a store that does not load marks the verdict.\n\t\"poc_quality_checked\": {\"warn\"},\n\t// annotation_validity FAILs on the annotations that name a missing\n\t// requirement, a stale obligation, an unknown or misplaced evidence\n"
        },
        {
          "startLine": 3211,
          "endLine": 3225,
          "text": "\t// ACC-15 (poc_quality_checked): reads the KnownIssue corpus under\n\t// .proof/known-issues/ (DependencyExternalArtifacts \u2014 `severity`,\n\t// `code_severity`, `bounty_severity` and the `poc_quality` block all live\n\t// on the KI YAML), and is a pure deterministic predicate over that corpus.\n\t// The optional `min_severity` override lives under\n\t// project.checks.poc_quality_checked in proof.yaml. StageDocument, warning.\n\t// Two reads fall outside these domains, and the check opts out of the\n\t// cache for a run that makes them (audit_cacheable=false): a KI's\n\t// video_evidence manifests and the video files they name (any project\n\t// path), and the Web3 detection (root foundry.toml, Anchor.toml,\n\t// Cargo.toml, package.json, *.sol files) when an in-scope KI has an\n\t// unsatisfied Web3-only rule. Both reads follow from the KI records and\n\t// the config alone, so a key that matches a stored verdict never names a\n\t// run that made them.\n\t\"poc_quality_checked\": descriptor(CachePolicyPlanned, DependencyExternalArtifacts, DependencyConfig, DependencyWeb3Detection).withConfigSections(\"checks.poc_quality_checked\").withExternalArtifactStores(ExternalArtifactStoreKnownIssues),\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/ki_promotion_helpers.go",
      "sha256": "14c5e7d9bd65e3dd040889c917859836c09cc6ec71b19211a06083b263a62622",
      "bytes": 21954,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 252,
          "endLine": 261,
          "text": "// ResultIsAdvisory reports whether a check result never blocks the audit:\n// the check marked it advisory. mcdc_coverage is the exception \u2014 the audit\n// keeps its advisory warn a warn (exit 2) \u2014 so its advisory bit does not make\n// it non-blocking. The audit (audit.checkIsAdvisory) and the record gate use\n// this one rule.\n//\n// Implements: SW-REQ-261011-RSK2\nfunc ResultIsAdvisory(cr CheckResult) bool {\n\treturn cr.Advisory && cr.Name != \"mcdc_coverage\"\n}\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/workflow.go",
      "sha256": "7ad6058e35ce103368c6d8524f9ccd1965bc5c02b3e8219b0b33eadcf22aa24b",
      "bytes": 654675,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 490,
          "endLine": 505,
          "text": "}\n\n// SYS-REQ-702\nfunc warningsBlockAdvancement(failLevel string) bool {\n\treturn NormalizeFailLevel(failLevel) != FailLevelError\n}\n\n// SYS-REQ-702\nfunc canAdvanceForCounts(errors, warnings int, failLevel string) bool {\n\tif errors > 0 {\n\t\treturn false\n\t}\n\tif warnings > 0 && warningsBlockAdvancement(failLevel) {\n\t\treturn false\n\t}\n\treturn true\n"
        },
        {
          "startLine": 828,
          "endLine": 841,
          "text": "// MarkOperationalError keeps a verdict that an operational error produced\n// (a timeout, an unreadable file, an unprepared index) out of the audit\n// cache: the error is no fact about the check's declared inputs, so a later\n// run on the same inputs must evaluate the check again. It sets the same\n// audit_cacheable=false opt-out EffectiveCachePolicy resolves to\n// cache_policy: none, with the reason the cache records.\n//\n// Implements: SYS-REQ-1085\nfunc MarkOperationalError(cr *CheckResult, reason string) {\n\tif cr == nil {\n\t\treturn\n\t}\n\tmarkVerdictNotCacheable(cr, \"operational error: \"+reason)\n}\n"
        },
        {
          "startLine": 1020,
          "endLine": 1043,
          "text": "\t\t}\n\t\tresults[idx] = cr\n\t\temit(cr)\n\t\tresult.Skipped++\n\t}\n\tfor idx, check := range checks {\n\t\tif IsCheckDisabledByPolicy(cfg.Checks, check.Name()) {\n\t\t\tsummary := CheckDisabledSummary(check.Name(), IsCheckListedDisabled(cfg.Checks, check.Name()))\n\t\t\tskipCheck(idx, check, CheckResult{\n\t\t\t\tName:       check.Name(),\n\t\t\t\tStatus:     \"skip\",\n\t\t\t\tSeverity:   check.Severity(),\n\t\t\t\tSummary:    summary,\n\t\t\t\tSkipReason: summary,\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\n\t\t// Check mode-based skip policy before queueing the check.\n\t\tif IsCheckSkippedByMode(cfg.Mode, stage, check.Name()) {\n\t\t\tskipCheck(idx, check, CheckResult{\n\t\t\t\tName:       check.Name(),\n\t\t\t\tStatus:     \"skip\",\n\t\t\t\tSeverity:   check.Severity(),\n"
        }
      ]
    },
    {
      "path": "pkg/audit/audit.go",
      "sha256": "ccca90fb8840cd2a34df715a51362f998705f5aca87f3755b62c115cc66ac987",
      "bytes": 169968,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 958,
          "endLine": 988,
          "text": "\n// ExitCode returns the appropriate exit code for the audit result.\n// SYS-REQ-871: configurable exit threshold for audit\nfunc ExitCode(result *AuditResult, failLevel string) int {\n\tswitch failLevel {\n\tcase \"error\":\n\t\tif result.Errors > 0 {\n\t\t\treturn 1\n\t\t}\n\t\treturn 0\n\tcase \"warn\":\n\t\tif result.Errors > 0 {\n\t\t\treturn 1\n\t\t}\n\t\tif result.Warnings > 0 {\n\t\t\treturn 2\n\t\t}\n\t\treturn 0\n\tdefault:\n\t\tif result.Errors > 0 {\n\t\t\treturn 1\n\t\t}\n\t\tif result.Warnings > 0 {\n\t\t\treturn 2\n\t\t}\n\t\treturn 0\n\t}\n}\n\n// stageCategoryName maps workflow stages to audit category display names.\n// SYS-REQ-783\n"
        },
        {
          "startLine": 2070,
          "endLine": 2111,
          "text": "}\n\n// convertCheckResult transforms a workflow CheckResult into an AuditCheck with hints.\n// SYS-REQ-786: adds actionable hints and dig-deeper commands\nfunc convertCheckResult(cr workflow.CheckResult, stage workflow.Stage, verbose bool) AuditCheck {\n\tac := AuditCheck{\n\t\tName:    cr.Name,\n\t\tSummary: cr.Summary,\n\t}\n\n\t// Map status.\n\tswitch cr.Status {\n\tcase \"fail\":\n\t\tif cr.Severity == workflow.SeverityError {\n\t\t\tac.Status = \"error\"\n\t\t} else {\n\t\t\tac.Status = \"warn\"\n\t\t}\n\tcase \"warn\":\n\t\tac.Status = \"warn\"\n\tcase \"waived\":\n\t\tac.Status = \"waived\"\n\tcase \"skip\":\n\t\tac.Status = \"skip\"\n\tdefault:\n\t\tac.Status = \"pass\"\n\t}\n\tif checkIsAdvisory(cr) && ac.Status == \"warn\" {\n\t\tac.Status = \"info\"\n\t\tac.Advisory = true\n\t}\n\t// BUG-007: an advisory check should never bubble up as a hard \"error\".\n\t// Some check implementations set Status=\"fail\" with Severity=Error on\n\t// catastrophic paths (e.g. a sub-process crash) before workflow-level\n\t// severity overrides could take effect; downgrading the audit-side\n\t// status to \"info\" here keeps the surface stable for advisory consumers.\n\tif checkIsAdvisory(cr) && ac.Status == \"error\" {\n\t\tac.Status = \"info\"\n\t\tac.Advisory = true\n\t}\n\n\t// SYS-REQ-1328: carry the pre-truncation finding count into the audit\n"
        }
      ]
    },
    {
      "path": "cmd/proof/audit.go",
      "sha256": "fb5283e5d7911c80bbca46860156e8f1f907655633574842d7fbd9326a097f90",
      "bytes": 96934,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 155,
          "endLine": 164,
          "text": "\tSilenceUsage: true,\n}\n\n// SYS-REQ-789: audit command exposes --verbose for complete detail output.\nfunc init() {\n\tauditCmd.Flags().StringVar(&auditFormat, \"format\", \"table\", \"Output format: table|json|markdown. Unscoped audits normally emit newline-delimited JSON events (JSONL: one stage_start/check_start/check_done object per line, then one final audit_done object with totals and exit status); parse line-by-line. With --only <REQ-ID>, JSON is a single pretty-printed result document with only_scope; parse the whole document, not JSONL. Active mutes emit a single compact result object instead of event records. Only JSON is written to stdout; human Help/Next trailers are suppressed.\")\n\tauditCmd.Flags().StringVar(&auditFailLevel, \"fail-level\", \"warn\", \"Severity threshold for non-zero exit: error|warn|info\")\n\tauditCmd.Flags().StringVar(&auditScope, \"scope\", string(audit.ScopeFull), \"Audit scope: full (every active requirement) | baseline (narrow coverage_threshold + documentation_coverage to requirements whose fingerprint changed since the captured baseline; activate deletion_without_retirement)\")\n\tauditCmd.Flags().StringVar(&auditBaseRef, \"base\", \"\", \"Base git ref of this run. The branch-diff checks (authored_delta_expected, changed_requirements_reviewed, description_delta_reviewed and the other checks that compare HEAD with a base) compare HEAD with the merge-base of this ref and HEAD; it overrides project.workflow.base_branch for this run. With --scope baseline and no .proof/workflow.json baseline, the requirement baseline is also captured at that merge-base\")\n\tauditCmd.Flags().BoolVar(&auditVerbose, \"verbose\", false, \"Show every detail row of every check. Without it, the stage section lists at most 10 rows per check and the Findings section at most --max-findings rows (default 3)\")\n"
        },
        {
          "startLine": 1258,
          "endLine": 1280,
          "text": "\t\treturn opts, nil\n\t}\n\n\tcfg := project.Manifest.Project.Audit\n\tif !cmd.Flags().Changed(\"fail-level\") && cfg.FailLevel != \"\" {\n\t\topts.FailLevel = cfg.FailLevel\n\t}\n\tif !cmd.Flags().Changed(\"scope\") && cfg.Scope != \"\" {\n\t\topts.Scope = cfg.Scope\n\t}\n\tif !cmd.Flags().Changed(\"verbose\") && cfg.Verbose {\n\t\topts.Verbose = true\n\t}\n\n\tswitch opts.FailLevel {\n\tcase \"error\", \"warn\", \"info\":\n\tdefault:\n\t\treturn auditOptions{}, fmt.Errorf(\"invalid audit fail level %q in project.audit.fail_level (expected error|warn|info)\", opts.FailLevel)\n\t}\n\tswitch audit.Scope(opts.Scope) {\n\tcase audit.ScopeFull, audit.ScopeBaseline:\n\tdefault:\n\t\treturn auditOptions{}, fmt.Errorf(\"invalid audit scope %q in project.audit.scope (expected full|baseline)\", opts.Scope)\n"
        }
      ]
    },
    {
      "path": "docs/help/checks/poc_quality_checked.md",
      "sha256": "d569c70d9832d6c4def157e6695bf001e618f4f766c325522b4fa5cb7c24ba9f",
      "bytes": 13880,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 1,
          "endLine": 277,
          "text": "---\nid: poc_quality_checked\ntitle: PoC Quality Checked\nsummary: \"Warn when an active KnownIssue that is at or above the configured min_severity (default: medium) OR is being submitted has no PoC quality review, or any of the 11-rule checklist booleans is false or missing.\"\nkind: check\nrelated_commands:\n  - proof audit --check poc_quality_checked\n  - proof known-issue edit <KI-ID>\nsee_also:\n  - known-issue\n  - submission_validated\n  - deployment_tvl_verified\n  - high_severity_reproducer_grade\nrelated_requirements:\n  - ACC-15\n---\n\n<!-- Documents: ACC-15, SYS-REQ-260718-SV4N -->\n\n`poc_quality_checked` is the document-stage gate that keeps a consequential\nfinding honest against the 11-rule PoC quality checklist\n(POC-QUALITY-CHECKLIST.md). An in-scope KnownIssue must carry a\n`poc_quality` block whose 11 boolean fields are all true.\n\nStage: `document`. Severity: `warning` (advisory, non-blocking).\n\n## Scope is a union\n\nTwo independent reasons put a KnownIssue in scope. Either one alone is\nenough.\n\n| Limb | In scope when | Why |\n|---|---|---|\n| **Severity** | Any of `severity`, `code_severity`, `bounty_severity` reaches the configured `min_severity` (default `medium`) | A KI graded at that level asserts an impact worth acting on, and that assertion shall not rest on the claim alone. |\n| **Externally reported** | The KI carries an external report block \u2014 `submission` (filed to a contest) or `upstream_report` (disclosed to a vendor) \u2014 or its `disposition` contains the case-insensitive substring \"submit\" | A finding that goes in front of a judging committee, or a vendor's security team, gets its PoC scrutinized whatever grade the author put on it. |\n\nThe external limb closes a real coverage hole. With severity as the only\ncriterion, a reported **low**-severity KI was checked by nobody: this check\nskipped it on grade, and [`submission_validated`](submission_validated.md)\n(ACC-11) only asserts the `poc_quality` block EXISTS, never that its 11\nbooleans are true \u2014 so an all-false checklist on a filed low finding cleared\nboth gates.\n\nBoth checks read the same external-report predicate, so they cannot disagree\nabout what counts as having gone outside. They still differ elsewhere: ACC-11 blocks\n(error) and only checks that the block is present; this check warns and\ninspects all 11 rules; and the severity limb is this check's alone, so a\nhigh-severity KI nobody has reported anywhere is in scope here and invisible\nto ACC-11.\n\n## Why this check exists\n\nA PoC that is technically correct but only succeeds under operational\ndeviation from documented practice is the classic shape that gets rejected\nat triage: severity-inflated, missing a control test, or demonstrating an\nattack that needs trusted-actor behavior. **SEC-28** was the case study \u2014\nRule 10 (`operational_path_verified`) is what caught it. The check turns\nthe 11-rule checklist into a machine-readable gate so a reviewer scanning\nthe audit table can see at a glance which in-scope KIs have a clean PoC\nquality review and which are still claims.\n\n## The 11 PoC quality rules\n\nThe `poc_quality` block carries a boolean for each of the 11 rules:\n\n| # | YAML key                                | Rule                                                            |\n|---|-----------------------------------------|-----------------------------------------------------------------|\n| 1 | `real_infrastructure`                   | Exercises the real running service over its real protocol / entry point, not an SDK/unit call. For an MC/DC capability-gap KI this is the same public-API bar: e2e user-shaped APIs, not Reflect / private / ParseHooks. |\n| 2 | `quantitative_impact`                   | Shows token balances before/after                               |\n| 3 | `control_test`                          | Includes a control test proving correct intended behavior       |\n| 4 | `untrusted_attacker`                    | Attacker is a separate signer with no privileged role           |\n| 5 | `current_deployment_relevance`          | Reachable by the modeled attacker through the real entry point past access controls (verified end-to-end), not merely that the vulnerable code path exists |\n| 6 | `honest_severity`                       | PoC test names match demonstrated impact                        |\n| 7 | `attacker_profitability`                | Attacker cost vs revenue analyzed                               |\n| 8 | `reproducible`                          | Runs with a single command in <5 min                            |\n| 9 | `no_inflation`                          | Severity in submission matches PoC                              |\n| 10| `operational_path_verified`             | Safe/intended path tested (the SEC-28 rule)                     |\n| 11| `reachability_verified`                 | Exploit reproduced through the product's real entry point / attack surface, past the access-control & input-validation layer, not a downstream/library/unit harness that starts past the guard |\n\n## What it checks\n\nFor each active KnownIssue (status `open` or `reviewed`):\n\n1. **Scope filter.** Compute the highest rank among the KI's `severity`,\n   `code_severity`, and `bounty_severity` fields. If NONE meets the\n   configured `min_severity` (default `medium`) AND the KI is not being\n   submitted, skip it.\n2. **Missing-block gate.** If the KI is in scope but has no `poc_quality`\n   block, emit a finding naming WHICH limb put it in scope \u2014 the severity\n   threshold or being submitted \u2014 followed by \"has no PoC quality review\".\n   The distinction matters because a severity re-grade only helps on the\n   severity limb.\n3. **Per-rule gate.** Otherwise, for each of the 11 rules, if the boolean\n   is false OR missing, emit a finding:\n   \"PoC quality rule N (<yaml_key>) not satisfied\".\n\nWithdrawn / fixed KIs are out of scope (the issue is no longer live).\n\n## Configuration\n\nThe severity floor is configurable under `project.checks.poc_quality_checked`\nin `proof.yaml`:\n\n```yaml\nchecks:\n  poc_quality_checked:\n    min_severity: low   # informational | low | medium | high | critical | none\n```\n\nWhen unset (or set to an unrecognized value), the check falls back to\n`medium`. Lowering the threshold pulls more KIs into the gate; raising it\nnarrows the severity limb to higher-severity findings. It has no effect on\nthe external limb \u2014 a KI that has gone outside is in scope at any grade.\n\nThe sentinel `none` (also accepted as `all` / `all-active`) is the\napply-to-all-active option: it drops the severity floor entirely so EVERY\nactive KnownIssue is in scope regardless of grade or submission state, for\nteams that want the checklist run on the whole ledger. The default and every\nreal severity value are unchanged.\n\n## What it does NOT do\n\n- It does **not** independently verify the PoC (that is manual review).\n- It does **not** block KIs \u2014 it only warns.\n\n## How to fix them\n\nTwo resolutions clear a flagged KnownIssue, and they are **alternatives, not\nsteps**. Which one is even available depends on WHICH limb put the KI in\nscope \u2014 the finding text names it, so read that first.\n\n| Limb that put it in scope | Remediation 1 (run the checklist) | Remediation 2 (re-grade / re-configure) |\n|---|---|---|\n| Severity only | works | works |\n| Externally reported | works | **does nothing** |\n\n**1. Run the 11-rule PoC quality checklist** (the ground-the-submission\npath):\n\n```yaml\nseverity: high\npoc_quality:\n  real_infrastructure: true\n  quantitative_impact: true\n  control_test: true              # Rule 3 \u2014 a NEGATIVE control test\n  untrusted_attacker: true\n  current_deployment_relevance: true\n  honest_severity: true\n  attacker_profitability: true\n  reproducible: true\n  no_inflation: true\n  operational_path_verified: true # Rule 10 \u2014 the SEC-28 rule\n  reachability_verified: true      # Rule 11 \u2014 reproduced through the real entry point past the ingress guard\n  notes: |\n    real_infrastructure: src/test/protocol-fixtures.ts:42\n    control_test: tests/control/SafePath.spec.ts (passes -> impact NOT triggered)\n    operational_path_verified: tests/control/SafePath.spec.ts\n```\n\nPay particular attention to **Rule 3** (`control_test`) and **Rule 10**\n(`operational_path_verified`) \u2014 both require a NEGATIVE control test\nasserting the safe / intended path does NOT trigger the impact. These two\nrules are what catch PoCs that need trusted-actor deviation.\n\n**Rule 11** (`reachability_verified`) is the universal reachability rule: the\nexploit must reproduce through the product's real entry point / attack surface,\ntraversing the ingress access-control & input-validation layer the modeled\nattacker faces \u2014 a library/unit reproducer that starts past the guard does not\nsatisfy it for a reachability-class finding. It is N/A-eligible ONLY for a\nlocal-behavioral / non-reachability finding (a correctness defect with no\ntrust-boundary crossing), declared with a justification:\n\n```yaml\npoc_quality:\n  # ... other rules ...\n  reachability_verified: false\n  not_applicable:\n    reachability_verified: \"local-behavioral correctness defect: no ingress access-control layer to traverse, so end-to-end reachability is not applicable\"\n```\n\nA bare N/A with no reason is ignored and the rule still fires; and it must\nnever be N/A for a security/exploit-class finding, where reaching the sink is\nthe whole question. The check enforces that: the N/A is honored only on a\nplainly non-security KI \u2014 `cve_surface` none or unset, no `cvss` vector, no\n`attacker_input`, no `sanitizer` other than `none`, and no security token in its `id`, `title`, `risk` or `defect_class` (the matcher\n`security_relevance_consistent` uses). On any other KI the declaration is\nreported as a gap.\n\n**2. Correct a genuinely wrong grade, or a genuinely wrong threshold** (the\nleaves-the-severity-limb path). Two sub-forms, both legitimate only when the\ncurrent number is actually wrong:\n\n- **The KI's grade is wrong.** Lower ALL of `severity`, `code_severity`, and\n  `bounty_severity` below the configured floor (e.g. all `low` under the\n  default `medium`). Lowering only `bounty_severity` does NOT silence the\n  check \u2014 the severity limb fires when ANY dimension meets the threshold. A\n  grade change must carry a reason naming the axis that moved, and the\n  lowered grade needs a `severity_basis` that justifies it:\n\n  ```bash\n  proof known-issue edit KI-XX \\\n    --set-severity low \\\n    --set-severity-basis risk \\\n    --set-risk correctness \\\n    --severity-justification \"severity re-graded to low: impact is a cosmetic mis-render, no fund or data loss path\"\n  ```\n\n  `code_severity` and `bounty_severity` have no dedicated flags \u2014 edit them\n  in the KnownIssue YAML.\n\n- **The project's floor is wrong.** If the whole project's threshold is set\n  too low and is pulling in findings nobody considers consequential, raise it\n  once in `proof.yaml` rather than re-grading KIs one by one:\n\n  ```yaml\n  checks:\n    poc_quality_checked:\n      min_severity: high   # informational | low | medium | high | critical\n  ```\n\n### The asymmetry that matters most\n\n**A KI in scope on the SUBMITTING limb is helped by NEITHER remediation.**\nThis is the single most common wasted fix attempt on this check:\n\n- **Re-grading does not remove it.** The submitting limb ignores severity\n  entirely. Dropping a filed finding from `high` to `low` leaves it exactly\n  as in-scope as it was, because a judging committee scrutinizes the PoC\n  whatever grade the author put on it.\n- **Rewording the disposition does not un-file it.** Once a `submission` or\n  `upstream_report` block records an actual report, the finding really was\n  sent outside. Editing `disposition` away from \"submit\" changes prose about\n  intent; it does not retract a filing.\n\nFor a submitting KI there are exactly two honest ways forward: **run the\n11-rule checklist**, or **withdraw the report** at its venue and remove the\nexternal-report block once it is actually withdrawn.\n\n### The anti-pattern\n\n**Downgrading a severity you still believe, to leave the severity limb, is\nseverity dishonesty** \u2014 and the checklist itself names it: Rule 6\n(`honest_severity`) and Rule 9 (`no_inflation`) both assert the recorded\ngrade matches the demonstrated impact. A re-grade with no `severity_basis`\nthat supports it fails the very rules the check exists to enforce.\n\nThe same applies to the two neighbouring shortcuts: flipping the 11 booleans\nto `true` without running the underlying tests, and raising `min_severity`\nproject-wide to duck one inconvenient finding. Both make the check green\nwithout making the PoC any more likely to survive triage \u2014 and the check\nbeing a non-blocking WARNING means leaving an unreviewed PoC visible as\ntracked debt is always an available, honest option.\n\nThen re-run:\n\n```bash\nproof audit --check poc_quality_checked --verbose\n```\n\nSee `proof help known-issue` for editing KnownIssue fields.\n\n## Candidate source provenance\n\n`source_report` is inbound provenance and does not count as an external report,\nincluding after promotion. A legacy `upstream_report` containing only a reference\nor tracker URL is also excluded when the KI is still a candidate or its history\nexplicitly establishes candidate origin. Any vendor, channel, report date,\nreporter, response, recheck, schedule, or distinct second locator keeps the block\nexternal. Source-only blocks without candidate origin remain external too.\n\nMigrate legacy provenance with\n`proof known-issue edit <KI-ID> --set-source-report <original-reference-or-tracker-url>`.\nThis also repairs records created and promoted by older CLIs without candidate\nhistory markers. It writes `source_report` and removes the upstream block only\nwhen its sole locator value matches the supplied value and no disclosure\nmetadata is present. Enriched or mismatched blocks stay intact and the edit\nexplains why. See [the known-issue command](../commands/known-issue.md).\n"
        }
      ]
    },
    {
      "path": "pkg/catalog/data/domain/audit_process/poc_quality_verified.yaml",
      "sha256": "f8ff541147e087a3fa1010224e825f4ad9eb3e9273b0f98981958cf3beb226d8",
      "bytes": 6377,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 1,
          "endLine": 109,
          "text": "id: poc_quality_verified\ncatalog_version: 2\ncategory: domain\ndomains: [audit_process]\norder: 524\nstatus: active\nevidence:\n  - review\n  - negative\nframeworks:\n  - id: NIST-800-53\n    refs: [\"CA-2\", \"CA-7\"]\n    severity: LOW\nname: PoC quality verified\nsummary: Every PoC shall pass the 10-rule quality checklist before its finding is submitted.\nplain_english: |\n  The auditor shall not submit a finding whose PoC has not passed the 10-rule\n  quality checklist (real infrastructure, quantitative impact, control test,\n  untrusted attacker, current-deployment relevance, honest severity, attacker\n  profitability, reproducibility, no inflation, operational path verification).\ndescription: |\n  A PoC that is technically correct but demonstrates an attack that only\n  succeeds under operational deviation from documented practice is rejected.\n  The 10-rule quality checklist gates every PoC: real infrastructure,\n  quantitative impact, a control test against the safe path, an untrusted\n  attacker, current-deployment relevance, honest severity, attacker\n  profitability, reproducibility, no inflation, and operational-path\n  verification. Rule 10 (safe-path control test) is what catches attacks that\n  require trusted-actor deviation.\napplies_when:\n  description: >\n    An audit finding is accompanied by a proof-of-concept about to be submitted\n    for triage.\n  tag_match_any: [documentation]\n  trigger_phrases:\n    - \"poc quality checklist\"\n    - \"control test\"\n    - \"attacker profitability\"\n    - \"reproducibility\"\n    - \"severity inflation\"\n    - \"operational path\"\n    - \"10-rule\"\nexample_req: |\n  Before submitting a finding, the auditor shall confirm its PoC passes all 10\n  quality-checklist rules, including a safe-path control test (Rule 10).\nif_missing: |\n  A PoC that fails the checklist (e.g. only works under operational deviation,\n  or inflates severity) is rejected at triage and erodes confidence in the\n  remaining findings.\nrecommended_evidence:\n  - kind: review\n    note: Run the 10-rule checklist; record a yes/no for each rule and confirm all pass.\n  - kind: negative\n    note: Include a control test asserting the safe path does NOT trigger the impact (Rule 10).\ndefault_assurance: B\ndefault_obligation_severity: shall\nversioning:\n  introduced_in_catalog_version: 2\ndocumentation_links:\n  - title: NIST SP 800-53 Rev 5 - CA-2 / CA-7 Assessment\n    url: https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final\nagent_hints:\n  trigger_phrases_high_confidence:\n    - \"poc fails checklist\"\n    - \"no control test\"\n    - \"severity inflated\"\n  trigger_phrases_review_needed:\n    - \"passing poc\"\n    - \"documented severity\"\nrelated_classes:\n  - id: intended_usage_path_verified\n    relationship: complements\n  - id: production_topology_verified\n    relationship: complements\nfit_examples:\n  - text: \"Before submitting a finding, the auditor shall confirm its PoC passes all 10 quality-checklist rules, including a safe-path control test that asserts the documented intended path does not trigger the reported impact.\"\n    provenance: \"reqproof:catalog-enrichment-2026-07\"\n    why: \"Rule 10 control test is the structural gate that rejects PoCs only valid under operational deviation\"\n  - text: \"A PoC shall demonstrate quantitative impact (value extractable, funds at risk, or measurable DoS) rather than asserting severity from qualitative description alone.\"\n    provenance: \"reqproof:catalog-enrichment-2026-07\"\n    why: \"quantitative impact is a checklist rule that prevents inflated or hand-wavy severity\"\n  - text: \"A PoC shall be executable by an untrusted attacker model (no trusted-role deviation, no privileged misconfiguration) unless the finding is explicitly scoped as insider-only.\"\n    provenance: \"reqproof:catalog-enrichment-2026-07\"\n    why: \"attacker model fidelity separates real external risk from trusted-actor mistakes\"\n  - text: \"A PoC shall run against current-deployment configuration (live proxy implementation, active parameters, documented operational topology) and not only a deprecated code path.\"\n    provenance: \"reqproof:catalog-enrichment-2026-07\"\n    why: \"current-deployment relevance keeps findings actionable for the system as operated\"\n  - text: \"A PoC shall be reproducible with listed steps, inputs, and expected outcomes so an independent reviewer can re-run it without tribal knowledge.\"\n    provenance: \"reqproof:catalog-enrichment-2026-07\"\n    why: \"reproducibility is a checklist rule that separates verified defects from anecdotal reports\"\n  - text: \"Severity assigned to a finding shall not exceed what the PoC demonstrates under honest profitability and operational-path constraints (no inflation via impossible preconditions).\"\n    provenance: \"reqproof:catalog-enrichment-2026-07\"\n    why: \"honest severity and no-inflation rules couple PoC quality to triage credibility\"\n  - text: \"When a PoC claims fund extraction, it shall show attacker profitability after gas, fees, and required capital rather than gross theoretical drain alone.\"\n    provenance: \"reqproof:catalog-enrichment-2026-07\"\n    why: \"attacker profitability is a checklist rule that filters economically irrelevant exploits\"\nantifit_examples:\n  - text: \"When a function mutates critical state, it shall enforce an explicit msg.sender or role check in its own body or modifier list.\"\n    provenance: \"sibling:access_control_enforced\"\n    why: \"access-control placement is a product obligation, not auditor PoC checklist quality\"\n  - text: \"When computing a balance delta as balanceAfter - balanceBefore, the implementation shall clamp underflow to zero or require the minuend is at least the subtrahend.\"\n    provenance: \"sibling:accounting_delta_safe\"\n    why: \"accounting-delta safety is implementation correctness, not PoC submission quality\"\n  - text: \"When the request body exceeds the configured maximum size, the server shall reject it with a specific error before parsing.\"\n    provenance: \"sibling:parameter_boundary_safe / HTTP size limit\"\n    why: \"runtime input bounds are not the 10-rule audit PoC checklist\"\n  - text: \"Deployment topology used in tests shall match the production proxy, role, and oracle wiring documented for the system.\"\n    provenance: \"sibling:production_topology_verified\"\n    why: \"topology fidelity is a related audit-process class; this class is specifically PoC checklist passage before submission\"\n"
        }
      ]
    },
    {
      "path": "website/demo.html",
      "sha256": "902a9dc2a5f71745d1047ccbc160848510e53fc6e2d43f90ebd597e26d5cbc26",
      "bytes": 24503,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 174,
          "endLine": 189,
          "text": "               keeps password managers from autofilling it and costing a real\n               person their reply. -->\n          <input type=\"hidden\" name=\"source\" value=\"exp40-demo\">\n          <input class=\"hp\" type=\"text\" name=\"website\" tabindex=\"-1\" autocomplete=\"off\" aria-hidden=\"true\" data-1p-ignore data-lpignore=\"true\" data-form-type=\"other\">\n          <h2 class=\"dm-lf-h\" id=\"ask-h\">Book a demo.</h2>\n          <p class=\"dm-lf-sub\">Work email is enough. If you like, name the change you would bring.</p>\n          <div class=\"step-1\">\n            <label for=\"lf-email\">Work email</label>\n            <input id=\"lf-email\" name=\"email\" type=\"email\" required autocomplete=\"email\" placeholder=\"you@company.com\">\n            <label for=\"lf-engagement\">How would you like to work? (optional)</label>\n            <select id=\"lf-engagement\" name=\"engagement\"><option value=\"\">Help me choose</option><option value=\"factory\">Software factory</option><option value=\"audit\">Continuous audit alongside our development</option></select>\n            <label for=\"lf-interest\">What would you start with? (optional)</label>\n            <select id=\"lf-interest\" name=\"interest\"><option value=\"\">Choose a starting point</option><option value=\"agent-change\">An agent-written change</option><option value=\"backlog\">Unresolved backlog</option><option value=\"business-logic\">Business logic</option><option value=\"migration\">Migration or legacy transformation</option><option value=\"requirements\">Requirements and intent recovery</option><option value=\"correctness\">Component correctness</option></select>\n            <label for=\"lf-message\">Anything we should know</label>\n            <textarea id=\"lf-message\" name=\"message\" rows=\"4\"></textarea>\n            <button class=\"btn btn-primary\" type=\"submit\">Book a demo</button>\n"
        },
        {
          "startLine": 239,
          "endLine": 246,
          "text": "        </details>\n\n        <details class=\"dm-fold\">\n          <summary>What a first engagement includes</summary>\n          <div class=\"dm-fold-body\"><p>Agree one component or change, its owner, access, required evidence, exclusions and a handoff date. For a backlog, each accepted item receives a recorded disposition; an agreed subset proceeds to a fix.</p><p>You keep the requirements, reproductions, tests, observed results and remaining decisions. Factory scope also includes implementation. An audit can remain alongside your development for future changes.</p><p>We agree price and timing after scoping the build, dependencies and verification work. <a href=\"/topics/software-correctness-audit#sample-scope\">Read the sample deliverables.</a></p></div>\n        </details>\n      </div>\n\n"
        }
      ]
    },
    {
      "path": "website/assets/engagement-intake.js",
      "sha256": "72df4637e1adc355fbabecb70b80f2ec0e41c89855deef941bd3314dde23472f",
      "bytes": 6531,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 1,
          "endLine": 25,
          "text": "/* Only recognized choices prefill the visible, editable inquiry fields. */\n(function () {\n  var params = new URLSearchParams(window.location.search);\n  var page = (window.location.pathname || \"\").replace(/\\.html$/, \"\").replace(/\\/$/, \"\");\n  var topicInterests = {\n    \"do178c\": \"DO-178C evidence chain\",\n    \"iec-62304\": \"Medical software change evidence\",\n    \"iso-26262\": \"Automotive software change evidence\",\n    \"property-based-testing\": \"Properties and test oracles\"\n  };\n  [\"engagement\", \"interest\"].forEach(function (name) {\n    var field = document.querySelector('.lead-form select[name=\"' + name + '\"]');\n    var value = params.get(name);\n    if (!field || field.value || !value) return;\n    if (name === \"interest\" && page === \"/demo\" &&\n        Object.prototype.hasOwnProperty.call(topicInterests, value) &&\n        !Array.from(field.options).some(function (option) { return option.value === value; })) {\n      var option = document.createElement(\"option\");\n      option.value = value;\n      option.textContent = topicInterests[value];\n      field.appendChild(option);\n    }\n    if (Array.from(field.options).some(function (option) { return option.value === value; })) {\n      field.value = value;\n    }\n"
        }
      ]
    },
    {
      "path": "pkg/workflow/workflow_poc_quality_checked_test.go",
      "sha256": "001cf571cffeefdf81822a7c92a9a3a0a4a88684fe3c29ade0658e5e28307a12",
      "bytes": 51737,
      "readScope": "Exact retained regions only; tests inspected as source, not executed",
      "regions": [
        {
          "startLine": 20,
          "endLine": 112,
          "text": "//   - cfg.PoCQualityMinSeverity=high                          -> medium KIs skipped\n//   - cfg.PoCQualityMinSeverity=bogus                         -> falls back to medium\n//   - no project loaded                                       -> pass\n//   - descriptor catalog registration                         -> registered\n//   - GuidanceFor non-nil                                     -> actionable\n//\n// Scope pins (ACC-15 scopes to the UNION of severity threshold and the shared\n// knownIssueGoesExternal predicate; ACC-11 scopes to the submitting predicate\n// alone \u2014 overlapping, not identical):\n//\n//   - low severity + disposition \"submitting\"  -> in scope for BOTH\n//   - low severity + submission block          -> in scope for BOTH\n//   - high severity + empty disposition        -> in scope for ACC-15, invisible to ACC-11\n//   - both checks read exactly one submitting predicate\npackage workflow\n\nimport (\n\t\"context\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/probelabs/proof/pkg/model\"\n\t\"github.com/probelabs/proof/pkg/repo\"\n)\n\n// allTruePoCQuality returns a PoCQuality with every rule set true \u2014 the clean\n// baseline the gate requires. Tests toggle individual rules false to trip\n// specific findings.\nfunc allTruePoCQuality() *model.PoCQuality {\n\treturn &model.PoCQuality{\n\t\tRealInfrastructure:         true,\n\t\tQuantitativeImpact:         true,\n\t\tControlTest:                true,\n\t\tUntrustedAttacker:          true,\n\t\tCurrentDeploymentRelevance: true,\n\t\tHonestSeverity:             true,\n\t\tAttackerProfitability:      true,\n\t\tReproducible:               true,\n\t\tNoInflation:                true,\n\t\tOperationalPathVerified:    true,\n\t\tReachabilityVerified:       true,\n\t}\n}\n\n// ACC-15:nominal:nominal \u2014 a high-severity KI whose poc_quality block has all\n// 11 rules true must NOT fire (the gate is satisfied).\n// Verifies: SYS-REQ-260718-SV4N\n// MCDC SYS-REQ-260718-SV4N: poc_quality_review_complete=T, known_issue_poc_review_in_scope=T => TRUE\n// MCDC SYS-REQ-260718-SV4N: poc_quality_review_complete=F, known_issue_poc_review_in_scope=F => TRUE\nfunc TestPoCQualityChecked_HighSeverityAllTruePasses(t *testing.T) {\n\t_, dir := setupBoost6Project(t)\n\tsaveKI(t, dir, &model.KnownIssue{\n\t\tID:         \"KI-HI-OK\",\n\t\tTitle:      \"clean high-severity PoC\",\n\t\tStatus:     model.KnownIssueStatusOpen,\n\t\tSeverity:   model.KnownIssueSeverityHigh,\n\t\tPoCQuality: allTruePoCQuality(),\n\t})\n\tproject, _ := repo.LoadProject(dir)\n\n\tcr := (&pocQualityCheckedCheck{}).Run(context.Background(), project, &WorkflowConfig{})\n\tif cr.Status != \"pass\" {\n\t\tt.Fatalf(\"want pass for clean PoC quality, got status=%s advisory=%v summary=%q details=%v\", cr.Status, cr.Advisory, cr.Summary, cr.Details)\n\t}\n}\n\n// ACC-15:nominal:nominal \u2014 a high-severity KI with NO poc_quality block must\n// fire the missing-block finding.\n// Verifies: SYS-REQ-260718-SV4N\nfunc TestPoCQualityChecked_HighSeverityNoBlockFires(t *testing.T) {\n\t_, dir := setupBoost6Project(t)\n\tsaveKI(t, dir, &model.KnownIssue{\n\t\tID:       \"KI-HI-NOQ\",\n\t\tTitle:    \"high-severity with no poc_quality\",\n\t\tStatus:   model.KnownIssueStatusOpen,\n\t\tSeverity: model.KnownIssueSeverityHigh,\n\t})\n\tproject, _ := repo.LoadProject(dir)\n\n\tcr := (&pocQualityCheckedCheck{}).Run(context.Background(), project, &WorkflowConfig{})\n\tif cr.Status != \"warn\" || cr.Advisory {\n\t\tt.Fatalf(\"want non-advisory warn, got status=%s advisory=%v summary=%q\", cr.Status, cr.Advisory, cr.Summary)\n\t}\n\tif cr.IssueCount != 1 || len(cr.IssueIDs) != 1 || cr.IssueIDs[0] != \"KI-HI-NOQ\" {\n\t\tt.Fatalf(\"want exactly KI-HI-NOQ flagged, got count=%d ids=%v\", cr.IssueCount, cr.IssueIDs)\n\t}\n\tif len(cr.Details) != 1 || !strings.Contains(cr.Details[0], \"no PoC quality review\") {\n\t\tt.Fatalf(\"detail must name missing-block finding, got %#v\", cr.Details)\n\t}\n}\n\n// ACC-15:boundary:nominal \u2014 high severity with one rule false fires exactly\n// that rule's finding, naming the rule number, label, and YAML key.\n"
        },
        {
          "startLine": 600,
          "endLine": 620,
          "text": "}\n\n// ACC-15 \u2014 the cache descriptor catalog must register the new check so it\n// participates in the standard caching contract and the coverage validation.\n// Verifies: SYS-REQ-260718-SV4N\nfunc TestPoCQualityChecked_RegisteredInDescriptorCatalog(t *testing.T) {\n\tdesc, ok := CheckDescriptorFor(&pocQualityCheckedCheck{})\n\tif !ok {\n\t\tt.Fatalf(\"poc_quality_checked must be registered in the check_descriptors catalog\")\n\t}\n\tif len(desc.Dependencies) == 0 {\n\t\tt.Fatalf(\"poc_quality_checked must declare at least one dependency domain\")\n\t}\n\tif desc.Stage != StageDocument {\n\t\tt.Fatalf(\"poc_quality_checked must run at StageDocument, got %s\", desc.Stage)\n\t}\n\tif desc.Severity != SeverityWarning {\n\t\tt.Fatalf(\"poc_quality_checked must default to severity warning, got %s\", desc.Severity)\n\t}\n}\n\n"
        }
      ]
    }
  ],
  "currentFileCount": 23,
  "regionCount": 36,
  "notRun": "Source audit did not execute test suite, companion check, disabled/minnone/Web3/N-A/video/error branches; native selected3 run separately",
  "officialNotes": [
    {
      "path": "docs/research/remaining-library-refinement-2026-10-28/15-poc-quality-checked/research/root-official-source-check.md",
      "sha256": "df8824e5bbe244a4ea6af6370b9643970df4430763fc4d9ab4743124dca4bfbd",
      "bytes": 3368,
      "fullText": "# Root official-method check: authorization observations and local-model limits\n\nInspected 29 October 2026. This is a targeted methods note, not a completed security assessment, native Proof result or execution receipt.\n\n## Versioned primary sources\n\n- [OWASP WSTG v4.2, WSTG-ATHZ-02: Testing for Bypassing Authorization Schema](https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/05-Authorization_Testing/02-Testing_for_Bypassing_Authorization_Schema/). Read the scenario page, concentrating on its summary/objective and horizontal/vertical testing sections. It describes evaluating operations under the relevant user identities and privileges. Its horizontal method keeps two user sessions and compares requests using their identities; its examples distinguish a legitimate response from an attempt under a different caller. Its vertical method compares roles and examines whether a lower-privilege session can perform a higher-privilege operation. These are application/request observations, not conclusions from an isolated downstream function.\n- [OWASP WSTG v4.2, WSTG-ATHZ-04: Testing for Insecure Direct Object References](https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References/). Read the scenario page, concentrating on objectives and the general test method. It recommends mapping object-reference inputs and using multiple users with different owned resources or privileges. A test should establish which object another user is not permitted to access, then observe whether application input can obtain or change it. The guide's examples concern application requests; it does not validate a Python-only teaching model or this project's field answers.\n\n## Application to the proposed fixture: explicit root inference\n\nThe controlled comparison should preserve both a caller who must be denied and an authorized caller who must be able to complete the selected operation. The latter prevents blanket refusal from appearing adequate. Checking selected state as well as returned status is our proposed oracle design; neither cited scenario defines this fixture's exact reply or state values.\n\nSuccess after directly invoking an internal mutation helper establishes only that invocation's selected effect. Without demonstrating the guard/actor/entrypoint chain, it does not establish that a differently authorized caller can cause the same effect through an application. This is an inference from the methods above and the chosen call paths, not a reported OWASP experiment.\n\nHere the planned NoteService calls are local Python method calls. Caller labels are modeled inputs, not authenticated sessions. There is no HTTP server, network request, deployed configuration or real customer actor. A repaired local-model PoC/claim may explain the guarded method's selected behavior; it cannot satisfy the checker rubric's real-service/protocol or current-deployment evidence merely by calling a method public. No OWASP conformity, all-role coverage, general absence of bypass, deployment verification, actual disclosure or approval follows.\n\nNo source-code mutation, native build/audit, behavior execution, third-party test or customer communication was performed for this note. No broad OWASP suite, ASVS mapping, NIST mapping or attack campaign was researched or claimed.\n"
    },
    {
      "path": "docs/research/remaining-library-refinement-2026-10-28/15-poc-quality-checked/research/root-official-source-check.json",
      "sha256": "986a87c859ce85faed5b24211f1f9fa5ca779af1d0675feff2b84ce7ad4a6524",
      "bytes": 2158,
      "fullText": "{\n  \"reviewer\": \"/root\",\n  \"observedAtUtc\": \"2026-10-29T05:56:56.293099+00:00\",\n  \"status\": \"targeted-method-source-note-complete\",\n  \"notePath\": \"docs/research/remaining-library-refinement-2026-10-28/15-poc-quality-checked/research/root-official-source-check.md\",\n  \"noteSha256\": \"df8824e5bbe244a4ea6af6370b9643970df4430763fc4d9ab4743124dca4bfbd\",\n  \"sources\": [\n    {\n      \"id\": \"WSTG-ATHZ-02\",\n      \"version\": \"v4.2\",\n      \"requestedUrl\": \"https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/05-Authorization_Testing/02-Testing_for_Bypassing_Authorization_Schema\",\n      \"resolvedUrl\": \"https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/05-Authorization_Testing/02-Testing_for_Bypassing_Authorization_Schema/\",\n      \"readScope\": \"Scenario page text; summary/objectives and horizontal/vertical methods targeted for use. No whole-WSTG-suite review.\"\n    },\n    {\n      \"id\": \"WSTG-ATHZ-04\",\n      \"version\": \"v4.2\",\n      \"requestedUrl\": \"https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References\",\n      \"resolvedUrl\": \"https://wstg.owasp.org/v4.2/4-Web_Application_Security_Testing/05-Authorization_Testing/04-Testing_for_Insecure_Direct_Object_References/\",\n      \"readScope\": \"Scenario page text; objectives/general method, multiple users and owned resources. Not an actual test of a service.\"\n    }\n  ],\n  \"mechanism\": \"Fresh web-tool official versioned pages; no claim of retained raw HTML or website/browser interaction.\",\n  \"inferenceBoundary\": \"Authorized-success control, selected-state oracle and direct-helper/local-model limits are explicitly identified root fixture-design inferences, not source-specified outputs or OWASP test results.\",\n  \"rootNativeOrBehaviorRuns\": 0,\n  \"rootCommunicationsOrDisclosures\": 0,\n  \"limits\": [\n    \"Local method calls are not HTTP/protocol/session/deployment evidence.\",\n    \"No actual actor authentication, production validation, all-role closure or checklist truth follows.\",\n    \"No entire WSTG, ASVS or NIST normative mapping.\"\n  ]\n}\n"
    }
  ]
}
