security: harden token cache permissions and verify self-update checksums#280
Merged
LargeModGames merged 1 commit intoMay 27, 2026
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
spotatui update --installflows 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).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:
sha2andhexas dependencies for checksum verification and enabled theblockingfeature forreqwestto 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.