You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beets stores authentication/token files that may contain sensitive credentials. These files should not be readable or writable by other users on the system.
Currently, token files may be created using the default filesystem permissions, which can result in permissions that are more permissive than intended depending on the user's umask.
Expected behavior
Token files should always be created with permissions:
0600
This means:
Owner: read + write
Group: no access
Others: no access
The implementation should explicitly set the file mode rather than relying solely on the process umask.
Proposed solution
When creating or writing token files, ensure they are created with 0600 permissions. Ideally, the file should be created atomically with the desired mode to avoid a window where the file has broader permissions.
For existing token files, consider restricting their permissions to 0600 when they are accessed or updated.
Marked as good first issue for human contributors to explore how plugins handle authentication and token files. Fully automated PRs from agents may be rejected.
Hi, I noticed this is currently assigned to @snejus but there doesn't seem to be a linked PR yet. Are you still working on it? If not, I'd be interested in taking it and adding tests covering 0600 permissions for newly created and existing token files.
Activity
semohr commentedon Sep 3, 2026
Marked as
good first issuefor human contributors to explore how plugins handle authentication and token files. Fully automated PRs from agents may be rejected.util: remove open_secure(), superseded by TokenFileMixin
Implement TokenFileMixin for token caching
Refactor DiscogsPlugin to use TokenFileMixin
Refactor Spotify plugin for token handling
Refactor BeatportPlugin to use TokenFileMixin
Refactor TidalPlugin to use TokenFileMixin
Update token_path type to support Path
Refactor tidal session for token handling
Remove OpenSecureTest class and related tests
Implement tests for TokenFileMixin functionality
fix: prescreen rejects an issue a maintainer reserved for human contr…
Rudra-G-23 commentedon Oct 7, 2026
Hi, I noticed this is currently assigned to @snejus but there doesn't seem to be a linked PR yet. Are you still working on it? If not, I'd be interested in taking it and adding tests covering
0600permissions for newly created and existing token files.