Please report a vulnerability privately through GitHub's Report a vulnerability button on the repository's Security tab, not in a public issue. Include what you did, what you expected, and what happened; there is no need to include a token (see below, and please do not).
- No client secret exists. Trak uses Authorization Code with PKCE and a user-supplied Client ID, so there is nothing secret to ship or to leak from the binary.
- The token is a
0600file,~/.config/trak/token.json(XDG_CONFIG_HOMEis respected), in a0700directory, written atomically. Trak refuses to read a token file whose mode is looser than0600. There is no Keychain backend on purpose (it hangs for an unsigned binary; seedocs/KEYCHAIN.md). - The token never appears in
config.toml, in logs, in error messages or inDebugoutput; every type that can hold one prints[redacted], and a test asserts no error notice contains it. - The login listener binds
127.0.0.1on an ephemeral port, checks thestatevalue, and is closed as soon as one redirect has been handled. - Refresh tokens expire after six months. Trak warns before then and, if Spotify rejects one, deletes it and asks you to log in again.
- Trak talks to Spotify through the desktop app (AppleScript) and, if you add a Client ID,
the Web API over HTTPS. Besides that it fetches album art from Spotify's image CDN and looks up lyrics at LRCLIB
(
[lyrics] enabled = falseturns the lookup off). Nothing else leaves the machine.
To revoke Trak completely: remove it under Apps in your Spotify account page, and delete
~/.config/trak/token.json.