Skip to content

Overrides form-data package to fix CVEs - #566

Merged
RomanNikitenko merged 1 commit into
che-incubator:mainfrom
sbouchet:CRW-9340_sha.js
Sep 11, 2025
Merged

RomanNikitenko merged 1 commit into
che-incubator:mainfrom
sbouchet:CRW-9340_sha.js

Conversation

@sbouchet

@sbouchet sbouchet commented Sep 9, 2025 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Overriding form-data from 2.5.2 to 2.5.5, as request can't be updated anymore (deprecated).

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340
https://issues.redhat.com/browse/CRW-9311

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

@openshift-ci-robot

openshift-ci-robot commented Sep 9, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

update sha.js from 2.4.0 to 2.4.4

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@github-actions

github-actions Bot commented Sep 9, 2025 •

Copy link
Copy Markdown
Contributor

Click here to review and test in web IDE: Contribute

@openshift-ci-robot

openshift-ci-robot commented Sep 9, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

update sha.js from 2.4.0 to 2.4.4

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Sep 9, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

update sha.js from 2.4.0 to 2.4.4

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Sep 9, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

update sha.js from 2.4.0 to 2.4.4

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@sbouchet
sbouchet marked this pull request as draft September 9, 2025 12:47
@sbouchet sbouchet changed the title CRW-9340: bump sha.js from 2.4.0 to 2.4.4 CRW-9340: replace @types/sha.js 2.4.0 to sha.js 2.4.12 Sep 9, 2025
@openshift-ci-robot

openshift-ci-robot commented Sep 9, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

replace @types/sha.js 2.4.0 to sha.js 2.4.12

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • [] rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Sep 9, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

replace @types/sha.js 2.4.0 to sha.js 2.4.12

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@sbouchet
sbouchet marked this pull request as ready for review September 9, 2025 13:37
@github-actions

github-actions Bot commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

@rgrunber

rgrunber commented Sep 9, 2025 •

Copy link
Copy Markdown
Collaborator

@sbouchet , for fixing che-resource-monitor, here's what I had :

diff --git a/code/extensions/che-resource-monitor/package-lock.json b/code/extensions/che-resource-monitor/package-lock.json
index 0e9a3794c4e..bab0cb6f681 100644
--- a/code/extensions/che-resource-monitor/package-lock.json
+++ b/code/extensions/che-resource-monitor/package-lock.json
@@ -4228,19 +4228,6 @@
         "node": ">= 6"
       }
     },
-    "node_modules/request/node_modules/form-data": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
-      "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
-      "dependencies": {
-        "asynckit": "^0.4.0",
-        "combined-stream": "^1.0.6",
-        "mime-types": "^2.1.12"
-      },
-      "engines": {
-        "node": ">= 0.12"
-      }
-    },
     "node_modules/request/node_modules/tough-cookie": {
       "version": "2.5.0",
       "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
diff --git a/code/extensions/che-resource-monitor/package.json b/code/extensions/che-resource-monitor/package.json
index eb5d1af3400..14b215a38ac 100644
--- a/code/extensions/che-resource-monitor/package.json
+++ b/code/extensions/che-resource-monitor/package.json
@@ -47,6 +47,9 @@
     "ts-jest": "^27.1.4"
   },
   "overrides": {
+    "request": {
+      "form-data": "2.5.2"
+    },
     "jsonpath-plus": "10.1.0"
   },
   "repository": {

(Note: the package-lock.json change is generated by npm install)

You mentioned trying overrides, but did you "fix" the path to request -> form-data. Otherwise it would probably attempt to fix every instance of form-data. The above compiled for me and no traces of cipher-base or sha.js

@RomanNikitenko

Copy link
Copy Markdown
Collaborator

[tsl] ERROR in /checode-compilation/extensions/che-resource-monitor/src/k8s-helper.ts(14,26)
#13 2059.5 TS7016: Could not find a declaration file for module 'request'. '/checode-compilation/extensions/che-resource-monitor/node_modules/request/index.js' implicitly has an 'any' type.

this error should be fixed by bfd066b

@RomanNikitenko

Copy link
Copy Markdown
Collaborator

@sbouchet
I got successful build in the test-PR #568
Please see 2 last commits

@github-actions

This comment was marked as outdated.

2 similar comments
@github-actions

This comment was marked as outdated.

@github-actions

Copy link
Copy Markdown
Contributor

@openshift-ci-robot

openshift-ci-robot commented Sep 11, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

replace @types/sha.js 2.4.0 to sha.js 2.4.12

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Sep 11, 2025 •

Copy link
Copy Markdown

@sbouchet: This pull request references CRW-9340 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the vulnerability to target the "4.21.0" version, but no target version was set.

Details

In response to this:

What does this PR do?

replace @types/sha.js 2.4.0 to sha.js 2.4.12

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-9340

How to test this PR?

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@sbouchet sbouchet changed the title CRW-9340: replace @types/sha.js 2.4.0 to sha.js 2.4.12 overrides form-data to fix CVEs Sep 11, 2025
@sbouchet sbouchet changed the title overrides form-data to fix CVEs Overrides 'form-data' to fix CVEs Sep 11, 2025
@sbouchet sbouchet changed the title Overrides 'form-data' to fix CVEs Overrides form-data package to fix CVEs Sep 11, 2025
@github-actions

Copy link
Copy Markdown
Contributor

CRW-9311: fix cipher-base via form-data override
CRW-9340: fix sha.js via form-data override

Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
Comment thread code/remote/package.json Resolved
@RomanNikitenko
RomanNikitenko merged commit 00ea4cc into che-incubator:main Sep 11, 2025
@sbouchet
sbouchet deleted the CRW-9340_sha.js branch September 11, 2025 15:39
@github-actions

Copy link
Copy Markdown
Contributor

sbouchet added a commit to sbouchet/che-code that referenced this pull request Sep 11, 2025
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
@sbouchet sbouchet mentioned this pull request Sep 11, 2025
2 of 3 tasks
RomanNikitenko pushed a commit that referenced this pull request Sep 12, 2025
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
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.

5 participants