-
Notifications
You must be signed in to change notification settings - Fork 239
[BUG] Missing String Length Constraints #1492
Copy link
Copy link
Closed
Labels
area:backendBackend API, database, or service workBackend API, database, or service worklevel:beginner20 pts difficulty label for small beginner-friendly PRs20 pts difficulty label for small beginner-friendly PRspriority:lowNice-to-have issue with low urgencyNice-to-have issue with low urgencytype:bugBug fix work category bonus labelBug fix work category bonus label
Description
Activity
Metadata
Metadata
Assignees
Labels
area:backendBackend API, database, or service workBackend API, database, or service worklevel:beginner20 pts difficulty label for small beginner-friendly PRs20 pts difficulty label for small beginner-friendly PRspriority:lowNice-to-have issue with low urgencyNice-to-have issue with low urgencytype:bugBug fix work category bonus labelBug fix work category bonus label
Missing String Length Constraints
Description:
Various creation and update endpoints (e.g., target policies, workflows, profiles) accept string inputs such as
nameanddescriptionwithout imposing any maximum length constraints.Impact:
An attacker could submit excessively large payloads for these fields, resulting in database bloat, increased memory consumption on data retrieval, and potential application slowdowns.
Recommendation:
Introduce length validation (e.g., maximum 255 characters for
name, maximum 2000 characters fordescription) either via Pydantic modelFieldconstraints or explicit length checks in the route handlers before processing the data.