Skip to content

fix: SBL security #8207 - reject inverted job budget ranges in validation#8263

Open
gtx20060124-bot wants to merge 3 commits into
SecureBananaLabs:mainfrom
gtx20060124-bot:budget-validation
Open

fix: SBL security #8207 - reject inverted job budget ranges in validation#8263
gtx20060124-bot wants to merge 3 commits into
SecureBananaLabs:mainfrom
gtx20060124-bot:budget-validation

Conversation

@gtx20060124-bot

Copy link
Copy Markdown

Security Fix: Inverted Budget Ranges (#8207)

Problem

createJobSchema validates budgetMin and budgetMax individually as non-negative numbers, but does not enforce budgetMax >= budgetMin. An attacker can submit inverted ranges (e.g., budgetMin: 10000, budgetMax: 1) which breaks business logic and may cause downstream calculation errors.

Fix

Added Zod .refine() validator to ensure budgetMax >= budgetMin on job creation. The updateJobSchema inherits this constraint via .partial().

Changes

  • apps/api/src/validators/job.js: Added .refine() constraint on budget range

github-actions Bot added a commit that referenced this pull request Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant