ORIGIN // ERLICH.DIGITAL
BUILD: STATIC // ZERO-3P
Brian Erlich

leakscan

A pre-send check that scans files for credentials, private network addresses, and credential-folder paths before they leave the machine.

Published (UTC)

leakscan is a pre-send check for files about to leave my machine: text I plan to paste into a chat, a file I plan to upload, or files bound for a public repository. I designed it, directed the work, and run it; AI coding agents wrote most of the code.

It scans files for three kinds of sensitive material:

  • credentials
  • private network addresses
  • paths to credential folders

When leakscan finds a hit, it exits with a non-zero status, so a calling script can stop before anything is sent. It masks the matches it prints.

The tool is one Python file with no dependencies, for Python 3.8 or later, with 14 automated tests. Two other AI models reviewed the code independently before release, and their findings were fixed. It is MIT licensed.

Limitations

leakscan matches patterns. It can miss a secret that fits none of them, so a clean result does not guarantee that a file is safe to send.