[Schema Inaccuracy] code_scanning_alert fixed webhook: fixed_at typed as null instead of date-time string
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- openapi
- Ambito
- api
Direzione di ricerca
Inizia individuando lo schema del webhook code_scanning_alert per l’action "fixed" e confronta alert.fixed_at con lo schema dell’endpoint REST referenziato nell’issue. Aggiorna lo schema in modo che fixed_at accetti stringhe di data e ora ISO 8601 nullable, quindi verifica che il payload di esempio venga validato mentre null rimanga consentito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Expected
In the code_scanning_alert webhook event with action: "fixed", the alert.fixed_at property should be typed as a nullable ISO 8601 date-time string:
fixed_at:
type: string
format: date-time
nullable: true
description: >-
The time that the alert was fixed in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
This would be consistent with how fixed_at is already defined on the REST API endpoint GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}, where it is correctly typed as string or null with format: date-time.
Actual
The webhook schema for code_scanning_alert (action fixed) defines fixed_at with only type: null, meaning it can never contain a value — only null or absent.
Reproduction Steps
- Configure a repository webhook (or GitHub App) to receive
code_scanning_alertevents. - Trigger a
code_scanning_alertevent withaction: "fixed"(e.g., fix a CodeQL finding and merge to the default branch). - Inspect the webhook payload. The
alert.fixed_atfield contains an ISO 8601 datetime string, e.g."2025-01-15T10:30:00Z". - Attempt to validate this payload against a client generated from the OpenAPI spec. Validation fails because the schema only permits
nullforfixed_at.
Impact
Any strongly-typed client generated from this spec (e.g., githubkit for Python, Octokit for TypeScript) will reject valid code_scanning_alert fixed webhook payloads because fixed_at does not conform to the null-only schema.
Reference
- REST API endpoint schema (correct): https://docs.github.com/en/rest/code-scanning/code-scanning#get-a-code-scanning-alert
- Webhook event docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#code_scanning_alert
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 1.6k
- Fork
- 342
- Merge medio
- 3h 33m
- PR unite (30g)
- 51
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/rest-api-description
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
github/rest-api-description#7201 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/rest-api-description#7163 ·
-
Runner deprecations: registration_deprecates_at is declared on the response but never returned Apertafeature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/rest-api-description#7162 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
github/rest-api-description#7135 ·
-
feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
github/rest-api-description#7111 · 1 commento ·
Tutte le issue di github/rest-api-description
Issue simili
-
[Bug]: Matrix progress drafts fail with "Matrix runtime not initialized" during tool activity Apertabug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
games-on-whales/wolf#509 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100