Skip to content

chore(storage): remove form-data dependency use native globals and update package scripts - #9120

Open
thiyaguk09 wants to merge 5 commits into
googleapis:mainfrom
thiyaguk09:fix/7348-form-data-vulnerability
Open

chore(storage): remove form-data dependency use native globals and update package scripts#9120
thiyaguk09 wants to merge 5 commits into
googleapis:mainfrom
thiyaguk09:fix/7348-form-data-vulnerability

Conversation

@thiyaguk09

@thiyaguk09 thiyaguk09 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Removes the form-data dependency (and related legacy HTTP packages) in @google-cloud/storage by adopting native Node.js 18+ global APIs and resolving transitive vulnerability paths.

Key Changes

  • Replaced form-data and node-fetch imports in tests with built-in global FormData and fetch.
  • Removed form-data, node-fetch, @types/node-fetch, and @types/request from devDependencies.
  • Bumped retry-request to ^8.0.0 and teeny-request to ^10.0.0 to eliminate transitive form-data dependencies.
  • Removed redundant samples-test script and simplified test execution.

Fixes #7348

@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Aug 11, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the 'samples-test' script, cleans up unused dependencies ('form-data' and 'cross-env'), and simplifies the 'test' script. Feedback suggests replacing the 'samples-test' script with a no-op command instead of deleting it to avoid breaking CI pipelines that might still invoke it. Additionally, it is recommended to restore the 'cross-env' and preload configuration in the 'test' script, as removing them appears unrelated to the dependency cleanup.

Comment thread handwritten/storage/package.json
Comment thread handwritten/storage/package.json Outdated
@thiyaguk09 thiyaguk09 changed the title chore(storage): remove form-data dependency and use native globals chore(storage): remove form-data dependency use native globals and update package scripts Aug 11, 2026
@thiyaguk09
thiyaguk09 marked this pull request as ready for review August 11, 2026 09:15
@thiyaguk09
thiyaguk09 requested a review from a team as a code owner August 11, 2026 09:15
@thiyaguk09
thiyaguk09 force-pushed the fix/7348-form-data-vulnerability branch 2 times, most recently from ad286ae to 666d700 Compare August 13, 2026 08:07
@thiyaguk09
thiyaguk09 force-pushed the fix/7348-form-data-vulnerability branch from 666d700 to 033de68 Compare August 14, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vulnerability in a sub-dependency (form-data) in @google-cloud/storage@7.16.0

1 participant