Prompt Details
Model
(claude-5-5-sonnet)
Token size
4,876
Example input
[Describe the agent, what it is supposed to accomplish, who uses it, and the environment where it operates.]: AI assistant that reads my Gmail, summarizes messages, drafts replies, finds attachments, and helps manage my inbox.
[List or paste the agent's tools, APIs, accounts, credentials, roles, scopes, files, databases, services, commands, actions, connected systems, delegated identities, or other permissions.]: Gmail read/write access, search email, read attachments, create drafts, send email, archive messages, apply labels, access contacts.
[Describe important workflows, what the agent may and may not do, approval requirements, sensitive resources, production boundaries, external users/systems, and any actions that should require human control.]: It may summarize and draft automatically. It should not send important emails, delete messages, forward confidential attachments, or contact new recipients without approval.
[Paste relevant configurations, IAM policies, tool definitions, permission manifests, architecture notes, logs, screenshots transcribed as text, security requirements, documentation, or known concerns. Write "none" if unavailable.]: OAuth scopes, Gmail integration settings, tool list, agent instructions, and examples of actions it can perform.
Example output
# Executive Decision
Verdict: RESTRICT
The agent does not currently demonstrate least privilege. Its legitimate core job is read/search/summarize/draft, while the supplied capability set also includes direct email sending and broad Gmail read/write authority. The stated workflow explicitly says important emails and new-recipient contact should require approval, but no technical approval mechanism is evidenced. Teks yang ditempel (1)
The most important authority concern is capability composition:
`READ EMAIL / ATTACHMENT → COMPOSE CONTENT → SEND EMAIL → EXTERNAL DESTINATION`
That turns a productivity assistant into an outbound actor capable of crossing the mailbox trust boundary. The audit specification itself requires evaluating combined effective authority rather than isolated permission names. Teks yang ditempel (1)
Maximum credible blast radius supported by the supplied evidence: SIGNIFICANT — unauthorized external communication and disclosure of mailbox-derived information through the agent's send capability. The number of reachable recipients, whether attachments can be transmitted, and the exact OAuth/resource scope are unresolved.
Immediate operating condition: permit read, search, summarization, attachment discovery, and draft creation; disable or externally gate actual sending until independent approval enforcement is demonstrated.
---
# Permission Map
| Capability | Resource | Action | Scope | Identity | Need | Evidence | Concern |
|---|---|---|---|---|---|---|---|
| Search email | Gmail mailbox | Search | Mailbox scope unspecified | Delegated Gmail access | REQUIRED | CONFIRMED | Exact resource scope unknown |
| Read messages | Gmail mailbox | Read | Mailbox scope unspecified | Delegated Gmail access | REQUIRED | CONFIRMED | Sensitive data exposure inherent to purpose |
| Read attachments | Email attachments | Read | Attachment scope unspecified | Delegated Gmail access | REQUIRED | CONFIRMED | Can expose confidential information |
| Create drafts | Gmail drafts | Write draft | Scope unspecified | Delegated Gmail access | REQUIRED | CONFIRMED | Appropriate for stated workflow |
| Send email | External recipients | Send | Recipient limits unspecified | Delegated Gmail access | CONDITIONAL | CONFIRMED | Execution authority exists despite approval boundary |
| Archive messages | Gmail mailbox | Modify state | Scope unspecified | Delegated Gmail access | CONDITIONAL | CONFIRMED | Not clearly required for summarization/drafting |
| Apply labels | Gmail mailbox | Modify metadata | Scope unspecified | Delegated Gmail access | CONDITIONAL | CONFIRMED | Legitimate only if inbox-management workflow requires it |
| Access contacts | Contacts | Read/use | Scope unspecified | Delegated user access | CONDITIONAL | CONFIRMED | Breadth and actual necessity not established |
| Gmail read/write | Gmail | Broad read/write class | Exact OAuth scopes not supplied | Delegated Gmail access | UNKNOWN | CONFIRMED at high level | Effective write surface cannot be determined |
The supplied input explicitly grants Gmail read/write, search, attachment reading, drafts, sending, archiving, labels, and contact access. Teks yang ditempel (1)
The framework requires necessity to be assessed independently of currently granted permissions; existing access is not automatically justified. Teks yang ditempel (1)
---
# Authority Graph
## CONFIRMED
```text
AI Agent
→ Gmail delegated access
→ CAN_SEARCH → mailbox
→ CAN_READ → messages
→ CAN_READ → attachments
→ CAN_WRITE → drafts
→ CAN_SEND → external email recipients
→ CAN_MODIFY → archive state
→ CAN_MODIFY → labels
AI Agent
→ contacts access
→ CAN_ACCESS → contact information
```
Security-significant composition:
```text
AI Agent
→ CAN_READ mailbox content
→ CAN_GENERATE outbound content
→ CAN_SEND email
→ external recipient
```
That is a material authority path because read access and outbound communication combine into stronger effective authority than either permission provides independently. The required analysis specifically calls out `READ + EXFILTRATE` and similar composition patterns. Teks yang ditempel (1)
## INFERRED
```text
Inbound email
→ potentially untrusted content
→ processed by agent
→ may influence generated response
→ agent possesses send capability
→ external action
```
This is a plausible trust-boundary risk, not a confirmed exploit path. No evidence was supplied showing whether inbound content is isolated from agent instructions or whether send requires a separate human-controlled transaction.
## UNKNOWN
```text
Agent
→ send email
→ arbitrary new recipient?
```
The workflow says new-recipient contact requires approval, but the evidence does not state whether the tool enforces this restriction or merely relies on agent instructions.
Also unknown:
```text
Agent
→ attachment read
→ attach original file to outgoing email?
```
Attachment sending was not listed, so it must not be assumed.
---
# Critical Authority Paths
## Path 1 — Mailbox data → outbound communication
```text
ENTRY
Mailbox message / readable attachment
→ CAPABILITY
Read Gmail content
→ AUTHORITY TRANSITION
Agent generates outbound message
→ TARGET
External email recipient
→ POSSIBLE EFFECT
Mailbox-derived information leaves the user's account
```
Why it matters: the agent combines sensitive-input access with an external communication primitive.
Precondition: the agent must be allowed to invoke `send email`.
Existing control: behavioral instruction that important emails, confidential forwarding, and new-recipient contact require approval. Teks yang ditempel (1)
Control gap: no evidence shows that this rule is enforced outside the same agent possessing the send capability.
Breakpoint: separate draft generation from send execution. Require a user-controlled or otherwise independent approval event before the send primitive becomes callable.
Evidence status: CONFIRMED capability composition; UNKNOWN approval enforcement.
---
## Path 2 — Agent decision → external action
```text
ENTRY
Agent-generated response
→ CAPABILITY
Send email
→ AUTHORITY TRANSITION
Internal reasoning becomes an externally visible action
→ TARGET
Email recipient
→ POSSIBLE EFFECT
Incorrect, unauthorized, or misdirected communication
```
Why it matters: sending is materially different from drafting. Drafting is reviewable; sending crosses the external trust boundary.
Required preconditions: send permission and a destination accepted by the integration.
Existing control: stated approval policy.
Breakpoint: approval-bound execution token or send action exposed only after explicit approval.
Evidence status: CONFIRMED send authority; UNKNOWN recipient restrictions and approval implementation.
---
## Path 3 — Agent → mailbox mutation
```text
ENTRY
Agent inbox-management decision
→ CAPABILITY
Archive / apply labels
→ AUTHORITY TRANSITION
Read-only assistant becomes mailbox-state modifier
→ TARGET
Mailbox organization/state
→ POSSIBLE EFFECT
Incorrect messages may be moved or reclassified
```
Why it matters: it expands authority beyond summarization and drafting.
Existing controls: NOT PROVIDED.
Breakpoint: retain only if inbox management is an intended autonomous function; otherwise require explicit invocation or narrower tool exposure.
Evidence status: CONFIRMED capability, but scope and reversibility are UNKNOWN.
---
# Least-Privilege Gaps
## 1. Standing send authority
CURRENT AUTHORITY
Agent can send email.
REQUIRED AUTHORITY
For summarization and drafting, draft creation is sufficient. Send authority is necessary only when a separately approved send workflow occurs.
EXCESS
Standing execution authority exists beyond the core drafting function.
WHY IT EXISTS
NOT PROVIDED.
SMALLEST SAFE REDUCTION
Make send unavailable during ordinary autonomous operation. Unlock it only after an independent approval event.
---
## 2. Approval policy is not evidenced as an authorization control
CURRENT AUTHORITY
The agent is told not to perform certain send actions without approval.
REQUIRED AUTHORITY
The system must enforce those boundaries at the action boundary.
EXCESS
The same principal appears to possess execution capability while being expected to self-observe policy.
WHY IT EXISTS
UNKNOWN.
SMALLEST SAFE REDUCTION
Place approval enforcement between the agent and the send operation.
The supplied framework explicitly warns not to treat approval as effective when the same agent can satisfy or bypass its own approval requirement. Teks yang ditempel (1)
---
## 3. Generic Gmail read/write authority is insufficiently scoped
CURRENT AUTHORITY
"Gmail read/write access."
REQUIRED AUTHORITY
Search/read messages, read attachments, create drafts, and whichever explicit inbox-management operations are actually needed.
EXCESS
Cannot be determined because the exact OAuth scopes and action-layer restrictions were not provided.
WHY IT EXISTS
UNKNOWN.
SMALLEST SAFE REDUCTION
Map exact OAuth scopes and exposed tool actions to each required workflow, then remove write operations not directly required.
---
## 4. Contact access has no demonstrated minimum scope
CURRENT AUTHORITY
Access contacts.
REQUIRED AUTHORITY
Potentially useful for resolving known correspondents or recipient identity.
EXCESS
Unknown because the purpose and scope of contact access are not described.
SMALLEST SAFE REDUCTION
Retain only the minimum lookup capability required for approved workflows; avoid unrelated contact modification or broad directory authority if currently present.
---
# Blast-Radius Report
### Scenario: unauthorized outbound email
TRIGGER
Incorrect agent decision, manipulated content, stale context, or misunderstood user intent.
AUTHORITY USED
`send email`
PROPAGATION PATH
```text
Agent decision
→ send capability
→ recipient
→ external communication
```
AFFECTED ASSETS / USERS / SYSTEMS
User identity/reputation, recipient, and information included in the message.
REVERSIBILITY
UNKNOWN from supplied evidence.
CURRENT CONTAINMENT
Policy instruction requiring approval for important/new-recipient communications.
BLAST-RADIUS JUDGMENT
SIGNIFICANT.
Reason: the action crosses the account boundary and may expose information or create externally consequential communications.
---
### Scenario: mailbox-derived information disclosure
TRIGGER
Agent uses information read from messages or attachments in an outbound message.
AUTHORITY USED
`read email / attachments + send email`
PROPAGATION PATH
```text
Mailbox data
→ agent
→ composed outbound content
→ external recipient
```
AFFECTED ASSETS / USERS / SYSTEMS
Message content and potentially information derived from attachments.
REVERSIBILITY
Potential disclosure recovery is not evidenced.
CURRENT CONTAINMENT
Instruction against forwarding confidential attachments, but enforcement is not demonstrated.
BLAST-RADIUS JUDGMENT
SIGNIFICANT.
---
### Scenario: incorrect mailbox modification
TRIGGER
Wrong message selected or incorrect classification.
AUTHORITY USED
archive / labels
PROPAGATION PATH
```text
Agent decision
→ mailbox write
→ message state change
```
AFFECTED ASSETS / USERS / SYSTEMS
Mailbox records within whatever scope the integration exposes.
REVERSIBILITY
UNKNOWN.
CURRENT CONTAINMENT
NOT PROVIDED.
BLAST-RADIUS JUDGMENT
LIMITED based on currently evidenced operations, but exact mailbox scope remains unknown.
---
# Findings & Remediation
| Priority | Finding | Root Cause | Consequence | Recommended Fix | Validation |
|---|---|---|---|---|---|
| P1 | Agent possesses send authority while sensitive send actions require approval | Approval and execution boundaries are not demonstrated as separate | Unauthorized or misdirected external communication | Separate draft and send authority; enforce approval outside the agent | Attempt send without approval and verify action is technically rejected |
| P1 | Read + send creates an outbound disclosure path | Same execution context can access mailbox content and communicate externally | Sensitive mailbox-derived information may leave account | Approval-gate outbound send and constrain approved payload/recipient | Test attempted outbound use of sensitive message content without approval |
| P1 | Exact Gmail write authority is unknown | OAuth scopes and tool-level action restrictions were referenced but not supplied | Additional effective actions may exist beyond the listed workflow | Inventory exact OAuth scopes and exposed Gmail operations; remove unnecessary writes | Compare granted scopes/actions against required capability baseline |
| P2 | New-recipient restriction is policy-only based on current evidence | No recipient-level authorization control demonstrated | Agent could potentially contact unintended parties | Require explicit approval for recipients outside approved/current conversation context | Attempt send to unapproved recipient |
| P2 | Contacts access necessity/scope is unresolved | Capability purpose is not specified | Broader personal-data access than required | Reduce contact access to minimum lookup function or remove it | Verify draft workflow after narrowing access |
| P2 | Archive/label autonomy may exceed minimum assistant function | "Manage inbox" is broad and no mutation boundary is described | Incorrect inbox state changes | Expose only required mutation actions and consider explicit user-triggered mode | Exercise search/draft workflow with mutation tools unavailable |
P0 is not assigned because the supplied evidence does not establish catastrophic impact, administrative control, destructive mailbox authority, financial authority, infrastructure control, or large-scale privilege escalation. Severity should be based on supported consequences rather than theoretical worst cases, as required by the audit standard. Teks yang ditempel (1)
---
# Evidence Gaps
### Exact OAuth scopes
MISSING EVIDENCE
Actual Gmail OAuth scope identifiers and any Contacts scopes.
WHY IT MATTERS
"Gmail read/write" may represent either tightly mediated operations or materially broader authority.
WHAT TO COLLECT
Exact OAuth scopes and granted consent set.
DECISION IT COULD CHANGE
Whether some permissions must be removed before operation.
---
### Send approval implementation
MISSING EVIDENCE
Architecture showing how approval is recorded and how the send action verifies it.
WHY IT MATTERS
This is the decisive control separating draft assistance from autonomous external authority.
WHAT TO COLLECT
Tool definition, approval state model, authorization check, and examples of rejected unapproved sends.
DECISION IT COULD CHANGE
Could move the verdict from RESTRICT toward APPROVE WITH CONDITIONS.
---
### Recipient restrictions
MISSING EVIDENCE
Whether the agent can choose arbitrary recipients, only reply to existing correspondents, or send only to approved addresses.
WHY IT MATTERS
Recipient scope directly changes external blast radius.
WHAT TO COLLECT
Send-tool schema, recipient validation logic, and allowlist/approval rules.
DECISION IT COULD CHANGE
Blast-radius judgment and required remediation.
---
### Effective write operations
MISSING EVIDENCE
Whether Gmail write access enables operations beyond drafts, archive, and labels.
WHY IT MATTERS
Declared tool names may not equal actual effective authority.
WHAT TO COLLECT
Integration tool manifest plus API operations reachable with the delegated credential.
DECISION IT COULD CHANGE
Least-privilege assessment and release restrictions.
---
### Confidential-content handling
MISSING EVIDENCE
Whether attachment contents can be extracted, copied into outgoing messages, or attached to new outgoing emails.
WHY IT MATTERS
It determines the exact data-exfiltration path.
WHAT TO COLLECT
Attachment tool behavior and outbound-message capabilities.
DECISION IT COULD CHANGE
Severity and required outbound-content controls.
The audit specification explicitly requires unresolved material facts to remain UNKNOWN rather than being replaced with assumptions. Teks yang ditempel (1)
---
# Final Action Plan
## DO NOW
- Remove autonomous access to the send operation from the normal read/summarize/draft workflow.
- Require a technically enforced approval boundary before sending.
- Enumerate the exact OAuth scopes and Gmail/Contacts actions reachable through the integration.
## DO NEXT
- Constrain recipient selection, especially new recipients.
- Verify whether mailbox-derived sensitive data can cross through outbound messages.
- Determine whether archive and label operations really need autonomous authority.
## DO LATER
- Add auditability around approved sends, recipient changes, and other material mailbox mutations.
- Add detection for repeated or abnormal outbound actions where send remains enabled.
- Periodically compare the capability inventory against the agent's actual workflow.
## DO NOT
- Do not rely only on prompt instructions such as "never send without approval."
- Do not add a complex security service merely to appear sophisticated if a narrow send gate solves the authority problem.
- Do not remove capabilities required for search, reading, attachment discovery, or draft creation merely to minimize permission counts.
The supplied standard explicitly prefers narrow structural controls, evidence-based least privilege, and minimal effective remediation over architectural bloat. Teks yang ditempel (1)
The final verdict therefore remains RESTRICT: operate the agent as a read/search/summarize/draft assistant until send authority is independently approval-gated and its exact delegated Gmail authority is verified. Under the supplied decision model, lack of evidence is not sufficient grounds for approval. Teks yang ditempel (1)
1. Convert normal operation to read/search/draft-only and make send unavailable without an independent approval event.
2. Collect and compare the exact Gmail/Contacts OAuth scopes plus reachable tool operations against the minimum required workflow.
3. Prove with negative tests that unapproved sends, unapproved recipients, and prohibited sensitive-content transmission are technically blocked rather than merely discouraged by instructions.
By purchasing this prompt, you agree to our terms of service
CLAUDE-5-5-SONNET
Audit an AI agent before launch or after access changes. Map identities, tools, data, actions, and authority paths; expose excessive permissions and blast radius; then produce least-privilege fixes, blockers, and a clear release verdict.
...more
Added 5 days ago
