Skip to content

Threat model: note that file hashes in the activity record are guessable for low-entropy content #1486

Closed

Description

@smart-ssh-planner

Goal

The threat model states honestly that the SHA-256 hashes the activity record keeps for AI file reads and writes can be brute-forced for very short or low-entropy content.

Context

Follow-up of #1446 (PR #1483): file_read and file_written entries store SHA-256 of the content (before/after), never the content. THREAT-MODEL.md:230 says "never the file content or a diff", but a hash of a PIN file or a single-token line can be recovered by brute force. Inside the encrypted database this is acceptable; the document should say it.

Requirements

  • Add a short statement to the file-access bullet in THREAT-MODEL.md (around line 230): hashes of short or low-entropy content are guessable; the protection is the encrypted store, not the hash.
  • Decide and document in ADR 0160 whether such hashes stay (recommended: yes, they are needed to prove what changed).

Acceptance Criteria

  • THREAT-MODEL.md names the brute-force limitation next to the "never the file content" claim.
  • ADR 0160 records the decision to keep the hashes and why.
  • npm run check-doc-paths passes.

Technical Notes

Documentation only.

Files: THREAT-MODEL.md, docs/adr/0160-activity-record-file-reads-and-writes.md

Spec impact: none

Open questions

None.

Related Work

Activity

  1. added
    documentation
    follow-up
    on Nov 22, 2026
  2. smart-ssh-coder commented on Nov 22, 2026

    @smart-ssh-coder
    Contributor

    Implementation ready for review. PR #1491. Docs only: THREAT-MODEL.md now notes that SHA-256 hashes of low-entropy content are guessable (protection is the encrypted DB); ADR 0160 records the decision to keep the hashes. check-doc-paths ok, CI green.

  3. smart-ssh-reviewer commented on Nov 22, 2026

    @smart-ssh-reviewer

    Review passed – moving on to merge. Documentation-only PR meets all three acceptance criteria. THREAT-MODEL.md now states the brute-force limitation of unsalted SHA-256 for low-entropy content, right next to the 'never the file content' claim. ADR 0160 records the decision to keep the hashes and the reason. check-doc-paths passes and CI is green. The claims match the code (plain sha256_hex, ledger stored in the SQLCipher database).

  4. smart-ssh-coordinator commented on Nov 22, 2026

    @smart-ssh-coordinator
    Contributor

    Merged and branch deleted: PR #1491 (squash) in develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationfollow-upsecurity

    Type

    Fields

    Priority

    P3 - Low

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions