Skip to content

TEZ-4419: Upgrade node and yarn version and fix npm security issues in Tez UI module - #215

Closed
amanraj2520 wants to merge 6 commits into
apache:masterfrom
amanraj2520:TEZ-4419_NPMFixes
Closed

TEZ-4419: Upgrade node and yarn version and fix npm security issues in Tez UI module#215
amanraj2520 wants to merge 6 commits into
apache:masterfrom
amanraj2520:TEZ-4419_NPMFixes

Conversation

@amanraj2520

@amanraj2520amanraj2520 commented Jun 6, 2022

Copy link
Copy Markdown
Contributor

Upgrade node and yarn version and fix npm security issues in Tez UI module
Track this issue:
https://issues.apache.org/jira/browse/TEZ-4419

The RFC documentation which adds selective dependency resolution in the description : https://github.com/yarnpkg/rfcs/blob/master/implemented/0000-selective-versions-resolutions.md

…fix the vulnerability
[TEZ-4423][CVE-2021-44906] Upgrade minimist version from 0.0.8 to 1.2.6 to fix the vulnerability
[TEZ-4422][CVE-2021-43138] Upgrade async from 2.3.0 to 2.6.4 to fix the vulnerability
….1.2. The cryptiles 4.1.2 version requires node version>=8.9.0
… cryptiles 4.1.2 version and upgrade lodash.merge version to 4.6.2 to fix vulnerability
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec17m 36sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep6m 40sMaven dependency ordering for branch
+1 💚mvninstall10m 38smaster passed
+1 💚compile3m 39smaster passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚compile3m 30smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javadoc2m 55smaster passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javadoc2m 21smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
_ Patch Compile Tests _
+0 🆗mvndep0m 16sMaven dependency ordering for patch
+1 💚mvninstall5m 42sthe patch passed
+1 💚compile3m 31sthe patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javac3m 31sthe patch passed
+1 💚compile3m 13sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javac3m 13sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 3sThe patch has no ill-formed XML file.
+1 💚javadoc2m 46sthe patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javadoc2m 24sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
_ Other Tests _
+1 💚unit1m 57stez-ui in the patch passed.
+1 💚unit66m 51sroot in the patch passed.
+1 💚asflicense1m 25sThe patch does not generate ASF License warnings.
136m 40s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-215/1/artifact/out/Dockerfile
GITHUB PR#215
JIRA IssueTEZ-4419
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux 5aeefad56750 4.15.0-175-generic #184-Ubuntu SMP Thu Mar 24 17:48:36 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / cf9e3ff
Default JavaPrivate Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-215/1/testReport/
Max. process+thread count2089 (vs. ulimit of 5500)
modulesC: tez-ui . U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-215/1/console
versionsgit=2.25.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@guptanikhil007

Copy link
Copy Markdown
Contributor

@abstractdog@rbalamohan
Can you please help with the review?

Comment threadpom.xml Outdated
<protoc.path>${env.PROTOC_PATH}</protoc.path>
<scm.url>scm:git:https://gitbox.apache.org/repos/asf/tez.git</scm.url>
<frontend-maven-plugin.version>1.4</frontend-maven-plugin.version>
<frontend-maven-plugin.version>1.8.0</frontend-maven-plugin.version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change this to 1.12.1

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we change the version to anything more than 1.8.0, this is the error in the build pipeline. The plugin com.github.eirslett:frontend-maven-plugin:1.12.1 requires Maven version 3.6.0 @guptanikhil007

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, then let's go with 1.8.0 only

Comment threadtez-ui/pom.xml
<configuration>
<nodeVersion>${nodeVersion}</nodeVersion>
<yarnVersion>v0.21.3</yarnVersion>
<yarnVersion>v1.6.0</yarnVersion>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please mention the RFC which adds selective dependency resolution in the description.

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 31sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+0 🆗mvndep6m 29sMaven dependency ordering for branch
+1 💚mvninstall10m 36smaster passed
+1 💚compile3m 38smaster passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚compile3m 26smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javadoc2m 56smaster passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javadoc2m 19smaster passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
_ Patch Compile Tests _
+0 🆗mvndep0m 17sMaven dependency ordering for patch
+1 💚mvninstall5m 41sthe patch passed
+1 💚compile3m 26sthe patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javac3m 26sthe patch passed
+1 💚compile3m 13sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
+1 💚javac3m 13sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚xml0m 2sThe patch has no ill-formed XML file.
+1 💚javadoc2m 45sthe patch passed with JDK Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1
+1 💚javadoc2m 22sthe patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
_ Other Tests _
+1 💚unit1m 57stez-ui in the patch passed.
+1 💚unit66m 0sroot in the patch passed.
+1 💚asflicense1m 26sThe patch does not generate ASF License warnings.
119m 16s
SubsystemReport/Notes
DockerClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-215/2/artifact/out/Dockerfile
GITHUB PR#215
JIRA IssueTEZ-4419
Optional Testsdupname asflicense javac javadoc unit xml compile
unameLinux 87e1cf18bf86 4.15.0-175-generic #184-Ubuntu SMP Thu Mar 24 17:48:36 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitypersonality/tez.sh
git revisionmaster / cf9e3ff
Default JavaPrivate Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Multi-JDK versions/usr/lib/jvm/java-11-openjdk-amd64:Private Build-11.0.15+10-Ubuntu-0ubuntu0.20.04.1 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-215/2/testReport/
Max. process+thread count1383 (vs. ulimit of 5500)
modulesC: tez-ui . U: .
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-215/2/console
versionsgit=2.25.1 maven=3.6.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Comment threadtez-ui/pom.xml
<webappDir>src/main/webapp</webappDir>

<nodeVersion>v5.12.0</nodeVersion>
<nodeVersion>v8.9.0</nodeVersion>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can try with v16 ?
https://nodejs.org/en/about/releases/

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slachiewicz When I update the node version to 16.15.1, this is the error that I get :
yarn run v1.6.0
(node:2298) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use node --trace-deprecation ... to show where the warning was created)
$ TMPDIR=tmp node/node ./node_modules/ember-cli/bin/ember build -prod

exports.dir = path.resolve(os.tmpDir());
^

TypeError: os.tmpDir is not a function
at Object. (/home/tez-ui/src/main/webapp/node_modules/temp/lib/temp.js:273:45)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/home/amanraj2520/Repositories/wildfire-tez/tez-ui/src/main/webapp/node_modules/ember-cli/lib/tasks/install-blueprint.js:7:21)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I think this error means is that we need to replace all the places of occurrence of new Buffer() to either Buffer.alloc() or Buffer.from(). Let me know you thoughts

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably stack should be upgraded. I commented on Node's version because currently 16 is LTS version. I don't have experience with frontend tools.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes thats true, but I think it will be another big change. I think we should make this change first and then work on upgrading the stack. Any thoughts ? @abstractdog@slachiewicz

@abstractdog

Copy link
Copy Markdown
Contributor

thanks guys for taking care of security issues in Tez!
I can see that TEZ-4419 is an umbrella with lots of subtasks
if we're tracking fixes on separate jiras, we might want to fix them in separate PRs/commits too, if possible, can you please do this accordingly?
I'm adding contributor rights to all of you in jira to tez project, feel free to assign tickets to yourselves

@abstractdog

abstractdog commented Nov 17, 2022

Copy link
Copy Markdown
Contributor

TEZ-4419 is resolved, I think we can close this PR
please reopen if I'm wrong

Sign up for freeto 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.

5 participants

@amanraj2520@tez-yetus@guptanikhil007@abstractdog@slachiewicz