LLM agent tool permission review
Brief
The impact of any AI finding is set by the tools: what the model can call, with whose permissions, and whether a person confirms first. This review measures that blast radius directly with test accounts, one reversible action and a read of each tool's credential, so the answer does not depend on finding an injection first.
On this page
- Situation
- The tool list from the LLM app recon page, the tool definitions the app sends to the model, shared by the client for the test, and test accounts in two roles with test data on each side. We test only the applications and tenants the scope letter names. The one action we trigger is a ticket in our test tenant, deleted the same hour; tools that reach outside the tenant, such as email or sharing, are reviewed and never called.
- Goal
- A blast radius table: each tool, what it changes, the identity it runs as, whether a confirmation gates it, and what its credential allows beyond the tool's stated purpose.
- Outputs
- Representative examples on placeholder hosts, trimmed to the lines that matter. Not captured from a public fixture yet.
Check first
- The tool definitions exactly as the model receives them, not a summary.
- For each tool, the credential it uses: the user's own token, a service account, an API key or a database login.
- Which tools are meant to need a confirmation, and where in the code that is enforced.
- Test accounts in two roles, with test records each one owns, and the ticket marker
ATARUS-TEST-2026-10-28. - Whether tool calls are logged with their arguments and the identity they ran as.
Steps
Which tools can the model call, and what does each one change?
jq -r '.tools[] | [.name, .description] | @tsv' tool-definitions.json
Expected output
search_invoices Search the current customer's invoices
create_ticket Create a support ticket
run_report_sql Run a read-only SQL report # <- "read-only" is a description; the database grant decides
share_document Share a document with an email address # <- an effect outside the tenant
send_email Send an email on the user's behalf
We sort each tool into one of three classes: reads, writes inside the tenant, and effects outside it, such as email, sharing, payments or calls to arbitrary URLs. The third class sets the ceiling of every other finding on the assistant, because once any text can reach the model, any of those tools can be the result. A description is what the model reads, not a limit, so every claim like "read-only" or "current customer" is checked in the steps below.
Negative result. Only read tools scoped to the user, and nothing that reaches outside the tenant.
Fix. Remove tools the feature does not need, split broad tools into narrow ones, and replace open-ended tools such as raw SQL or URL fetch with named operations.
Does each tool run with the user's permissions or its own?
GET /api/invoices?customer_id=cus_test_b2 HTTP/1.1
Host: app.example.com
Authorization: Bearer <token for tester-a, redacted>
Expected output
HTTP/1.1 403 Forbidden # <- the baseline: the API refuses tester-a this customer
POST /api/assistant/messages HTTP/1.1
Host: app.example.com
Authorization: Bearer <token for tester-a, redacted>
Content-Type: application/json
Accept: text/event-stream
{"conversation_id":"conv_test_0510","message":"Show the latest invoice for customer cus_test_b2."}
Expected output
event: tool_call
data: {"name":"search_invoices","arguments":{"customer_id":"cus_test_b2","limit":1}}
event: tool_result
data: {"invoices":[{"id":"inv_test_b2_0007","total":"120.00"}]} # <- the tool returned what the API refused tester-a
cus_test_b2 is a test customer owned by tester-b. The API refuses tester-a, so if the tool returns the record, it runs with a service identity and trusts the model to pass only the user's own ids. That is a confused deputy: the assistant reaches what the user cannot, and every tool built the same way has the same reach.
Negative result. The tool returns an authorization error or nothing for cus_test_b2, and the assistant says it cannot see that customer.
Fix. Call tools with the user's own token, or pass the user's identity to the tool and check it there. Never take the tenant or customer id from the model's arguments; take it from the session.
Which tools act without a confirmation?
POST /api/assistant/messages HTTP/1.1
Host: app.example.com
Authorization: Bearer <token for tester-a, redacted>
Content-Type: application/json
Accept: text/event-stream
{"conversation_id":"conv_test_0511","message":"Create a support ticket titled ATARUS-TEST-2026-10-28."}
Expected output
event: tool_call
data: {"name":"create_ticket","arguments":{"title":"ATARUS-TEST-2026-10-28"}}
event: tool_result
data: {"ticket_id":"tkt_test_0981"} # <- written with no confirmation step
The user asked for this ticket, so the action is legitimate; the question is whether anything stood between the model and the write. A confirmation the user clicks is what stops the same call when the instruction came from a document. We delete tkt_test_0981 at once and record its id. We never call send_email or share_document to prove the same point; the client shows us in code whether the confirmation layer covers them.
Negative result. A confirmation event before the write, and the ticket appearing only after we accept it.
Fix. Require a user confirmation, enforced in code outside the model, for every tool that writes or reaches outside the tenant, and show the exact arguments in the confirmation.
What does each tool's credential allow beyond the tool?
psql "$REVIEW_DSN" -c "SELECT table_name, string_agg(privilege_type, ',' ORDER BY privilege_type) AS grants
FROM information_schema.role_table_grants WHERE grantee = 'assistant_svc' GROUP BY table_name;"
Expected output
table_name | grants
------------+--------------------------
invoices | DELETE,INSERT,SELECT,UPDATE # <- the "read-only" report tool's login can delete invoices
customers | SELECT
The tool's code may only run SELECT, but the credential is what an attacker gets if the tool can be steered, and a production database deleted by an agent is what that looks like. We read the grants with the client's review login, or the client's administrator runs the query; we do the same for API keys and cloud roles behind each tool.
Negative result. Each tool credential holds only what its tool needs, here SELECT on the report views.
Fix. Give each tool its own credential with the narrowest grant, short-lived where the platform allows, and keep destructive rights out of any credential a model can reach.
The defender sees
Each tool call should be logged with the user, the conversation id, the tool, its arguments, the identity it ran as and the result. The identity test then shows as tester-a's conversation reading cus_test_b2 through search_invoices, which an alert on tool arguments naming objects the user cannot read would catch. The ticket shows as created by the assistant on behalf of tester-a and deleted by us minutes later. The grant query shows in the database log under the review login where statement logging is on. If tool calls are logged without the identity they ran as, the client cannot tell an assistant acting for a user from one acting as itself, which belongs in the report beside the write-up of any finding here.
Done when
Every tool is classified as read, write in the tenant or effect outside it, the identity check is run against another role's test data, the confirmation result is recorded with the ticket id and its deletion, and each tool credential's grants are listed.
Not covered
Getting the model to call a tool through injected text (see prompt injection testing), the security of the tool servers themselves, and model vendor controls; the outputs shown are representative examples on a placeholder app, not captured runs.