[Schema Inaccuracy] Repository security advisory operations name `repository_advisories:read` / `repository_advisories:write` OAuth scopes that do not exist
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- openapi
- 領域
- api
調査の方向性
descriptions/api.github.com/api.github.com.json にある6つのリポジトリセキュリティアドバイザリ操作の説明から始め、descriptions/ghec/ghec.json の対応するエントリと比較します。文書化された OAuth および classic personal access token の scopes を issue の再現結果と照合して確認します。完了の条件は、両方のファイルで有効な scopes のみが一貫して記載され、無効な repository_advisories の代替案が残っていないことです。
索引モデルが issue の本文から書いたものです。
説明
Schema Inaccuracy
Moved here from github/docs#46013 at a maintainer's request.
The description of six repository security advisory operations says that OAuth app tokens and personal access tokens (classic) can use either repo or a repository_advisories:* scope. GitHub's OAuth authorization server rejects both of those scope names as invalid.
| Operation | Scope named in the description |
|---|---|
GET /orgs/{org}/security-advisories |
repository_advisories:write |
GET /repos/{owner}/{repo}/security-advisories |
repository_advisories:read |
POST /repos/{owner}/{repo}/security-advisories |
repository_advisories:write |
GET /repos/{owner}/{repo}/security-advisories/{ghsa_id} |
repository_advisories:read |
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id} |
repository_advisories:write |
POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve |
repository_advisories:write |
For example, GET /repos/{owner}/{repo}/security-advisories/{ghsa_id} says:
OAuth app tokens and personal access tokens (classic) need the
repoorrepository_advisories:readscope to to get a published security advisory in a private repository, or any unpublished security advisory that the authenticated user has access to.
The same text appears in descriptions/api.github.com/api.github.com.json and descriptions/ghec/ghec.json (checked at 642960c).
Expected
The descriptions should name only scopes that can actually be granted. For these operations that is repo, so the or repository_advisories:read / or repository_advisories:write alternatives should be removed.
If these scopes are meant to exist, they should be grantable. They are also missing from Scopes for OAuth apps.
Reproduction Steps
Request a device code with only the scope named in the description. Any OAuth app client ID will do:
$ curl -s -X POST -H "Accept: application/json" \
-d "client_id=<oauth app client id>&scope=repository_advisories:read" \
https://github.com/login/device/code
{"error":"invalid_scope","error_description":"The scopes requested are invalid: repository_advisories:read.","error_uri":"https://docs.github.com"}
Results for other scopes, tested against github.com on 2026-09-22 UTC:
| Requested scope | Response |
|---|---|
repo, notifications, security_events |
device code issued |
read:org, read:packages, write:discussion, admin:repo_hook, read:user |
device code issued |
repo repository_advisories:read |
invalid_scope, naming only repository_advisories:read |
repository_advisories:read |
invalid_scope |
repository_advisories:write |
invalid_scope |
nonexistent_scope_xyz, nonexistent:read |
invalid_scope |
Other colon-separated scopes are accepted, so the colon is not the cause.
The "New personal access token (classic)" page at https://github.com/settings/tokens/new does not offer these scopes either.
Only github.com was tested. GHEC was not checked.
- 主要言語
- 言語のデータがありません
- スター
- 1.6k
- フォーク
- 342
- 平均マージ
- 2時間 23分
- マージ済み PR(30日)
- 57
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/rest-api-description のほかの issue
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
github/rest-api-description#7201 ·
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/rest-api-description#7163 ·
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/rest-api-description#7162 ·
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/rest-api-description#7135 ·
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
github/rest-api-description#7111 · コメント 1 件 ·
github/rest-api-description の issue をすべて見る
似ている issue
-
Area: Excel support
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
orbeon/orbeon-forms#7893 ·
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
modelcontextprotocol/python-sdk#3566 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
griptape-ai/griptape#2353 ·