Skip to main content
use_secret is the unified runtime tool. Pick a mode by providing exactly one target field: itemId for single-item injection, or profileId to bulk-inject every env-shaped item in a profile.
Subprocess stdout/stderr text is never forwarded to the model. The model receives only the exit code, duration, output-line count, and a truncation flag. If the model needs to read subprocess output, route it through a separate audited channel (write to a file via mount_secret, then read it explicitly). This prevents the full set of semantic-leakage vectors (base64, hex, URL-encoded, nth-char, byte-split) that string-based redaction cannot catch.

Targets

Provide exactly one. They are mutually exclusive:

Input

Output

injectedCount appears only in bulk mode. On a failed run (exitCode !== 0) that produced withheld output, the result also carries a static, secret-free hint string. It explains that stdout/stderr were suppressed to prevent secret leakage (RED1) and points at mount_secret for output inspection. The hint is a fixed constant containing no subprocess output, and is omitted on success.

Bulk-mode rules

  • Only single-string-field items participate; multi-field items (logins, certs, ssh_keys) are silently skipped.
  • Labels are normalized to POSIX env-var names (openai-api-key → OPENAI_API_KEY).
  • Two items normalizing to the same env var name fail the call with both offending IDs.
  • A label normalizing to a reserved env key (LD_PRELOAD, NODE_OPTIONS, PATH, …) fails the call with the offending item ID.
  • Per-secret 4 KB size cap; oversize secrets are refused before spawn — use mount_secret instead.
  • Each included item produces its own access.use audit row.
  • use is local-only — remote agents cannot use bulk mode.

Errors

Returned as JSON text content. Local validation failures (e.g. supplying neither or both targets, an invalid envVarName, or an oversize secret) surface as a bare error field:
Failures from the control-plane API (AbadgeApiError) also carry code, and — when present — hint and meta: