[PR #6180] [MERGED] chore(frontend): resolve the high-severity brace-expansion advisory #6142

Closed
opened 2026-11-02 04:06:40 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6180
Author: @n0ctal
Created: 8/5/2026
Status: ✅ Merged
Merged: 8/6/2026
Merged by: @MHSanaei

Base: main ← Head: upstream-fix-npm-audit-brace-expansion


📝 Commits (1)

  • dd91121 chore(frontend): resolve the high-severity brace-expansion advisory

📊 Changes

2 files changed (+15 additions, -1 deletions)

View changed files

📝 frontend/package-lock.json (+13 -0)
📝 frontend/package.json (+2 -1)

📄 Description

Summary

The frontend CI job fails on main because npm audit --omit=dev --audit-level=high reports GHSA-rgw5-rvv9-x895 in brace-expansion. Pin the patched 5.0.9 for the production path.

Why

npm audit --omit=dev --audit-level=high is a hard gate in ci.yml, and it is currently red on main itself — run 30898275209 on 38838827. Every pull request inherits the failure, which makes the job useless as a signal: a real advisory introduced by a PR would look exactly like today's noise.

The production path is:

swagger-ui-react → swagger-client → @swagger-api/apidom-reference → minimatch@10.2.6 → brace-expansion@5.0.8

5.0.8 is inside the advisory's affected range (4.0.0 - 5.0.8); 5.0.9 is the fix.

Scope

  • frontend/package.json — brace-expansion: ^5.0.9 added to the existing swagger-ui-react overrides block, next to the js-yaml override already there.
  • frontend/package-lock.json — regenerated.

Scoped rather than global on purpose: eslint-plugin-jsx-a11y still resolves minimatch@3, which requires brace-expansion@^1.1.7, and a top-level override would force v5 into that subtree as well. After the change the tree keeps 1.1.16 where it belongs and only the swagger path moves.

Validation

  • npm ci --ignore-scripts from the regenerated lockfile, then npm ls brace-expansion shows 5.0.9 under the swagger path and 1.1.16 unchanged under eslint-plugin-jsx-a11y.
  • npm audit --omit=dev --audit-level=high → found 0 vulnerabilities.
  • npm run typecheck and npm run build both clean.

Risk

Low. A patch-level bump of a transitive dependency, scoped to one subtree; no source change and no behaviour change in the app.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/6180 **Author:** [@n0ctal](https://github.com/n0ctal) **Created:** 8/5/2026 **Status:** ✅ Merged **Merged:** 8/6/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `upstream-fix-npm-audit-brace-expansion` --- ### 📝 Commits (1) - [`dd91121`](https://github.com/MHSanaei/3x-ui/commit/dd91121f3029c196c38d5acf19346642d35b7386) chore(frontend): resolve the high-severity brace-expansion advisory ### 📊 Changes **2 files changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `frontend/package-lock.json` (+13 -0) 📝 `frontend/package.json` (+2 -1) </details> ### 📄 Description ## Summary The `frontend` CI job fails on `main` because `npm audit --omit=dev --audit-level=high` reports GHSA-rgw5-rvv9-x895 in `brace-expansion`. Pin the patched 5.0.9 for the production path. ## Why `npm audit --omit=dev --audit-level=high` is a hard gate in `ci.yml`, and it is currently red on `main` itself — run [30898275209](https://github.com/MHSanaei/3x-ui/actions/runs/30898275209) on `38838827`. Every pull request inherits the failure, which makes the job useless as a signal: a real advisory introduced by a PR would look exactly like today's noise. The production path is: ``` swagger-ui-react → swagger-client → @swagger-api/apidom-reference → minimatch@10.2.6 → brace-expansion@5.0.8 ``` `5.0.8` is inside the advisory's affected range (`4.0.0 - 5.0.8`); `5.0.9` is the fix. ## Scope - `frontend/package.json` — `brace-expansion: ^5.0.9` added to the **existing** `swagger-ui-react` overrides block, next to the `js-yaml` override already there. - `frontend/package-lock.json` — regenerated. Scoped rather than global on purpose: `eslint-plugin-jsx-a11y` still resolves `minimatch@3`, which requires `brace-expansion@^1.1.7`, and a top-level override would force v5 into that subtree as well. After the change the tree keeps `1.1.16` where it belongs and only the swagger path moves. ## Validation - `npm ci --ignore-scripts` from the regenerated lockfile, then `npm ls brace-expansion` shows `5.0.9` under the swagger path and `1.1.16` unchanged under `eslint-plugin-jsx-a11y`. - `npm audit --omit=dev --audit-level=high` → `found 0 vulnerabilities`. - `npm run typecheck` and `npm run build` both clean. ## Risk Low. A patch-level bump of a transitive dependency, scoped to one subtree; no source change and no behaviour change in the app. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:40 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6142
No description provided.