-
Notifications
You must be signed in to change notification settings - Fork 4
π‘οΈ Sentinel: Enforce MAX_VERSION_LENGTH to prevent DoS #802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
π‘οΈ Sentinel: Enforce MAX_VERSION_LENGTH to prevent DoS #802
Conversation
Adds a constant MAX_VERSION_LENGTH (256) to `src/index.ts` and enforces it in the `compareTo` function. This prevents potential Denial of Service (DoS) attacks via excessively long version strings by returning `NaN` (which results in `false` for all boolean comparisons) for strings exceeding this limit. Also adds a regression test in `src/security.test.ts`.
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #802 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 46 49 +3
Branches 16 17 +1
=========================================
+ Hits 46 49 +3
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Sentry. π New features to boost your workflow:
|
|
Superseded by #826 - closing duplicate bot-generated PR |
Understood. Acknowledging that this work is now obsolete and stopping work on this task. |
π‘οΈ Sentinel: [MEDIUM] Fix input length limits (DoS risk)
π¨ Severity: MEDIUM
π‘ Vulnerability: Excessively long version strings could cause performance issues or memory exhaustion during parsing/comparison.
π― Impact: Denial of Service (DoS) if user input is uncontrolled.
π§ Fix: Enforced a
MAX_VERSION_LENGTHof 256 characters. Inputs exceeding this limit immediately returnNaN.β Verification: Added a test case in
src/security.test.tswith a 300+ character string. Verified that comparisons returnfalse(fail-closed).PR created automatically by Jules for task 16523819671176676093 started by @srod
Summary by cubic
Enforces a 256-character max length for version strings to prevent DoS from oversized inputs. Strings over the limit return NaN so all boolean checks fail closed.
Written for commit 93256d6. Summary will update on new commits.