Skip to content

Feature/hide copied secrets - #19

Merged
tarikbc merged 2 commits into
tarikbc:mainfrom
NigamDevansh:feature/hide-copied-secrets
Oct 10, 2026
Merged

tarikbc merged 2 commits into
tarikbc:mainfrom
NigamDevansh:feature/hide-copied-secrets

Conversation

@NigamDevansh

Copy link
Copy Markdown
Contributor

What this changes

  • Hide Secrets. API keys, tokens, passwords and card numbers are shown with the middle masked (sk-p••••••abcd) on cards, in the preview, the paste stack and the menu bar list. An eye button on the card and in the preview reveals them. Pasting, copying and dragging still use the real value. On by default, in Settings > Privacy.
  • Delete Secrets After. Optionally deletes a card that contains a secret a set time after it was first copied (1 hour to 7 days). Off by default. Favorites and pinboard items are never deleted.
  • Detection is conservative. It recognizes known key formats, JWTs, private keys, valid card numbers, and name = value only when the value is quoted, the name is an ALL-CAPS .env name, or it is a URL parameter.
  • Database: migration v4 adds a nullable containsSecret column. Existing history is only scanned once someone turns deletion on.

How you tested it

Screen.Recording.2026-10-10.at.4.45.19.PM.mov

Ran on macOS 27 in demo mode, which now seeds four fake secrets. Debug builds have a "1 Minute" option to watch a deletion happen. swift test --package-path CopyCore passes, with new SecretDetectorTests and SecretRetentionTests.

All keys in the tests and demo data are fake.


  • Every commit is signed off (git commit -s, or turn on the hook once with
    git config core.hooksPath .githooks). The DCO check enforces this. See
    CONTRIBUTING.md.
  • Engine changes come with tests (swift test --package-path CopyCore)
  • CopyCore/Package.resolved still pins GRDB, KeyboardShortcuts and Sparkle

A copied API key, token, password or card number showed in full on its
card, in the preview, in the paste stack and in the menu bar list, and
stayed in history for as long as anything else.

Hide Secrets (Settings > Privacy, on by default) draws the middle of
each secret as bullets, keeping a few characters at each end so the key
is still recognizable. An eye button on the card's hover actions and in
the preview reveals it; a revealed card is masked again when the shelf
closes. Masking is display only: pasting, copying and dragging use the
real text.

Delete Secrets After (Never by default; 1 hour to 7 days) removes an
item that contains a secret once that long has passed since it was
first copied. Favorites and pinboard items are never deleted, the same
promise the history retention makes.

SecretDetector is deliberately conservative. It recognizes provider key
formats by their prefix, JWTs, private key blocks and card numbers with
a valid checksum, and a generic name = value only when the value is
quoted, the name is an ALL-CAPS .env name, or it is a URL parameter.

Migration v4 adds a nullable item.containsSecret column. It is filled
in by the deletion job, so existing history is only scanned once the
user picks a lifetime.

Demo mode seeds four fake secrets to show the feature, and Debug builds
get a 1 Minute lifetime for testing. Every key in the tests and the
demo data is fake and assembled from pieces.

Signed-off-by: devansh nigam <devanshn02@gmail.com>
Signed-off-by: devansh nigam <devanshn02@gmail.com>
@NigamDevansh

Copy link
Copy Markdown
Contributor Author

Hi @tarikbc , added a new feature for keeping the copied sensitive info safe , please do have a look and let me know if there are any changes.

Thanks..!!

@tarikbc

tarikbc commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Very good as always. Thanks @NigamDevansh !!

@tarikbc
tarikbc merged commit b5dcbfe into tarikbc:main Oct 10, 2026
2 checks passed
@tarikbc tarikbc mentioned this pull request Oct 11, 2026
tarikbc added a commit that referenced this pull request Oct 11, 2026
Bumps the version to 0.3.0 (build 10) and records what changed since 0.2.0:
Hide Secrets and Delete Secrets After (#19), and drag to select (#18).

The site's What's New strip and its privacy section now mention both. Its
download links stay on 0.2.0 on purpose: the release workflow rewrites them
once the 0.3.0 DMG exists, so pointing them at it any earlier would break
downloads in between.

Signed-off-by: Tarik Caramanico <tarikcaramanico@gmail.com>
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.

2 participants