Skip to content

Commit dc4ec53

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 349fc4e commit dc4ec53

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

PROOF-NEEDS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# PROOF-NEEDS.md — modshells
2+
3+
## Current State
4+
5+
- **src/abi/*.idr**: NO
6+
- **Dangerous patterns**: 0
7+
- **LOC**: ~2,900
8+
- **ABI layer**: Missing
9+
10+
## What Needs Proving
11+
12+
| Component | What | Why |
13+
|-----------|------|-----|
14+
| Shell config validation | Validator rejects all malicious shell configurations | Shell configs can contain arbitrary code execution |
15+
| Config store integrity | Stored configs are not corrupted or tampered | Corrupted shell config breaks user's terminal |
16+
| Shell manager isolation | Module loading does not leak between shell contexts | Cross-contamination between shell environments |
17+
18+
## Recommended Prover
19+
20+
**Idris2** — Create `src/abi/` with config validation types. Shell config parsing is security-sensitive (arbitrary code in shell configs).
21+
22+
## Priority
23+
24+
**LOW** — Shell configuration manager. Config validation preventing code injection is the only security-relevant proof target. Small blast radius.

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 — modshells
2+
3+
> Generated 2026-03-29 by punishing audit.
4+
5+
## Current State
6+
7+
| Category | Count | Notes |
8+
|-------------|-------|-------|
9+
| Unit tests | 1 | tests/test_shell_manager.adb |
10+
| Integration | 1 | tests/smoke_test.sh |
11+
| E2E | 0 | None |
12+
| Benchmarks | 0 | None |
13+
14+
**Source modules:** 7 Ada source files: config_store (adb+ads), modshells main (adb), shell_manager (adb+ads), shell_validator (adb+ads).
15+
16+
## What's Missing
17+
18+
### P2P (Property-Based) Tests
19+
- [ ] Config store: property tests for config read/write roundtrip
20+
- [ ] Shell validator: arbitrary shell path/config validation
21+
- [ ] Shell manager: property tests for shell registration/deregistration invariants
22+
23+
### E2E Tests
24+
- [ ] Full lifecycle: register shell -> configure -> validate -> switch -> use -> deregister
25+
- [ ] Multi-shell: register multiple shells, switch between them, verify isolation
26+
- [ ] Config persistence: save config -> restart -> verify restored
27+
28+
### Aspect Tests
29+
- **Security:** No tests for shell path injection, config file tampering, privilege escalation through shell switching
30+
- **Performance:** No shell switching latency benchmarks
31+
- **Concurrency:** No tests for concurrent shell operations
32+
- **Error handling:** No tests for invalid shell paths, corrupted config, missing shell binaries
33+
34+
### Build & Execution
35+
- [ ] GNAT compilation
36+
- [ ] Ada test runner (AUnit or similar)
37+
- [ ] Smoke test execution
38+
39+
### Benchmarks Needed
40+
- [ ] Shell switching time
41+
- [ ] Config load/save time
42+
- [ ] Shell validation throughput
43+
44+
### Self-Tests
45+
- [ ] Shell binary existence verification
46+
- [ ] Config file integrity check
47+
48+
## Priority
49+
50+
**HIGH.** 7 source files with 1 unit test and 1 smoke test. Shell management is security-sensitive (shell injection, privilege). The shell_validator and config_store both lack any tests. The smoke test covers only the happy path.
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)