Write-only secrets
useSecret("NAME") produces an opaque reference — never a value. Values are injected only into declared connections after origin, method, path-prefix, agent, and environment checks. They never appear in prompts, logs, templates, snapshots, bundles, manifests, rendered instructions, events, session transcripts, --json output, API responses, or env dumps.
Connections
defineConnection allowlists an HTTPS origin, an allowed method list, and a path prefix:
fetchtakes relative paths only; absolute URLs fail closed (CONNECTION_ABSOLUTE_URL).- Methods outside the allowlist fail (
CONNECTION_METHOD_DENIED); paths outside the prefix fail (CONNECTION_PATH_DENIED). - Hard-coding sensitive headers (
Authorization,Cookie,X-API-Key) as literals is a build error (ZAP_BUILD_SECRET_LITERAL).
SECRET_SCOPE_DENIED.
Redaction
Every resolved key registers with the redaction layer, so any occurrence in logs, run events, or--json output is replaced with [redacted]:
