Liking cljdoc? Tell your friends :D

jj.bettong.secrets

Keeping credentials out of transcripts.

Anything a tool returns is sent to the model provider, so a command like echo $API_KEY does not just print a secret - it uploads one. Two defences here, both on by default: the child process never sees credentials in its environment, and whatever a tool does return is scrubbed of their values on the way back.

Keeping credentials out of transcripts.

Anything a tool returns is sent to the model provider, so a command like
`echo $API_KEY` does not just print a secret - it uploads one. Two defences
here, both on by default: the child process never sees credentials in its
environment, and whatever a tool does return is scrubbed of their values on
the way back.
raw docstring

redactclj

(redact s)
(redact s values)

s with any known credential value replaced. Cheap: a handful of string scans over output that is already capped in size.

`s` with any known credential value replaced. Cheap: a handful of string
scans over output that is already capped in size.
raw docstring

secret-nameclj

Environment variables whose names suggest they hold a credential.

Environment variables whose names suggest they hold a credential.
raw docstring

secret-name?clj

(secret-name? n)

secret-valuesclj

(secret-values)
(secret-values env)

The values worth scrubbing. Short ones are skipped: a two-character value is more likely to appear innocently in output than to be a credential.

The values worth scrubbing. Short ones are skipped: a two-character value is
more likely to appear innocently in output than to be a credential.
raw docstring

strip-env!clj

(strip-env! pb)

Removes credential-looking variables from a process's environment, so a command cannot read what it was never meant to see.

Removes credential-looking variables from a process's environment, so a
command cannot read what it was never meant to see.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close