Skip to main content

Module security

Module security 

Source
Expand description

Security utilities — leak detection for agent output.

Before posting agent output to GitHub (public), scan for leaked secrets. Inspired by spacebot’s approach. Catches API keys, tokens, passwords, private keys, and connection strings before they hit the internet.

Structs§

LeakMatch
A detected secret in agent output.

Functions§

has_leaks
Quick check: does this text contain any leaked secrets? All patterns are checked regardless of confidence — nothing is posted to GitHub if any pattern matches.
redact
Redact all detected secrets in text, replacing them with [REDACTED:{rule}].
scan
Scan text for potential leaked secrets.