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.
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_secretinstead. - Each included item produces its own
access.useaudit row. useis 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 invalidenvVarName, or an oversize secret)
surface as a bare error field:
AbadgeApiError) also carry code,
and — when present — hint and meta: