Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion THREAT-MODEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ provider (e.g. Ollama on `127.0.0.1`): then nothing leaves your machine
([ADR 0084](docs/adr/0084-red-risk-requires-confirm.md), §3).
- **File reads and writes by the AI** appear in the ledger as path, size, SHA-256
and (for writes) backup path only — never the file content or a diff. Paths
are redacted like command text.
are redacted like command text. A SHA-256 of very short or low-entropy
content (a PIN file, a single-token line) can be recovered by brute force,
so the hash is not a secrecy boundary: the protection is the encrypted
database, not the hash
([ADR 0160](docs/adr/0160-activity-record-file-reads-and-writes.md)).
- **Your own chat messages** are stored as you typed them (inside the
encrypted database, section 3) and redacted only when they are sent.

Expand Down
1 change: 1 addition & 0 deletions docs/adr/0160-activity-record-file-reads-and-writes.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ADR 0047 point 3 limited the ledger to `SuggestCommand`. A file read or write by
| When is `file_written` written? | Only after the write succeeded. A rejected, blocked or failed write leaves no `file_written` entry. | "Written" must mean bytes were written. A failed write is visible as the action error in the chat. |
| "Before" values | Size from the stat before the write; hash from the content read for the backup. On the sudo path the old content is read over SFTP once more for the hash; it is absent only when that read itself is denied or fails (size still recorded). A new file has no "before". | No privileged read is added; the extra read on the sudo path is an ordinary SFTP read. |
| "After" values | Computed over the bytes sent to the server (after the edition's outgoing transform). | These are the bytes that were written. |
| Keep the hashes? | Yes. The hashes stay, although the SHA-256 of very short or low-entropy content can be guessed by brute force. | They are needed to prove what changed and which version the AI saw. The protection for them is the encrypted database, not the hash; the threat model says so. |
| Redaction | Path and backup path go through the same central redaction as command text. | Spec 0057 §1.2. |
| Link to the action | Entries carry the `action_id` of the proposed action. | Spec 0057 §1. |
| Decision entries for file actions | File writes get confirmed, rejected, auto-approved or blocked decision entries, linked by `action_id` to the `file_written` entry. File reads get none. | Reads need no confirmation; a write's decision is part of the record of who allowed it. |
Expand Down
Loading