AI coding agents have a secret-keeping problem

a white dice with a black github logo on it

Your AI coding agent can read a codebase, write a pull request, and trigger a deployment. The question nobody is asking loudly enough: what does it do with the credentials it picks up along the way?

Hamza Fareed Syed’s piece on Stackademic frames the problem directly. GitHub tokens, MCP server policies, and CI/CD credentials have quietly become the primary attack surface of agentic development. The more autonomy you hand an agent, the more credential surface it touches.

Two Fixes Worth Implementing Now

The article surfaces two concrete mitigations that solo operators and small engineering teams can act on today.

Replace reusable secrets with short-lived tokens in CI/CD. Instead of storing a reusable Azure client secret inside GitHub Actions, teams can configure OpenID Connect so Azure issues a short-lived token scoped to each individual trusted workflow run. The token expires. A stolen token from a compromised run does not become a persistent key.

Govern your MCP servers like you govern your APIs. Organizations should maintain an approved list of MCP servers, restrict the tools each server can expose, separate read permissions from write permissions, and require human approval before any sensitive action executes. An MCP server with unconstrained write access is a privilege escalation waiting to happen.

Why This Matters for Indie Teams

Larger security teams have playbooks for credential rotation and least-privilege access. Solo operators and small teams usually don’t. When you wire an AI agent into your GitHub repo, your cloud provider, and your deployment pipeline, you are extending trust to a system that can act at machine speed on whatever secrets it can reach.

The OWASP framing applies here: treat the agent as an untrusted third party until you have explicitly scoped what it can touch. That posture costs almost nothing to adopt and closes a real exposure.

Stay on top of AI & Automation with BizStack Newsletter
BizStack  —  Entrepreneur’s Business Stack
Logo