Skip to main content

Overview

Redaction patterns scan agent inputs and tool outputs, replacing text that matches known secret formats with ⟦SECRET_REDACTED⟧. This helps prevent sensitive values from reaching the model or being stored locally or on the server. Pattern-based redaction is always active. It runs independently of the secrets feature and catches sensitive values even when they are not registered as secrets.

How redaction works

Poolside runs tool output and user input through a redaction pipeline before the agent sees it:
  1. Exact-value redaction: Replaces values that were resolved through ⟦secret⋮<name>⟧ interpolation. See Secrets for details.
  2. Pattern-based redaction: Matches the text against a combined set of regular expression patterns from all sources.
For tool output, Poolside runs both layers in sequence. All matches are replaced with ⟦SECRET_REDACTED⟧. For user input, pattern-based redaction applies to text user messages before Poolside stores them in trajectories or adds them to model context.

Pattern sources

Patterns come from three sources, merged at runtime. No pattern from any source can be removed. The merge is append-only.
SourceManaged by
Built-in patternsPoolside
Organization patternsAdministrators (via Poolside Console)
User patternsIndividual users (via settings.yaml)

Built-in patterns

Poolside includes 28 built-in regular expression patterns that detect common secret formats. These are always active and cannot be turned off.
PatternPrefix / markerExample match
AWS access key IDAKIAAKIA1234567890ABCDEF
AWS session tokenASIAASIA1234567890ABCDEF
AWS STS tokenABIAABIA1234567890ABCDEF
AWS CloudFront keyACCAACCA1234567890ABCDEF
GitHub fine-grained PATgithub_pat_github_pat_abc123...
GitHub classic PATghp_ghp_abc123...
GitHub OAuth tokengho_gho_abc123...
GitHub user-to-server tokenghu_ghu_abc123...
GitHub server-to-server tokenghs_ghs_abc123...
GitHub refresh tokenghr_ghr_abc123...
OpenAI project keysk-proj-sk-proj-abc123...
OpenAI service account keysk-svcacct-sk-svcacct-abc123...
OpenAI API keysk-sk-abc123...
Anthropic API keysk-ant-sk-ant-abc123...
Stripe webhook secretwhsec_whsec_abc123...
Stripe keyrk_, sk_, pk_sk_live_abc123...
Google API keyAIzaAIza1234567890-abc
Slack bot tokenxoxb-xoxb-1234-5678-abc
Slack user tokenxoxp-xoxp-1234-5678-abc
Slack app tokenxapp-xapp-1234-5678-abc
NPM tokennpm_npm_abc123...
PyPI tokenpypi-pypi-abc123...
Poolside access tokenps-ps-abc123...-def456...
Poolside refresh tokenpsr-psr-abc123...-def456...
JSON Web Token (JWT)eyJeyJhbGciOiJ...
Bearer token headerBearer Bearer eyJhbGci...
PEM private key-----BEGIN...PRIVATE KEY-----Full PEM block
Fireworks API keyfw_fw_abc123...

Organization patterns

Administrators can manage redaction patterns for their organization in the Poolside Console under Security > https://mintcdn.com/poolside/Tz6xG1rOCu6JtFws/images/icons/redaction-patterns-icon.svg?fit=max&auto=format&n=Tz6xG1rOCu6JtFws&q=85&s=7f3c227df97b20297fec866f5e23469a Redaction Patterns. Poolside merges organization patterns with built-in and user patterns. Organization patterns follow the same validation rules as user patterns.

User patterns

Add custom redaction patterns to secrets.redact_patterns in your settings.yaml file:
secrets:
  redact_patterns:
    - name: internal_api_key
      pattern: "MYCO_[A-Za-z0-9]{32}"
    - name: database_dsn
      pattern: "postgres://[^\\s]+"
This does not require administrator access. At runtime, Poolside merges user patterns with built-in patterns. Each pattern requires:
  • name: A non-empty identifier for the pattern.
  • pattern: A valid RE2 regular expression.
Validation rules Poolside rejects patterns that match common code tokens such as empty strings, function, 123, hello world, true, const, or return. This prevents overly broad patterns like .* from stripping useful content from tool output. Settings file locations
File locationUse this for
.poolside/settings.local.yamlPersonal, project-specific.
Do not commit. Takes precedence over all other files.
.poolside/settings.yamlShared, project-specific.
Commit and share with your team.
~/.config/poolside/settings.yamlPersonal defaults, all projects.
Applies when no project-level settings override it.
Poolside combines patterns from all files. For more information about settings file locations and precedence, see Tool permissions.
Invalid patterns surface as errors rather than being silently dropped. A rejected pattern could leave secrets exposed, so fix validation errors before proceeding.

Manage organization patterns

Prerequisites
  • You belong to a team with the tenant-admin role.
Steps
  1. In the Poolside Console, navigate to Security > https://mintcdn.com/poolside/Tz6xG1rOCu6JtFws/images/icons/redaction-patterns-icon.svg?fit=max&auto=format&n=Tz6xG1rOCu6JtFws&q=85&s=7f3c227df97b20297fec866f5e23469a Redaction Patterns.
  2. Click Add Pattern.
  3. In Name, enter a descriptive name for the pattern.
  4. In Pattern (RE2 regex), enter the regular expression you want Poolside to redact.
  5. In Test your pattern, paste or edit sample text to confirm that the pattern matches the values you expect to redact.
  6. Click Save.

Redaction warnings

When redaction is triggered excessively during an agent step, Poolside displays a warning to you (not to the agent).
TriggerThresholdWhat it means
An exact secret value is redacted too many times in one stepMore than 3 replacements per stepThe secret value may be too short or too common, causing false positives
A pattern-based match is detected in tool outputAny matchTool output contains a string that matches a known secret format. In normal operation, secret-format strings should not appear in tool output, so any match indicates a potential exposure.
Warnings appear in the IDE as session notifications and in the pool CLI as yellow warning messages. Each warning displays only once per session to avoid noise.
If you see repeated redaction warnings for a specific secret, consider using a longer, unique secret value.

Troubleshooting

Legitimate values are being redacted

If you see ⟦SECRET_REDACTED⟧ in places where no actual secret exists, a built-in pattern may be matching a non-secret value. Built-in patterns cannot be turned off. If this affects your workflow, check whether the redacted value matches one of the built-in patterns and consider restructuring the output to avoid the match.

Redaction warnings appear repeatedly

Frequent redaction warnings for a specific secret usually mean the secret value is too short or too generic. Replace it with a longer, unique value.

Custom pattern rejected during validation

Poolside rejects custom patterns that match common code tokens. Make your pattern more specific. For example, instead of [A-Za-z]+, use a pattern that includes a distinguishing prefix like MYCO_[A-Za-z0-9]{32}.