Expand description
Secret redaction for outgoing tool output.
winx pipes shell output, file contents, and saved memory straight into the
model’s context - env, cat .env, CI logs, etc. This scrubs high-confidence
credential patterns from any text leaving the server (and from persisted
ContextSave memory) before it reaches the model or disk.
Only named, low-false-positive patterns are matched (provider key
prefixes, JWTs, PEM private-key blocks, user:pass@ URLs). There is no
entropy heuristic, so ordinary code is never mangled. Set WINX_NO_REDACT=1
to disable entirely (e.g. when you knowingly need the raw value).
A redacted span becomes [REDACTED:<rule>] - the rule name only, never any
part of the secret.
Functions§
- redact
- Scrub credential patterns from
text. ReturnsCow::Borrowed(no allocation) when nothing matched, so the common case is cheap. Theregexcrate is linear-time, so this is safe on adversarial/large input. - redact_
json - Recursively redact every string inside a JSON value (for
structuredContent).