Back to blog

Security · May 15, 2026

Credential boundaries for production AI agents

How to connect agents to useful systems without handing raw secrets to prompts, logs, or shell commands.

SecurityCredentials

Most useful agents eventually need access to something private: a repository, a ticket queue, a database, an internal API, or a model provider. The question is not whether credentials exist. The question is whether the runtime can use them without turning them into model-visible text.

Facio treats credentials as runtime-owned values. The agent can refer to placeholders, Placet can collect secret fields, and the runtime resolves the value only at the boundary where a tool or provider needs it.

Do not paste secrets into work instructions

Secrets in prompts become hard to control. They can appear in history, logs, tool output, model context, screenshots, or follow-up messages. Even when a model does not intentionally reveal them, downstream tooling may persist more than expected.

Use credential storage instead. A workflow should say, for example, that an MCP server uses ${credentials.GITHUB_TOKEN}, not the raw token.

Separate three boundaries

BoundaryWhat it controlsProduction default
Provider credentialsModel API access and OAuth stateManaged by provider settings or OAuth flow
Tool credentialsMCP headers, stdio env, internal APIsPlaceholder references resolved by runtime
Shell exposureEnvironment variables available to commandsEmpty unless a CLI explicitly needs one

Those boundaries should not collapse into one global secret bag. A GitHub token used by an MCP server does not automatically need to appear in shell commands. A provider key used for model routing does not need to appear in a task transcript.

Review broad scopes

Credential scope determines what an agent could do after a mistake. Read-only tokens, project-scoped access, short-lived credentials, and service accounts with narrow permissions make review much easier. Broad personal tokens make every workflow harder to reason about.

The strongest deployment posture is boring: scoped credentials, visible placeholders, no secrets in prompts, and review before side effects.

Keep reading

More on Security

View category
Aug 3, 2026Security

Runtime Policy Engine Architecture for AI Agents: Why 7 Policy Layers Are the Minimum Stack That Survives the Multi-Vector Threat Model

The Maxim AI 2026 implementation guide confirmed: AI guardrails are runtime controls that validate inputs to and outputs from an LLM against safety, security, and compliance policies — and the operational reality is that single-vector guardrails (NeMo, Llama Guard, Lakera Guard) miss the multi-vector attacks that the 2026 incident data documents. The Context Studios analysis named the architectural commitment: production agents need runtime policy, structural command parsing, sandboxing, provenance-tagged memory writes, identity, traces, evals, compliance exports, and incident-to-test regression loops. The seven-layer architecture that satisfies the commitment.

Aug 2, 2026Security

Adversarial Agent Evaluation in CI/CD: Why Single-Turn Tests Miss 89% of the Failures That Matter in 2026

Single-turn tests miss 89% of failures that matter. Multi-turn adversarial sequences, cross-session contamination, persistent preparation patterns, tool composition exploits, reasoning chain manipulation. The CI/CD-integrated, three-tier cadence (real-time smoke, daily full library, weekly novel patterns), seven-category attack library, and consensus scoring that closes the gap.

Aug 1, 2026Security

Shadow AI Agents and the 144:1 NHI Crisis: The Discovery-to-Governance Pipeline That Closes the Identity Gap

ITECS Online quantified the gap: NHIs outnumber employees 144:1. The NHIMG analysis reframed the problem: shadow AI is really shadow identity, because the access path matters more than the interface. SailPoint at Gartner SRM 2026 confirmed the consensus: autonomous agents need continuous governance, not one-time onboarding. The four-stage pipeline that closes the gap.