Cyclium.Redaction (Cyclium v0.5.2)

Copy Markdown View Source

Key-based redaction applied to tool arguments, tool results and output payloads before they are journaled.

Tools may implement redact/1 and redact_result/1 themselves; this is the floor beneath them, so a credential that rides in a map under an obvious key never reaches cyclium_episode_steps or cyclium_outputs even when a tool keeps the identity defaults.

The key pattern is configurable:

config :cyclium, :redact_key_pattern, ~r/^(.*_)?(secret|password)s?$/i

Matching is on the key alone; values are never inspected. Structs are left untouched (they are not journaled as-is anyway).

Summary

Functions

The placeholder written in place of a redacted value.

Redact every value under a sensitive key, recursively through maps and lists.

Whether key names a sensitive value under the configured pattern.

Functions

placeholder()

@spec placeholder() :: binary()

The placeholder written in place of a redacted value.

redact_sensitive(term)

@spec redact_sensitive(term()) :: term()

Redact every value under a sensitive key, recursively through maps and lists.

sensitive_key?(key)

@spec sensitive_key?(term()) :: boolean()

Whether key names a sensitive value under the configured pattern.