Redact Secrets Before Taking Screenshots
Best practices for removing secrets from terminal output, IDE views, and dashboards before capturing screenshots for documentation, bug reports, or presentations.
Detailed Explanation
Redacting Secrets Before Screenshots
Screenshots are a common way to share information in bug reports, documentation, and presentations. But terminal windows, IDE editors, and admin dashboards frequently display sensitive data. Unlike text, screenshots cannot be easily searched or edited after sharing — a secret in a screenshot may persist indefinitely.
Why Screenshot Redaction Is Different
Text redaction is straightforward: find and replace. Screenshot redaction requires a different approach because you must redact before capturing:
- Screenshots are images — You cannot search-and-replace text within them
- OCR can extract secrets — Automated tools can read text from screenshots
- Screenshots persist — They get saved in chat history, wikis, email attachments, and presentation slides
- Blurring is not enough — Image processing can sometimes reverse simple blur effects
The Pre-Screenshot Workflow
- Copy the text content from your terminal, editor, or dashboard
- Paste into the Secret Redactor
- Review the redacted output
- Replace the original content with the redacted version
- Take the screenshot
Common Screenshot Scenarios
Terminal Output
# Before - do NOT screenshot this
$ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ curl -H "Authorization: Bearer sk_live_abc123..." https://api.example.com
# After - safe to screenshot
$ export AWS_SECRET_ACCESS_KEY=[REDACTED_AWS_SECRET]
$ curl -H "Authorization: Bearer [REDACTED_API_KEY]" https://api.example.com
Environment Variables Display
When your IDE or terminal shows environment variables, secrets are prominently displayed. Redact the text in the terminal before capturing.
Admin Dashboard Panels
Dashboards for services like Stripe, AWS, or Datadog may show partial API keys, webhook URLs, or connection strings. Copy visible text, redact, and consider cropping the screenshot to exclude sensitive panels entirely.
Additional Precautions
- Use placeholder credentials — When creating tutorials, set up a demo environment with clearly fake credentials
- Crop aggressively — Only include the portion of the screen relevant to your point
- Check the background — Other windows, tabs, and notifications may contain secrets
- Review before sending — Zoom in on the screenshot and scan for any remaining sensitive data
Tools vs. Manual Review
The Secret Redactor handles the text extraction and pattern matching, but you should always manually review the final screenshot. Some secrets may be partially visible, truncated, or formatted in unexpected ways that automated detection might miss.
Use Case
A technical writer is creating onboarding documentation that includes screenshots of the development environment setup process. Terminal output in the screenshots shows AWS credentials, database URLs, and API keys being configured. By pre-redacting the terminal text, the screenshots show the correct workflow steps without exposing any real credentials.