← Integration Engineering
Integration Engineering

Ask for Less Access, Get More Trust

19 Oct 2026·3 min read

A security reviewer reads your app’s consent screen and asks: "Why do you need to delete files?" Have an answer. If you do not, remove that permission.

Why it matters

Least privilege means a system gets only the access its job needs. Things go wrong: a token leaks, a bug hits the wrong records, an AI agent misreads an instruction. The damage is limited by what the token was allowed to do. Customers and their security teams read that list too, and a short list gets approved faster.

Ask for the smallest scopes

In OAuth, a scope is a named piece of access, like "read your calendar". Providers often have a big scope and a small one. On GitHub, repo gives full access to repositories, while read:user only reads a user’s profile. If you only show a public name and avatar, you do not need repo at all. GitHub’s docs say a token with no scope can already read public profile info.

HTTP/2 200
X-OAuth-Scopes: repo, user
X-Accepted-OAuth-Scopes: user
Response headers copied from GitHub’s own docs, not run by me because it needs a real token. The token has repo, but the call only needed user. Least privilege closes that gap.

Three more habits

  • If your platform lets you turn actions on one by one, turn on only the ones your feature calls.
  • Start read-only. Add write access only when a feature really writes.
  • Every few months, check the list. If no feature uses a scope today, remove it.
Do this in 60 secondsOpen GitHub: Settings, then Developer settings, then Personal access tokens. If a token has more access than its script needs, or you forgot what uses it, delete it.
Today’s AI angleAn AI agent will try any tool you give it. Give it only the tools the task needs, read-only first. A block on "delete" in the name does not catch a tool called "remove" or "archive".
Ask for Less Access, Get More Trust · Ali Huzaifa