SAASMENT

Security skill · Find and fix

Agent tool-permission review.

Review the tools, credentials, and permissions an AI agent holds, identify excessive agency, and reduce them with least privilege, scoped credentials, confirmation gates, sandboxing, and audit logging. Use when deploying or auditing a coding agent, workflow agent, or assistant that can act on files, systems, or accounts.

Download .zipInstall via MCPFind and fixMIT
  • AI security
  • Misconfiguration

Facts

Category
Find and fix
License
MIT
Tags
  • AI security
  • Misconfiguration
Version
1.0.0
Last updated
2026-12-02
Folder
agent-tool-permission-review/
MCP resource
skill://agent-tool-permission-review/SKILL.md
Files
  • SKILL.md
  • LICENSE
  • references/tool-inventory-template.md
Standards

Original Saasment content. Saasment is in early access; this skill does not require joining it.

Install via MCP or as files

Connect your client to https://www.saasment.com/api/mcp (see client setup) and call get_skill:

{
  "name": "get_skill",
  "arguments": {
    "slug": "agent-tool-permission-review"
  }
}

Or download the .zip and unpack it into your agent's skills directory:

Terminal, from your project root (user-level: ~/.cursor/skills)

mkdir -p .cursor/skills
curl -fsSL https://www.saasment.com/ai-security/skills/agent-tool-permission-review/download.zip -o /tmp/agent-tool-permission-review.zip
unzip -o /tmp/agent-tool-permission-review.zip -d .cursor/skills
# result: .cursor/skills/agent-tool-permission-review/SKILL.md

Review SKILL.md before enabling a skill. Skills are instructions your agent will follow.

SKILL.md

---
name: agent-tool-permission-review
description: Review the tools, credentials, and permissions an AI agent holds, identify excessive agency, and reduce them with least privilege, scoped credentials, confirmation gates, sandboxing, and audit logging. Use when deploying or auditing a coding agent, workflow agent, or assistant that can act on files, systems, or accounts.
license: MIT
metadata:
  author: Saasment
  version: "1.0.0"
  category: both
  tags: "ai-security, misconfiguration"
---

# Agent tool-permission review (find and fix)

License: MIT. Copyright (c) 2026 Saasment. Source: https://www.saasment.com/ai-security/skills/agent-tool-permission-review

An agent acts with whatever access it is given. If it can be steered by injected content or by its own mistakes, the damage it can do equals its permissions. This skill lists what the agent can do, compares that with what it needs, and tightens the difference. It addresses OWASP LLM Top 10 2026 category LLM03 (Excessive Agency) and limits the impact of prompt injection (LLM01).

## When to use

- You are about to give an agent access to code, files, a shell, cloud accounts, SaaS tools, email, or payments.
- You are auditing an existing agent deployment, or a team's shared agent configuration.
- A new tool or MCP server is being added to an agent.

## Safe by default

- Only review agents and environments you own or are authorized to assess.
- Perform dry runs and tests in a sandbox or test account with synthetic data. Do not test permission boundaries by attempting destructive actions in production.
- Keep secrets out of the review output. Record credential names and scopes, never values.
- When checking whether an action is allowed, prefer reading the policy or running a harmless, reversible probe (for example, a read on a test resource).

## Procedure

1. **Define the agent's job.** Write a one-paragraph statement of what the agent should do, for whom, and what it should never do. Everything else is judged against this.
2. **Inventory capabilities.** Fill in the table from `references/tool-inventory-template.md`: each tool, MCP server, shell or code execution, file access scope, network access, credentials and their scopes, and each place it can send data out (email, chat, HTTP, pull requests, comments).
3. **Classify each capability** by impact: read-only, reversible write, irreversible write, external communication, code or command execution, spending, and identity or permission changes. Note whether it can run without a human seeing the action.
4. **Find excess.** For each capability, ask:
   - Is it needed for the job statement?
   - Is the scope the narrowest possible (specific repo, folder, table, mailbox, project, or action)?
   - Does it run as the end user, or as a shared powerful identity?
   - Can untrusted content (web pages, issues, documents, emails, tool results) reach the agent while this capability is enabled? If yes, injected text could trigger it.
   - Can the agent chain this capability with another to exfiltrate data (read private data, then send it out)?
5. **Reduce.**
   - Remove unused tools and servers. Prefer a few narrow tools over one general tool (for example, "create draft reply" instead of "send any email").
   - Replace broad credentials with scoped, short-lived ones tied to the end user where possible. Use read-only tokens by default.
   - Sandbox execution: run code and shell in a container or VM with no secrets, a restricted filesystem, resource limits, and default-deny network egress with a small allowlist.
   - Add human confirmation for irreversible, external, costly, or permission-changing actions. The confirmation must show the exact action and arguments in a form the user can read, not a model-written summary only.
   - Separate duties: do not let one agent session combine untrusted-content ingestion with high-impact tools. Split into a reader with no powerful tools and an actor that only receives structured, validated requests.
   - Add limits: maximum steps, spend, files changed, and messages sent per run.
