Skip to content

chore(storage): restrict the cache file to its owner, drop dead tests - #215

Merged
romaintb merged 1 commit into
mainfrom
chore/secure-db-file
Sep 4, 2026
Merged

romaintb merged 1 commit into
mainfrom
chore/secure-db-file

Conversation

@romaintb

@romaintb romaintb commented Sep 4, 2026

Copy link
Copy Markdown
Owner

backends.credentials stores the API token as plaintext JSON, so the cache is a credential file and has no business being world-readable. Set 0600 after connecting, best-effort: a filesystem without Unix modes logs a warning instead of blocking startup.

Also delete tests/storage/{tasks,labels,projects,sections}.rs. Four copies of the same test, asserting only that $HOME is writable, and tests/storage.rs never declared them so they were not even compiled.

Changes

  • Code changes
  • Tests added/updated
  • Docs updated (README/CHANGELOG)

Checklist

  • cargo fmt passes
  • cargo clippy -- -D warnings passes
  • cargo test passes

Related issues

Initialy done by @stevenwcarter in #209

backends.credentials stores the API token as plaintext JSON, so the cache
is a credential file and has no business being world-readable. Set 0600
after connecting, best-effort: a filesystem without Unix modes logs a
warning instead of blocking startup.

Also delete tests/storage/{tasks,labels,projects,sections}.rs. Four
copies of the same test, asserting only that $HOME is writable, and
tests/storage.rs never declared them so they were not even compiled.
@romaintb
romaintb force-pushed the chore/secure-db-file branch from ac6b243 to 6e233d6 Compare September 4, 2026 10:56
@romaintb romaintb self-assigned this Sep 4, 2026
@romaintb romaintb added the feat label Sep 4, 2026
@romaintb romaintb added this to the v0.6.0 milestone Sep 4, 2026
@romaintb
romaintb merged commit 3b843da into main Sep 4, 2026
28 of 36 checks passed
@romaintb
romaintb deleted the chore/secure-db-file branch September 4, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant