Tool permissions and identity for a security agent

Agent authority is the set of actions that succeed when the agent tries them, and the credentials decide it, not the prompt. Question Q04 asks which identity the agent uses on each system, whether the grant is the least needed, and whether that system enforces it. This page works one agent through, with review dates.

The question

Checklist group Tool permissions and identity, one question.
IDQuestion
Q04What identity and permissions does the agent use on each downstream system, are they the least needed (for example read-only on a log store, write on one ticket queue), and is authorization enforced by those systems rather than left to the model?

A prompt that says "never delete" removes nothing. A delete permission that was never granted cannot be used by a mistaken or manipulated agent. That is why Q04 asks where the limit is enforced.

What the guidance requires

  • OWASP LLM06:2025: "Limit the permissions that LLM extensions are granted to other systems to the minimum necessary in order to limit the scope of undesirable actions." Its example is an agent that makes recommendations from a product database and "might only need read access to a 'products' table," enforced "by applying appropriate database permissions for the identity that the LLM extension uses to connect."
  • OWASP, on who decides: "Implement authorization in downstream systems rather than relying on an LLM to decide if an action is allowed or not."
  • MITRE ATLAS AML.M0026 (created 29 Oct 2025, modified 23 Dec 2025): agents get "the principle of least privilege so that the agent is only granted the necessary permissions to access tools and resources required to accomplish its designated task(s)."
  • MITRE ATLAS AML.M0027, for an agent acting for a user: "the AI agent should not be granted permissions that the user would not be granted within the system or organization." It also names the lifecycle, ending with "decommissioning of the agent when its role is no longer needed."
  • CISA and partners, on AI in operational technology (3 Dec 2025): "Collect flow logs and access logs for AI endpoints and track data egress by asset and identity." That only works if each agent has its own identity.
  • Google SAIF, Focus on Agents: tools "must be secured with least-privilege permissions."

Worked example: one triage agent, three systems

The example is written for this page; the names and dates are invented, the policy shape is real. A team runs an agent that reads cloud storage settings, opens tickets and proposes dependency fixes. It gets one identity per system, created on 3 Nov 2026, each reviewed 90 days later.

