redact_text
Replace detected secrets in text with [REDACTED:] before sharing logs, configs, diffs, or command output to prevent credential leaks.
Instructions
Return the text with every detected secret replaced by [REDACTED:].
Use it before quoting logs, stack traces, configs, command output or diffs that may contain credentials, in the conversation, an issue, a commit message or a document. Everything that is not a secret is kept exactly as it was.
Args: text: The text to clean.
Returns: {"text": the redacted text, "redactions": how many secrets were replaced, "by_pattern": {detector name: count}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| by_pattern | Yes | ||
| redactions | Yes |