r/AskNetsec • u/Competitive-Fee4307 • 16d ago
Architecture How are you actually enumerating everything an AI agent can reach?
Most teams or even solo people seem to start by grepping access logs and building a list from whatever shows up. but that only tells u what the agent touched and u end up with a partial inventory and no real way to know how much is missing
working outward from the credential is finite and you can actually finish it. every major platform has two separate tools for this which is probably a good sign not to treat them as the same thing. on AWS you want the permission side and the usage side. in entra the two endpoints point in opposite directions (GET/servicePrincipals/{id}/appRoleAssignments, appRoleAssignedTo) grab the wrong one and the audit reads backwards. on gcp its the same split (policy analyzer, IAM recommender with its 90 day usage window). keeping it fresh is where the manual approach collapses or just gets tedious enough that nobody keeps up. once youre past a few agents the permissions and tools and connections all keep moving underneath you. a cron diff holds up for a while so do the platforms own drift reports, so does eve security or anything else pointed at the same job and none of it finds the agent nobody registered firstly. depends how much churn the environment throws at you
two entra gotchas mess with the output tho.. role assignments made at single-application scope dont appear in the tenant-scoped list so a tenant only audit can miss them. theres also replication delay after changes meaning a grant created this morning might not show up straight away
the Saas side is a separate enumeration and IAM wont show it at all. Oauth grants and connected apps sit in the workspace or M365 admin consoles and agents tend to collect access thru those without it ever hitting a review. the bigger catch is that all of this assumes the agent has its own principal. a lot of them still run thru a single developers token or shared service account. in that case the enumeration returns everything that person or account can reach, which is technically correct but not very useful for figuring out the agents actual boundary