Illustrative identity register as of 19 Nov 2026. Expiry of each identity: 2 May 2027 (180 days) unless renewed by a named owner at a review. Short-lived credentials limit how long a stolen one is useful.
SystemIdentityCredential and lifetimeGrantEnforced byReview date
Cloud accountRole svc-triage-audit, assumed by the agent runtime onlyTemporary credentials from assuming the role, session of 1 hour, no stored access keyList buckets and read their public-access settings; no write, no object readsCloud provider policy engine1 Feb 2027 (90 days)
Ticket queue SECService user agent-triageAPI token, expires 90 days, replaced at each reviewCreate and comment in queue SEC; cannot close, delete or use another queueTicketing project permission scheme1 Feb 2027
Source repositoryApp identity agent-fixesInstallation token generated per run, expires after 1 hour; no stored password or personal tokenPush to branches named agent/*; open pull requests; cannot merge, force push or change branch rulesBranch protection rules, with a human code owner required to merge1 Feb 2027

The cloud grant, as a policy document, is short enough to read in a minute. It is the whole of what the role may do: list buckets, and read the public-access-block, policy-status and ACL settings of each bucket. It carries no write action and no object read.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "ReadBucketExposureSettingsOnly",
      "Effect": "Allow",
      "Action": [
        "s3:ListAllMyBuckets",
        "s3:GetBucketPublicAccessBlock",
        "s3:GetBucketPolicyStatus",
        "s3:GetBucketAcl"
      ],
      "Resource": "*"
    }
  ]
}

Download the template: .docx PDF CC BY 4.0

A reviewer can answer Q04 from the policy document without running anything: nothing in it writes, nothing reads object contents, and the role is not shared with a person. If the agent later needs to fix a bucket, that is a new grant with its own row and review date, not an edit to this one.

The repository row is enforced by two settings on the repository, not by the agent's prompt. The first excerpt uses the field names of the GitHub REST API for branch protection (GitHub Docs, REST API endpoints for branches), applied to the default branch. The agent's app identity holds contents and pull-request write on the repository and no administration right, so it cannot edit these rules.

{
  "required_pull_request_reviews": {
    "required_approving_review_count": 1,
    "require_code_owner_reviews": true,
    "dismiss_stale_reviews": true
  },
  "required_status_checks": { "strict": true, "contexts": ["tests"] },
  "enforce_admins": true,
  "allow_force_pushes": false,
  "allow_deletions": false
}

Download the template: .docx PDF CC BY 4.0

Branch protection does not limit which branch names an identity may push to: the agent could push to any other branch. A repository ruleset does. This one blocks creating, updating and deleting every branch except those under agent/. It applies to every actor not on its bypass list, so the list must name each team that pushes to other branches: here team 4417, the developers, bypass it and keep their normal push rights, while the agent's app, which is not on the list, can write to agent/* and nowhere else. A team that cannot list its developers this way gives the agent a separate fork or repository instead.

{
  "name": "agent-push-limit",
  "target": "branch",
  "enforcement": "active",
  "bypass_actors": [
    { "actor_id": 4417, "actor_type": "Team", "bypass_mode": "always" }
  ],
  "conditions": {
    "ref_name": { "include": ["~ALL"], "exclude": ["refs/heads/agent/**"] }
  },
  "rules": [
    { "type": "creation" },
    { "type": "update", "parameters": { "update_allows_fetch_and_merge": false } },
    { "type": "deletion" },
    { "type": "non_fast_forward" }
  ]
}

Download the template: .docx PDF CC BY 4.0

Field names follow the GitHub REST API for repository rulesets (GitHub Docs, REST API endpoints for rules); team 4417 stands for the developer team and its ID is invented for the example. With both settings in place, the agent can push only to agent/* branches and open pull requests, a pull request needs a code owner's approval, and force pushes and deletions are off, so a manipulated agent has no path to merge its own change.

What a refused action looks like. On 12 Nov 2026 a prompt-injected ticket text makes the agent try to switch off the bucket's public-access block. The provider refuses, and its log carries one line under the agent's role:

2026-11-12T09:41:07Z principal=svc-triage-audit action=s3:PutBucketPublicAccessBlock resource=example-reports result=AccessDenied reason="no identity-based policy allows the action" caller=agent-runtime run=r-2231

Download the template: .docx PDF CC BY 4.0

The line shows the agent's own identity, the action it was refused and the run that attempted it. The agent never held that grant, so no instruction to the model could have supplied it. The line is an illustration of the fields to expect; the exact format is the provider's.

Test it on your own systems

  1. Ask each system's administrator for the grants held by the agent's identity and compare them with the register. Differences go in the register on scope of change.
  2. Read the role definition rather than trying actions to see what works.
  3. In a test environment, aim the agent at an action its role forbids. The system must refuse it and log the refusal under the agent's identity, as in the log line above.
  4. Revoke the credential in one step and confirm the agent stops, as asked on kill switch and rollback.
  5. On each review date, remove any grant the agent did not use since the last review. The access log shows which.

Products that manage agent identities are outside this site. This page records the grants each downstream system enforces; the tools and permissions page records the rules inside the harness itself. Human approval points covers the actions that still need a person after the grant is narrow.

Sources

  1. OWASP, LLM06:2025 Excessive Agency, read 19 Nov 2026
  2. MITRE ATLAS mitigations, ATLAS data release 5.6.0, read 19 Nov 2026
  3. Google SAIF, Focus on Agents, read 19 Nov 2026
  4. CISA and partners, Principles for the Secure Integration of Artificial Intelligence in Operational Technology (publication page and PDF, 3 Dec 2025), read 19 Nov 2026
  5. GitHub Docs, REST API endpoints for rules, read 19 Nov 2026
  6. GitHub Docs, REST API endpoints for branch protection, read 19 Nov 2026
  7. AWS, STS AssumeRole API reference (DurationSeconds default 3600 seconds), read 19 Nov 2026
  8. GitHub Docs, Generating an installation access token for a GitHub App (expires after 1 hour), read 19 Nov 2026

Last reviewed 19 Nov 2026