[Schema Inaccuracy] Repository security advisory operations name `repository_advisories:read` / `repository_advisories:write` OAuth scopes that do not exist
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 85/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- openapi
- Área
- api
Línea de trabajo
Comienza con las seis descripciones de operaciones de avisos de seguridad del repositorio en descriptions/api.github.com/api.github.com.json y compara las entradas correspondientes en descriptions/ghec/ghec.json. Verifica los scopes documentados de OAuth y de los tokens de acceso personal clásicos con respecto a los resultados de reproducción del issue; se considera terminado cuando ambos archivos mencionan de forma coherente solo scopes válidos y no quedan alternativas repository_advisories no válidas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 1.6k
- Forks
- 342
- Merge medio
- 2 h 23 min
- PR fusionados (30 d)
- 57
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de github/rest-api-description
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
github/rest-api-description#7201 ·
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Abiertofeature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/rest-api-description#7162 ·
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
github/rest-api-description#7135 ·
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
github/rest-api-description#7111 · 1 comentario ·
Todos los issues de github/rest-api-description
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
canonical/paas-charm#368 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
area:workflow bug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
fil-donadoni/tolaria#4409 ·
-
status/awaiting_triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100