rfellows opened a new pull request, #11342: URL: https://github.com/apache/nifi/pull/11342
<!-- Licensed to the Apache Software Foundation (ASF) under one or more --> <!-- contributor license agreements. See the NOTICE file distributed with --> <!-- this work for additional information regarding copyright ownership. --> <!-- The ASF licenses this file to You under the Apache License, Version 2.0 --> <!-- (the "License"); you may not use this file except in compliance with --> <!-- the License. You may obtain a copy of the License at --> <!-- http://www.apache.org/licenses/LICENSE-2.0 --> <!-- Unless required by applicable law or agreed to in writing, software --> <!-- distributed under the License is distributed on an "AS IS" BASIS, --> <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <!-- See the License for the specific language governing permissions and --> <!-- limitations under the License. --> # Summary [NIFI-16023](https://issues.apache.org/jira/browse/NIFI-16023) Resolves the bulk of the open `npm audit` advisories against `nifi-frontend/src/main/frontend` using a minimal-impact approach: patch bumps for direct dependencies that already publish a fixed version on the same minor line, plus narrowly-scoped `overrides` entries for transitive-only chains. No major or unsafe minor bumps are introduced, and no Angular CLI / build-tooling minor lines are advanced. `npm audit` count on this branch drops from **39 → 5** vulnerabilities. The five remaining advisories all share a single root cause (`esbuild < 0.28.1` flowing through `@angular/build`, `ng-packagr`, `vite`, and `@angular-devkit/build-angular`) and are explicitly deferred — see "Known remaining advisories" below. Only `nifi-frontend/src/main/frontend/package.json` and `nifi-frontend/src/main/frontend/package-lock.json` are modified. There are no source changes, no Angular API surface changes, and no changes to the production build output shipped in NAR artifacts. ## Direct dependency patch bumps Updates in `nifi-frontend/src/main/frontend/package.json`: - `@angular/animations`, `@angular/common`, `@angular/compiler`, `@angular/core`, `@angular/forms`, `@angular/platform-browser`, `@angular/platform-browser-dynamic`, `@angular/router`: `21.2.4` → `21.2.17` - `@angular/compiler-cli` (devDependency): `21.2.4` → `21.2.17` - `postcss` (devDependency): `^8.4.32` → `^8.5.10` These are all patch-level bumps within the existing minor line. ## Transitive overrides Added under the `overrides` block in `package.json`: - `@babel/core: ">=7.29.7"` - `js-yaml: ">=4.2.0"` - `postcss: "^8.5.10"` (dedupes the nested copy inside `@angular-devkit/build-angular`) - `sockjs.uuid: ">=11.1.1"` (scoped under `sockjs`; the top-level `uuid` direct dependency is already on `^14.0.0`, and npm forbids a conflicting global override) - `webpack-dev-server: ">=5.2.5"` - `ws: ">=8.21.0"` ## Advisories cleared ### Angular framework (cleared by the `21.2.17` patch bump) - `GHSA-rgjc-h3x7-9mwg` — `@angular/core` Hydration DOM Clobbering & Response-Cache Poisoning (high) - `GHSA-p3vc-36g9-x9gr` — `@angular/common` DoS via OOM in Number Formatting (high) - `GHSA-q6f4-qqrg-jv6x` — `@angular/common` Information leak in `HttpTransferCache` (high) - `GHSA-692r-grfm-v8x7` — `@angular/core` Template/Dynamic Component Namespace Bypass XSS (moderate) - `GHSA-48r7-hpm6-gfxm` — `@angular/common` DoS via OOM in Date Formatting (high) - `GHSA-39pv-4j6c-2g6v` — `@angular/common` Weak 32-bit cache key hashing in `HttpTransferCache` (high) - `GHSA-58w9-8g37-x9v5` — `@angular/compiler` Two-Way Property Binding Sanitization Bypass (moderate) - `GHSA-f3m7-gqxr-g87x` — `@angular/compiler` / `@angular/core` Template/Attribute Namespace Sanitization Bypass XSS (moderate) ### Transitive chain (cleared by overrides) - `GHSA-qx2v-qp2m-jg93` — `postcss` XSS via unescaped `</style>` (moderate) — fixed by the direct `postcss` bump plus `overrides.postcss` to dedupe nested copies. - `GHSA-w5hq-g745-h8pq` — `uuid` missing buffer bounds check in v3/v5/v6 (moderate) — fixed by `overrides["sockjs"].uuid`. - `GHSA-58qx-3vcg-4xpx` — `ws` uninitialized memory disclosure (high) — fixed by `overrides.ws`. - `GHSA-96hv-2xvq-fx4p` — `ws` memory exhaustion DoS (high) — fixed by `overrides.ws`. - `GHSA-79cf-xcqc-c78w` — `webpack-dev-server` cross-origin source exposure on non-HTTPS origins (moderate) — fixed by `overrides["webpack-dev-server"]`. - `GHSA-h67p-54hq-rp68` — `js-yaml` quadratic-complexity DoS in merge-key handling (moderate) — fixed by `overrides["js-yaml"]`; collaterally clears the `nx → @yarnpkg/parsers → js-yaml` and `nx → front-matter → js-yaml` chains without an `nx` bump. - `GHSA-4x5r-pxfx-6jf8` — `@babel/core` arbitrary file read via `sourceMappingURL` (low) — fixed by `overrides["@babel/core"]`. | Dependabot | Alert | GHSA-ish | | --- | --- | --- | | [#723](https://github.com/apache/nifi/security/dependabot/723) | Angular Client Hydration DOM Clobbering & Response-Cache Poisoning | fixed via @angular/core 21.2.17 | | [#727](https://github.com/apache/nifi/security/dependabot/727) | @angular/common Information Leak in HttpTransferCache | fixed via @angular/common 21.2.17 | | [#729](https://github.com/apache/nifi/security/dependabot/729) | @angular/common DoS via OOM in Number Formatting | fixed via @angular/common 21.2.17 | | [#725](https://github.com/apache/nifi/security/dependabot/725) | @angular/core Template/Dynamic Component Namespace Bypass XSS | fixed via @angular/core 21.2.17 | | [#708](https://github.com/apache/nifi/security/dependabot/708) | uuid missing buffer bounds check in v3/v5/v6 | fixed via scoped sockjs.uuid override | | [#673](https://github.com/apache/nifi/security/dependabot/673) | PostCSS XSS via Unescaped </style> | fixed via direct postcss ^8.5.10 bump + override | | [#702](https://github.com/apache/nifi/security/dependabot/702) | webpack-dev-server cross-origin source exposure on non-HTTPS | fixed via webpack-dev-server: ">=5.2.5" override | ### Packages no longer flagged as a side-effect The following packages disappear from `npm audit` once the overrides above are in place, even though they are not directly bumped: - `@module-federation/dts-plugin`, `@module-federation/cli`, `@module-federation/enhanced`, `@module-federation/manifest`, `@module-federation/rspack` — were flagged only because of `ws`; closed by `overrides.ws`. - `nx`, `@nx/workspace`, `@nx/js`, `@nx/angular`, `@nx/eslint`, `@nx/eslint-plugin`, `@nx/module-federation`, `@nx/rspack`, `@nx/web`, `@nx/webpack`, `@yarnpkg/parsers`, `front-matter` — were flagged only because of `js-yaml` and/or `ws`; closed by those overrides without needing an `nx` minor bump. - `@rspack/dev-server` — was flagged via `sockjs → uuid`; closed by the scoped `sockjs.uuid` override. ## Known remaining advisories (intentionally deferred) All five remaining `npm audit` findings share a single root cause: `esbuild < 0.28.1` flowing through `@angular/build`, `ng-packagr`, `vite`, and `@angular-devkit/build-angular`. `esbuild` treats every `0.x → 0.(x+1)` step as a breaking change, and the Angular tooling currently pins `^0.27.x`, so a top-level `esbuild` override risks breaking the Angular build pipeline. These will be closed by a future Angular CLI / `@angular/build` minor bump (from `21.1.5` to `21.2.15+`) once the Angular team picks up `esbuild >= 0.28.1` in their tooling stack: - `GHSA-gv7w-rqvm-qjhr` — `esbuild` missing binary integrity verification in Deno module enables RCE via `NPM_CONFIG_REGISTRY` (high) — dev-tooling only. - `GHSA-4w7w-66w2-5vf9` — `vite` path traversal in optimized deps `.map` handling (moderate) — dev-server only. - `GHSA-v2wj-q39q-566r` — `vite` `server.fs.deny` bypassed with queries (high) — dev-server only. - `GHSA-p9ff-h696-f583` — `vite` arbitrary file read via dev-server WebSocket (high) — dev-server only. - `GHSA-v6wh-96g9-6wx3` — `vite` / `launch-editor` NTLMv2 hash disclosure via UNC paths on Windows (moderate) — dev-server only, Windows-only. - `GHSA-fx2h-pf6j-xcff` — `vite` `server.fs.deny` bypass on Windows alternate paths (high) — dev-server only, Windows-only. All six are dev-tooling / dev-server advisories. None of them ship in the production build output bundled into NAR artifacts. ## Build & verification To reproduce the audit delta and validate the build locally: cd nifi-frontend/src/main/frontend npm install --legacy-peer-deps nx build nx test npm audit `--legacy-peer-deps` is required for the *initial* install only, while npm reconciles the regenerated `package-lock.json` against the previous `21.2.4` cross-pins between Angular framework packages (Angular packages reference each other with exact-version peer deps). Subsequent installs do not need the flag. The existing `ci` script in `package.json` (`npm ci --ignore-scripts`) does not pass `--strict-peer-deps`, so CI is unaffected. # Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000` - [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000` - [ ] Pull request contains [commits signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) with a registered key indicating `Verified` status ### Pull Request Formatting - [ ] Pull Request based on current revision of the `main` branch - [ ] Pull Request refers to a feature branch with one commit containing changes # Verification Please indicate the verification steps performed prior to pull request creation. ### Build - [ ] Build completed using `./mvnw clean install -P contrib-check` - [ ] JDK 21 - [ ] JDK 25 ### Licensing - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html) - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [ ] Documentation formatting appears as expected in rendered files -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
