Your AI Agent Shouldn’t Have the Keys to Everything

An AI agent can search your code, access APIs and execute tasks. But what happens when it finds a key it was never supposed to use?

There’s a difference between asking AI to write a function and giving it access to your actual business.

The first is relatively straightforward. The second is where things get interesting.

An agent connected to your GitHub account, cloud services, database and business tools can do far more than generate code. It can read files, make requests, retrieve information and take actions on your behalf.

That’s useful when everything works as intended.

But Microsoft recently documented something that should make anyone building with AI agents pay attention.

Five minutes from a GitHub search to a compromised cloud environment

In a November 5 security report, Microsoft described threat actors using an AI-powered offensive framework to search public GitHub repositories for exposed credentials.

These weren’t just ordinary API keys sitting in random files. The attackers were looking for application credentials that could provide access to cloud services and other business systems.

The concerning part was what happened next.

Microsoft observed an AI agent move from searching GitHub for exposed secrets to extracting data from an Azure Key Vault in just five minutes.

The attackers used stolen application credentials to authenticate against cloud environments and explore the resources they could access.

This is important because the AI wasn’t simply helping someone write malicious code. It was being used to automate multiple steps of an attack.

Microsoft also observed attempts to access other cloud resources, including storage, application settings and AI services.

The full investigation is worth reading, particularly if you run applications on cloud infrastructure.

Microsoft’s November 5 security report.

In the beginning, the founder often is the system. They answer every question, approve every decision, remember every customer detail, and connect every moving part. That level of involvement may feel necessary early on, but over time it turns the founder into the company’s biggest bottleneck. A lightweight company operating system helps replace constant interruptions with shared context. Instead of asking where the latest deck lives, what was decided in last week’s meeting, or who owns a launch, the team can self-serve from one central workspace. Weekly priorities, project owners, meeting notes, onboarding resources, customer context, and key decisions all have a clear home. The result is not just better organization. It is more autonomy. When the team knows where to find information and how work moves forward, founders spend less time repeating themselves and more time making high-leverage decisions. A clear operating system gives early-stage companies the structure they need without slowing them down. Spend less time answering repeat questions and more time building.

Try Notion today and get up to 3 months free of Notion Business with Notion AI.

Try Notion Business Free for 3 Months

back to our story…

India has issued a critical warning, too

This isn’t just a concern raised by a private security company.

On October 15, India’s Computer Emergency Response Team (CERT-In) published a critical advisory titled “AI Agents as Attack Vectors.”

It described incidents involving AI agents that exceeded their assigned task authorization and accessed Indian information and communication technology assets without permission.

The advisory also highlighted the misuse of open-source agentic AI tools for reconnaissance, exploitation and financially motivated intrusions.

There are two separate problems here.

First, an agent can go beyond the scope of the task it was given.

Second, attackers can use agentic tools to automate their own operations.

Both deserve attention, especially when agents are connected to systems containing customer data, credentials or business information.

Read CERT-In advisory CIAD-2026-0049.

A new business is forming around controlling AI agents

Here’s another interesting development.

On November 10, WhiteMatter announced a $20 million Series A funding round led by Blumberg Capital.

The company was previously known as QuilrAI. Its product focuses on managing and securing AI agents across enterprise systems.

One of its ideas is particularly interesting: deploy a dedicated Guardian agent to monitor and enforce policies for each AI agent operating inside an organisation.

In simple terms, one agent does the work while another helps control what it can access and do.

WhiteMatter says its platform already manages more than 2.25 million agents across customer environments. Those figures come from the company, not an independent audit.

Read the WhiteMatter funding announcement.

The funding is a useful signal. Companies are starting to spend serious money not only on deploying AI agents, but also on controlling them.

For years, businesses built security around employees, accounts and applications. Now they have another category of actors to manage: software that can make decisions and perform tasks with limited human involvement.

Here’s what you gotta do..

You probably don’t need an enterprise security platform to start using AI agents safely.

But you do need to be careful about what you allow them to access.

Here are five rules I’d follow before connecting an agent to a real project.

1. Give each agent only the permissions it needs.

If an agent only needs to read a repository, don’t give it permission to delete branches or change deployment settings. Start with read-only access wherever possible.

2. Don’t put API keys in prompts or source code.

Use environment variables or a secrets manager. Avoid long-lived credentials when short-lived or scoped alternatives are available. If a key is exposed, deleting the line from GitHub isn’t enough. Revoke or rotate the credential.

3. Require approval for important actions.

Reading a file and publishing a change are not the same thing. Put human approval in front of actions such as sending emails, publishing content, deleting data, changing permissions or deploying to production.

4. Keep experiments away from production.

Give agents a separate development environment, test database and limited credentials. A mistake in a sandbox is usually much easier to recover from than a mistake in your live application.

5. Keep a record of what the agent does.

You should be able to find out which tools it called, what resources it accessed and what changes it made. If something goes wrong, you need more than the agent’s explanation of what happened.

One additional point: treat information coming from websites, documents and external messages as untrusted input. An agent shouldn’t automatically follow instructions it discovers inside a page or file.

Partnered with BELAY

Get More Capacity Without More Overhead

A $60,000 hire can cost up to $93,000 once you add taxes, benefits, PTO, and recruiting.

Fractional support gives you an Executive or Marketing Assistant to run your inbox and campaigns, a Bookkeeper or Fractional CFO for clean books and year-end clarity, or both, without the overhead.

BELAY's free guide, The $0 Hire, shows the role-by-role math so you can see which hire pays for itself fastest heading into Q1.

Get the Free Guide

The interesting part is what we build next

I think there’s a real opportunity here for smaller SaaS companies and independent developers.

We are getting better at making agents perform useful work. But the next challenge is making their access predictable.

For example, a data-driven website such as HolidayExplore could use AI to help research public holiday updates, compare source documents and prepare changes. But the final verification and publication of important dates should still have proper checks.

The same principle applies to a CRM agent, an email automation, a coding assistant or a customer support workflow.

Let the agent do the repetitive work. Don’t automatically give it permission to make every decision.

The goal isn’t to make AI agents less capable. It’s to make sure their permissions never exceed the trust we’ve placed in them.

Stay sharp, see you soon.

Builder Hustle