Skip to content

Store the VirusTotal API key in the Keychain - #30

Open
andrei-chernikov wants to merge 2 commits into
Jerry23011:mainfrom
andrei-chernikov:feat/keychain-api-key
Open

andrei-chernikov wants to merge 2 commits into
Jerry23011:mainfrom
andrei-chernikov:feat/keychain-api-key

Conversation

@andrei-chernikov

Copy link
Copy Markdown
Contributor

The API key was kept in UserDefaults, which means it sits in plain text in the app's preferences plist.

  • The key now lives in the login Keychain as a generic password (kSecAttrAccessibleWhenUnlockedThisDeviceOnly).
  • A key written by an earlier version is migrated on launch and removed from UserDefaults.
  • Settings asks for confirmation the first time a key is saved, so the Keychain prompt is not a surprise, and trims whitespace around the key and username before verifying.

Andrei Chernikov and others added 2 commits August 7, 2026 02:23
The API key was kept in UserDefaults, which means it sits in plain text in
the app's preferences plist. It now lives in the login Keychain as a generic
password (kSecAttrAccessibleWhenUnlockedThisDeviceOnly), and a key written by
an earlier version is migrated on launch and removed from UserDefaults.

The settings screen asks for confirmation the first time a key is saved, so
the Keychain prompt is not a surprise, and trims whitespace around the key
and username before verifying.

Czech and Simplified Chinese strings are machine translations and are marked
as such in the catalog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant