Repository navigation
fix(DX-28334): resolve Snyk vulnerabilities (safe bumps) - #178
pritesh-jain-cstk wants to merge 2 commits into
Conversation
…bilities Lock file regenerated (fixed 35 on its own). Direct upgrades: axios 1.13.5 -> 1.21.0, @shopify/cli ^3.63.0 -> ^3.63.2 Overrides: form-data 4.0.6 Vuln count: snyk 83 -> 10, npm audit 105 -> 56. Build verified passing (strict npm ci + shopify hydrogen build, client + Oxygen worker). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
pritesh-jain-cstk
left a comment
There was a problem hiding this comment.
Automated review (ponytail + DevEco dev-skill reviewer). Head 452526e.
Verified Snyk (head, --org): Open Source 10 unique / 105 paths (braces, picomatch, graphql-tools url-loader + 2x utils, react-router x2, remix server-runtime x2, turbo-stream). Snyk Code 1 (medium javascript/OR, app/entry.server.tsx:21). Matches the PR body.
Ponytail findings
Should fix
form-dataoverride is global and an exact pin. The only parent that forces the old version is@shopify/cli-kit3.94.3 (it pinsform-data4.0.4);axios1.21.0 already asks for^4.0.6. Scope it:"@shopify/cli-kit": { "form-data": "^4.0.6" }, and add the removal condition (drop when cli-kit stops pinning 4.0.4) to the body. cli-kit comes in through@shopify/cli, a devDependency, so the body's "production tree" wording is not right (inline).
No other issues in the two package.json changes; the lock regeneration is the bulk of the fix and is appropriate for an app.
Dev-skill reviewer verdict: pass with one note (finding 1 is an override-quality issue, not extra scope). No source changes, so checks 1 and 3 do not apply.
Not checked: npm ci && npm run build and the Oxygen preview (relied on the PR body).
🤖 Generated with Claude Code
| "@remix-run/server-runtime": "2.17.4", | ||
| "@remix-run/router": "1.23.2" | ||
| "@remix-run/router": "1.23.2", | ||
| "form-data": "4.0.6" |
There was a problem hiding this comment.
Should fix. Only @shopify/cli-kit 3.94.3 forces the old version (it pins form-data 4.0.4); axios 1.21.0 already wants ^4.0.6. Suggest "@shopify/cli-kit": { "form-data": "^4.0.6" } instead of a global exact pin, plus a removal condition in the body. cli-kit is pulled in by @shopify/cli (devDependency), so this is dev tooling, not the production tree.
There was a problem hiding this comment.
Fixed in ee05c39: the global exact pin is replaced by "@shopify/cli-kit": { "form-data": "^4.0.6" }. Lock regenerated; still resolves form-data 4.0.6 for both cli-kit and axios. Strict npm ci and shopify hydrogen build (client + Oxygen worker) pass; Snyk is still 10 unique. The PR body now says it is dev-tree only and gives the removal condition (cli-kit ships form-data >= 4.0.6).
cli-kit 3.94.3 pins form-data 4.0.4; axios 1.21.0 already wants ^4.0.6. Replace the global exact pin with a scoped range. Remove once cli-kit ships form-data >= 4.0.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Superseded by #180: the Snyk fix is redone from main (this PR was based on development, which is 50 commits behind main). |
Problem
developmentscans at 83 Snyk findings (6 critical, 40 high) and 105 npm audit findings on the committed lock file, plus 1 Snyk Code finding.Fix (APP: the lock file is what ships, so regenerating it is a real fix)
axios1.13.5 → 1.21.0 (clears 39 axios findings),@shopify/cli^3.63.0 → ^3.63.2."@shopify/cli-kit": { "form-data": "^4.0.6" }.@shopify/cli-kit3.94.3 pinsform-data4.0.4, andaxios1.21.0 already asks for^4.0.6. cli-kit comes in through@shopify/cli(devDependency), so this fixes the dev tree, not the production bundle. Remove it once@shopify/cli-kitships withform-data≥ 4.0.6.Verification
npm ci(strict, node 24 / npm 11.12, same as the Oxygen workflow'slts/*) followed bynpm run build(shopify hydrogen build). The client and the Oxygen worker bundle (dist/server/index.js) both build.npm run typecheckreports the same 9 TypeScript errors asdevelopment. They are in app route code and existed before this PR.shopify hydrogen preview/ an Oxygen deploy. Both need storefront env vars. Please smoke-test the storefront after the Oxygen deploy, because earlier Snyk fixes on this repo were reverted.Note on installs
developmentalready has a peer conflict:@graphql-codegen/cli6.0.0 (pinned in 7b26097) vs@shopify/cli-hydrogenpeer^5.0.2.npm cihandles it (warnings only). A plainnpm installon npm ≤ 11.6 fails with ERESOLVE. This PR does not change that. PR 2 deals with it.What remains (10): needs major upgrades or has no fix
@graphql-tools/url-loader8 (critical) and@graphql-tools/utils11 (2 high): need codegen-cli / graphql-tools majorsreact-router6 (2),turbo-stream2,@remix-run/server-runtime2.17.4: need the Remix 2 → React Router 7 / Hydrogen 2025 migration (the server-runtime fix 2.17.5 is blocked by the existingoverridespin)braces,picomatch: no fixed version Snyk can mapapp/entry.server.tsx(source fix in PR 2)These go to a stacked "to-zero" PR.
🤖 Generated with Claude Code