Skip to content

chore: upgrade node version to 18 - #2062

Merged
yashasvibajpai merged 41 commits into
developfrom
chore.upgrade.node.to.18
May 31, 2023
Merged

yashasvibajpai merged 41 commits into
developfrom
chore.upgrade.node.to.18

Conversation

@yashasvibajpai

@yashasvibajpai yashasvibajpai commented Apr 14, 2023 •

Copy link
Copy Markdown
Contributor

Description of the change

  • upgrade node version to 18.15.0

fixed docker vulnerabilities and after fixing the below vulnerabilities remain only for both arm and amd architectures.

0C     0H     1M     0L  got 8.3.2
pkg:npm/[email protected]

Dockerfile (56:56)
RUN npm run clean:node

    ✗ MEDIUM CVE-2022-33987
      https://dso.docker.com/cve/CVE-2022-33987
      Affected range : <11.8.5                                       
      Fixed version  : 11.8.5                                        
      CVSS Score     : 5.3                                           
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N  
    

   0C     0H     0M     0L     1?  cacheable-request 2.1.4
pkg:npm/[email protected]

Dockerfile (56:56)
RUN npm run clean:node

    ✗ UNSPECIFIED GMS-2023-285
      https://dso.docker.com/cve/GMS-2023-285
      Affected range : <10.2.7  
      Fixed version  : 10.2.7   
    


2 vulnerabilities found in 2 packages
  UNSPECIFIED  1  
  LOW          0  
  MEDIUM       1  
  HIGH         0  
  CRITICAL     0

which previously was :

Analyzing image rudderstack/rudder-transformer:1.27.1
    ✓ Pulled
    ✓ Image stored for indexing
    ✓ Indexed 1117 packages
    ✗ Detected 11 vulnerable packages with a total of 14 vulnerabilities

  1C    0H    0M    0L  execa 0.7.0
pkg:npm/[email protected]

    ✗ CRITICAL GMS-2020-2
      https://dso.docker.com/cve/GMS-2020-2
      Affected range : <2.0.0
      Fixed version  : 2.0.0
      CVSS Score     : 9.8
      CVSS Vector    : CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H


  0C    1H    2M    2L  node 14.21.1
