Skip to content

[security] Encryption key not gitignored; OKF bundle repo has no .gitignore #7

Description

@stancsz

Severity: High — surfaced in the architect review (2026-06-20).

R13 selective encryption (iter-22) protects private Concepts, but the surrounding secret hygiene is incomplete:

  • The encryption key ($SECONDBRAIN_KEY_FILE / ~/.secondbrain/secret.key) is not matched by any .gitignore rule.
  • sync.ensure_repo() creates the OKF bundle repo with git init only — the bundle repo gets no .gitignore at all (scripts/sync.py:28).

For a privacy product this is the one mistake you cannot make: if a key file or brain.db ever lands inside the bundle directory, the next sync commits and pushes it.

Acceptance criteria

  • The repo .gitignore (and a generated bundle-repo .gitignore) exclude *.key, secret.key, brain.db*, and any conflict/trash artifacts that must not be pushed.
  • sync.ensure_repo() writes a .gitignore into the bundle repo on init.
  • A verifier asserts: a key file placed in the bundle dir is never staged/committed by sync.

Activity

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions