fix(sdk): upgrade cypress due to vulnerable dependency#28
Conversation
|
Dependabot flagged a security vulnerability in form-data@2.3.3, a transitive dependency introduced via the chain cypress → @cypress/request → form-data. Since Cypress is a devDependency used only for testing and is not bundled into the published SDK, this vulnerability had no impact on SDK consumers—they never receive Cypress or its dependencies when installing @testboxlab/browser. To resolve the alert, we upgraded Cypress from ^11.0.1 to ^13.15.0 (installed as 13.17.0), which pulls in @cypress/request@3.0.9 and form-data@4.0.5, satisfying the ≥2.5.4 requirement. The Cypress upgrade is a major version jump (11→13), but our test suite uses only standard, stable Cypress APIs (cy.visit, cy.window, cy.spy, cy.stub, cy.get, cy.wait) that remain unchanged. The package-lock.json also migrated from lockfileVersion 2 to 3 during npm install, which removed ~10k lines of redundant legacy dependency metadata—this is expected npm behavior and does not affect functionality. |
WalkthroughUpdated the Cypress devDependency version in package.json from ^11.0.1 to ^13.15.0. This is a configuration-level dependency update with no changes to public APIs or control flow. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Run Cypress tests
🔇 Additional comments (1)
package.json (1)
32-32: Address incomplete staging verification.The PR description notes that staging tests have not been completed. This is a gap in validation for a security fix that spans a major version upgrade (Cypress 11 → 13). Please ensure staging tests are run and pass before merging to confirm the upgrade works end-to-end in your deployment pipeline.
What did I change:
form-dataversion frompackage-lock.json.form-datapackage was not being directly used in the SDK, being in thepackage-lock.jsononly because it is a dev dependency ofcypress>requests.QA Notes:
Related Tickets:
https://linear.app/testbox/issue/SEC-7/browsersdk-form-data-uses-unsafe-random-function-in-form-data-for
Did you...
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.