pkg:github/nodejs/[email protected]

    ✗ MEDIUM CVE-2023-23919 [Cryptographic Issues]
      https://dso.docker.com/cve/CVE-2023-23919
      Affected range : >=14.0.0
                     : <14.23.1
      Fixed version  : 14.23.1
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

    ✗ HIGH CVE-2023-23918 [Incorrect Authorization]
      https://dso.docker.com/cve/CVE-2023-23918
      Affected range : >=14.0.0
                     : <14.23.1
      Fixed version  : 14.23.1
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

    ✗ LOW CVE-2023-24807 [Inefficient Regular Expression Complexity]
      https://dso.docker.com/cve/CVE-2023-24807
      Affected range : >=14.0.0
                     : <14.23.1
      Fixed version  : 14.23.1
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

    ✗ MEDIUM CVE-2023-23936 [Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')]
      https://dso.docker.com/cve/CVE-2023-23936
      Affected range : >=14.0.0
                     : <14.23.1
      Fixed version  : 14.23.1
      CVSS Score     : 5.4
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

    ✗ LOW CVE-2023-23920 [Untrusted Search Path]
      https://dso.docker.com/cve/CVE-2023-23920
      Affected range : >=14.0.0
                     : <14.23.1
      Fixed version  : 14.23.1
      CVSS Score     : 4.2
      CVSS Vector    : CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:N


  0C    1H    1M    0L  decode-uri-component 0.2.0
pkg:npm/[email protected]

    ✗ HIGH CVE-2022-38900 [Improper Input Validation]
      https://dso.docker.com/cve/CVE-2022-38900
      Affected range : <0.2.1
      Fixed version  : 0.2.1
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

    ✗ MEDIUM CVE-2022-38778 [Improper Input Validation]
      https://dso.docker.com/cve/CVE-2022-38778
      Affected range : <0.2.1
      Fixed version  : 0.2.1
      CVSS Score     : 6.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H


  0C    1H    1M    0L  node 14.21.1
pkg:generic/[email protected]

    ✗ HIGH CVE-2023-23918 [Incorrect Authorization]
      https://dso.docker.com/cve/CVE-2023-23918
      Affected range : >=14.0.0
                     : <14.21.3
      Fixed version  : 14.21.3
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

    ✗ MEDIUM CVE-2023-23920 [Untrusted Search Path]
      https://dso.docker.com/cve/CVE-2023-23920
      Affected range : >=14.0.0
                     : <14.21.3
      Fixed version  : 14.21.3
      CVSS Score     : 4.2
      CVSS Vector    : CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:N


  0C    1H    0M    0L  ansi-regex 4.1.0
pkg:npm/[email protected]

    ✗ HIGH CVE-2021-3807 [Incorrect Comparison]
      https://dso.docker.com/cve/CVE-2021-3807
      Affected range : >=4.0.0
                     : <4.1.1
      Fixed version  : 4.1.1
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H


  0C    1H    0M    0L  ansi-regex 3.0.0
pkg:npm/[email protected]

    ✗ HIGH CVE-2021-3807 [Incorrect Comparison]
      https://dso.docker.com/cve/CVE-2021-3807
      Affected range : >=3.0.0
                     : <3.0.1
      Fixed version  : 3.0.1
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H


  0C    1H    0M    0L  http-cache-semantics 3.8.1
pkg:npm/[email protected]

    ✗ HIGH CVE-2022-25881 [Inefficient Regular Expression Complexity]
      https://dso.docker.com/cve/CVE-2022-25881
      Affected range : <4.1.1
      Fixed version  : 4.1.1
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H


  0C    1H    0M    0L  minimatch 3.0.4
pkg:npm/[email protected]

    ✗ HIGH CVE-2022-3517 [Uncontrolled Resource Consumption]
      https://dso.docker.com/cve/CVE-2022-3517
      Affected range : <3.0.5
      Fixed version  : 3.0.5
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H


  0C    1H    0M    0L  qs 6.5.2
pkg:npm/[email protected]

    ✗ HIGH CVE-2022-24999 [Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')]
      https://dso.docker.com/cve/CVE-2022-24999
      Affected range : >=6.5.0
                     : <6.5.3
      Fixed version  : 6.5.3
      CVSS Score     : 7.5
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H


  0C    0H    1M    0L  request 2.88.0
pkg:npm/[email protected]

    ✗ MEDIUM CVE-2023-28155 [Server-Side Request Forgery (SSRF)]
      https://dso.docker.com/cve/CVE-2023-28155
      Affected range : <=2.88.2
      Fixed version  : not fixed
      CVSS Score     : 6.1
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N


  0C    0H    1M    0L  got 6.7.1
pkg:npm/[email protected]

    ✗ MEDIUM CVE-2022-33987
      https://dso.docker.com/cve/CVE-2022-33987
      Affected range : <11.8.5
      Fixed version  : 11.8.5
      CVSS Score     : 5.3
      CVSS Vector    : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N



The image contains 11 packages with one or more vulnerability for a total of 17 vulnerabilities
  LOW      | 2
  MEDIUM   | 6
  HIGH     | 8
  CRITICAL | 1

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Fix #1

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@yashasvibajpai
yashasvibajpai requested a review from a team April 14, 2023 06:16
@yashasvibajpai yashasvibajpai self-assigned this Apr 14, 2023
Comment thread Dockerfile Resolved
Comment thread Dockerfile Resolved
Comment thread Dockerfile-ut-func Resolved
Comment thread package.json Resolved
saikumarrs
saikumarrs previously approved these changes Apr 14, 2023
@codecov

codecov Bot commented Apr 14, 2023 •

Copy link
Copy Markdown

Codecov Report

Patch coverage: 75.00% and no project coverage change.

Comparison is base (411c2c9) 88.57% compared to head (dabd777) 88.57%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2062   +/-   ##
========================================
  Coverage    88.57%   88.57%           
========================================
  Files          509      509           
  Lines        25830    25829    -1     
  Branches      6375     6375           
========================================
+ Hits         22878    22879    +1     
+ Misses        2638     2636    -2     
  Partials       314      314           
Impacted Files Coverage Δ
src/legacy/router.js 53.34% <0.00%> (ø)
src/util/customTransformer-faas.js 91.37% <100.00%> (ø)
src/util/customTransformer.js 80.27% <100.00%> (+0.54%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@saikumarrs
saikumarrs force-pushed the chore.upgrade.node.to.18 branch 3 times, most recently from c07221f to 2a2f76c Compare April 14, 2023 13:15
@yashasvibajpai yashasvibajpai mentioned this pull request Apr 15, 2023
3 of 10 tasks
@saikumarrs

Copy link
Copy Markdown
Member

Snyk scan report.

> snyk container test rudderstack/develop-rudder-transformer:chore.upgrade.node.to.18 --file=./Dockerfile

Testing rudderstack/develop-rudder-transformer:chore.upgrade.node.to.18...

Organization:      saikumarrs
Package manager:   apk
Target file:       ./Dockerfile
Project name:      docker-image|rudderstack/develop-rudder-transformer
Docker image:      rudderstack/develop-rudder-transformer:chore.upgrade.node.to.18
Platform:          linux/arm64
Base image:        node:18.15.0-alpine3.17
Licenses:          enabled

✔ Tested 43 dependencies for known issues, no vulnerable paths found.

According to our scan, you are currently using the most secure version of the selected base image

-------------------------------------------------------

Testing rudderstack/develop-rudder-transformer:chore.upgrade.node.to.18...

Tested 56 dependencies for known issues, found 1 issue.


Issues with no direct upgrade or patch:
  ✗ Remote Code Execution (RCE) [Critical Severity][https://security.snyk.io/vuln/SNYK-JS-ISOLATEDVM-3037320] in [email protected]
    introduced by [email protected]
  No upgrade or patch available



Organization:      saikumarrs
Package manager:   npm
Target file:       /home/node/app/package.json
Project name:      rudder-transformer
Docker image:      rudderstack/develop-rudder-transformer:chore.upgrade.node.to.18
Licenses:          enabled

Pro tip: use `--exclude-base-image-vulns` to exclude from display Docker base image vulnerabilities.

Snyk found some vulnerabilities in your image applications (Snyk searches for these vulnerabilities by default). See https://snyk.co/app-vulns for more information.

To remove these messages in the future, please run `snyk config set disableSuggestions=true`


Tested 2 projects, 1 contained vulnerable paths.

We can suppress the above isolated-vm vulnerability as we don't seem to use that feature.
CC @Jayachand @sivashanmukh @krishna2020

@saikumarrs
saikumarrs force-pushed the chore.upgrade.node.to.18 branch from 0352adf to 323f91b Compare April 21, 2023 07:59
@yashasvibajpai
yashasvibajpai force-pushed the chore.upgrade.node.to.18 branch from 323f91b to 8fd959e Compare May 7, 2023 00:00
@yashasvibajpai
yashasvibajpai requested review from a team as code owners May 7, 2023 00:00
@saikumarrs saikumarrs changed the title chore: upgrade node version to 18.15.0 chore: upgrade node version to 18 May 10, 2023
saikumarrs and others added 10 commits May 15, 2023 11:33
* chore: override vulnerable packages

* chore: empty commit to trigger actions

---------

Co-authored-by: shrouti1507 <[email protected]>
* chore: push merged changes

* fix: added koa-bodyparser as dev dependency

Signed-off-by: Sai Sankeerth <[email protected]>

---------

Signed-off-by: Sai Sankeerth <[email protected]>
Co-authored-by: Sai Sankeerth <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

40.0% 40.0% Coverage
0.0% 0.0% Duplication

@yashasvibajpai
yashasvibajpai merged commit 5815669 into develop May 31, 2023
@yashasvibajpai
yashasvibajpai deleted the chore.upgrade.node.to.18 branch May 31, 2023 06:01
@yashasvibajpai
yashasvibajpai restored the chore.upgrade.node.to.18 branch May 31, 2023 06:02
yashasvibajpai added a commit that referenced this pull request May 31, 2023
yashasvibajpai added a commit that referenced this pull request May 31, 2023
Revert "chore: upgrade node version to 18 (#2062)"

This reverts commit 5815669.
@devops-github-rudderstack
devops-github-rudderstack deleted the chore.upgrade.node.to.18 branch September 1, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants