GitHub Gist
DEVELOPER · DEVELOPER
Gists, the files inside them, stars, and comments under that person’s own token.
Connecting GitHub Gist in practice
Gists sit behind their own OAuth scope, `gist`, separate from `repo`, so a token that can read every private repository still cannot list a user’s gists. The API also truncates rather than failing: a file over 1 MB comes back with truncated: true, and anything over 10 MB or past the 300th file has to be cloned from git_pull_url.
Scopes that draw scrutiny
gistRequired to create gists or read a user’s gists. It is granted independently of repo access, and a token holding it can publish a public gist under that user’s name.
Worth knowing
- Content is silently partial: files over 1 MB return with truncated: true and only part of the content, so an agent that reads the response body gets a plausible-looking half of a file.
- Files over 10 MB are not retrievable through the API at all — the documented route is cloning the gist from the git_pull_url.
- A gist with more than 300 files returns only the first 300 with a top-level truncated: true, which is a second, separate truncation to check for.
- Pagination caps the reachable set: per_page maxes at 100 and the docs state you can fetch up to 3,000 gists, so a long-lived account’s history is not fully enumerable.
Checked against REST API for gists (2026-09-29)
What an agent can do
Each action is granted on its own. An agent allowed to read is not thereby allowed to write, and the scope beside each row is what the acting user must have connected for it to run at all.
Often connected alongside
Put GitHub Gist behind one governed endpoint.
Same permissions, same audit trail, whatever else you connect next.