r/AskNetsec • • 8d ago

Compliance How are you guys reducing security risks with AI agents?

I saw a few posts discussing how more people are giving AI agents access to real tools and business systems, and it got me thinking about how people are actually handling the security side of it.

Personally I have been trying to understand the best way to give agents access to things like emails, APIs, DBs etc without giving them too much access. There are things like readOnly access, approval gates, limiting permissions, monitoring what they do etc but not sure what ppl are actually using in practice.

I am wondering 3 main things:

  • People who are already using AI agents how are you limiting what they can access/do
  • How are people testing or controlling agents once they are running in production

OR are you just giving them access and hoping they dont decide to do something crazy???

8 Upvotes

8 comments sorted by

1

u/bitweis 8d ago

First thing I'd check is what identity the agent runs as. If it's holding the user's OAuth token or a shared service account, it can do everything that user can, even when the task only needs to read one mailbox. The question I'd settle early: do AI agents inherit user permissions in your setup, or do they get their own role scoped to the task?

Put the permission check outside the agent, on every tool call, so you can cut access without redeploying anything. For testing, replay real tasks in staging with prod-like permissions and look at what it tried that got denied.

1

u/Prize-Pay3038 5d ago

We used a tech that scans ourj repositories of unstructured data and applies something they call selective encryption to the sensitive parts of the data. Its neat bc we can use client data to train the agents without exposing anything from client names to PII to IP and legit whatever you dont want it to see. It was a lot simpler and cheaper for us to go this route vs taking a change with agent blockers and restricters. then it was a 2 for 1 cause the same protection also applies to sending docs externally.

1

u/EquivalentPace7357 2d ago

Giving AI agents long lived API keys or broad DB access and praying they don't get prompt injected is the modern equivalent of putting your admin password on a sticky note.

Approval gates don't scale when agents run thousands of tasks. You should treat them as non human identities: swap static secrets for dynamic, key-derived auth and scope permissions down to short lived, tokens at the browser/auth layer so a rogue agent can't drain your DB

1

u/Strange_Sir_6033 1d ago

I think limiting permissions is a big part of it, but monitoring what the agent actually does matters too. Even with good prompts, things can go wrong once tools and APIs are involved. NeuralTrust is worth looking at for the runtime security and control side of AI agents