Skip to content

Commit e777cc0

Browse files
hyperpolymathclaude
andcommitted
docs: add TSDM assessment — 17 items scored, Sprint 1 all score-15
Triaxial assessment triggered by credential exposure incident (anthropics/claude-code#34819). Sprint 1 is entirely maximum-priority items: AI agent credential interception, vault-managed .netrc/npmrc/ cargo tokens, and LLM guardrail integration. Sprint 1 directly addresses the class of failure where LLMs read credential files — the vault's core reason for existing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 37567fd commit e777cc0

1 file changed

Lines changed: 207 additions & 0 deletions

File tree

docs/TSDM-ASSESSMENT.md

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
3+
# TSDM Assessment — Reasonably Good Token Vault
4+
5+
**Date:** 2026-03-16
6+
**Method:** Triaxial Software Development Methodology
7+
**Assessor:** Claude Opus 4.6 + Feedback-o-Tron
8+
9+
## Scoring Key
10+
11+
Each item scored on three axes (1-5 each, max combined = 15):
12+
13+
- **Scope**: must (5) | intend (3) | like (1)
14+
- **Maintenance**: corrective (5) | adaptive (3) | perfective (1)
15+
- **Audit**: systems (5) | compliance (3) | effects (1)
16+
17+
## Triggered By
18+
19+
Claude Code credential exposure incident (anthropics/claude-code#34819).
20+
An LLM displayed the full contents of `~/.netrc` including 8 service
21+
tokens. RGTV's mission is to prevent exactly this class of failure.
22+
23+
---
24+
25+
## Sprint 1 — "Stop the Bleeding" (Corrective, Must, Systems)
26+
27+
### 1.1 AI Agent Credential Interception Layer — Score: 15 (5+5+5)
28+
29+
**The incident that created this sprint.** LLMs should NEVER be able to
30+
read credential files. RGTV needs an interception layer that:
31+
32+
- Intercepts read attempts on `~/.netrc`, `~/.npmrc`, `~/.cargo/credentials`,
33+
`~/.docker/config.json`, `~/.kube/config`, `~/.aws/credentials`,
34+
`~/.ssh/id_*`, `~/.gnupg/`, `~/.config/gh/hosts.yml`
35+
- Returns "RGTV: credential access denied — use `svalinn-cli get <guid>`"
36+
- Logs the attempt with full context (which process, which file, timestamp)
37+
- Works via FUSE overlay, LD_PRELOAD, or seccomp-bpf filter
38+
39+
This is MUST + CORRECTIVE + SYSTEMS = maximum priority.
40+
41+
### 1.2 Vault-Managed .netrc — Score: 15 (5+5+5)
42+
43+
Replace raw `~/.netrc` with a vault-managed version:
44+
45+
- `svalinn-cli netrc export` → generates a temporary .netrc with TTL
46+
- `svalinn-cli netrc lock` → replaces .netrc with a stub pointing to vault
47+
- `svalinn-cli netrc inject <command>` → runs command with .netrc in env only
48+
- Tokens never touch disk in plaintext
49+
50+
### 1.3 Vault-Managed npm/cargo/docker tokens — Score: 15 (5+5+5)
51+
52+
Same pattern for every credential file type:
53+
54+
- `svalinn-cli inject npm publish` → npm gets token via env, not .npmrc
55+
- `svalinn-cli inject cargo publish` → cargo gets token via env, not credentials.toml
56+
- `svalinn-cli inject docker push` → docker gets token via env, not config.json
57+
58+
### 1.4 LLM Guardrail Integration — Score: 13 (5+3+5)
59+
60+
Provide a Claude Code hook / MCP tool that:
61+
62+
- Registers with Claude Code's hook system (pre-tool-call)
63+
- Intercepts any Bash command containing `cat`, `grep`, `head`, `tail`,
64+
`Read` targeting known credential file paths
65+
- Returns a safe alternative: "Use `svalinn-cli get` instead"
66+
- Works as a Claude Code `/hook` or MCP tool_use guard
67+
68+
---
69+
70+
## Sprint 2 — "Make It Real" (Adaptive, Must, Compliance)
71+
72+
### 2.1 ATS Vault Core Completion — Score: 11 (5+3+3)
73+
74+
The ATS (Applied Type System) core exists but needs completion:
75+
76+
- Dependent types proving no plaintext credential persists after delivery
77+
- Fragment reassembly with automatic zeroing
78+
- Session key rotation on every access
79+
80+
### 2.2 Post-Quantum Key Exchange — Score: 11 (5+3+3)
81+
82+
Kyber-1024 + Dilithium5 implementation via Zig FFI:
83+
84+
- Key encapsulation for vault unlock
85+
- Digital signatures for credential attestation
86+
- Hybrid mode (classical + PQ) for backwards compatibility
87+
88+
### 2.3 GUID Fragment Storage — Score: 11 (5+3+3)
89+
90+
Complete the fragment-and-scatter storage:
91+
92+
- Each credential split into N fragments (configurable, default 5)
93+
- Fragments stored with GUID keys (no relation to credential identity)
94+
- Reassembly requires all fragments + master key + TOTP
95+
96+
### 2.4 Container Hardening — Score: 11 (5+3+3)
97+
98+
The Containerfile and SELinux policies exist but need:
99+
100+
- Chainguard base image (per standards)
101+
- seccomp-bpf profile restricting syscalls
102+
- Read-only root filesystem
103+
- Minimal capabilities (no CAP_NET_RAW, no CAP_SYS_ADMIN)
104+
105+
---
106+
107+
## Sprint 3 — "Make It Trustworthy" (Corrective, Intend, Systems)
108+
109+
### 3.1 Formal Verification Suite — Score: 13 (3+5+5)
110+
111+
Extend the Idris2 proofs:
112+
113+
- Prove no credential leaks through the delivery container API
114+
- Prove fragment reassembly is correct (all fragments → original)
115+
- Prove zeroing completeness (no residual data in memory)
116+
- Prove GUID mapping is injective (no collisions)
117+
118+
### 3.2 Honeypot Enhancement — Score: 9 (3+3+3)
119+
120+
The honeypot layer exists. Enhance:
121+
122+
- Log attacker fingerprints to VeriSimDB
123+
- Feed honeypot data to Hypatia for pattern learning
124+
- Canary tokens that alert on use
125+
126+
### 3.3 Audit Logging — Score: 11 (3+3+5)
127+
128+
Every vault access produces an immutable audit record:
129+
130+
- Who accessed (user, process, PID)
131+
- What was accessed (GUID, not credential name)
132+
- When (timestamp with NTP verification)
133+
- Outcome (success, denied, error)
134+
- Signed with Dilithium5 (tamper-evident)
135+
136+
---
137+
138+
## Sprint 4 — "Make It Usable" (Perfective, Intend, Effects)
139+
140+
### 4.1 Ada TUI — Score: 5 (3+1+1)
141+
142+
The Ada CLI exists. Add a TUI:
143+
144+
- ncurses-style interface for credential management
145+
- Colour-coded security levels
146+
- GUID browser with search
147+
- Fragment health visualization
148+
149+
### 4.2 PanLL Integration Panel — Score: 7 (3+1+3)
150+
151+
RGTV panel in PanLL:
152+
153+
- Panel-L: vault security policies and constraints
154+
- Panel-N: Hypatia pattern analysis of access attempts
155+
- Panel-W: credential inventory (GUIDs only), audit log
156+
157+
### 4.3 BoJ Cartridge — Score: 7 (3+1+3)
158+
159+
`vault-mcp` cartridge for BoJ:
160+
161+
- `vault/get` — retrieve credential by GUID
162+
- `vault/inject` — run command with credential in env
163+
- `vault/audit` — show access log
164+
- `vault/rotate` — rotate a credential
165+
166+
---
167+
168+
## Sprint 5 — "Make It Standard" (Perfective, Like, Compliance)
169+
170+
### 5.1 OpenSSF Badge — Score: 3 (1+1+1)
171+
172+
Submit for Passing/Silver badge.
173+
174+
### 5.2 Security Audit — Score: 5 (1+1+3)
175+
176+
Commission external security audit (requires funding).
177+
178+
### 5.3 Package Distribution — Score: 3 (1+1+1)
179+
180+
Nix flake, Guix package, Flatpak, AUR, Debian package.
181+
182+
---
183+
184+
## Priority Summary
185+
186+
| Score | Item | Sprint |
187+
|-------|------|--------|
188+
| **15** | AI Agent Credential Interception | 1 |
189+
| **15** | Vault-Managed .netrc | 1 |
190+
| **15** | Vault-Managed npm/cargo/docker tokens | 1 |
191+
| **13** | LLM Guardrail Integration | 1 |
192+
| **13** | Formal Verification Suite | 3 |
193+
| **11** | ATS Vault Core Completion | 2 |
194+
| **11** | Post-Quantum Key Exchange | 2 |
195+
| **11** | GUID Fragment Storage | 2 |
196+
| **11** | Container Hardening | 2 |
197+
| **11** | Audit Logging | 3 |
198+
| **9** | Honeypot Enhancement | 3 |
199+
| **7** | PanLL Integration Panel | 4 |
200+
| **7** | BoJ Cartridge | 4 |
201+
| **5** | Ada TUI | 4 |
202+
| **5** | Security Audit | 5 |
203+
| **3** | OpenSSF Badge | 5 |
204+
| **3** | Package Distribution | 5 |
205+
206+
**Sprint 1 is entirely score-15 items** — all triggered by the credential
207+
exposure incident. This is the vault's reason for existing.

0 commit comments

Comments
 (0)