How a ten-minute script creates a gap no one monitors
An employee in accounts payable sits down with a no-code automation builder, a large language model, and a clear instruction. Ten minutes later, she has a working script that pulls email, cross-references invoices against the company ERP, and posts a daily summary to Slack. The workflow runs smoothly. The team is happy. The script exists in a shadow IT layer that the security team has no visibility into, and it will likely remain there until a breach occurs. This scenario illustrates a specific failure mode in AI agent security: the tool is built faster than the governance controls can be updated.
The operational reality is that developers and business users are bypassing traditional IT governance entirely. They are not using the formal request channels. They are not waiting for identity and access management teams to provision service accounts. They are grabbing personal API keys, clicking through OAuth consent screens, and hardcoding credentials into builder platforms. For a systems engineer, this is a nightmare. It means the access path is not just a line in an identity provider log. It is a mix of human session tokens, static keys, and delegated grants that do not align with standard user lifecycle events.
Standard logging tools fail to capture what these unauthorized agents are actually doing in production because they are looking at the wrong layers. If an agent hands a user’s OAuth token to a sub-agent, which then calls a database via a shared service account, the database logs show the service account. The SaaS audit logs show the user. The identity provider shows nothing. The access path determines what appears in your logs, and when you mix identity types, the audit trail breaks. I have seen this happen with cPanel integrations on VPS hosting boxes. A client would add a script to their .env file with a static key, and when that client left the company, the key remained active for months. The hosting control panel did not care who was using it. It just accepted the credential.
This is not a theoretical risk. It is a daily occurrence in any organization that has adopted generative AI tools without a rigid deployment pipeline. The security team is playing catch-up. They are writing playbooks in production, dealing with problems after they appear in incident tickets. The disconnect is massive. Recent surveys suggest that while most security leaders believe they have full visibility into their AI agents, the vast majority have discovered rogue agents in the past year. The gap between belief and reality is where the vulnerability lives.
The problem is not that the technology is too advanced for our controls. It is that the speed of creation has decoupled from the speed of review. When a ten-minute script can touch sensitive corporate data, the traditional quarterly access review is useless. We need to understand that every new automation pipeline is a new vector for prompt injection and credential leakage. If you cannot track it, you cannot protect it.
Background
To understand the specific security gap we are dealing with, we have to look at how these agents actually move through your infrastructure. John Donovan, former Head of Security at Zededa, outlines four core access paths that AI agents use to touch sensitive corporate data. Each path changes what is visible in your logs, which is where the trouble starts.
The first path is riding a human session. This includes browser extensions and in-app copilots that act directly as the user. You see the user, but you do not see the automation layer behind them. The second is a delegated OAuth grant. The user approves scopes once, with a single click, and the agent holds that access until someone explicitly revokes it. Most people assume this happens automatically. It does not. Stale grants left behind by former employees remain active for months or years in cloud environments because identity providers rarely enforce revocation by default.
The third path utilizes static credentials. We are talking about API keys and service account passwords. These are usable by anyone who finds them, and they do not expire unless you manually rotate them. The fourth path is acting through purpose-built agent identities. These are registered, short-lived, and tied to one specific agent. This is the ideal scenario, but it is also the rarest. Most organizations are not using this yet.
Here is where it gets messy in practice. Real agents mix these paths. Imagine an agent that takes a user’s OAuth token and hands it to a sub-agent. That sub-agent then calls an MCP server, which queries a database using a shared service account. Now look at your logs. The database log shows the service account. The SaaS audit log shows the user. The identity provider shows nothing at all. You have created total invisibility. You cannot correlate the actions because the identity context changes with every hop.
I have managed hosting environments where this kind of fragmented auditing was a constant headache. A client would set up a cron job using a temporary API key, then move that key into a static configuration file. When they changed providers, the old key stayed in the environment variables. No one removed it. It just sat there, active and unclaimed, ready to be exploited by anyone who found the repo.
The same principle applies here, but the speed is different. An accounting employee can build a pipeline that touches email, ERP systems, and communication channels in an afternoon. If they mix a personal OAuth token with a service account for the backend database, your standard SIEM will miss the connection entirely. The security gap is not just about who has access. It is about the fact that the access paths are invisible to each other until something goes wrong. You are trying to audit a system that does not report itself as a single entity. It reports itself as a user, a service, and a script, all at once, none of which talk to each other in your log aggregation tool.