bug: remediate Snyk SCA dependency vulnerabilities (npm deps bucket)#56
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
bug: remediate Snyk SCA dependency vulnerabilities (npm deps bucket)#56devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Bump direct deps to fixed versions, add npm overrides for transitive vulns, and move tap to devDependencies. Regenerate package-lock.json. Reduces unique Snyk SCA findings 154 -> 26 (8 critical -> 0). Only package.json and package-lock.json changed. Co-Authored-By: Stephen Cornwell <stephen@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
Remediates the open-source dependency (SCA) Snyk findings by bumping vulnerable packages to their fixed versions. Only
package.jsonandpackage-lock.jsonchange.Unique Snyk findings (
snyk test --all-projects): 154 → 26 (8 critical → 0, 68 high → 11, 67 medium → 14, 11 low → 1). 128 resolved, 0 new.What changed
adm-zip 0.4.7→0.5.x,body-parser 1.9→1.20.x,dustjs-linkedin 2.5→2.7.5+dustjs-helpers 1.5→1.7.4,express 4.12→4.21.x,express-fileupload 0.0.5→1.5.x,hbs→4.2.x,jquery 2→3.7.x,lodash 4.17.4→4.18.1,moment→2.30.x,mongoose 4.2→4.13.21,morgan→1.11.x,ms→2.1.x,npmconf→2.1.x,st 0.2.4→3.x,typeorm 0.2.24→0.2.45,validator→13.15.x,marked 0.3.5→0.3.9.overridesadded for transitive vulns (handlebars→4.7.9, form-data→4.0.6, ajv→6.15, qs→6.14, semver→7.5, minimatch→3.1.3, brace-expansion→1.1.13, cross-spawn→7.0.6, tough-cookie→4.1.3, send/serve-static, bson→1.1.6, mquery→3.2.5, mpath→0.8.4, and ~30 more).tap→devDependencies.tap@11bundles ancient, un-overridable deps (babel-traverse[critical],request,lodash 4.17.10,hosted-git-info,istanbul-reports,mem,minimist 0.0.8); reclassifying the test framework removes them from the production scan.package-lock.jsonregenerated in the same commit.Verification
npm installclean;npm run build(browserify) OK.NODE_OPTIONS=--openssl-legacy-provider node app.js) against MongoDB + MySQL. Exercised: GET/(ejs +markedrender →<strong>hello</strong>),/login,/about_new(dust), static/public/js/bundle.js(st), POST/create(mongoose write) and POST/login(mongoose read) — all 200/302.Remaining 26 findings (require source changes or no fix available)
ejs@1.0.0(5):ejs-locals@1.0.2pins ejs 1.x; upgrading breaks the EJS view engine.marked@0.3.9(6):views/index.ejscallsmarked(new String(todo.content)); marked ≥0.3.19 rejects String objects. 0.3.9 is the highest non-breaking (cleared 5/11 marked findings).mongoose@4.13.21(6) +mongodb@2.2.34(1): mongoose 4 callback API used inmongoose-db.js/routes; 5/6/7/8 are breaking, and mongodb 2.x is pinned by mongoose 4.typeorm@0.2.45(2, incl. SQLi): 0.3.x removescreateConnection/getConnectionused intypeorm-db.js.dustjs-linkedin@2.7.5(1): proto-pollution fix needs 3.0.0 butdustjs-helperspeer caps it at 2.7–2.8 (cleared the code-injection finding).express-fileupload(2),inflight(1),hbs(1): no fix available.js-yaml@3.14.2(1): fix needs 4.x which removessafeLoad(cleared the proto-pollution finding).Fixing the remaining items needs application source changes (templating engine / mongoose / typeorm migrations), which are out of scope for this dependencies-only bucket.
Link to Devin session: https://app.devin.ai/sessions/e3ef91adbf3f4fc29bf0195f44ecd1ec
Requested by: @stephencornwell
Devin Review