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
{{ message }}
Repository navigation
Credentials encryption key is stored in plain text next to the database #1069
Stored platform credentials (Hugging Face, Kaggle, GitHub) are encrypted with a Fernet key that is saved as a plain file next to the database that holds them, so anyone who can read the DashAI data folder can decrypt every stored token.
container.py#L45-L51 loads or creates the key at CREDENTIALS_KEY_PATH, which is <LOCAL_PATH>/.credentials_key, beside db.sqlite.
encryptor.py#L42-L53 writes the key in plain text. chmod 600 does nothing on Windows, where the error is only logged.
#1063 stops the API from returning decrypted keys, which closes the network path. This issue is about the key at rest: another local user, a backup or sync of the data folder, or any file read bug exposes both the ciphertext and the key.
Suggested fix
Keep the key in the OS keyring (the keyring package), with a migration that moves an existing key file there without losing stored credentials. Where a keyring is not available (Docker), keep DASHAI_CREDENTIALS_SECRET from the environment, and on Windows restrict the file with an ACL for the current user.
Activity