Skip to content

security: harden token cache permissions and verify self-update checksums#280

Merged
LargeModGames merged 1 commit into
mainfrom
security/token-permissions-and-update-verification
May 27, 2026
Merged

security: harden token cache permissions and verify self-update checksums#280
LargeModGames merged 1 commit into
mainfrom
security/token-permissions-and-update-verification

Conversation

@LargeModGames
Copy link
Copy Markdown
Owner

This pull request introduces important security enhancements to the update and authentication flows, along with a new miniplayer feature and dependency updates. The most significant changes are the addition of SHA-256 checksum verification for self-updates, improved file permissions for the OAuth token cache, and the new miniplayer view. These changes increase user safety and add new functionality.

Security improvements:

  • The self-update and spotatui update --install flows now download and verify the SHA-256 checksum sidecar for each release asset before replacing the binary, rejecting compromised assets before installation (src/cli/update.rs, Cargo.toml, CHANGELOG.md).
  • The OAuth token cache file is now written with mode 0600 (owner read/write only) on Unix, preventing other local users from reading the Spotify refresh token (src/core/auth.rs, CHANGELOG.md).

Dependency updates:

  • Added sha2 and hex as dependencies for checksum verification and enabled the blocking feature for reqwest to support synchronous HTTP requests during update verification (Cargo.toml).

These changes significantly strengthen the security of the update process and the handling of sensitive authentication data.

…sums

  Write OAuth token cache with mode 0600 on Unix so the refresh token is
  not world-readable on shared systems.

  Verify the SHA-256 sidecar published alongside each GitHub release asset
  before calling status.update(), so a compromised release is rejected
  before the binary is replaced.
@LargeModGames LargeModGames merged commit e8df24e into main May 27, 2026
9 checks passed
@LargeModGames LargeModGames deleted the security/token-permissions-and-update-verification branch May 27, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant