90 lines
13 KiB
Markdown
90 lines
13 KiB
Markdown
# ZitPlane P05-SEC-01 — Dependency Provenance, Vulnerabilities and Exact Patch Records
|
|
|
|
**Baseline:** `1a602551ad9a791efcc594834f2fa6ce748339ae`
|
|
**Reference:** Gitea Run #83 security job #173, 2026-11-22. The source-only regenerated npm/pnpm lockfiles are **not CI acceptance** until the subsequent focused security workflow verifies frozen installs and registry advisory results.
|
|
|
|
## Advisory inventory (19 prior reported records)
|
|
|
|
`npm audit` reported **one affected Account Next.js package** associated with **seven IDs**, not seven different installed npm packages. `pnpm audit --prod` reported **18 Login Moderate records**, representing 7 Next.js IDs, 8 OpenTelemetry driver instrumentation records under a *single GHSA*, 1 HTTP instrumentation advisory, 1 glob and 1 minimatch. Previous HIGH/CRITICAL counts were zero.
|
|
|
|
| ID / Group | Affected package(s) and old pin | Verified immediate dependency parent | Security impact / required patched range | Source resolution, pending CI |
|
|
| --- | --- | --- | --- | --- |
|
|
| Seven Next.js GHSAs below | Account + Login direct `next@16.4.3` | Each application `package.json` | Information/cross-user cache disclosure/poisoning, SVG bypass, Edge HttpOnly header exposure and cross-client response injection; npm fix `16.4.6` | Both apps pin `next@16.4.6` in approved manifest/lock |
|
|
| `GHSA-qqmp-wf37-98f9` (8 records) | `@opentelemetry/instrumentation-{pg,mysql2,knex,mysql,mongoose,oracledb,tedious,cassandra-driver}` | `@opentelemetry/auto-instrumentations-node@0.76.0` direct production Login dependency | Database account username exposed as `db.user` in spans. Fixed: pg >=0.73.0; mysql2/mysql/mongoose >=0.67.0; knex >=0.65.0; oracledb >=0.46.0; tedious >=0.40.0; cassandra >=0.66.0 | Coordinated parent `auto-instrumentations-node@0.80.0` + `sdk-node@0.222.0` selects patched minors |
|
|
| `GHSA-3v2p-hm54-8qcq` | `@opentelemetry/instrumentation-http@0.218.0` | `@opentelemetry/auto-instrumentations-node@0.76.0` | Moderate HTTP instrumentation issue, patched >=0.222.0 | `auto-instrumentations-node@0.80.0` requires `instrumentation-http@^0.222.0` |
|
|
| `GHSA-3g3m-2fjr-6pw4` | `glob@10.5.0`; old lock also `13.0.6` | Snapshot immediate parents: `@npmcli/map-workspaces@3`, `@npmcli/package-json@5`, `rimraf@5`, `archiver-utils@5`, `unified-engine@11`; old `cacache@20` also referenced glob13 | Aborted glob traversal may continue performing costly filesystem operations, risking availability; patched >=14.0.2 | **OPEN**: major 14 not permitted by parent semver/approved root overrides; current workspace YAML read-only |
|
|
| `GHSA-g3hv-75wg-m249` | `minimatch@10.2.5/10.2.6`; old lock also v9 | Snapshot immediate parents include `eslint@10.8.1`, `@eslint/config-array@0.23.5`, `@typescript-eslint/typescript-estree@8.67.0`, `nx@22.7.12`, `@netlify/build-info@10.5.1` and `glob@13.0.6` | Potential globparts amplification denial of service, patched >=11.0.1 | **OPEN**: major 11 needs compatible transitive parent update or audited PNPM workspace override, outside exact write scope |
|
|
|
|
### Seven GitHub advisory IDs affecting Next.js 16.4.3
|
|
|
|
`GHSA-mfr8-8qww-v76h`, `GHSA-vc7v-qv4w-wrv8`, `GHSA-7qx7-33qx-rqx2`, `GHSA-f3mh-rxg3-f5g2`, `GHSA-pc58-hwjq-p385`, `GHSA-rhh4-g77r-r9qj`, `GHSA-vvgp-ww4w-46vf`.
|
|
|
|
Original audit: Login Next fixed >=16.4.5; Account npm recommends >=16.4.6, so **16.4.6 exact** chosen for both plus matching `@next/eslint-plugin-next` (Login dev only). See https://www.npmjs.com/package/next and original Gitea security logs.
|
|
|
|
### Transitive parent and compatibility detail
|
|
|
|
This table identifies **immediate parents present in the archived PNPM lock graph**, not a claim that every vulnerable package is loaded at runtime or exploitable over a public request. Actual production reachability remains UNVERIFIED without a separate controlled analysis. PNPM's `--prod` audit flagged these lockfile packages, so they must not be suppressed solely because many parents are dev tools.
|
|
|
|
`auth/ui/v2/pnpm-workspace.yaml` already owns other root overrides and is explicitly READ ONLY in this phase. A `pnpm.overrides` entry in root `package.json` would conflict with or be ignored in the presence of workspace-defined overrides on modern PNPM; **no ineffective fake override is added**. Minimatch 11/glob 14 are semver major changes; forcing them without compatibility proof is disallowed.
|
|
|
|
### Reproducible lockfile / provenance rules
|
|
|
|
- Account npm v3 lock was generated by `npm install --package-lock-only --ignore-scripts --no-audit --no-fund`; **no app install/build/test**.
|
|
- Login pinned `pnpm@10.30.3` lock was generated by `pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile`; no project `node_modules`. The four imported PNPM workspace members and prior root overrides are unchanged.
|
|
- PNPM's lockfile-only regeneration removed prior unreachable snapshots inherited from a much larger official ZITADEL monorepo. Source files/proto/Login UI/auth code are unchanged. Compare exact Git diff: this is **lock resolution metadata**, not removal of application features.
|
|
- Security acceptance is only the single Gitea workflow run: frozen npm/pnpm installs, locked build/regression and live npm/pnpm advisory results. No blind blanket update, no lockfile hand-edited integrities.
|
|
|
|
## Source-level candidate and acceptance
|
|
|
|
Expected patched direct candidates: Next.js `16.4.6` both apps; Login `@opentelemetry/auto-instrumentations-node@0.80.0`, `@opentelemetry/sdk-node@0.222.0`, `@opentelemetry/api-logs@0.222.0`. **OPEN candidate blockers:** glob >=14.0.2, minimatch >=11.0.1 require separately approved scoped parent/override changes.
|
|
|
|
**CI VERIFIED in Run #87:** the live registry audit did report two unchanged Moderate transitive vulnerabilities (`glob`, `minimatch`). See the terminal outcome section below. No claim of full security acceptance.
|
|
|
|
|
|
## Gitea Run #87 verified outcome — 2026-11-22
|
|
|
|
**Tested SHA:** `752d243ae8fb24ce3cfa990343082e2d0431306b`.
|
|
**Run:** https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87, **overall FAILURE** (3 job PASS/1 security job FAIL), manual only.
|
|
|
|
- **Account:** pinned npm v3 lock frozen install, Next.js 16.4.6/TypeScript production build and anonymous negative identity regressions PASS. Production npm audit **0 vulnerabilities** (0 Moderate/High/Critical), job #187 PASS.
|
|
- **Login:** pinned pnpm v10.30.3 **frozen install** (1131 packages), Nx proto/client/Next.js 16.4.6 standalone build PASS; upstream Vitest **84/84 test files, 1219/1219 unit tests PASS**. Its production pnpm audit had **zero High/Critical**, but **2 Moderate**; job #188 intentionally FAIL due fail-closed zero-Moderate gate.
|
|
- **Still open:** `GHSA-3g3m-2fjr-6pw4` (`glob`, upgrade >=14.0.2) and `GHSA-g3hv-75wg-m249` (`minimatch`, upgrade >=11.0.1). Immediate parent version constraints remain incompatible with blind semver-major upgrades. The authoritative PNPM workspace override file is read-only in P05-SEC-01.
|
|
- **No longer reported:** 7 old Next.js Login records, 9 old OpenTelemetry Login records, 1 old Account `next` vulnerable package record — 17/19 original records disappeared from current registry audit. This is not proof of runtime exploitability or of zero future advisories.
|
|
- Remaining P05-SEC-02 focus: narrow authorized `auth/ui/v2/pnpm-workspace.yaml` overrides or compatible parent dependency upgrades, reproducible pinned lock, exact transitive resolution and fail-closed Gitea frozen/security/build/unit acceptance. No login/auth/UI source changes.
|
|
|
|
**P05-SEC-01 classification: PATCH IMPLEMENTED AND BUILDS PASS; SECURITY ACCEPTANCE BLOCKED, not a production release.** Final docs-only SHA differs from the tested Run #87 source SHA.
|
|
|
|
|
|
## P05-SEC-02 — exact seven parent-scoped transitive fixes (candidate)
|
|
|
|
**Approved baseline:** `43eee54e7ad6b647e38491ac4dc28703547cf410`; **prior failed audit:** Run #87, exactly two Moderate Login advisories and zero High/Critical. No Account changes.
|
|
|
|
The current pnpm lock snapshots contained only two **direct glob10** parent refs (`rimraf@5.0.10`, `archiver-utils@5.0.2`) and five direct **minimatch10** parent refs (`@eslint/config-array@0.23.5`, `@typescript-eslint/typescript-estree@8.67.0`, `eslint@10.8.1`, `nodemon@3.1.14`, `nx@22.7.12`). The inherited `glob@10.5.0` also depended on `minimatch@9.0.9`. The old ranges were respectively `^10.3.7`, `^10.0.0`, `^10.2.4`, `^10.2.2`, `^10.2.5`, `^10.2.1`, and exact `10.2.5`.
|
|
|
|
Selected exact patch pins `glob@14.0.6` and `minimatch@11.0.9` are **published**, and both support Node 22. `glob@14.0.6` depends on `minimatch@^11.0.5`. `auth/ui/v2/pnpm-workspace.yaml` gets **only those seven parent-scoped replacements**, not a broad global major override; previous seven workspace overrides and the three imported workspace package paths remain unchanged. A pinned `pnpm@10.30.3` **metadata-only** lockfile regeneration showed `glob@14.0.6`, `minimatch@11.0.9` plus unaffected `minimatch@3.1.5/5.1.9` (outside both GHSA ranges). Its delta was just **35 added / 115 removed lock lines** prior to source commit, with **no application `node_modules` created**.
|
|
|
|
The seven *semver-major transitive* substitutions require runtime compatibility proofs. `tests/ci/transitive_override_contract.py` checks exact selector ownership, absence of vulnerable lock versions, unchanged importer requirements and the seven parent→version resolutions; it is CI-only. Manual Gitea security workflow option `login_only=true` skips previously accepted Account jobs, executes Login frozen install/build/upstream unit suite and a **strict zero Moderate/High/Critical** live production registry audit. Leave original Login auth, Account Portal, backend, deployment and unrelated package manifests read-only. Source presence is not a production-security guarantee.
|
|
|
|
**Security acceptance:** PENDING the one focused Gitea run. If registry audit or upstream regression fails, document exact blocker rather than suppressing findings or silently changing major versions.
|
|
|
|
|
|
## P05-SEC-02 Gitea Run #88 outcome (2026-11-22)
|
|
|
|
**Actual tested remote source:** `66cfed5a8b6bd5845b229c9934695e307f9a0775`, remote tree `9a1d2abd803f20cd05e428541483c1fa390e14d9` matched the local 25-file approved source commit tree byte-for-byte. One manual `login_only=true` Gitea Run [#88](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/88), overall **FAILURE**, two Account jobs skipped as intended.
|
|
|
|
**Login production security job #192 PASS:** real registry `pnpm audit --prod` reported `No known vulnerabilities found`, exactly `moderate=0, high=0, critical=0` and `ZITPLANE_PNPM_ZERO_MODERATE_HIGH_CRITICAL_PASS`. Both `glob` and `minimatch` prior Moderate findings no longer reproduce in this lock-based production audit. Previous Account registry audit was 0 in Run #87 (not rerun).
|
|
|
|
**Login frozen/build/unit job #190 FAIL before install:** newly written `tests/ci/transitive_override_contract.py` treated historical `axios@>=1.0.0`, `brace-expansion@>=4.0.0`, and `esbuild@>=0.27.3` version-range selectors as new parent overrides because the regex matched any `>`. That is a **validator false-positive**; it does **not** establish pinned PNPM frozen install or Nx/Next/1219-unit compatibility with the semver-major overrides. The helper regex was then narrowed to match **only terminal `>glob` / `>minimatch` selectors**. This final narrow correction has **NOT been executed in CI**, and there was no second run.
|
|
|
|
**Verdict:** advisory clearance **VERIFIED** in Run #88; full dependency compatibility/phase acceptance **BLOCKED** pending **P05-SEC-02-A01** isolated Login frozen install, production build, upstream unit suite, exact contract and retained zero-advisory gate. No authentication/UI/backend/Account source change or production deployment. Do not assert that historical Run #87's successful builds validate the newly overridden glob/minimatch majors.
|
|
|
|
|
|
## P05-SEC-02-A01 — acceptance of existing scoped dependency resolution (pending)
|
|
|
|
This phase **does not modify** `auth/ui/v2/pnpm-workspace.yaml`, `pnpm-lock.yaml` or any manifest. The seven original P05-SEC-02 patch parent selectors remain pinned to `glob@14.0.6` and `minimatch@11.0.9` without global major overrides. Run #88 established **zero known Moderate/High/Critical** advisories from the live Login production audit; only compatible frozen install/build/upstream-unit confirmation was missing due a CI helper false-positive. Acceptance of this existing dependency graph requires a successful Gitea Login-only run on the corrected parser baseline or its pre-run docs commit, with actual frozen PNPM, official Next standalone build and Vitest results. An audit PASS by itself is not runtime E2E.
|
|
|
|
|
|
## P05-SEC-02-A01 definitive dependency-security acceptance — verified
|
|
|
|
[Run #89](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/89) verified the patched seven parent-scoped `glob@14.0.6`/`minimatch@11.0.9` graph on tested SHA `ff4c58ed861474061c8f045be3a9f0752caf6ca0`: corrected selector/lock contract PASS, `pnpm@10.30.3 install --frozen-lockfile` PASS, official Login production standalone build PASS and upstream **1219/1219** unit regressions PASS. The independent production `pnpm audit --prod` registry report was **0 Moderate / 0 High / 0 Critical (also zero Low/Info)**. No package or PNPM lock revisions occurred in this acceptance phase. Previous two Moderate transitive advisories no longer reproduce at this point in time. **Accepted within CI dependency/build/unit scope only**; authenticated OIDC/MFA and production deployment separate.
|