Skip to content

Latest commit

 

History

History
81 lines (56 loc) · 2.82 KB

SECURITY.md

File metadata and controls

81 lines (56 loc) · 2.82 KB

SECURITY.md — Civil Law Copilot (Personal)

Owner: Rafael (local machine)
Scope: Private legal research assistant for JP family law. Highly sensitive.

1) Threat model (plain English)

  • Crown jewels: case facts, negotiation strategy, chat history, income numbers, child schedules.
  • Main risks: laptop theft; accidental cloud sync; pasting PII into external LLMs; repo push to GitHub; logs leaking tokens.
  • Adversaries: curious 3rd parties, cloud providers, hostile counsel in litigation.

2) Data classification

  • SECRET: case facts, chat logs, strategy, raw docs with annotations.
  • SENSITIVE: law PDFs/XML (public) + my chunk metadata.
  • PUBLIC: code, generic prompts, docs without case data.

3) Storage map

  • data/raw/** – source PDFs/XML/HTML (SENSITIVE)
  • data/processed/** – extracted text/chunks (SENSITIVE)
  • data/case/** – case facts & strategy (SECRET)
  • chroma/** – vector store (SECRET if contains case text)
  • db/chat.sqlite3 – chat logs (SECRET)
  • .env – API keys (SECRET)

☐ Verify data/case/, chroma/, db/ excluded from Git (see .gitignore)
☐ Confirm no cloud sync on project folder (Dropbox/Drive/OneDrive off)

4) Secrets & keys

  • .env lives locally only.
  • Default local-only mode: ALLOW_EXTERNAL_LLM=false.
  • If enabling API: use per-project key, never paste logs externally.

☐ .env is in .gitignore
☐ Rotatable API keys (document where)

5) LLM/Network policy

  • No PII (full names, addresses) to external APIs.
  • Use initials in prompts and logs (e.g., Wife = “S.”, Child = “A.”).
  • Strip emails/phones before sending to any API.

☐ External calls blocked unless explicitly toggled
☐ Redaction filter runs before any outbound call

6) Device security

☐ Full-disk encryption enabled
☐ Screen auto-lock ≤ 5 min
☐ OS + browser up to date
☐ Strong login/passcode or hardware key

7) Backups (local only)

  • Weekly offline backup to encrypted drive (Veracrypt/FileVault dmg).
  • Backup items: data/, chroma/, db/chat.sqlite3, source.yml, SECURITY.md.

☐ Test restore quarterly
☐ Keep backup drive physically separate

8) DLP (Data Loss Prevention) checklist

☐ Use initials in: case_profile.yml, strategy.md, chat prompts
☐ Mask numbers where possible (income bands, not exact ¥)
☐ Sanitize exports (no names, no addresses)
☐ Never push SECRET files to Git
☐ Review commit diffs for accidental secrets

9) Incident response (mini)

  • If you suspect leakage:
    1. Revoke keys; 2) Move/rotate .env; 3) Invalidate tokens;
    2. Re-encrypt/rotate backup; 5) Note what was exposed and when.

10) Ops habits

☐ Close the app when not in use
☐ Don’t demo this app in public places
☐ Use “JP cites first; EN for convenience” rule in outputs