feat(bird): read X cookies from Brave only #25

Merged
hermes merged 1 commits from fm/dotfiles-bird-brave-reader into main 2026-11-28 17:25:29 -05:00
Owner

Intent

Make sure the tweet reader checks Brave only going forward.

What changed

  • home/.config/bird/config.json5 points Bird's Chromium cookie source at Brave only. No Safari or Firefox source is configured.
  • home/.pi/agent/bin/bird reads auth_token and ct0 from Brave's cookie database, decrypts them with the Brave Safe Storage key, and passes them to bird as AUTH_TOKEN and CT0. No browser fallback, no Keychain writes, no credentials-file access, and no secret output.
  • home.nix links both files with mkOutOfStoreSymlink. force = true appears only on the config, because an unmanaged config file already exists at that path.
  • rebuild.sh, readme.md, and the read-tweet skill document the Brave-only path and the recovery step.
  • tests/bird-brave-e2e.sh covers the full path with a throwaway HOME.

Validation

  • E2E check: FAIL before the wrapper existed, PASS after implementation. Four PASS lines cover Brave-only decrypt, Brave Safe Storage keychain use, no secret output, and no touch of Safari, Chrome, Firefox, or the credentials file.
  • tests/run.sh: all existing checks and the new E2E check pass.
  • shellcheck, bash and Python syntax, and Nix evaluation pass.
  • no-mistakes: passed with pr and ci skipped for this Gitea forge. No findings.

No X credentials or cookie values are in git.

## Intent Make sure the tweet reader checks Brave only going forward. ## What changed - `home/.config/bird/config.json5` points Bird's Chromium cookie source at Brave only. No Safari or Firefox source is configured. - `home/.pi/agent/bin/bird` reads `auth_token` and `ct0` from Brave's cookie database, decrypts them with the Brave Safe Storage key, and passes them to bird as `AUTH_TOKEN` and `CT0`. No browser fallback, no Keychain writes, no credentials-file access, and no secret output. - `home.nix` links both files with `mkOutOfStoreSymlink`. `force = true` appears only on the config, because an unmanaged config file already exists at that path. - `rebuild.sh`, `readme.md`, and the `read-tweet` skill document the Brave-only path and the recovery step. - `tests/bird-brave-e2e.sh` covers the full path with a throwaway HOME. ## Validation - E2E check: FAIL before the wrapper existed, PASS after implementation. Four PASS lines cover Brave-only decrypt, Brave Safe Storage keychain use, no secret output, and no touch of Safari, Chrome, Firefox, or the credentials file. - `tests/run.sh`: all existing checks and the new E2E check pass. - `shellcheck`, bash and Python syntax, and Nix evaluation pass. - no-mistakes: passed with `pr` and `ci` skipped for this Gitea forge. No findings. No X credentials or cookie values are in git.
hermes added 1 commit 2026-11-28 16:27:06 -05:00
Bird 0.8.0 asks Keychain for Chrome Safe Storage, but Brave stores its key
under Brave Safe Storage, so the reader fails before it can use Brave.

Manage the Bird config in Nix and add a wrapper at ~/.pi/agent/bin/bird.
The wrapper decrypts auth_token and ct0 from Brave cookie database with the
Brave Safe Storage key and passes them to bird as env vars. It has no
browser fallback, writes no Keychain item, and never opens the credentials
file.

Add an end-to-end shell check with a fake Brave cookie source and keychain.
The check fails before the wrapper exists and passes after implementation.
hermes merged commit 8378ac41fd into main 2026-11-28 17:25:29 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: transnet/dotfiles#25