fix(security): paramétrage GraphQL (V5) + verrou GET /discord-users (V7)#3
Merged
Conversation
V5 - GraphQL injection via string interpolation: convert user-info and all event-progress queries (promotion, additional, specialty) to use parameterized GraphQL variables ($username: String!, $eventId: Int!) instead of interpolating values into the query string. Validate eventId with Number.isInteger and return 400 when invalid. Response shape and selected fields are unchanged. V7 - public login<->Discord lookup: add requireApiKey middleware to both GET /discord-users and GET /discord-users/:login routes. V8 - .env already present in .gitignore and untracked; no change needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vulns élevées API
V5 — Injection GraphQL par interpolation
user.ts,promotion.ts(×2),additional.ts,specialty.tsinterpolaientusername/eventIddans la chaîne GraphQL.→ Variables GraphQL paramétrées (
$username: String!,$eventId: Int!) + validationNumber.isInteger(eventId)(400 sinon). Forme des réponses inchangée.V7 — login↔Discord public
GET /discord-userset/discord-users/:loginexposaient toute la table login↔discordId sans auth → ajout derequireApiKey.V8 — secrets .env
.envdéjà gitignoré (aucun changement code) ; rotation + env Deno Deploy = opérationnel.