Skip to content

Commit 77d1f14

Browse files
hyperpolymathclaude
andcommitted
docs: add TEST-NEEDS.md and/or PROOF-NEEDS.md from audit
Documents testing and proof gaps identified during batch audit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 021b3aa commit 77d1f14

2 files changed

Lines changed: 81 additions & 0 deletions

File tree

PROOF-NEEDS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PROOF-NEEDS.md — polysafe-gitfixer
2+
3+
## Current State
4+
5+
- **src/abi/*.idr**: NO
6+
- **Dangerous patterns**: 0
7+
- **LOC**: ~1,400 (Rust + Elixir NIFs)
8+
- **ABI layer**: Missing
9+
10+
## What Needs Proving
11+
12+
| Component | What | Why |
13+
|-----------|------|-----|
14+
| Capability system | Capability grants are minimal and non-escalating | Over-privileged operations can damage repositories |
15+
| Git operations | Git modifications preserve repository integrity | Corrupting git repos is catastrophic |
16+
| File system operations | FS ops respect capability boundaries | Escaping sandbox damages the host system |
17+
| NIF safety | Elixir NIF bridge does not corrupt BEAM VM memory | NIF bugs crash the entire Erlang VM |
18+
19+
## Recommended Prover
20+
21+
**Idris2** — Create `src/abi/` with capability types (indexed by permission set). Git operation correctness proofs would ensure repo integrity is preserved.
22+
23+
## Priority
24+
25+
**MEDIUM** — Git repository fixer that modifies repos. The capability system is the most important proof target — it bounds what the tool can do. Small codebase makes full coverage achievable.

TEST-NEEDS.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# TEST-NEEDS.md — polysafe-gitfixer
2+
3+
> Generated 2026-03-29 by punishing audit.
4+
5+
## Current State
6+
7+
| Category | Count | Notes |
8+
|-------------|-------|-------|
9+
| Unit tests | 0 | No inline tests, no test files |
10+
| Integration | 0 | None |
11+
| E2E | 0 | None |
12+
| Benchmarks | 0 | None |
13+
14+
**Source modules:** 6 Rust source files across 4 crates: capability (audit_log.rs, dir_capability.rs, lib.rs), fs_ops (lib.rs), git_ops (lib.rs), polysafe_nifs (lib.rs).
15+
16+
## What's Missing
17+
18+
### P2P (Property-Based) Tests
19+
- [ ] Dir capability: property tests for capability creation/verification invariants
20+
- [ ] Audit log: property tests for log entry integrity
21+
- [ ] fs_ops: property tests for filesystem operation safety (no escaping sandbox)
22+
- [ ] git_ops: property tests for git operation correctness
23+
24+
### E2E Tests
25+
- [ ] Full fix cycle: detect issue -> create capability -> apply fix -> audit -> verify
26+
- [ ] Git operation: clone -> modify -> commit -> verify integrity
27+
- [ ] Capability lifecycle: create -> use -> revoke -> verify revoked
28+
29+
### Aspect Tests
30+
- **Security:** A git fixing tool with capabilities and audit logging has ZERO security tests. Capability bypass, audit log tampering, path traversal in fs_ops, git injection — ALL untested
31+
- **Performance:** No benchmarks for fix throughput
32+
- **Concurrency:** No tests for concurrent fix operations, capability contention
33+
- **Error handling:** No tests for git operation failure, filesystem permission denied, corrupted audit log
34+
35+
### Build & Execution
36+
- [ ] `cargo test` across all 4 crates
37+
38+
### Benchmarks Needed
39+
- [ ] Git operation speed
40+
- [ ] Capability validation overhead
41+
- [ ] Audit logging throughput
42+
43+
### Self-Tests
44+
- [ ] Fix its own repository as smoke test
45+
- [ ] Capability system self-test
46+
- [ ] Audit log integrity verification
47+
48+
## Priority
49+
50+
**CRITICAL.** 6 source files, ZERO tests of any kind. A capability-based security tool with an audit log that has never been tested. The capability and audit_log modules are security-critical and completely unverified. This is one of the worst test situations in the entire scan.
51+
52+
## FAKE-FUZZ ALERT
53+
54+
- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing
55+
- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file
56+
- Priority: P2 — creates false impression of fuzz coverage

0 commit comments

Comments
 (0)