Repository navigation
Conversation
|
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.



Summary
Fixes credential persistence gaps in the Rust backend and tightens the Tauri CSP:
Enable native OS keychain backends for
keyringv3 (src-tauri/Cargo.toml,src-tauri/Cargo.lock)keyring = "3"does not enable any platform credential store by default. Added explicit features:apple-native,windows-native,sync-secret-service, andcrypto-rust.Prevent plaintext DB and SSH secrets from being written to JSON (
src-tauri/src/db/connection_pool.rs,src-tauri/src/models.rs)persist_connection_with_passwordpreviously setstored.password = Some(password.to_string())and wrote it to the local JSON store before saving to the keychain, andrename_connection_in_storewrote it back after loading.SshConfig::redacted()andStoredConnection::redacted()sopersist_connectionalways stripspassword,ssh_config.password, andssh_config.passphrasebefore serializing to disk.StoredConnection::summary()to useSshConfig::redacted()so SSH secrets are not sent to the frontend inConnectionSummary.load_connectionto load SSH secrets from the OS keychain and migrate/clean any legacy plaintext DB or SSH secrets from existing JSON stores.Store and delete SSH credentials in OS keychain (
src-tauri/src/credentials.rs,src-tauri/src/commands/connections.rs)store_ssh_password,get_ssh_password,delete_ssh_password,store_ssh_passphrase,get_ssh_passphrase, anddelete_ssh_passphrase.delete_connectionto also remove SSH keychain entries.Remove
'unsafe-eval'from CSP (src-tauri/tauri.conf.json)script-src 'self' 'unsafe-eval'toscript-src 'self'.Verification
src-tauri/src/models.rs(redacted_strips_db_and_ssh_secrets_before_serialization,summary_does_not_expose_ssh_secrets).cargo test --lib: 117 passed, 0 failed.pnpm test: 115 passed, 0 failed.tauri build -b app).