Skip to content

fix CVE issues - #2068

Merged
SuZhou-Joe merged 6 commits into
opensearch-project:mainfrom
yyfamazon:main
Jun 22, 2026
Merged

fix CVE issues#2068
SuZhou-Joe merged 6 commits into
opensearch-project:mainfrom
yyfamazon:main

Conversation

@yyfamazon

@yyfamazon yyfamazon commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

This PR addresses multiple security vulnerabilities in dependencies and hardens CI workflow actions by pinning them to specific commit SHAs.

  • CVE-2026-4800 (lodash): Added override/resolution to ^4.18.0 → resolves to 4.18.1
  • CVE-2026-32141 (flatted): Added override/resolution to ^3.4.0 → resolves to 3.4.2
  • GHSA-5c6j-r48x-rmvq (minimatch): Added override/resolution to ^5.1.9, replacing vulnerable 3.x which used brace-expansion@1
  • CVE-2025-69873 (ajv ReDoS with $data option): Added scoped resolutions (webpack//ajv, table/ajv, ajv-formats//ajv) to force ^8.20.0 for ajv 8.x consumers while keeping eslint on compatible ajv 6.15.0
  • CVE-2026-33672 (picomatch): Added override/resolution >=2.3.2 to mitigate method injection in POSIX character classes

Issues Resolved

[List any issues this PR will resolve]

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: yyfamazon <yyf@amazon.com>
Signed-off-by: yyfamazon <yyf@amazon.com>
Signed-off-by: yyfamazon <yyf@amazon.com>
Signed-off-by: yyfamazon <yyf@amazon.com>
@yyfamazon
yyfamazon force-pushed the main branch 2 times, most recently from 391dad6 to cf997df Compare June 22, 2026 09:44
Signed-off-by: yyfamazon <yyf@amazon.com>
Comment thread package.json Outdated
"form-data": "^2.5.5"
"form-data": "^2.5.5",
"lodash": "^4.18.0",
"flatted": "^3.4.0",

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.

Do we use flatted as direct dependency?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, flatted is not a direct dependency. It's a transitive dependency pulled in through:

eslint → file-entry-cache → flat-cache → flatted

It only appears in overrides and resolutions to force the patched version for the CVE fix.

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.

Oh, get it. I thought it was for dev dependency. Thanks.

Signed-off-by: yyfamazon <yyf@amazon.com>
@SuZhou-Joe
SuZhou-Joe merged commit 19a1a53 into opensearch-project:main Jun 22, 2026
78 of 81 checks passed
TackAdam pushed a commit to TackAdam/opensearch-dashboards-functional-test that referenced this pull request Jun 25, 2026
The CVE-fix commit (opensearch-project#2068) migrated this repo from yarn to npm. Under
npm, the reporters' mocha peerDependency auto-installs a top-level
mocha@11, which conflicts with Cypress 13.17's bundled mocha@7.0.1 and
breaks the reporter (test.slow is not a function).

Pin mocha to 7.0.1 via overrides so both cypress-multi-reporters and
mocha-junit-reporter resolve against the same mocha Cypress runs.

Lockfile is updated incrementally from the working main lockfile so it
stays in sync (npm ci) and keeps ajv@8.20.0 top-level with eslint's
nested ajv@6.15.0 (lint passes).
TackAdam pushed a commit to TackAdam/opensearch-dashboards-functional-test that referenced this pull request Jun 25, 2026
The CVE-fix commit (opensearch-project#2068) migrated this repo from yarn to npm. Under
npm, the reporters' mocha peerDependency auto-installs a top-level
mocha@11, which conflicts with Cypress 13.17's bundled mocha@7.0.1 and
breaks the reporter (test.slow is not a function).

Pin mocha to 7.0.1 via overrides so both cypress-multi-reporters and
mocha-junit-reporter resolve against the same mocha Cypress runs.

Lockfile is updated incrementally from the working main lockfile so it
stays in sync (npm ci) and keeps ajv@8.20.0 top-level with eslint's
nested ajv@6.15.0 (lint passes).

Signed-off-by: Adam Tackett <tackadam@amazon.com>
peterzhuamazon pushed a commit that referenced this pull request Jun 26, 2026
* fix obs test failures: pin mocha to Cypress bundled version

The CVE-fix commit (#2068) migrated this repo from yarn to npm. Under
npm, the reporters' mocha peerDependency auto-installs a top-level
mocha@11, which conflicts with Cypress 13.17's bundled mocha@7.0.1 and
breaks the reporter (test.slow is not a function).

Pin mocha to 7.0.1 via overrides so both cypress-multi-reporters and
mocha-junit-reporter resolve against the same mocha Cypress runs.

Lockfile is updated incrementally from the working main lockfile so it
stays in sync (npm ci) and keeps ajv@8.20.0 top-level with eslint's
nested ajv@6.15.0 (lint passes).

Signed-off-by: Adam Tackett <tackadam@amazon.com>

* Pin dorny/paths-filter to commit SHA in dashboard-variable workflow

This workflow was missed in c791b5b (Pin GitHub Actions to commit SHAs).
The org policy rejects unpinned actions, failing the 'changes' job. Use
the same SHA (4512585405083f25c027a35db413c2b3b9006d50 # v2) already used
by the other 20 e2e workflows.

Signed-off-by: Adam Tackett <tackadam@amazon.com>

---------

Signed-off-by: Adam Tackett <tackadam@amazon.com>
Co-authored-by: Adam Tackett <tackadam@amazon.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.

4 participants