Commit Graph

42 Commits

Author SHA1 Message Date
Peter Steinberger
ba41885b1c test: raise coverage to 85% 2026-01-09 09:18:16 +01:00
Peter Steinberger
8b18ae87c9 fix(lint): resolve wsl lint findings (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:49:53 +01:00
Peter Steinberger
852083613f fix(lint): tidy wsl spacing (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:41:05 +01:00
Peter Steinberger
6547ac0b04 fix(lint): satisfy fmt/lint checks (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:39:24 +01:00
Peter Steinberger
7beb1bc52f fix(lint): tidy test lint findings (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:34:38 +01:00
Peter Steinberger
c1ebd60210 test: expand coverage and tracking regressions (#35)
Thanks @salmonumbrella.

Co-authored-by: salmonumbrella <salmonumbrella@users.noreply.github.com>
2026-01-09 04:21:16 +01:00
Peter Steinberger
088bb6c801 fix(secrets): linux dbus guard (#51, thanks @salmonumbrella) 2026-01-09 01:58:50 +01:00
salmonumbrella
64aa17f167 fix(secrets): detect headless Linux and avoid D-Bus hangs (#45)
On headless Linux systems (e.g., Raspberry Pi), gnome-keyring may be
installed but not running. When this happens, the keyring library's
attempt to connect to D-Bus SecretService hangs indefinitely.

This change adds two layers of protection:

1. D-Bus detection: If DBUS_SESSION_BUS_ADDRESS is not set and backend
   is "auto", automatically use file backend (avoids hang entirely)

2. Timeout fallback: If D-Bus is present but unresponsive, timeout after
   5 seconds with guidance to use file backend

The D-Bus detection handles the common case cleanly without goroutine
leaks. The timeout is a safety net for edge cases where D-Bus is set
but SecretService is still unresponsive.

Fixes #45

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 01:55:37 +01:00
Peter Steinberger
7a59bad6e6 fix(auth): accept manual OAuth URL without newline 2026-01-08 12:26:52 +01:00
Peter Steinberger
c104480f8f fix(secrets): validate keyring backend in config 2026-01-08 12:08:45 +01:00
Peter Steinberger
de72b27dd8 feat(cli): add output flag aliases 2026-01-08 10:29:35 +01:00
Peter Steinberger
b65c425799 refactor(secrets): inject keyring opener 2026-01-08 09:34:08 +01:00
Peter Steinberger
3e837c4313 refactor(secrets): add secret helpers 2026-01-08 09:29:56 +01:00
salmonumbrella
4a7d9d1f4a fix(lint): resolve pre-existing lint issues
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 07:46:24 +01:00
Peter Steinberger
006d02e17e fix(calendar): restore search window defaults
Some checks failed
ci / test (push) Has been cancelled
ci / worker (push) Has been cancelled
ci / darwin-cgo-build (push) Has been cancelled
2026-01-08 06:36:12 +01:00
salmonumbrella
f70329b5b1 fix: resolve lint issues (shadow, wsl, wrapcheck, ineffassign)
Fix pre-existing golangci-lint issues:
- govet shadow: variable shadowing in tests
- wsl: whitespace linter spacing issues
- wrapcheck: unwrapped errors from external packages
- ineffassign: ineffectual assignment in root.go

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 06:28:51 +01:00
Peter Steinberger
705190ddb1 refactor(tracking): store tracking secrets in keyring 2026-01-08 05:25:57 +01:00
Peter Steinberger
bf0b75a669 fix(secrets): normalize keyring backend values (#26) 2026-01-07 19:20:26 +01:00
Peter Steinberger
39921a3831 Calendar: add --add-attendee flag
Co-authored-by: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com>
2026-01-07 17:10:58 +01:00
Peter Steinberger
c5974f77ec test(config): expand keyring backend coverage 2026-01-03 13:23:17 +01:00
Peter Steinberger
d1c53e9d5c feat(config): add JSON5 config and auth status 2026-01-03 13:20:36 +01:00
salmonumbrella
e12b2f95b0 fix: address format and lint issues
- Group const declarations with parentheses per gofumpt rules
- Add errInvalidKeyringBackend static error to satisfy err113
- Wrap dynamic error with static error using fmt.Errorf("%w: ...")

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 13:03:27 +01:00
salmonumbrella
66f5a1a2fd fix: skip keychain test on non-macOS platforms
The wrapKeychainError test was failing on Linux CI because
IsKeychainLockedError always returns false on non-Darwin platforms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 06:52:36 +01:00
salmonumbrella
bf534007a2 feat(secrets): wrap keychain errors with unlock guidance
When SetToken encounters a locked keychain error (-25308), the error
message now includes instructions for how to unlock the keychain
manually using the security command.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 06:52:36 +01:00
salmonumbrella
1072e850d7 feat(secrets): add macOS keychain lock detection and unlock helpers
Add platform-specific helpers to detect when the macOS keychain is locked
and prompt the user to unlock it. This is the foundation for fixing GitHub
issue #22 where `gog auth` fails with "User Interaction is not allowed.
(-25308)" on macOS 26.2.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 06:52:36 +01:00
Peter Steinberger
0bb5da41da fix: satisfy lint for oauth + keyring 2026-01-02 19:58:34 +01:00
Peter Steinberger
0662d53fcf style: gofumpt secrets store 2026-01-02 19:56:49 +01:00
Peter Steinberger
19d833fd3e feat: add token validation + keyring backend override 2026-01-02 14:03:06 +01:00
Peter Steinberger
3c1afc6caf chore: tighten lint rules and fix findings 2025-12-31 19:47:32 +01:00
Peter Steinberger
e616a5b733 chore: tighten lint rules 2025-12-31 17:51:45 +01:00
Peter Steinberger
348f6d2a05 test: raise coverage and tighten lint 2025-12-31 14:31:49 +01:00
Peter Steinberger
c888a85b1c test: add regression coverage 2025-12-26 19:20:53 +01:00
Peter Steinberger
9d8d36a94e feat: take over PR #18 integration 2025-12-26 15:35:15 +01:00
Peter Steinberger
e8dc1af8a1 refactor(secrets): remove Keychain trust env toggle 2025-12-26 08:33:34 +00:00
Peter Steinberger
3f2f858820 fix(secrets): trust Keychain application by default 2025-12-26 08:20:50 +00:00
salmonumbrella
e7fae164f4
feat: add context propagation, security fixes, and new features
Drive:
- Add context propagation to all API calls
- Add path traversal security fix in download

Gmail:
- Add context propagation to labels and thread commands
- Simplify MIME building (remove unused ReplyTo, BodyHTML)
- Add --from flag for send-as aliases in send and drafts
- Simplify base64 decoding
- Add path traversal security fix in attachments

Calendar:
- Add needsAction status support to respond command
- Add --comment flag for response comments
- Add organizer check to prevent self-response

Auth:
- Add browser-based account management command (auth manage)
- Add web UI for managing connected accounts

Maintenance:
- Update golangci-lint config for v2 compatibility
2025-12-24 19:14:01 -08:00
Peter Steinberger
ed9ec54b55 test: cover keyring file password fallback 2025-12-24 17:33:41 +01:00
Peter Steinberger
6ee747d36e fix: make file-keyring non-interactive safe 2025-12-24 17:32:14 +01:00
Advait Shinde
cac66d50b7 Fix keyring file backend: set FileDir + password prompt 2025-12-24 17:30:29 +01:00
Peter Steinberger
b15eda9ad1 test: raise coverage (gmail labels, ui, secrets) 2025-12-12 16:14:14 +00:00
Peter Steinberger
89a133a983 Tests: increase unit coverage 2025-12-12 15:18:20 +00:00
Peter Steinberger
bfbc6e4323 Unify Google CLI with auth, services, and CI 2025-12-12 14:18:38 +00:00