Repository navigation
Passwords stay encrypted in memory; editors no longer show stored ones - #70
Conversation
Stored passwords (connections, folders, shares, defaults, saved credentials) are now a Secret: AES-256-GCM with a per-process key, decrypted only for the call that uses them into a pinned buffer that is wiped afterwards. Loading opens each sealed row straight into a Secret; database records carry a placeholder instead of the value. The editors start with an empty password box: typing replaces the stored password, Remove stored password clears it. Tests: Secret unit and view tests, a memory-dump test of the test process, and lab case C-DB-14 (dump of RemoteHub.exe on the client VM). Device sync is marked not planned in local-db-design.md.
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
|
Pull requests start as drafts here. Mark this one Ready for review when it's done and all checks have passed. |
…iable (GitGuardian false positives)
Stored passwords no longer sit in memory as plain strings. They stay encrypted and are decrypted only for the call that uses them. Until now, every stored password was decrypted when the data loaded (
local-db-design.md§15 listed this as open). Device sync is marked not planned.Passwords in memory
Secret(Services/Secret.cs) replacesstring? PasswordinCredentialSetandSavedCredential.Usedecrypts into a pinned buffer, hands it over as a span and wipes it afterwards.ToSecureStringbuilds PowerShell's credential straight from that buffer.ToString()is never the value.SecretBox.OpenSecretopens eachsecretsrow straight into aSecret.SecretJsonConverter.Capture/Supply), so the value never enters the JSON text in either direction.SecureStringin a wiped buffer.SecureString.Sync
Device sync (phase 4) is marked not planned in
local-db-design.md§8, §12, §13 and §16, and in the notes and scripts designs. The shared settings folder already covers using the same connections on several PCs.Tests
SecretTests:Credentials.PasswordSecretBoxopens a password only in its own placeSecretMemoryTests:Use,SecureString, sealing and opening, a record, and a JSON read.C-DATA.Tests.ps1, client VM):RemoteHub.exeis dumped in full.HelperClipboardFilesTests.Files_copied_by_another_program_reach_the_helper_as_files, is a clipboard test this PR doesn't touch, and it passed when rerun.Docs
local-db-design.md: §5, a new §17 "Passwords in memory" (including where a plain copy still exists), §15 and §16.