[REDACTED] before any data leaves the agent process. Redaction runs entirely inside your application, so sensitive data never reaches the backend or appears in the VS Code extension.
Default redacted keys
Out of the box, HyperProbe redacts any variable whose name matches one of the following strings (case-insensitive):| Key name | What it typically covers |
|---|---|
password | User passwords, database passwords |
secret | Generic secrets, client secrets |
token | Auth tokens, refresh tokens, JWT values |
authorization | HTTP Authorization header values |
cookie | Cookie strings |
key | API keys, encryption keys |
signature | HMAC signatures, signed values |
Redaction matches on variable names (keys), not on values. A variable named
authHeader is not redacted by default; a variable named authorization is. Use redactValues to target specific values by content.Adding custom keys
Pass an array of additional key names toredactKeys. Your list replaces the defaults, so include the default keys alongside any custom ones if you still want them redacted.
userApiKey is not matched by the key apiKey — only an exact match on the full variable name is applied.
Redacting specific values
UseredactValues to redact variables whose value matches a specific string. This is useful for redacting known secrets like live Stripe keys or internal tokens that appear under different variable names depending on context.
redactValues is replaced with [REDACTED] in the captured snapshot, regardless of the variable’s name.
Using environment variables
You can configure redaction without changing your code by using environment variables. This is useful for configuring different redaction rules across environments without a redeploy.- Code
- Environment
Best practices
Audit variable scope at probe locations. Before placing a probe, think about what variables are in scope at that line. In a request handler,req, res, and any middleware-attached properties are typically in scope. If req.headers.authorization is in scope, the authorization key is already redacted by default — but a custom property like req.context.stripeKey would not be unless you add it.
Use conditions as a complement to redaction. The condition field on a probe restricts when a capture fires. You can combine redaction with a condition to limit captures to known-safe execution contexts:
data or value) that would redact useful debugging information.
Prefer redactKeys over redactValues for structural secrets. If a sensitive value can appear under multiple variable names, listing it in redactValues is a safety net. However, redactKeys is more reliable because it catches a secret regardless of its current value, whereas redactValues requires an exact string match.