|
2 | 2 |
|
3 | 3 | ## Current State |
4 | 4 |
|
5 | | -- **src/abi/*.idr**: YES — `Types.idr` |
| 5 | +- **src/abi/*.idr**: 3 files — `Types.idr`, `PatternCompleteness.idr` (PA1 ✅ 2026-04-11), `ClassificationSoundness.idr` (PA2 ✅ 2026-04-11) |
6 | 6 | - **Dangerous patterns**: 0 in own code (3 references are in the analyzer that DETECTS believe_me in other repos); 282 `unwrap()` calls |
7 | 7 | - **LOC**: ~31,700 (Rust) |
8 | | -- **ABI layer**: Minimal Idris2 types |
| 8 | +- **ABI layer**: Idris2 with completeness + soundness proofs |
9 | 9 |
|
10 | | -## What Needs Proving |
| 10 | +## Completed Proofs |
| 11 | + |
| 12 | +| Proof | File | What it proves | |
| 13 | +|-------|------|---------------| |
| 14 | +| PA1 Pattern detection completeness | `src/abi/PatternCompleteness.idr` | All 47 `Lang` constructors have an analyzer; all 20 `WPCategory` constructors have at least one detector; cross-language checks applied unconditionally to all languages. `completeScanForAll` is the top-level theorem. | |
| 15 | +| PA2 Classification soundness | `src/abi/ClassificationSoundness.idr` | Severity (Low/Medium/High/Critical) is totally ordered (`LTE`); `maxSeverity` is commutative and idempotent; numeric ABI encoding preserves the ordering. | |
| 16 | + |
| 17 | +## What Still Needs Proving |
11 | 18 |
|
12 | 19 | | Component | What | Why | |
13 | 20 | |-----------|------|-----| |
14 | | -| Assail analyzer soundness | Pattern detection has no false negatives for critical patterns | Security scanner missing a vulnerability is its worst failure mode | |
15 | | -| Assail analyzer completeness | No false positives for clean code | False positives erode trust and cause alert fatigue | |
16 | | -| SARIF report correctness | Generated SARIF is well-formed and semantically correct | Malformed SARIF breaks CI/CD pipeline integration | |
17 | | -| Bridge classify | CVE classification is correct | Wrong CVE classification leads to wrong mitigation | |
18 | | -| Bridge reachability | Reachability analysis is sound | Unreachable code marked reachable wastes effort; reachable code missed is a security gap | |
| 21 | +| Bridge reachability soundness | Reachability analysis is sound (no reachable dep wrongly classified as phantom) | Unreachable code marked reachable wastes effort; reachable missed = security gap | |
| 22 | +| Attestation chain unforgeability | Intent/evidence/seal triple is cryptographically bound; tampering detectable | Tampered attestations break trust chain | |
19 | 23 | | Kanren taint analysis | Taint propagation tracks all tainted data flows | Missed taint flow means missed vulnerability | |
20 | | -| Attestation chain | Attestation envelope integrity is unforgeable | Tampered attestations break trust chain | |
21 | | -| Bridge lockfile parsing | Lockfile parser extracts correct dependency versions | Wrong versions mean wrong vulnerability matching | |
22 | 24 |
|
23 | 25 | ## Recommended Prover |
24 | 26 |
|
25 | | -**Idris2** — Extend `src/abi/Types.idr` with analyzer soundness/completeness types. Taint analysis correctness proofs could use **Agda** with relational semantics. The 282 unwrap() calls are a significant debt. |
| 27 | +**Idris2** — Already in use. Taint analysis correctness proofs could use **Agda** with relational semantics. The 282 unwrap() calls are a significant debt (but separate from the proof obligations). |
26 | 28 |
|
27 | 29 | ## Priority |
28 | 30 |
|
29 | | -**HIGH** — panic-attacker is the pre-commit security scanner used across all repos. If it has false negatives, vulnerabilities slip through the entire ecosystem. Analyzer soundness is the single most important proof in this repo. |
| 31 | +**MEDIUM** (was HIGH) — PA1 and PA2 completed 2026-04-11. The highest-risk false-negative scenario (analyzer dispatch completeness) is now formally proved. Remaining proofs are deeper semantic properties. |
0 commit comments