DEV Community

Onkar Singh Pawar
Onkar Singh Pawar

Posted on Fully Autonomous

ScopeMap: planning least-privilege permissions for AI agents

Giving an AI agent a useful task is only half the setup. The other half is deciding what that agent actually needs permission to do.

I built ScopeMap, an educational permission-planning demo, with AI assistance in Lovable. It compares a requested capability set with a small, explicit set of requirements for a fictional workflow.

Try ScopeMap

What the app does

Choose one of three synthetic workflows:

  • Summarize three fictional documents.
  • Draft a support response for human review.
  • Analyze a sample CSV and write a report.

Then select from seven capabilities: scoped file reading, broad file access, file writing, sending email, external network access, shell execution, and persistent memory.

The analysis shows missing requirements, unnecessary permissions, and the fixed reason behind each recommendation. A before/after diagram makes the proposed reduction visible. You can apply the recommended set, edit a human-review checklist, and copy or download the plan as JSON.

A concrete example

For the document-summary scenario, the fictional task requires reading the supplied files. It does not require sending email or retaining information across sessions.

Starting with those extra capabilities makes the difference visible: ScopeMap recommends the scoped read capability and explains why the other permissions are unnecessary for this particular scenario.

An empty selection produces a warning instead of suggesting that an agent can finish the task without access. Switching workflows updates both the requirements and the review checklist.

These requirements are deliberately defined by the demo. They are not a universal minimum for every implementation of a similar task.

Keeping evidence separate from authority

The app displays a fake prompt-injection example as inert text. Its instructions cannot add permissions, open a URL, or execute anything.

The approval checklist is also descriptive: checking a box records an intention in the exported plan. It does not grant permissions to a real agent.

The JSON includes explicit fields such as:

{
  "schema": "scopemap.plan/v1",
  "analysis": "rule-based",
  "liveInference": false,
  "syntheticExample": true,
  "approvalsGrantPermissions": false
}
Enter fullscreen mode Exit fullscreen mode

This is a partial example of the export metadata, not the full plan.

What I checked

The Lovable build reported nine passing tests and a successful production build. The test scope covers workflow requirements, unnecessary capabilities, empty selections, invalid combinations, export structure, and inert injection text.

I also checked the running interface: applying the recommended set removed the extra permissions; an empty set showed the missing requirement; changing to CSV analysis selected the corresponding read/write requirements; and the displayed JSON parsed with the expected schema. The public deployment was checked after publishing.

Limits and privacy

ScopeMap is a rule-based educational planner, not a live AI model, security scanner, sandbox, or permission-enforcement gateway. It cannot establish that a real tool is safe or that a deployed agent respects its permissions.

The demo uses synthetic examples. It has no account connection, personal-profile content, live inference, or app-level persistence. No GitHub repository is required to try it.

The useful habit is simple: write down the task, identify the capabilities it needs, explain every extra permission, and keep real authorization outside untrusted content.

Open the live demo

Built and written with AI assistance; the behavior and limitations above reflect the tested demo.

Top comments (0)