chore(deps): fix all critical Snyk open-source vulns in docs and superset-frontend - #33
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
…rset-frontend Co-Authored-By: shayan <shayan@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Removes every critical-severity Snyk Open Source finding in the JS dependency trees (
superset-frontend/npm workspace +docs/yarn workspace). Scoped deliberately to critical + upgradable JS packages; no source code changes.Verified with the Snyk CLI (
snyk test --all-projects) before and after:(unique issues: 273 → 134)
Fixed —
superset-frontend/(npm)handlebars4.7.8 → 4.7.9package.json,packages/superset-ui-core,plugins/plugin-chart-handlebars,plugins/legacy-preset-chart-deckgl+handlebarsoverridesimple-git3.33.0 → 3.36.0yeoman-generator@7.5.1inpackages/generator-superset; pinned with a rootoverridesentryThe handlebars finding reported 9 paths at the workspace root and 3 more in each of ~20 workspace packages — all of them resolve through the single hoisted
handlebarsinstall, so one version bump clears them.Fixed —
docs/(yarn 1, viaresolutions)axios1.13.5 → 1.20.0 (viaswagger-ui-react→swagger-client)"axios": "^1.15.2"esbuild0.25.9 → 0.28.2 (via@storybook/core)"esbuild": "^0.28.1"node-forge1.3.2 → 1.4.0 (via@docusaurus/core→webpack-dev-server/selfsigned)"node-forge": "^1.4.0"shell-quote1.8.3 → 1.10.0"shell-quote": "^1.8.4"websocket-driver0.7.4 → 0.7.5"websocket-driver": "^0.7.5"immutable3.8.2 → 3.8.4 and 5.1.4 → 5.1.9"**/swagger-ui-react/immutable": "^3.8.3"and"**/sass/immutable": "^5.1.5"immutableneeded scoped resolutions rather than one global entry:swagger-ui-reactrequires^3.x.xwhilesassrequires^5.0.2, and both major lines have a fixed release (3.8.3+ / 5.1.5+), so forcing a single version would have broken one of the two consumers.Lockfile churn is unavoidable:
docs/yarn.lock(+228/−195) andsuperset-frontend/package-lock.json(+27/−10) are regenerated output. Hand-written changes are 13 lines across 5package.jsonfiles.Snyk Code triage (NOT fixed here — assessment only)
snyk code testreports 19 high findings (the 17 listed in the request plussuperset/app.pypath traversal ×2 and one hardcoded key in a Storybook fixture). Assessment:XSS (CWE-79) — 11 findings, all assessed as false positives. Every flagged sink is a JSON API response, not HTML:
superset/views/core.py:268,379,superset/views/datasource/views.py:112—json_error_response(...), whichjson.dumpsthe payload and setsmimetype="application/json; charset=utf-8"(superset/views/error_handling.py:68). No HTML context, so reflected input can't execute.superset/security/api.py:192,290,329,superset/async_events/api.py:101— FABself.response(...)/self.response_400(...), i.e. JSON serialization with a JSON content type.superset/views/api.py:76— returnsjson.dumps(payload_json, ...).superset/views/core.py:739,752—json_error_responsewith__()-interpolatedslice_id/table_name/db_name; same JSON sink.superset/views/auth.py:84—render_app_template({...username, first_name, last_name}); that data lands insuperset/templates/superset/spa.html:119asdata-bootstrap="{{ bootstrap_data }}", and Jinja autoescaping escapes the attribute. False positive, though it is the only finding of the group that reaches an HTML template at all, so it is the one worth re-checking if the bootstrap payload is ever moved into an inline<script>.ReDoS —
superset-ui-core/src/connection/callApi/callApi.ts:103,117— false positive. Both lines are inside the HTTP-cache branch (caches.open/supersetCache.match(url)/ ETag handling); there is no user-controlled regex there. Snyk appears to be flagging the taint path throughurlinto the cache-matching code rather than an actual backtracking regex in this file.Hardcoded non-cryptographic secrets — 4 findings, none are real secrets:
superset-websocket/src/config.ts:66—jwtSecret: '', an intentionally empty default that must be overridden by config; the server refuses to start without a real value. False positive.docs/docusaurus.config.ts:806— Algolia DocSearchapiKey; this is the public search-only key, designed to ship in client bundles. False positive.docs/scripts/generate-database-docs.mjs:71—SUPERSET_SECRET_KEY: 'docs-build-key'passed to a throwawaypython -csubprocess at docs-build time; never used to protect data. True positive in the literal sense, harmless in practice; worth replacing with a generated random value if someone wants a clean report.superset-frontend/plugins/legacy-plugin-chart-map-box/src/stories/data.ts:5529— a Mapbox token in a Storybook fixture (not in the 17 listed). This one is a genuine live-token-shaped credential committed to the repo and is the only item I'd suggest following up on: it should be rotated/removed rather than "fixed" in code.Path traversal —
superset/app.py:119,126(not in the listed 17).send_static_fileoverride for webpack HMR files; delegates to Flask'ssuper().send_static_file, which does the safe-join itself. False positive.Base images — out of scope, needs separate work.
python:3.11.13-trixie(351 critical / 939 high),alpine:3.12(EOL),ruby:2.7-alpine(EOL Ruby). These are Docker-layer findings; fixing them means base-image upgrades with their own compatibility testing and belongs in dedicated PRs.Deliberately not fixed in this PR
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — dependency-only change.
TESTING INSTRUCTIONS
Notes on verification limits:
docsyarn buildOOMs on this machine even with--max-old-space-size=16384; I confirmed the same OOM on unmodifiedmasterwith the original lockfile, so it is pre-existing and not caused by theesbuild/immutablebumps.tsc+eslintondocsare clean, and the rspack compile phase runs identically before the OOM.packages/generator-superset's jest suite fails to parse its own TS/ESM test files (SyntaxError: Cannot use import statement outside a module) independent of this change — it fails before importing anything fromsimple-git.ADDITIONAL INFORMATION
Link to Devin session: https://app.devin.ai/sessions/c84ea7ac6c4b4dadb5197e79ba8fc6fb
Open in Devin Desktop: https://app.devin.ai/desktop/session/c84ea7ac6c4b4dadb5197e79ba8fc6fb?variant=devin
Requested by: @shayanshafii
Devin Review