Skip to content
Merged
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ the code, those win.
| Phase | Current state | ADR |
|---|---|---|
| P1 | In-RAM copy-on-write virtual worktrees; bounded blob budget + LRU eviction, optional spill; zero disk residue | [0005](docs/adr/0005-in-ram-vfs-over-fuse.md), [0006](docs/adr/0006-memory-budget-and-eviction.md) |
| P2 | Committed secrets: per-secret DEK (XChaCha20-Poly1305) wrapped per X25519 recipient; secrets are env vars, never files — `checkout` never materializes them; `sc run` injects into a child env, or onto a descriptor with `--secrets-fd N` (unix) | [0008](docs/adr/0008-committed-secrets-envelope-encryption.md), [0009](docs/adr/0009-key-management-and-authorization.md), [0010](docs/adr/0010-secret-registry-and-opaque-wrapped-dek.md), [0052](docs/adr/0052-secret-injection-by-fd.md) |
| P2 | Committed secrets: per-secret DEK (XChaCha20-Poly1305) wrapped per X25519 recipient; secrets are env vars, never files — `checkout` never materializes them; names are `[A-Za-z_][A-Za-z0-9_]*` minus loader/PATH/`SC_`/proxy-style variables (case-insensitive), enforced at add and again at injection (a bad name is skipped with a warning; a registry key must equal the sealed name); `sc run` injects into a child env, or onto a descriptor with `--secrets-fd N` (unix) | [0008](docs/adr/0008-committed-secrets-envelope-encryption.md), [0009](docs/adr/0009-key-management-and-authorization.md), [0010](docs/adr/0010-secret-registry-and-opaque-wrapped-dek.md), [0052](docs/adr/0052-secret-injection-by-fd.md) |
| P3 | Persistent `.sc/` repo: loose objects, branches, symbolic HEAD, single-writer lock, working tree; write-out paths restore the recorded executable bit (unix; #242; special bits are always cleared, `sc resolve` restores the chosen side's mode, and a swallowed chmod warns once; #243) | [0011](docs/adr/0011-persistent-store-and-working-tree.md) |
| P4 | Snapshot-DAG three-way merge; ff when possible; conflict markers + `.theirs` sidecars | [0012](docs/adr/0012-three-way-merge.md) |
| P5 | Commit-time secret scanner (pattern + entropy) hard-rejects plaintext secrets; `sc scan` preview; hash-scoped allowlist | [0017](docs/adr/0017-secret-scanner.md) |
Expand Down
8 changes: 4 additions & 4 deletions crates/repo/src/rewrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct RewrapReport {
/// Already-randomized protected blobs re-sealed under a fresh DEK because
/// the run asked to rotate (`rewrap_with` / `sc rewrap --rotate`).
pub blobs_rotated: usize,
/// (entry label e.g. "secret db-pass" / "path secret/db.txt", reason)
/// (entry label e.g. "secret DB_PASS" / "path secret/db.txt", reason)
pub skipped: Vec<(String, String)>,
/// The commit id; None on --dry-run or when nothing needed rewrapping.
pub commit: Option<ObjectId>,
Expand Down Expand Up @@ -470,9 +470,9 @@ mod tests {
let repo = Repo::init(&root).unwrap();
let (alice_sk, alice_pk) = scl_crypto::generate_keypair();
let (_esc_sk, esc_pk) = scl_crypto::generate_keypair();
repo.secret_add("db-pass", b"hunter2", std::slice::from_ref(&alice_pk))
repo.secret_add("DB_PASS", b"hunter2", std::slice::from_ref(&alice_pk))
.unwrap();
repo.secret_add("api-key", b"tok", std::slice::from_ref(&alice_pk))
repo.secret_add("API_KEY", b"tok", std::slice::from_ref(&alice_pk))
.unwrap();
let tip_before = repo.head_tip().unwrap().unwrap();

Expand All @@ -491,7 +491,7 @@ mod tests {
// ONE commit: new tip's sole parent is the old tip.
assert_eq!(repo.snapshot(&commit).unwrap().parents, vec![tip_before]);
// Both secrets now sealed to alice + escrow.
for name in ["db-pass", "api-key"] {
for name in ["DB_PASS", "API_KEY"] {
let rids = repo.secret_recipients(name).unwrap();
assert_eq!(rids.len(), 2, "{name} must gain the escrow key");
assert!(rids.contains(&esc_pk.recipient_id()));
Expand Down
Loading
Loading