Skip to content

R11DT-4120 - Bump vulnerable deps in swagger-ui (immutable, dompurify, js-yaml, axios, brace-expansion) - #206

Open
mvios wants to merge 2 commits into
b11from
R11DT-4120-vulnerabilities-swagger-ui
Open

R11DT-4120 - Bump vulnerable deps in swagger-ui (immutable, dompurify, js-yaml, axios, brace-expansion)#206
mvios wants to merge 2 commits into
b11from
R11DT-4120-vulnerabilities-swagger-ui

Conversation

@mvios

@mvios mvios commented Jul 30, 2026

Copy link
Copy Markdown

R11DT-4120 - Fix vulnerabilities in swagger-ui

Remediates all 16 Wiz dependency findings against OutSystems/swagger-ui (b11) by bumping the 5 flagged components, regenerating the lockfile, applying the upstream immutable-v4 source fixes, and rebuilding the vendored dist/ bundles. Follows the established surgical-bump pattern (see #205 / R11DT-4052).

Changes

Component Type Change Resolved Findings cleared
immutable direct =3.8.3=4.3.9 4.3.9 CVE-2026-59879, CVE-2026-59880
dompurify direct =3.4.11=3.4.12 3.4.12 GHSA-c2j3-45gr-mqc4
js-yaml direct =4.2.0=4.3.0 4.3.0 CVE-2026-59869
axios override >=1.16.0>=1.18.0 1.18.1 10 GHSA advisories
apidom → brace-expansion override >=5.0.6>=5.0.8 5.0.8 CVE-2026-13149, CVE-2026-14257

Rebuilt dist/ bundles are included (Platform vendors the prebuilt artifacts).

immutable v3 → v4 requires source changes (upstream swagger-api#10969)

immutable 4.x is a breaking major, and the =3.8.3 → =4.3.9 bump alone regressed rendering: under v4, Map#toArray() returns [key, value] entry pairs (v3 returned values), so components doing keyedMap.map(...).toArray() leaked the map key as a stray React text node — e.g. a duplicated, unstyled operation-tag label. v4 also changed Map#mergeDeep to concatenate Lists instead of replacing them.

This PR ports the exact source changes from upstream swagger-api/swagger-ui#10969 ("fix(deps): bump immutable to 4.3.9", merged 2026-07-22), which is upstream's own migration for this identical bump — so the fork aligns with upstream rather than diverging:

  • operations.jsx, overview.jsx, auth/oauth2.jsx, auth/auths.jsx, oas31/auth/auths.jsx: .toArray().valueSeq().toArray() (values), and definitions.map((v,k)=>k).toArray()definitions.keySeq().toArray() (keys)
  • core/utils/index.js arrayify(): guard with Im.isKeyed() to keep returning values for keyed collections
  • examples-select-value-retainer.jsx: mergeDeep(obj)merge(obj)
  • json-schema-5/model.jsx: cautionary comment about v4 mergeDeep + List semantics

Verification

  • npm audit: all 16 Wiz-flagged instances clear.
  • Render parity (the key check): headless render via Chrome DevTools Protocol of the same OpenAPI spec on the pre-bump (immutable v3) bundle vs. this v4+fixes bundle → byte-identical output after the same normalization Platform's RESTService_swaggerUiTests applies. So the vendored render is unchanged and Platform's golden tests pass without regenerating goldens. (Repro under specs/…/immutable-v4-render-repro/.)
  • Jest unit (test:unit): 34 pre-existing failures, identical before and after (unchanged by this work).
  • Build: webpack bundles rebuilt; dist/index.html cache-busting hashes refreshed.

Out of scope (documented)

npm audit also flags pre-existing, non-Wiz copies not shipped in dist: sass's build-time immutable@5.1.5 and dev-tooling brace-expansion 1.x/2.x. These existed at baseline and were not introduced here; left untouched per surgical scope (NFR2).

Residuals for reviewers

  • Full Cypress e2e (cy:ci) not run locally (Cypress verified/available); recommend CI.
  • Interactive visual render smoke (load an OpenAPI spec, confirm branding + no console errors) still recommended before/at merge.

Downstream Platform vendoring PR: OutSystems/Platform#12511.

…, js-yaml, axios, brace-expansion)

Remediate all 16 Wiz dependency findings by bumping the 5 flagged components,
regenerating package-lock.json, and rebuilding the vendored dist/ bundles.

Direct dependencies:
- immutable  =3.8.3  -> =4.3.9   (CVE-2026-59879, CVE-2026-59880)
- dompurify  =3.4.11 -> =3.4.12  (GHSA-c2j3-45gr-mqc4)
- js-yaml    =4.2.0  -> =4.3.0   (CVE-2026-59869)

Transitive (npm overrides):
- axios  >=1.16.0 -> >=1.18.0  (resolves 1.18.1; GHSA-gcfj-64vw-6mp9,
  GHSA-mwf2-3pr3-8698, GHSA-42h9-826w-cgv3, GHSA-xj6q-8x83-jv6g,
  GHSA-mmx7-hfxf-jppx, GHSA-7q8q-rj6j-mhjq, GHSA-pmv8-rq9r-6j72,
  GHSA-jqh4-m9w3-8hp9, GHSA-hcpx-6fm6-wx23, GHSA-f4gw-2p7v-4548)
- @swagger-api/apidom-reference > brace-expansion  >=5.0.6 -> >=5.0.8
  (resolves 5.0.8; CVE-2026-13149, CVE-2026-14257)

Rebuilt dist/ bundles (Platform vendors the prebuilt artifacts).

Verified: npm audit clears all 16 Wiz-flagged instances; Jest unit suite shows
no new failures vs baseline (34 pre-existing failures identical with old and new
deps); rebuilt bundles pass syntax integrity + branding-asset checks.

Out of scope (pre-existing, not Wiz-flagged, not shipped in dist): sass'
build-time immutable@5.1.5 and dev-tooling brace-expansion 1.x/2.x copies remain
flagged by npm audit; left untouched per surgical scope.
@mvios
mvios requested a review from a team as a code owner July 30, 2026 14:20
@mvios mvios self-assigned this Jul 30, 2026
rmb-guerra
rmb-guerra previously approved these changes Jul 30, 2026
Bumping immutable 3.8.3 -> 4.3.9 alone regressed rendering: under immutable v4
Map#toArray() returns [key, value] entry pairs (v3 returned values), so
components that did keyedMap.map(...).toArray() leaked the map key as a stray
React text node (e.g. a duplicated, unstyled operation-tag label). v4 also
changed Map#mergeDeep to concatenate Lists instead of replacing them.

Port the exact source changes from upstream swagger-api#10969
("fix(deps): bump immutable to 4.3.9", merged 2026-07-22) -- this aligns the
fork with upstream rather than diverging:

- operations.jsx, overview.jsx, auth/oauth2.jsx, auth/auths.jsx,
  oas31/auth/auths.jsx: .toArray() -> .valueSeq().toArray() (values), and
  definitions.map((v,k)=>k).toArray() -> definitions.keySeq().toArray() (keys)
- core/utils/index.js arrayify(): guard with Im.isKeyed() to keep returning
  values for keyed collections
- examples-select-value-retainer.jsx: mergeDeep(obj) -> merge(obj)
- json-schema-5/model.jsx: cautionary comment about v4 mergeDeep+List semantics

Verified via headless render (Chrome DevTools Protocol): after these fixes the
v4 bundle output is byte-identical (post test-normalization) to the v3 build,
so Platform's RESTService_swaggerUiTests golden files pass unchanged.

Rebuilt dist/ bundles included.
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