scan_secrets
Scan any text payload for secrets and PII before it leaves for an LLM or external API, and get a redacted copy. Works offline with no API key, returning tokens like [REDACTED-KEY].
Instructions
Scan a text payload (a prompt, an outbound API body, a file's contents) for secrets and PII BEFORE it leaves for an LLM or external API, and return a redacted copy. Catches the #1 real-world agent incident: secrets/PII leaking into a model's context.
WORKS OFFLINE with no API key — the detection runs in-process (pure regex
Luhn check, no network). If a SecretScan backend key IS configured, the scan is routed there instead (which also persists an audit record).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The payload to inspect (prompt, request body, document text). | |
| redact | No | If True (default), each match is replaced with a token like [REDACTED-KEY] / [REDACTED-EMAIL]. If False, only reports. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |