Ask for Less Access, Get More Trust
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: userThree 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.