Skip to content

Commit 0e67b6c

Browse files
Merge pull request #1 from Spacecraft-Software/m5-slice2-tui-reveal-copy
feat(vault): M5 slice 2 — TUI reveal + agent-side clipboard copy
2 parents 7c4c0a1 + 249105e commit 0e67b6c

15 files changed

Lines changed: 976 additions & 40 deletions

File tree

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,40 @@ range may break in any release.
1010

1111
### Added
1212

13+
- **M5 (slice 2) — TUI reveal + clipboard copy.** The detail pane is no longer
14+
secret-free: `Space` reveals the selected login's password on demand and
15+
`c` / `u` / `o` copy the password / username / URI to the clipboard, with a
16+
status-bar toast (`copied password · clears in 30s`) and a 30-second
17+
auto-clear. Copy/reveal act only when the item list is focused.
18+
- **Clipboard lives in the agent**, not the TUI. A new `Request::Copy { id,
19+
name, field, clear_after_secs }` has the agent decrypt the field, place it on
20+
its own clipboard (`arboard`, `wayland-data-control`), and schedule the
21+
clear — so the secret never crosses the socket on the copy path, the copy
22+
survives the TUI quitting, and a future `vault get --copy` becomes possible.
23+
The auto-clear task only wipes the clipboard if it still holds what we wrote
24+
(or can't read it back, failing safe), leaving anything the user copied since
25+
untouched. Behind a default-on `clipboard` feature on `vault-agent`; a
26+
`--no-default-features` headless build drops the X11/Wayland tree and answers
27+
`Copy` with a clean "not compiled in" error.
28+
- **Reveal uses `Request::Get`**, which gains an `id: Option<String>` field.
29+
The TUI targets the *exact* selected cipher id, closing a real footgun:
30+
`get_item` matched by name only, so a duplicate item name could reveal/copy
31+
the wrong item. Name remains the fallback selector and error label; the CLI
32+
passes `id: None` (unchanged behavior). Revealed plaintext is held in a
33+
`RevealedSecret` newtype (zeroised on drop, redacted in `Debug`) and
34+
re-masked on any navigation.
35+
- Tests: `vault-agent` gains an id-targeting-among-duplicate-names regression
36+
test and a pure `should_clear_clipboard` unit; `vault-tui` adds reveal /
37+
re-mask / toast / `Debug`-redaction units and `TestBackend` smokes for the
38+
masked-by-default, revealed, and toast states.
39+
- Supply-chain: `arboard` pulls `error-code` (`BSL-1.0`, via Windows-only
40+
`clipboard-win`) — added to `deny.toml`'s allow-list (FSF-confirmed
41+
GPL-compatible). No new advisories (`cargo deny check advisories` clean).
42+
- Known limitation: on `Quit` / `stop-agent` a pending auto-clear task dies
43+
with the runtime, so a just-copied secret can linger on the clipboard until
44+
overwritten (notably under `wayland-data-control`'s serving process). A
45+
clear-on-shutdown sweep is a tracked follow-up.
46+
1347
- **M5 (slice 1) — `vault-tui` skeleton (read-only browser).** The TUI stub is
1448
now a real cruxpass-style three-pane interface (`ratatui` + `crossterm`):
1549
**left** folder list, **center** filterable item list, **right** item detail,

0 commit comments

Comments
 (0)