Documentation
¶
Overview ¶
Package secrets keeps the agent from leaking credentials. The agent may USE secrets (commands inherit the process environment, including values loaded from .env) but their values must never reach the model, the event log, or the terminal. Two defenses: refuse to read secret-bearing files, and redact known secret values from every tool result and printed line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSecretPath ¶
IsSecretPath reports whether a path likely holds credentials, so its VALUES should be masked when read or diffed (the file is still usable — the agent just operates on it by reference, never seeing the plaintext).
func RedactSecretFile ¶
RedactSecretFile masks the values in a credential-bearing file (or a diff of one), preserving structure so the agent can still reason about and edit it.
Types ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor replaces known secret values with a placeholder.
func NewFromEnv ¶
func NewFromEnv() *Redactor
NewFromEnv collects secret values from the current environment (which, for the agent, already includes anything loaded from .env).