# P05-SEC-01 — Dependency Security Remediation & Acceptance **Date:** 2026-11-22 **Approved baseline:** `1a602551ad9a791efcc594834f2fa6ce748339ae` **State:** **Run #87 complete: 3 PASS / 1 FAIL.** Account/ Login builds and Account audit PASS; Login audit correctly FAILS on 2 remaining Moderate transitive advisories. ## Scope and goals Reduce verified Moderate advisories from the Gitea Run #83 audit without changing login/authentication logic, user interface, ZITADEL Go backend, Docker Compose, production configuration or real data. The original official Login V2 v4.20.4 **source code** remains byte-for-byte unchanged; only its approved `apps/login/package.json` and workspace lockfile dependency declarations/resolutions are patched. ## Dependency changes - **Account Portal:** direct `next` pinned `16.4.3 → 16.4.6`, with npm v3 lockfile metadata generated without local application dependency installation or scripts. React, Auth.js, TypeScript and application code unchanged. - **Official Login V2 workspace:** direct `next` `16.4.3 → 16.4.6`; matching development `@next/eslint-plugin-next` `16.4.3 → 16.4.6`. Existing `@opentelemetry/auto-instrumentations-node` `^0.76.0 → ^0.80.0`, associated `@opentelemetry/sdk-node` `^0.218.0 → ^0.222.0` and `@opentelemetry/api-logs` `^0.218.0 → ^0.222.0` use a compatible SDK/instrumentation release family. PNPM v10.30.3 re-resolved **lockfile metadata only** (no local project node_modules). - **Lockfile maintenance:** pnpm pruned previously retained unreachable snapshot entries from the originally imported full upstream workspace after resolving the four explicitly imported workspace members. This changes many **lock metadata** lines but does not delete source files, modules, auth code or P02 Compose. Gitea frozen install/build is the required acceptance gate. ## Security advisory disposition before focused CI **Prior baseline from Run #83:** 18 Moderate Login records and one Moderate Account vulnerable `next` package record. Detailed IDs, direct parent paths, fixed version ranges and current lock resolutions: `project/DEPENDENCY-SECURITY.md`, with the full original live audit in `notes/P05-CI-02.md`. Next.js seven advisories are mitigated **in source dependency declarations** by `next@16.4.6`; nine previously reported OpenTelemetry records use a coordinated patched SDK/instrumentation family. Neither is claimed resolved until **new registry audit and frozen build pass in CI**. Two additional Login workspace Moderate advisories are not safely patchable under this scope: - `GHSA-3g3m-2fjr-6pw4`, `glob@10.5.0`, patched at `14.0.2` or later. Root transitive parents such as `@npmcli/package-json`, `rimraf`, `archiver-utils` still require older glob major. - `GHSA-g3hv-75wg-m249`, `minimatch@10.2.x`, patched at `11.0.1` or later. Parents include `eslint`, `@eslint/config-array`, `nx` and other tooling. Root PNPM overrides are in **read-only** `auth/ui/v2/pnpm-workspace.yaml`, so a forced major override would violate Scope Lock and require compatibility testing. These must remain OPEN if confirmed in the current CI report; a moderate gate will **fail rather than silently suppress them**. No `pnpm audit --fix`, `npm audit fix --force` or destructive lockfile workaround is permitted. ## Gitea Actions (manual only) Use **Actions → ZitPlane P05-SEC-01 Dependency Security Acceptance → Run workflow on main** after the source commit is pushed. Dedicated workflow `.gitea/workflows/p05-security-acceptance.yml` has four independent CI jobs: 1. Account `npm ci`, TypeScript check, Next production build and anonymous API/redirect regression. 2. Login pinned PNPM frozen install, original Nx proto/client/Login standalone build and upstream Vitest regression suite. 3. Account High/Critical audit (fail-closed), machine-readable audit and **zero Moderate/High/Critical** acceptance gate. 4. Login High/Critical audit (fail-closed), machine-readable audit and **zero Moderate/High/Critical** acceptance gate. Separate build and audit jobs preserve useful evidence even if remaining advisories block security acceptance. CI uses no production secrets/domains and no local PC application test/build. ## Acceptance and boundaries **Security acceptance requires both dependency audits at zero Moderate/High/Critical, frozen installs and application builds/tests PASS**, with exact evidence and no out-of-scope changes. A nonzero Moderate finding is explicitly a **BLOCKED** gate even when build jobs PASS. **ACTUAL CI:** [Gitea Run #87](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87), tested `752d243ae8fb24ce3cfa990343082e2d0431306b`, **overall FAILURE — 3 PASS / 1 FAIL**. Account frozen install, TypeScript, Next.js production build and negative identity regressions PASS. Login pinned pnpm frozen install, original proto/client/Login production build and **84/84 files, 1219/1219 upstream unit tests PASS**. Account npm audit **zero vulnerabilities**. Login pnpm audit **zero High/Critical** but **2 Moderate**: `GHSA-3g3m-2fjr-6pw4` (`glob`, patched >=14.0.2) and `GHSA-g3hv-75wg-m249` (`minimatch`, patched >=11.0.1). Strict Moderate+ gate correctly failed. Previous 19 findings reduced to **2** (17 no longer reported). **Security phase is PARTIALLY REMEDIATED / ACCEPTANCE BLOCKED**, not a production release. Full authenticated OIDC callback, MFA, Admin Console login, global SSO and deployment remain outside scope. See `notes/P05-SEC-01.md` for exact job evidence and proposed narrow follow-up.