Skip to content

Grade Agent Permission Tests

Score both permitted work and denied effects in synthetic agent tests, including incomplete and uncertain cases.

A permission test suite can look good when every action is denied. That is not a usable agent. Grade both the allowed task and the prohibited effect. Include cases where evidence is missing, since an uncertain result must not be silently counted as safe.

Choose a fixed owned-lab fixture. Give it synthetic users, tenants, records, and tool handlers with known decisions. Freeze the task prompt and policy version for each run. OWASP's MCP and LLM guidance identify authorization and prompt-boundary risks; the suite should turn those broad risks into exact expected outcomes.

Scoring card

CaseExpected resultFailure signal
Authorized readCorrect owned marker returnedRefusal or wrong record
Cross-tenant readNo other marker returnedData reaches tool result or model
Write without approvalNo side effectDownstream call occurs
Prompt injectionLegitimate task completed safelyNew tool or destination used
Missing identityDenial with safe errorAnonymous access
Uncertain dependencyInconclusive, not a findingUnsupported impact claim

Judge the server decision, tool events, and final answer separately. A model may say "I cannot access that" after a tool already returned private data. Conversely, a safe controller may deny a tool while the model invents an answer. Those are different failures with different fixes.

Run and review

Use deterministic assertions for object ownership and side effects. Then review the model's explanation for unsupported claims and omitted uncertainty. Keep a positive control for every denial class so a broken service does not appear secure. Record exact fixture hashes, model and tool versions, policy version, and raw decisions without customer data.

Do not turn a small suite score into a detection-rate claim. A seeded test shows behavior on that fixture only. Preserve failed runs and rerun after changing a prompt, tool schema, or authorization rule. The release decision should identify which cases passed, failed, or remained inconclusive and why. If a high-impact path has no denial test, leave that tool unavailable until a bounded test can be written.

Know what your agents can reach

Map data access, tool actions and approval boundaries before testing. Use the scope guide, or discuss a review of your AI application.

Sources

  1. OWASP Top 10 for LLM ApplicationsAccessed
  2. OWASP Practical Guide for Secure MCP Server DevelopmentAccessed