SC

scan-for-secrets

Privacy & Security

scan-for-secrets scans text files for user-supplied secret strings and common escaped variants, with optional confirmed redaction.

Use with conditions
Last updated2026-04-06
Open source licenseApache-2.0
PlatformsPython CLI; complete operating-system support is not separately documented

About this project

scan-for-secrets searches text files for secret values supplied by the user, including common escaped forms that a direct text match could miss. It can scan selected files or recursively scan directories while ignoring binary files. One documented use is checking coding-agent logs before sharing them publicly.

The Python command-line tool can be installed with pip or uv, or invoked through uvx. Users provide known values through the documented input methods and choose the files or directories to inspect. A default configuration can execute shell commands to obtain secrets, so that configuration must be treated as executable local content.

The code is Apache-2.0. Redaction lists matching locations and asks for confirmation before changing files in place, so originals should be backed up first. A clean exit means the supplied values were not found by this scan; it does not prove that all possible secrets or sensitive information have been removed.

Project sources

  • Simon Willison

    @simonw

    Author release

    The project author publishes the scan-for-secrets 0.3 release notes on their own website; this is an author release, not an X recommendation.

Source labels distinguish recommendations, neutral mentions and the author’s own releases. Commercial relationships are unknown unless an author relationship is shown. Worthary reviews project eligibility separately.

Decision guide
01

Why it is worth a look

  • Find supplied secret strings in text files
  • Match common escaped forms of known values
02

Before you use it

  • Checks supplied values rather than discovering every possible secret
  • Configuration commands execute locally and need review
  • Redaction modifies files in place after confirmation
  • Keep real credentials out of shared command examples and outputs
Manual setupModerate
With an AI agentModerate
DeploymentNot verified
Additional requirements1 confirmed; others not verified

Checks supplied values rather than discovering every possible secret; Configuration commands execute locally and need review; Redaction modifies files in place after confirmation; Keep real credentials out of shared command examples and outputs; Confirmed requirements: Command line; Some requirements have not been verified. Check the official setup instructions.

03

What it can do

  • Find supplied secret strings in text files
  • Match common escaped forms of known values
  • Optional confirmed redaction of matching content

Who it fits

Good for

Checking text logs for known credential values before sharing; Removing confirmed matches from copied text files

Not a fit

A complete secrets-detection or privacy guarantee; Redacting the only copy of important files without a backup

Getting started

  1. Install the official Python package with pip or uv, or use uvx
  2. Choose a limited set of files and the known values to check, following the documented input methods
  3. Inspect matches; back up files before using optional confirmed redaction