How to hide API keys in a screen recording on Mac
Record with BlotShot. It reads every frame on your Mac as you record and covers API keys, tokens and passwords with solid bars before the file is written, so a key that scrolls past in a terminal or sits in a .env file never reaches the video. Nothing is uploaded.
Steps
- Install BlotShot. Download BlotShot, drag it into Applications and open it. It sits in the menu bar. Recording is part of BlotShot Pro, a one-time $24.99 purchase.
- Check that keys are switched on. Open the Hide submenu in the BlotShot menu and make sure Keys and Passwords is ticked.
- Start recording. Press ⌃⌥R (Control, Option and R) to record the screen, or choose Record Window or Record Area in the menu to record only your terminal or editor.
- Work as usual. Open the file, run the command, scroll the log. A key is covered from the first frame it appears in, and the bar follows it as the text moves.
- Stop. Press ⌃⌥R again. The recording is saved as an MP4 in the BlotShot folder inside Pictures.
- Watch it once. Reading text is not perfect, and a recording has a lot of frames. With Annotate Captures ticked the recording opens in the editor when you stop, where the Cover tool draws a solid bar over anything that was missed.
What counts as a key
BlotShot recognises the common shapes: AWS access keys, GitHub tokens, Stripe keys, OpenAI style sk- keys, Slack tokens, Google API keys, JSON Web Tokens, private key headers, Authorization: Bearer values, and any line that assigns a value to a name containing password, secret, token or API key, such as STRIPE_SECRET_KEY=sk_live_…. Email addresses and card numbers are covered too.
For a secret with a shape of its own, add it to Custom Words under Hide before you record.
Why not blur it afterwards
Blurring after the fact means finding every frame the key appears in, by hand, in a video editor, and blurred text can often be read back. BlotShot covers the key with a solid bar while recording, so the uncovered key is never in the file.
Screenshots
The same covering applies to screenshots, and that part is free: email addresses, keys and passwords, and card numbers are covered before the picture is saved.
More
In the guide: Screen recording. What gets covered.