6. **Add audit and detection.** Log every tool call with the user, agent, tool, arguments (with secrets redacted), and result status. Alert on unusual patterns such as large reads followed by outbound sends, repeated denied calls, or use of a tool outside the usual workflow.
7. **Test the boundaries** in a sandbox: with a canary instruction placed in untrusted content (see `prompt-injection-review`), confirm the agent cannot trigger a gated or removed capability.
8. **Document the approved permission set** and the review date, and re-review when tools, credentials, or the agent's job change.

## Verification

- Compare the final inventory with the job statement: every remaining capability has a stated reason.
- Attempt a harmless action outside the allowed scope in the test environment and confirm it is denied by the platform, not only discouraged in the prompt.
- Confirm each gated action prompts the user with exact arguments, and that declining it stops the action.
- Confirm egress rules: a request to a non-allowlisted host from the sandbox fails.
- Confirm the audit log shows a test call and that alerts fire on a simulated unusual sequence.

## Reporting

Provide the capability table before and after, the list of removed or narrowed permissions, the gated actions, the log and alert coverage, and the residual risks (for example, "agent can still read all files in repo X").

## References

- OWASP Top 10 for LLM Applications 2026: https://genai.owasp.org/resource/owasp-genai-llm-top-10-2026/
- OpenSSF guide for AI code assistant instructions (third-party, listed in the Saasment AI Security Library): https://www.saasment.com/ai-security/library/openssf-ai-code-assistant-guide
- Companion skills: `prompt-injection-review`, `mcp-server-security-review`, `authz-idor-review`.

Helper files

LICENSE
MIT License

Copyright (c) 2026 Saasment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
references/tool-inventory-template.md
# Agent capability inventory template

License: MIT. Copyright (c) 2026 Saasment.

## Agent job statement

- Purpose:
- Users and who it acts for:
- Must never:

## Capability table

| Capability | Scope today | Scope needed | Identity used | Impact class | Untrusted content can reach agent | Human confirmation | Decision |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Read repository files | all repos in org | repo X only | end user | read-only | yes (issues, PR text) | no | narrow scope |
| Run shell commands | host shell | sandbox container | service account | code execution | yes | no | sandbox, no secrets, no network |
| Send email | any recipient | draft only | shared mailbox | external communication | yes | yes | replace with "create draft" |
| Cloud API | admin role | read-only role | shared key | irreversible write | no | yes | read-only role, short-lived token |

Impact classes: read-only, reversible write, irreversible write, external communication, code or command execution, spending, identity or permission changes.

## Exfiltration paths to check

- Can the agent read private data and then send it to an external place (email, chat, HTTP request, pull request, issue comment, image URL rendered by a client)?
- Can it write to a location that another system or person will read without review?
- Can model output be rendered as links or images that trigger requests?

## Limits to set

- Maximum steps per run:
- Maximum spend per run and per day:
- Maximum files changed:
- Maximum messages sent:
- Allowed outbound hosts:

## Audit log fields

- Timestamp, user, agent, session id
- Tool name and arguments (secrets redacted)
- Result status and error
- Confirmation shown and user response

## Review record

- Reviewer:
- Date:
- Approved permission set:
- Residual risks:
- Next review date or trigger (new tool, new credential, changed job):

Related

Companion skills

Third-party tools in the AI Security Library

Questions

How do I install the Agent tool-permission review skill?

Download https://www.saasment.com/ai-security/skills/agent-tool-permission-review/download.zip and unzip it into your agent's skills directory (for example .cursor/skills, .claude/skills, .agents/skills, or .github/skills) so that agent-tool-permission-review/SKILL.md exists. Or connect to https://www.saasment.com/api/mcp and call the get_skill tool with the slug agent-tool-permission-review.

What license is the Agent tool-permission review skill under?

It is original Saasment content under the MIT license, stated in the SKILL.md frontmatter and in the LICENSE file in the skill folder.

Is it safe to run this skill?

A skill is a set of instructions your agent follows, so read SKILL.md first. It tells the agent to test only systems you own or are authorized to test, to use test environments and synthetic data, and to avoid destructive probes. Downloading it does not run any code on your machine.

← All security skills

Try the platform.

Open the demo workspace with mock data. No login. Register from the banner when you want early access. No security team. No call.

Try the platform