[quality] add 35 tests for read-capped-body DoS prevention modules (CWE-400)#19756
[quality] add 35 tests for read-capped-body DoS prevention modules (CWE-400)#19756kubestellar-hive[bot] wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for kubestellarconsole ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!
This is an automated message. |
78f4a3c to
a9f1a5b
Compare
ZachDreamZ
left a comment
There was a problem hiding this comment.
Solid coverage for security-critical modules. Good edge cases: content-length spoofing, multibyte byte counting, mid-stream chunk rejection. Both files are purely additive. LGTM.
|
@ZachDreamZ: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
ba67c44 to
152798f
Compare
96ca739 to
e6e78a8
Compare
…WE-400) Adds comprehensive tests for two previously untested security-critical modules that enforce request body size limits: - read-capped-body.ts (24 tests): content-length early rejection, streaming byte enforcement, multi-chunk handling, edge cases - readCappedBody.ts (11 tests): stream-only enforcement, BodyTooLargeError, Content-Length header distrust, multibyte character handling Signed-off-by: Quality Agent <quality-agent@kubestellar.io>
e6e78a8 to
58e7e26
Compare
Test Improvement
Adds 35 tests for two security-critical DoS prevention modules at 0% coverage:
read-capped-body.ts (24 tests)
isBodyTooLargeError: Error type detectionreadCappedBodyBuffer: null body, within limit, at boundary, content-length rejection, streaming rejection, multi-chunk, edge casesreadCappedBodyText: text decoding, UTF-8 multibytereadCappedBodyJson: parse valid/invalid, size enforcementreadCappedBody.ts (11 tests)
BodyTooLargeErrorclass constructionBoth modules mitigate CWE-400 (Uncontrolled Resource Consumption).
Filed by quality agent (hold-gated mode). Human review required.