Tiered Precision Curves for Scanner Accuracy

Advisory: 16-Dec-2025 - Measuring Progress with Tiered Precision Curves
Status: Processing
Related Sprints: SPRINT_3500_0003_0001 (Ground-Truth Corpus)

Executive Summary

This advisory introduces a tiered approach to measuring scanner accuracy that prevents metric gaming. By tracking precision/recall separately for three evidence tiers (Imported, Executed, Tainted→Sink), we ensure improvements in one tier don’t hide regressions in another.

Key Concepts

Evidence Tiers

TierDescriptionRisk LevelTypical Volume
ImportedVuln exists in dependencyLowestHigh
ExecutedCode/deps actually runMediumMedium
Tainted→SinkUser data reaches sinkHighestLow

Tier Precedence

Highest tier wins when a finding has multiple evidence types:

  1. tainted_sink (highest)
  2. executed
  3. imported

Implementation Components

1. Evidence Schema (eval schema)

-- Ground truth samples
eval.sample(sample_id, name, repo_path, commit_sha, language, scenario, entrypoints)

-- Expected findings
eval.expected_finding(expected_id, sample_id, vuln_key, tier, rule_key, sink_class)

-- Evaluation runs
eval.run(eval_run_id, scanner_version, rules_hash, concelier_snapshot_hash)

-- Observed results
eval.observed_finding(observed_id, eval_run_id, sample_id, vuln_key, tier, score, rule_key, evidence)

-- Computed metrics
eval.metrics(eval_run_id, tier, op_point, precision, recall, f1, pr_auc, latency_p50_ms)

2. Scanner Worker Changes

Workers emit evidence primitives:

3. Scanner WebService Changes

WebService performs tiering:

4. Evaluator CLI

New tool StellaOps.Scanner.Evaluation.Cli:

5. CI Gates

Fail builds when:

Operating Points

TierTarget RecallPurpose
imported≥ 0.60Broad coverage
executed≥ 0.70Material risk
tainted_sink≥ 0.80Actionable findings

Integration with Existing Systems

Concelier

Excititor (VEX)

Notify

UI

Success Criteria

  1. Can demonstrate release where overall precision stayed flat but tainted→sink PR-AUC improved
  2. On-call noise reduced via tier-gated paging
  3. TTFS p95 for tainted→sink within budget

Overlap Analysis

This advisory extends the ground-truth corpus work (SPRINT_3500_0003_0001) with:

No contradictions with existing implementations found.