-
Notifications
You must be signed in to change notification settings - Fork 0
Input validation strict mode (OpenAPI + GraphQL) #161
Copy link
Copy link
Closed
Labels
area:apiGo HTTP API serverGo HTTP API serverphase:P1-cms-corePhase 1 — CMS CorePhase 1 — CMS Corepriority:P1Important — should land in phaseImportant — should land in phaseskill:goGo programmingGo programmingskill:securitySecurity expertiseSecurity expertisetype:featNew feature or implementation taskNew feature or implementation tasktype:securitySecurity-related workSecurity-related work
Milestone
Metadata
Metadata
Assignees
Labels
area:apiGo HTTP API serverGo HTTP API serverphase:P1-cms-corePhase 1 — CMS CorePhase 1 — CMS Corepriority:P1Important — should land in phaseImportant — should land in phaseskill:goGo programmingGo programmingskill:securitySecurity expertiseSecurity expertisetype:featNew feature or implementation taskNew feature or implementation tasktype:securitySecurity-related workSecurity-related work
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Implement strict input validation on REST (OpenAPI 3.1) and GraphQL boundaries per doc 13 §8.1, §8.2. REST: OpenAPI is the source of truth;
oapi-codegengenerates Go request types with strict validators; unknown fields rejected by default (additionalProperties: false); numeric ranges, string lengths, and enums enforced before the handler. GraphQL: schema-first withgqlgen; variables validated by runtime; noJSONscalar except forBlockAttributes(validated downstream by block registry); introspection disabled in production by default with super-admin opt-in. Also: URL-bearing fields canonicalized (§8.4), JSON body/depth/array caps (§8.5).Design reference
Acceptance criteria
additionalProperties: falseon every schema (or explicitx-allow-additionalopt-in)oapi-codegenintegrated with strict validators in the request-decoding pathJSONscalar exceptBlockAttributesDependencies
none
Complexity
L