SecretLeakGuardrail

org.llm4s.agent.guardrails.builtin.SecretLeakGuardrail
See theSecretLeakGuardrail companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Preset: scan for all known secret types, including PEM private keys. Blocks on detection.

Preset: scan for all known secret types, including PEM private keys. Blocks on detection.

Attributes

Create a guardrail with default secret types and Block behaviour.

Create a guardrail with default secret types and Block behaviour.

Attributes

Create a guardrail with a specific failure action.

Create a guardrail with a specific failure action.

Value parameters

onFail

Behaviour when a secret is detected

Attributes

def apply(secretTypes: Seq[SecretType]): SecretLeakGuardrail

Create a guardrail that scans only for specific secret types.

Create a guardrail that scans only for specific secret types.

Value parameters

secretTypes

The credential types to detect

Attributes

def apply(secretTypes: Seq[SecretType], onFail: GuardrailAction): SecretLeakGuardrail

Create a fully configured guardrail.

Create a fully configured guardrail.

Value parameters

onFail

Behaviour when a secret is detected

secretTypes

Credential types to detect

Attributes

Preset: automatically mask secrets and allow the request to proceed. Secrets are replaced with typed placeholders (e.g. [REDACTED_OPENAI_KEY]).

Preset: automatically mask secrets and allow the request to proceed. Secrets are replaced with typed placeholders (e.g. [REDACTED_OPENAI_KEY]).

Attributes

Preset: monitoring mode — warn but do not block or mask. Useful for auditing traffic without affecting functionality.

Preset: monitoring mode — warn but do not block or mask. Useful for auditing traffic without affecting functionality.

Attributes