fix(deps): remediate socket-redis production dependencies#9
Open
Neha0461 wants to merge 1 commit into
Open
Conversation
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.
What
Remediates the production dependency issues in
socket-redisso downstream repos can move to a safe package tag. This updates the Node runtime baseline from Node 6 to Node 10, upgrades vulnerable production dependencies, replaces the vulnerableoptimist/oldminimistCLI path, and patches runtime compatibility issues found during validation.Changes
redisto3.1.2, outside the vulnerable>=2.6.0 <3.1.1range.optimistwith directminimist@1.2.8CLI parsing.underscore,sockjs,validator,log4js, and supporting dependency locks.package-lock.jsonat lockfile version 1 so Node 10/npm 6 can consume it.lib/cli-options.js.log4jsfile logging configuration for the 6.x API.redis@3does not receivepassword: null.socket-redis-up/socket-redis-down.subscribe.startvalidation to avoid accepting coerced values such asnull, booleans, arrays, whitespace, or decimals.9090, avoiding local port collisions.Files Changed
.travis.yml,Dockerfile,README.mdpackage.json,package-lock.jsonbin/socket-redis.js,lib/cli-options.jslib/server.js,lib/utils.js,lib/worker-connection.jstest/cli-options.js,test/server-redis-options.js,test/server.js,test/worker.js,test/worker-connection-validation.jsLinks
socket-redistag after this lands.Testing
/Users/nehatiwari/.nvm/versions/node/v10.24.1/bin/node node_modules/mocha/bin/mocha test/worker.js test/server-redis-options.js test/worker-connection-validation.js test/cli-options.js12 passingnpm audit --omit=devuuidfindings. The suggested fix requiresnpm audit fix --forceand a breakinguuid@14upgrade viasockjs, so it is intentionally left for a separate risk review.docker-compose build socket-redisnpm ci --only=production.docker-compose run --rm --volume $(pwd):/opt/socket-redis socket-redis ./script/test.sh29 passing.node -e "var p=require('./package-lock.json'); console.log('lockfileVersion=' + p.lockfileVersion); ..."lockfileVersion=1.redis@3.1.2,underscore@1.13.8,minimist@1.2.8,sockjs@0.3.24,sockjs-client@1.5.2,validator@13.15.35,log4js@6.9.1,websocket-extensions@0.1.4.hr-agents validate socket-redis-critical-depsRisks & Follow-ups
socket-redistag and update downstream consumers such asfrontend-core,app-server,candidate-site-frontend, andcodepair-frontend.uuidfindings require a breaking force upgrade path and should be handled separately from this critical/high remediation.[tokens used: —]
Proof of Work
Proof of Work — Task Graph
graph TD A["backend-developer<br/>status: done<br/>invocations: 3"] B["backend-developer-spec-review<br/>status: failed then fixed<br/>invocations: 2"] A --> B style A fill:#22c55e,color:#fff style B fill:#22c55e,color:#fffProof of Work — Files Changed
graph LR subgraph dependency_remediation F1["package.json"] F2["package-lock.json"] F3["Dockerfile"] F4[".travis.yml"] F5["README.md"] end subgraph runtime_compatibility F6["bin/socket-redis.js"] F7["lib/cli-options.js"] F8["lib/server.js"] F9["lib/utils.js"] F10["lib/worker-connection.js"] end subgraph tests F11["test/cli-options.js"] F12["test/server-redis-options.js"] F13["test/server.js"] F14["test/worker.js"] F15["test/worker-connection-validation.js"] endProof of Work — Execution Flow
flowchart LR S1["1 Intake ✓"] --> S2["2 Analysis ✓"] S2 --> S3["3 Planning ✓"] S3 --> S4["4 Prepare ✓"] S4 --> S5["5 Implement ✓"] S5 --> S6["6 Review ✓"] S6 --> S7["7 PR ✓"] style S1 fill:#22c55e,color:#fff style S2 fill:#22c55e,color:#fff style S3 fill:#22c55e,color:#fff style S4 fill:#22c55e,color:#fff style S5 fill:#22c55e,color:#fff style S6 fill:#22c55e,color:#fff style S7 fill:#22c55e,color:#fff