fix(security): scope glob and minimatch overrides to affected parents

This commit is contained in:
victorsteele428 committed 2026-11-22 14:33:36 +00:00
1 parent 43eee54e7a
commit 66cfed5a8b
25 files changed
+331 -138

No files matched your search

+2
View File
@@ -10,6 +10,8 @@ Job responsibilities:
**P05-CI-02 additions:** Account Portal CI negative route/API smoke, npm/pnpm structured Moderate advisory detail, and disposable Postgres restart persistence plus stronger OIDC issuer/JWKS negative checks. Run #83 passed Account, Login V2 and Security jobs but backend proxy bind to shared host port 8080 failed after Postgres/ZITADEL/Login healthy. **Post-run source fix:** all backend Compose calls include `tests/ci/compose.portless.override.yaml` (`ports: !reset []`), config rejects any published proxy port; this is not CI-verified. Full authenticated user sign-in/MFA remains deferred.
**P05-SEC-02:** Existing `p05-security-acceptance.yml` has manual `login_only=true` option to skip the previously accepted Account jobs, run only Login V2 pinned frozen install, proto/client/standalone production build, upstream Vitest and independent **strict zero Moderate/High/Critical** live production audit. The new `tests/ci/transitive_override_contract.py` checks exactly seven known patched parent resolutions before frozen installation. Default `login_only=false` preserves earlier full workflow. Pending actual Gitea acceptance; no production. See `docs/P05-SEC-02.md`.
**P05-SEC-01:** `.gitea/workflows/p05-security-acceptance.yml` is **manual-only** with independent Account frozen build + negative access regressions, Login frozen Nx build + Vitest, Account production audit and Login production audit. **Run #87:** Account build, Login build/1219 unit tests, Account security audit **PASS**; Login audit **FAIL** on 2 Moderate transitive `glob`/`minimatch` findings (0 High/Critical) as required by strict `tests/ci/security_advisory_gate.py`. No source auth changes or production deployment. See `docs/P05-SEC-01.md`.
**P05-CI-03:** `p05-backend-acceptance.yml` runs **only** the isolated backend job with `tests/ci/backend_acceptance.sh` and always-run `backend_cleanup.sh`. **Gitea Run #86 SUCCESS** on `03fb589`: portless config, all four services, restart persistence, ready/discovery/JWKS, negative cases and complete cleanup passed. No Account/Login build rerun; no production. See `docs/P05-CI-03.md`.
+11 -1
View File
@@ -1,14 +1,20 @@
name: ZitPlane P05-SEC-01 Dependency Security Acceptance
name: ZitPlane P05 Dependency Security Acceptance (SEC-01/02)
# Manual only. No PR triggers, production access, real credentials or deployment.
on:
workflow_dispatch:
inputs:
login_only:
description: 'P05-SEC-02: run Login frozen build/unit + Login security only; Account already accepted in Run #87'
required: false
default: 'false'
permissions:
contents: read
jobs:
account:
if: ${{ github.event.inputs.login_only != 'true' }}
name: Account Portal frozen install, typecheck and production build
runs-on: ubuntu-latest
container: node:22-bookworm
@@ -63,6 +69,9 @@ jobs:
working-directory: auth/ui/v2
run: |
set -eu
if [ "${{ github.event.inputs.login_only }}" = 'true' ]; then
python3 ../../../tests/ci/transitive_override_contract.py
fi
corepack enable
corepack prepare pnpm@10.30.3 --activate
pnpm install --frozen-lockfile
@@ -84,6 +93,7 @@ jobs:
echo ZITPLANE_SECURITY_LOGIN_UNIT_PASS
security_account:
if: ${{ github.event.inputs.login_only != 'true' }}
name: Account production High/Critical audit and Moderate acceptance
runs-on: ubuntu-latest
container: node:22-bookworm
+1
View File
@@ -11,6 +11,7 @@ Compact, developer-friendly monorepo for a central identity service, a branded l
- **P05-CI-02:** Gitea Run #83 **3 PASS / 1 FAIL**. Account Portal typecheck/build and negative identity checks PASS; Login V2 build + 1219/1219 tests PASS; High/Critical security threshold PASS (18 Moderate Login records + 1 Moderate Account package OPEN). Docker Postgres/ZITADEL API/Login healthy, but shared runner port 8080 blocked Traefik; cleanup PASS. CI-only portless override added afterward **not CI-verified**; full OIDC E2E deferred. See `docs/P05-CI-02.md`.
- **P05-CI-03:** **Gitea Run #86 SUCCESS** on `03fb589`: portless Docker Compose, four healthy/running services, PostgreSQL restart persistence, ZITADEL readiness, OIDC discovery/JWKS, negative contracts and complete CI cleanup verified. No repeated Account/Login suites. Full interactive OIDC E2E and Moderate dependency fixes remain pending. See `docs/P05-CI-03.md`.
- **P05-SEC-01:** Gitea Run #87 **3 PASS / 1 FAIL**. Account and Login patched Next.js `16.4.6` builds PASS, Login 1219/1219 upstream unit tests PASS, Account audit 0. Login OpenTelemetry patched dependencies reduced prior 18 Moderate to **2 remaining** (glob/minimatch); strict Moderate security gate correctly FAILS. Current dependency patch retained; complete security acceptance requires a separate narrow transitive remediation phase. See `docs/P05-SEC-01.md`.
- **P05-SEC-02:** Exactly seven PNPM parent-scoped overrides to remediate final `glob`/`minimatch` Moderate findings; regenerated pinned lockfile metadata without local builds/tests. Existing Login security workflow supports focused `login_only=true` Gitea CI; **acceptance pending actual CI**. See `docs/P05-SEC-02.md`.
- **Production / Coolify:** not configured or deployed.
## Documentation and project knowledge
+35 -115
View File
@@ -12,6 +12,13 @@ overrides:
esbuild@>=0.27.3 <0.28.1: ^0.28.1
'@opentelemetry/core@<2.8.0': ^2.8.0
'@opentelemetry/propagator-jaeger@<2.9.0': ^2.9.0
rimraf@5.0.10>glob: 14.0.6
archiver-utils@5.0.2>glob: 14.0.6
'@eslint/config-array@0.23.5>minimatch': 11.0.9
'@typescript-eslint/typescript-estree@8.67.0>minimatch': 11.0.9
eslint@10.8.1>minimatch: 11.0.9
nodemon@3.1.14>minimatch: 11.0.9
nx@22.7.12>minimatch: 11.0.9
importers:
@@ -1179,14 +1186,13 @@ packages:
'@internationalized/string@3.2.10':
resolution: {integrity: sha512-PDx6//vHSpRnHfxqMqto11zQvhsaU74O3mKv2F/0eicGZcl9NLjQmGlbHz/LsJh5tLKp4A4L7ZVTzN1/MmMTvA==}
'@isaacs/cliui@8.0.2':
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
'@isaacs/fs-minipass@4.0.1':
resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==}
engines: {node: '>=18.0.0'}
'@isaacs/nonrecursive-glob-match@1.1.0':
resolution: {integrity: sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==}
'@jest/diff-sequences@30.0.1':
resolution: {integrity: sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==}
engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}
@@ -2229,10 +2235,6 @@ packages:
resolution: {integrity: sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==}
engines: {node: '>= 10.0.0'}
'@pkgjs/parseargs@0.11.0':
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
'@playwright/test@1.62.1':
resolution: {integrity: sha512-DTcUc8qii+cpHvtOwggMtBRMjKZHXYWdw8syRYu2vtzuq4Wxphqq4NfCs5Zt44L6mA8rfDfj+PHnxFc/FeK6mQ==}
engines: {node: '>=20'}
@@ -3861,9 +3863,6 @@ packages:
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
engines: {node: '>= 0.4'}
eastasianwidth@0.2.0:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
ejs@5.0.1:
resolution: {integrity: sha512-COqBPFMxuPTPspXl2DkVYaDS3HtrD1GpzOGkNTJ1IYkifq/r9h8SVEFrjA3D9/VJGOEoMQcrlhpntcSUrM8k6A==}
engines: {node: '>=0.12.18'}
@@ -3878,9 +3877,6 @@ packages:
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
emoji-regex@9.2.2:
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
enabled@2.0.0:
resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==}
@@ -4217,10 +4213,6 @@ packages:
resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==}
engines: {node: '>= 0.4'}
foreground-child@3.3.1:
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
engines: {node: '>=14'}
form-data@4.0.6:
resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==}
engines: {node: '>= 6'}
@@ -4330,10 +4322,9 @@ packages:
resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
engines: {node: '>=10.13.0'}
glob@10.5.0:
resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==}
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
hasBin: true
glob@14.0.6:
resolution: {integrity: sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==}
engines: {node: 18 || 20 || >=22}
globals@15.15.0:
resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==}
@@ -4653,9 +4644,6 @@ packages:
isexe@2.0.0:
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
jackspeak@3.4.3:
resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
jiti@2.7.0:
resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==}
hasBin: true
@@ -4955,13 +4943,9 @@ packages:
resolution: {integrity: sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg==}
hasBin: true
minimatch@10.2.5:
resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==}
engines: {node: 18 || 20 || >=22}
minimatch@10.2.6:
resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==}
engines: {node: 18 || 20 || >=22}
minimatch@11.0.9:
resolution: {integrity: sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==}
engines: {node: 20 || >=22}
minimatch@3.1.5:
resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==}
@@ -4970,10 +4954,6 @@ packages:
resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==}
engines: {node: '>=10'}
minimatch@9.0.9:
resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==}
engines: {node: '>=16 || 14 >=14.17'}
minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
@@ -5254,9 +5234,6 @@ packages:
resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
engines: {node: '>=6'}
package-json-from-dist@1.0.1:
resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==}
package-manager-detector@0.2.11:
resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==}
@@ -5274,9 +5251,9 @@ packages:
path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
path-scurry@1.11.1:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'}
path-scurry@3.0.0:
resolution: {integrity: sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==}
engines: {node: 18 || 20 || >=22}
path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
@@ -5854,10 +5831,6 @@ packages:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
string-width@5.1.2:
resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==}
engines: {node: '>=12'}
string-width@7.2.0:
resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==}
engines: {node: '>=18'}
@@ -6435,10 +6408,6 @@ packages:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
wrap-ansi@8.1.0:
resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==}
engines: {node: '>=12'}
wrap-ansi@9.0.2:
resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==}
engines: {node: '>=18'}
@@ -7044,7 +7013,7 @@ snapshots:
dependencies:
'@eslint/object-schema': 3.0.5
debug: 4.4.3
minimatch: 10.2.6
minimatch: 11.0.9
transitivePeerDependencies:
- supports-color
@@ -7297,19 +7266,12 @@ snapshots:
dependencies:
'@swc/helpers': 0.5.23
'@isaacs/cliui@8.0.2':
dependencies:
string-width: 5.1.2
string-width-cjs: string-width@4.2.3
strip-ansi: 7.2.0
strip-ansi-cjs: strip-ansi@6.0.1
wrap-ansi: 8.1.0
wrap-ansi-cjs: wrap-ansi@7.0.0
'@isaacs/fs-minipass@4.0.1':
dependencies:
minipass: 7.1.3
'@isaacs/nonrecursive-glob-match@1.1.0': {}
'@jest/diff-sequences@30.0.1': {}
'@jridgewell/gen-mapping@0.3.13':
@@ -8401,9 +8363,6 @@ snapshots:
'@parcel/watcher-win32-arm64': 2.6.0
'@parcel/watcher-win32-x64': 2.6.0
'@pkgjs/parseargs@0.11.0':
optional: true
'@playwright/test@1.62.1':
dependencies:
playwright: 1.62.1
@@ -9124,7 +9083,7 @@ snapshots:
'@typescript-eslint/types': 8.67.0
'@typescript-eslint/visitor-keys': 8.67.0
debug: 4.4.3
minimatch: 10.2.6
minimatch: 11.0.9
semver: 7.8.5
tinyglobby: 0.2.17
ts-api-utils: 2.5.0(typescript@5.9.3)
@@ -9353,7 +9312,7 @@ snapshots:
archiver-utils@5.0.2:
dependencies:
glob: 10.5.0
glob: 14.0.6
graceful-fs: 4.2.11
is-stream: 2.0.1
lazystream: 1.0.1
@@ -9944,8 +9903,6 @@ snapshots:
es-errors: 1.3.0
gopd: 1.2.0
eastasianwidth@0.2.0: {}
ejs@5.0.1: {}
electron-to-chromium@1.5.463: {}
@@ -9954,8 +9911,6 @@ snapshots:
emoji-regex@8.0.0: {}
emoji-regex@9.2.2: {}
enabled@2.0.0: {}
end-of-stream@1.4.5:
@@ -10251,7 +10206,7 @@ snapshots:
imurmurhash: 0.1.4
is-glob: 4.0.3
json-stable-stringify-without-jsonify: 1.0.1
minimatch: 10.2.6
minimatch: 11.0.9
natural-compare: 1.4.0
optionator: 0.9.4
optionalDependencies:
@@ -10411,11 +10366,6 @@ snapshots:
dependencies:
is-callable: 1.2.7
foreground-child@3.3.1:
dependencies:
cross-spawn: 7.0.6
signal-exit: 4.1.0
form-data@4.0.6:
dependencies:
asynckit: 0.4.0
@@ -10547,14 +10497,11 @@ snapshots:
dependencies:
is-glob: 4.0.3
glob@10.5.0:
glob@14.0.6:
dependencies:
foreground-child: 3.3.1
jackspeak: 3.4.3
minimatch: 9.0.9
minimatch: 11.0.9
minipass: 7.1.3
package-json-from-dist: 1.0.1
path-scurry: 1.11.1
path-scurry: 3.0.0
globals@15.15.0: {}
@@ -10874,12 +10821,6 @@ snapshots:
isexe@2.0.0: {}
jackspeak@3.4.3:
dependencies:
'@isaacs/cliui': 8.0.2
optionalDependencies:
'@pkgjs/parseargs': 0.11.0
jiti@2.7.0: {}
joi@18.2.9:
@@ -11176,12 +11117,9 @@ snapshots:
mini-svg-data-uri@1.4.4: {}
minimatch@10.2.5:
dependencies:
brace-expansion: 5.0.12
minimatch@10.2.6:
minimatch@11.0.9:
dependencies:
'@isaacs/nonrecursive-glob-match': 1.1.0
brace-expansion: 5.0.12
minimatch@3.1.5:
@@ -11192,10 +11130,6 @@ snapshots:
dependencies:
brace-expansion: 2.1.7
minimatch@9.0.9:
dependencies:
brace-expansion: 2.1.7
minimist@1.2.8: {}
minipass@7.1.3: {}
@@ -11332,7 +11266,7 @@ snapshots:
chokidar: 3.6.0
debug: 4.4.3(supports-color@5.5.0)
ignore-by-default: 1.0.1
minimatch: 10.2.6
minimatch: 11.0.9
pstree.remy: 1.1.8
semver: 7.8.5
simple-update-notifier: 2.0.0
@@ -11431,7 +11365,7 @@ snapshots:
mime-db: 1.52.0
mime-types: 2.1.35
mimic-fn: 2.1.0
minimatch: 10.2.5
minimatch: 11.0.9
minimist: 1.2.8
ms: 2.1.3
npm-run-path: 4.0.1
@@ -11654,8 +11588,6 @@ snapshots:
p-try@2.2.0: {}
package-json-from-dist@1.0.1: {}
package-manager-detector@0.2.11:
dependencies:
quansync: 0.2.11
@@ -11670,9 +11602,9 @@ snapshots:
path-parse@1.0.7: {}
path-scurry@1.11.1:
path-scurry@3.0.0:
dependencies:
lru-cache: 10.4.3
lru-cache: 11.5.2
minipass: 7.1.3
path-type@4.0.0: {}
@@ -11984,7 +11916,7 @@ snapshots:
rimraf@5.0.10:
dependencies:
glob: 10.5.0
glob: 14.0.6
rollup@4.62.4:
dependencies:
@@ -12283,12 +12215,6 @@ snapshots:
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
string-width@5.1.2:
dependencies:
eastasianwidth: 0.2.0
emoji-regex: 9.2.2
strip-ansi: 7.2.0
string-width@7.2.0:
dependencies:
emoji-regex: 10.6.0
@@ -12965,12 +12891,6 @@ snapshots:
string-width: 4.2.3
strip-ansi: 6.0.1
wrap-ansi@8.1.0:
dependencies:
ansi-styles: 6.2.3
string-width: 5.1.2
strip-ansi: 7.2.0
wrap-ansi@9.0.2:
dependencies:
ansi-styles: 6.2.3
+13
View File
@@ -21,3 +21,16 @@ overrides:
# @opentelemetry/sdk-node 0.218 and auto-instrumentations-node 0.76 (login) pin older versions
"@opentelemetry/core@<2.8.0": "^2.8.0"
"@opentelemetry/propagator-jaeger@<2.9.0": "^2.9.0"
# P05-SEC-02: exactly two vulnerable glob v10 parents (GHSA-3g3m-2fjr-6pw4).
# Parent-scoped major replacements require frozen build/regression CI acceptance.
"rimraf@5.0.10>glob": "14.0.6"
"archiver-utils@5.0.2>glob": "14.0.6"
# P05-SEC-02: five vulnerable minimatch v10 parents (GHSA-g3hv-75wg-m249).
# Do NOT expand this to a global override or change official Login auth code.
"@eslint/config-array@0.23.5>minimatch": "11.0.9"
"@typescript-eslint/typescript-estree@8.67.0>minimatch": "11.0.9"
"eslint@10.8.1>minimatch": "11.0.9"
"nodemon@3.1.14>minimatch": "11.0.9"
"nx@22.7.12>minimatch": "11.0.9"
+1 -1
View File
@@ -18,7 +18,7 @@ Snapshot: 2026-11-22, **Gitea P05-CI-03 Run #86 backend-only SUCCESS** on `03fb5
| Global ZITADEL SSO logout | No | N/A | No |
| Subscriptions, payments and SaaS billing | Outside ZitPlane scope | N/A | No |
| Gitea Actions CI verification workflow | Yes, P05 manual dispatch | Run #83 baseline, Run #86 backend SUCCESS, Run #87 3 PASS/1 FAIL (2 Moderate Login advisories) | Not deployed |
| Dependency Moderate security patch/acceptance | Account/Login Next.js and OTel patched manifests/locks, strict CI acceptance | Run #87: Account 0, Login 2 Moderate (`glob`, `minimatch`), High/Critical 0; **security acceptance BLOCKED** | Not deployed |
| Dependency Moderate security patch/acceptance | Account/Login Next.js/OTel patched in P05-SEC-01; P05-SEC-02 exact seven scoped glob/minimatch override candidates | Run #87: Account 0, Login 2 Moderate; **P05-SEC-02 frozen/build/audit CI pending**, so full clearance NOT YET VERIFIED | Not deployed |
| Gitea Actions CI and isolated integration tests | Backend-only workflow; interactive identity E2E remains absent | **Run #86 PASS:** disposable backend OIDC ready/discovery/JWKS, Postgres persistence, cleanup; authenticated user E2E pending | No |
| Coolify production stack, TLS, routing and backups | No | No | No |
| Public `auth.vib.tools/login` URL | Proposed only | No | No |
+1
View File
@@ -11,6 +11,7 @@ Every file listed below is a direct child of `docs/`. Add/remove rows whenever t
| [P05-CI-02.md](P05-CI-02.md) | TypeScript remediation, Gitea CI verification, dependency risk and isolation evidence | P05-CI-02 / run #83 done; Docker acceptance blocked |
| [P05-CI-03.md](P05-CI-03.md) | Isolated backend-only Gitea CI procedure, checks and exact run outcomes | P05-CI-03 / Run #86 SUCCESS |
| [P05-SEC-01.md](P05-SEC-01.md) | Source-grounded dependency security patches, advisory blockers and CI verification | P05-SEC-01 / Run #87 3 PASS/1 FAIL, 2 Moderate open |
| [P05-SEC-02.md](P05-SEC-02.md) | Seven scoped PNPM parent overrides, patched lock and manual Login-only security CI evidence | P05-SEC-02 / run pending |
| [SETUP-GUIDE.md](SETUP-GUIDE.md) | Operator/developer prerequisites, configs, activation and safety | DOCS-01 / active; runtime pending |
| [FEATURES-STATUS.md](FEATURES-STATUS.md) | Exact implemented/unavailable/unverified feature matrix | DOCS-01 / active |
| [TROUBLESHOOTING.md](TROUBLESHOOTING.md) | Known blockers and safe diagnosis based on source status | DOCS-01 / active |
+43
View File
@@ -0,0 +1,43 @@
# P05-SEC-02 — Login Transitive Security Remediation
**Date:** 2026-11-22
**Approved baseline:** `43eee54e7ad6b647e38491ac4dc28703547cf410`
**Status:** Targeted source patch prepared; **one Gitea security acceptance run pending**.
## Purpose
Resolve the two previously reproduced Login workspace Moderate dependency advisories while preserving the **original ZITADEL Login V2** UI, authentication logic, backend and Account Portal unchanged. This is dependency hygiene, not a feature/UI redesign or production deployment.
## Exact source-level resolution
Prior [Gitea Run #87](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87) passed Account security 0 advisories, Login pinned frozen install/build and **1,219/1,219 unit tests**, but failed Login security gate on:
| Advisory | Affected parent-to-child path | Fixed resolution | What it addresses |
| --- | --- | --- | --- |
| `GHSA-3g3m-2fjr-6pw4` | `rimraf@5.0.10 → glob@10.5.0` | `glob@14.0.6` | Unbounded work after cancelled glob traversal |
| Same | `archiver-utils@5.0.2 → glob@10.5.0` | `glob@14.0.6` | Same vulnerable package |
| `GHSA-g3hv-75wg-m249` | `@eslint/config-array@0.23.5 → minimatch@10.2.6` | `minimatch@11.0.9` | Path-pattern match amplification |
| Same | `@typescript-eslint/typescript-estree@8.67.0 → minimatch@10.2.6` | `minimatch@11.0.9` | Same vulnerable package |
| Same | `eslint@10.8.1 → minimatch@10.2.6` | `minimatch@11.0.9` | Same vulnerable package |
| Same | `nodemon@3.1.14 → minimatch@10.2.6` | `minimatch@11.0.9` | Same vulnerable package |
| Same | `nx@22.7.12 → minimatch@10.2.5` | `minimatch@11.0.9` | Same vulnerable package |
Both selected fixed versions are published and support Node 22. The exact 7 parent-specific PNPM overrides are in `auth/ui/v2/pnpm-workspace.yaml`; `auth/ui/v2/pnpm-lock.yaml` is generated using **pnpm 10.30.3 lockfile-only**, no local application dependency installation or executable build. The former `glob@10.5.0 → minimatch@9.0.9` edge disappears once the vulnerable glob is replaced. Non-vulnerable `minimatch@3.1.5` and `5.1.9` remain on purpose.
**Compatibility caveat:** These are deliberate semver-major *transitive* replacements scoped narrowly to exact parents. They are **not** declared safe without a real Gitea frozen installation, build, upstream unit suite and registry audit. Source snapshot closure alone is not an acceptance PASS.
## CI verification
In Gitea Actions choose the existing **ZitPlane P05 Dependency Security Acceptance (SEC-01/02)** workflow and manually dispatch `main` with the **`login_only=true`** input for this phase.
The workflow preserves default `login_only=false` (full previous Account + Login jobs) but this selected run must skip the previously accepted Account jobs. It first checks exact seven parent-selector contracts using `tests/ci/transitive_override_contract.py`, then `pnpm@10.30.3 install --frozen-lockfile`, Nx proto/client/Login production standalone build, upstream Vitest regressions, and independent **fail-closed** Login `pnpm audit --prod` High/Critical and zero Moderate+ gates.
**Acceptance requires all of:** Login-only build job PASS, frozen install and correct pinned overrides, all focused upstream unit tests PASS, live Login audit **0 Moderate, 0 High, 0 Critical**, exact evidence and source-only patch audit.
## Explicit exclusions
No `users/ui/**` changes, original Login source/route/callback/UI changes, Go backend or developer Compose, real users/credentials, local application test/build, production deployment, tags or release. Login/Account authenticated OIDC callback and MFA end-to-end acceptance remain future scope. Existing untracked `AI_INSTRUCTIONS.md` is preserved.
## Real Gitea acceptance ledger
**PENDING:** one focused run, tested source SHA, actual Login build/unit/security jobs, distinct skipped Account jobs, audit counts and cleanup/evidence. **Do not claim zero advisories before terminal CI evidence.** Detailed pre-edit root-cause proof and implementation log: `notes/P05-SEC-02.md`. Dependency source map: `project/DEPENDENCY-SECURITY.md`.
+6
View File
@@ -59,6 +59,12 @@ Implement one explicitly approved phase at a time. Keep out-of-scope files, exis
- Direct Next.js pinned 16.4.6; Login coordinated OTel auto-instrumentation 0.80.0 / SDK 0.222.0 family, PNPM/npm metadata-only lockfile reconciliation. Root overrides are read-only, so glob14/minimatch11 major transitive remediation remains an explicit blocker if registry audit reproduces it.
- **Gitea Run #87**, tested SHA `752d243ae8fb24ce3cfa990343082e2d0431306b`: 3 job PASS (Account npm frozen typecheck/build/anonymous regressions, Login pnpm frozen Nx build + 1219/1219 unit tests, Account security 0), Login security FAIL on 2 Moderate transitive advisories (`glob` and `minimatch`), High/Critical 0. Prior 19 reported records reduced to 2; **full security acceptance BLOCKED**. Only one CI run, no local app build/test/dev server, no backend/production change. Exact result: `notes/P05-SEC-01.md`, `docs/P05-SEC-01.md`.
## P05-SEC-02 - Final Transitive Dependency Remediation (APPROVED 2026-11-22)
- Baseline `43eee54e7ad6b647e38491ac4dc28703547cf410`; prior Gitea Run #87: 3 PASS/1 FAIL, only 2 Login Moderate GHSA (`glob`/`minimatch`) remaining, Account audit 0.
- Exact Scope Lock: `auth/ui/v2/pnpm-workspace.yaml`, `pnpm-lock.yaml`, justified root or Login dependency manifests only, `.gitea/workflows/p05-security-acceptance.yml`, focused `tests/ci/**`, notes/project/docs and associated README/MINIFEST. **Login/auth/UI source, users/ui/**, Go backend, developer Compose, other packages and production READ-ONLY.** Preserve untracked AI_INSTRUCTIONS.md.
- Seven **exact parent-scoped** overrides: two glob10 parents → glob14.0.6, five minimatch10 parents → minimatch11.0.9. No broad global major override; pinned PNPM 10.30.3 metadata-only lockfile regeneration; compatibility subject to CI proof.
- Existing Gitea security workflow `workflow_dispatch.inputs.login_only=true`: skip previously accepted Account jobs; focused Login pinned frozen install, exact resolution contract, Nx production build + upstream Vitest, live fail-closed High/Critical and zero Moderate+ audit. **Exactly one CI cycle**, no local app builds/tests, no production deployment. Final evidence: `notes/P05-SEC-02.md` and `docs/P05-SEC-02.md`.
## P05 - Full Integration (proposed, NOT approved)
Shared design system, production-safe Compose topology and verified Login/Account OIDC wiring. No live deployment; separate approval.
+1 -1
View File
@@ -26,4 +26,4 @@
Full update policy is in root [AGENTS.md](../AGENTS.md). A list of available docs is in [MINIFEST.md](MINIFEST.md).
For Gitea Run #87 security patch evidence and its two remaining Moderate advisory blockers see [P05-SEC-01.md](P05-SEC-01.md). For backend-only isolated runtime verification see [P05-CI-03.md](P05-CI-03.md); for initial full workflow and its limitations see [P05-CI-01.md](P05-CI-01.md). A green backend discovery smoke is not an authenticated user-login result.
For the seven targeted `glob`/`minimatch` remediation candidates and manual focused Login-only CI instructions see [P05-SEC-02.md](P05-SEC-02.md). For Gitea Run #87 findings see [P05-SEC-01.md](P05-SEC-01.md). For backend-only isolated runtime verification see [P05-CI-03.md](P05-CI-03.md); for initial full workflow and its limitations see [P05-CI-01.md](P05-CI-01.md). A green backend discovery smoke is not an authenticated user-login result.
+5
View File
@@ -84,3 +84,8 @@ On Gitea `vibtools/ZitPlane` open Actions → `ZitPlane P05-SEC-01 Dependency Se
**P05-SEC-01 actual evidence:** [Run #87](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87) verified Account/Login frozen dependency installs, production builds and **1219/1219** Login unit tests; the Account security audit is clean. However Login `glob` and `minimatch` each still have one Moderate advisory, and the strict security job correctly **failed**. Production usage and package-security acceptance remain blocked until separate transitive-remediation approval and CI. No local application tests or deployment.
## P05-SEC-02 — focused Login-only dependency security acceptance
Gitea `vibtools/ZitPlane` → Actions → **ZitPlane P05 Dependency Security Acceptance (SEC-01/02)** → manual Run workflow on `main`, set **`login_only=true`**. This option deliberately skips Account build/security jobs already accepted in Run #87. Only the frozen official Login workspace install, source-level seven-override contract, proto/client/Next standalone build + upstream unit suite and live production pnpm vulnerability gate execute. The expected security threshold is **0 Moderate, 0 High, 0 Critical**. The authenticated OIDC end-to-end flow and production deployment are **not** part of the dependency gate. See `docs/P05-SEC-02.md`.
+5
View File
@@ -35,3 +35,8 @@ Account Portal and Login V2 build CI passed in Run #83, disposable backend accep
## P05-SEC-01 exact security-blocker troubleshooting
Gitea Run #87 produced 3 PASS and 1 FAIL. The FAILED `security_login` job is a **deliberate fail-closed Moderate threshold**: `GHSA-3g3m-2fjr-6pw4` in `glob` (fix >=14.0.2) and `GHSA-g3hv-75wg-m249` in `minimatch` (fix >=11.0.1). Account npm audit returned 0. Login's earlier Next.js/OTel advisories no longer reproduce, its frozen build and 1219 tests PASS, and High/Critical remain 0. Do not turn off auditing, ignore Moderate reports, modify protected auth code or force incompatible package majors. A separate P05-SEC-02 exact Scope Lock must allow controlled PNPM workspace overrides or verified compatible parent upgrades; only a new focused CI run can close security acceptance.
## P05-SEC-02 — scoped major transitive override troubleshooting
If a frozen Login install, Nx build or unit suite fails after this patch, verify the seven exact `parent@version>dependency` selectors in `auth/ui/v2/pnpm-workspace.yaml` and the matching `pnpm-lock.yaml` snapshots; compare with `notes/P05-SEC-02.md`. `glob@14` and `minimatch@11` are semver-major transitive substitutions, so historical parents expecting v10 APIs may need a separately approved compatible parent upgrade. **Do not** apply global overrides, blanket `pnpm audit --fix`, disable the strict zero-Moderate gate, or edit protected Login authentication code. Full security acceptance requires current CI frozen install/build/Vitest and registry audit, not just a clean lockfile.
+1
View File
@@ -13,5 +13,6 @@ This is the chronological **index**. Phase-specific scope/implementation evidenc
| 2026-11-22 | P05-CI-02 | Narrow Auth.js TS2345 fix, CI negative tests, advisory triage and post-run portless override | Run #83: Account/Login/Security PASS, Docker FAIL on host 8080; cleanup PASS; portless override unverified. [Evidence](P05-CI-02.md) |
| 2026-11-22 | P05-CI-03 | Backend-only Gitea verification of portless Compose, 4 services, Postgres persistence, OIDC/JWKS and safe cleanup | **Run #86 SUCCESS** on `03fb589`, no unrelated suites rerun; [evidence](P05-CI-03.md) |
| 2026-11-22 | P05-SEC-01 | Next.js 16.4.6, compatible OTel instrumentation, frozen locks and strict advisory gates | Run #87: 3 PASS/1 FAIL; 17/19 prior findings no longer reported, 2 Moderate Login blockers. [Evidence](P05-SEC-01.md) |
| 2026-11-22 | P05-SEC-02 | Seven exact parent overrides for glob/minimatch, pinned PNPM lock metadata and focused Login-only CI | Source prepared, one CI acceptance run pending. [Plan/evidence](P05-SEC-02.md) |
Rules: Append new phases or fixes; never silently rewrite a past result. Separate **implemented**, **verified**, **blocked**, and **proposed**. Never log a user secret or personal data.
+1
View File
@@ -9,6 +9,7 @@
| [P05-CI-02.md](P05-CI-02.md) | Auth.js narrow patch, isolated Gitea CI gate, advisory triage and exact acceptance evidence | P05-CI-02 / run #83 completed; residual Docker gate blocked |
| [P05-CI-03.md](P05-CI-03.md) | Backend-only pre-change scope, disposable CI run evidence and exact acceptance result | P05-CI-03 / Run #86 SUCCESS; acceptance complete |
| [P05-SEC-01.md](P05-SEC-01.md) | Pre-change security scope, remediation, exact advisory evidence, one CI run and closure | P05-SEC-01 / Run #87 completed, 2 Moderate open |
| [P05-SEC-02.md](P05-SEC-02.md) | Exact root chain, seven PNPM parent overrides, one focused Gitea CI and closure evidence | P05-SEC-02 / source prepared, run pending |
| [CHANGELOG.md](CHANGELOG.md) | Short append-only chronological phase log and links to detailed reports | DOCS-01 / active |
Update this manifest whenever any direct child file or directory changes. Use **actual source state**; a planned file must be labeled planned, not present.
+34
View File
@@ -0,0 +1,34 @@
# ZitPlane P05-SEC-02 — Final Transitive Dependency Remediation
**Date:** 2026-11-22
**Approved baseline:** `43eee54e7ad6b647e38491ac4dc28703547cf410`
**Prior evidence:** Gitea Run [#87](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87): 3 PASS / 1 FAIL, Login security 2 Moderate; Account vulnerability audit 0; Login frozen install + production build + 1219/1219 unit tests PASS.
**State:** APPROVED / PRE-CHANGE SCOPE LOCK — no P05-SEC-02 source edits yet.
## Exact approved Scope Lock
Allowed source writes: `auth/ui/v2/pnpm-workspace.yaml`, `auth/ui/v2/pnpm-lock.yaml`, and only if justified `auth/ui/v2/package.json`, `auth/ui/v2/apps/login/package.json`; narrowly related `.gitea/workflows/p05-security-acceptance.yml`, `tests/ci/**`; `notes/**`, `project/**`, relevant `docs/**` and applicable README/MINIFEST.
Read-only: original official Login V2 application/auth/UI source, `users/ui/**`, `core/backend/zitadel/**`, `deployment/docker/**`, other packages, production configuration, secrets and unrelated files. Preserve untracked `AI_INSTRUCTIONS.md`.
No local application builds, installs, tests, dev servers or Docker. **Only a pinned pnpm metadata-only lockfile reconciliation is authorized locally**; do not install dependencies, run application code, or rewrite extra files. Exactly **one** focused Gitea CI cycle after source commit/push; no repeated loops. Record actual PASS/FAIL, cleanup and remote SHA.
## Pre-edit exact root-cause proof (read-only source lock + live npm registry metadata)
**Advisories:**
1. `GHSA-3g3m-2fjr-6pw4` — vulnerable `glob@10.5.0`, advisory affected >=9.0.0 <=14.0.1, patched >=14.0.2. Current graph only **2 direct vulnerable edges**: `rimraf@5.0.10 → glob@10.5.0` (parent range `^10.3.7`), `archiver-utils@5.0.2 → glob@10.5.0` (parent range `^10.0.0`). An additional `glob@10.5.0 → minimatch@9.0.9` edge will disappear when its parent is no longer installed.
2. `GHSA-g3hv-75wg-m249` — vulnerable `minimatch@10.2.5/10.2.6` and `minimatch@9.0.9` through old glob, affected >=7.0.0 <11.0.1, patched >=11.0.1. Five direct pinned edges: `@eslint/config-array@0.23.5 → minimatch@10.2.6` (range `^10.2.4`), `@typescript-eslint/typescript-estree@8.67.0 → minimatch@10.2.6` (range `^10.2.2`), `eslint@10.8.1 → minimatch@10.2.6` (range `^10.2.5`), `nodemon@3.1.14 → minimatch@10.2.6` (range `^10.2.1`), `nx@22.7.12 → minimatch@10.2.5` (exact `10.2.5`).
**Registry candidate patch:** `glob@14.0.6` is published; Node engine `18 || 20 || >=22`, depends on `minimatch@^11.0.5`. `minimatch@11.0.9` is published; Node engine `20 || >=22`. Gitea runner is Node 22. Both exports include CommonJS/ESM support. **Semver-major compatibility is a risk**, not guaranteed; only new frozen install/build/unit/security CI validates it. No blind global `glob@<14>glob` or global `minimatch@<11>` override.
## Narrow proposed patch and plan (must be completed only after this note)
1. Insert exactly **7 direct parent-scoped PNPM workspace overrides**: `rimraf@5.0.10>glob`, `archiver-utils@5.0.2>glob` pinned `14.0.6`; `@eslint/config-array@0.23.5>minimatch`, `@typescript-eslint/typescript-estree@8.67.0>minimatch`, `eslint@10.8.1>minimatch`, `nodemon@3.1.14>minimatch`, `nx@22.7.12>minimatch` pinned `11.0.9`. Preserve all existing workspace members/overrides and Login/application manifests.
2. Run only `pnpm@10.30.3 install --lockfile-only --ignore-scripts` with frozen lock disabled to regenerate reproducible PNPM v9 metadata. No project node_modules. Confirm **no old vulnerable versions/edges remain**, unchanged importers and exactly seven scoped overrides.
3. Use existing dedicated manual Gitea security acceptance workflow's pinned PNPM frozen install, Login Nx production build, upstream Vitest and HIGH/CRITICAL plus strict **zero Moderate/High/Critical** live audit. If needed, narrowly scope this single run to Login jobs without changing production/app logic; do not claim full acceptance on source appearance alone.
4. Exact source/security diff audit; update docs, notes, project manifests; commit, push Gitea main; dispatch **one** focused CI run. Document tested source SHA, all job results and any remaining failing advisories/blockers honestly; final docs-only commit/push and remote verification.
## Acceptance contract
PASS only when exact vulnerable `glob/minimatch` resolved versions are absent from lock, pinned PNPM **frozen install PASS**, official Login V2 Nx production build and targeted upstream unit regressions PASS, and live Login **pnpm audit --prod** reports **zero Moderate/High/Critical**. A blocking failure is documented, never bypassed. Account security previously zero in Run #87; authenticated OIDC/MFA/production are separate phases.
**Execution evidence:** PENDING source patch and one Gitea CI run.
+1
View File
@@ -13,6 +13,7 @@ This is the **developer-focused implementation history**. `notes/CHANGELOG.md` i
| 2026-11-22 | P05-CI-02 | Type-safe Auth.js subject narrowing, Account anonymous negative tests, Login regression, structured advisory triage and CI-only portless Docker override | Run #83: 3 PASS/1 FAIL; Docker proxy 8080 collision, cleanup PASS, portless fix unverified; see `notes/P05-CI-02.md` |
| 2026-11-22 | P05-CI-03 | Dedicated manual backend-only CI acceptance, guarded disposable Compose, persistence/ready/JWKS probes and owned-state cleanup | **Gitea Run #86 SUCCESS** on `03fb589`; all steps PASS; `notes/P05-CI-03.md` |
| 2026-11-22 | P05-SEC-01 | Next.js/OTel minimal security manifests, reproducible locks, dedicated CI and strict Moderate+ gates | Run #87: Account/Login build PASS, Login Vitest 1219/1219, Account audit 0, Login 2 Moderate open; `notes/P05-SEC-01.md` |
| 2026-11-22 | P05-SEC-02 | Seven parent-targeted glob/minimatch patched resolutions, PNPM lockfile metadata-only and manual Login-only CI guard | Run pending; `notes/P05-SEC-02.md`, `project/DEPENDENCY-SECURITY.md` |
## Required entry for each future change
+9
View File
@@ -96,3 +96,12 @@ Only approved manifest and lockfile metadata were patched; original Login/auth/A
## P05-SEC-01 Run #87 terminal job results
Manual [Run #87](https://dev.ivib.cc/vibtools/ZitPlane/actions/runs/87) tested `752d243`. Account job #185 PASS; Login job #186 PASS (frozen pnpm, Nx Next 16.4.6 build and 1219 unit cases); Account security job #187 PASS at all levels with 0 findings; Login security job #188 FAIL on **two Moderate** `glob`/`minimatch` advisories (0 High/Critical). The strict `tests/ci/security_advisory_gate.py` did not suppress them, so **overall run FAILURE** is expected and correct. Full source/security acceptance remains blocked pending a separate narrow transitive dependency phase; no repeated run or application source change.
## P05-SEC-02 — focused Login-only CI acceptance mode
Existing manual `.gitea/workflows/p05-security-acceptance.yml` now offers `workflow_dispatch.inputs.login_only` (default false retains the prior full Account/Login jobs). For **this** phase dispatch **`login_only=true`**, which conditionally skips `account` and `security_account` jobs; only `login` and `security_login` should execute. No production secrets or remote identity client.
`login` starts with CI-only `python3 ../../../tests/ci/transitive_override_contract.py` for the exact seven owned parent overrides and no affected glob/minimatch lock versions, then pinned PNPM frozen install, upstream proto/client/Login standalone build and full `vitest --run` regressions. `security_login` uses existing production PNPM HIGH/CRITICAL audit and independent JSON detail + zero Moderate+ gate; **no suppression**. Both jobs must conclude SUCCESS before declaring P05-SEC-02 accepted. The historical Account zero-vulnerability proof is Gitea Run #87, **not retested** in this focused phase.
A single manual run is authorized; Git source commit/push precedes dispatch, and final evidence-only documentation commit/push follows without a second run. Source-only audit and actual runner results are distinct; see `notes/P05-SEC-02.md` and `docs/P05-SEC-02.md`.
+13
View File
@@ -53,3 +53,16 @@ Expected patched direct candidates: Next.js `16.4.6` both apps; Login `@opentele
- 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.
+13
View File
@@ -150,3 +150,16 @@ P02 dev Compose, core backend helper, Login V2 source, Account Portal and all de
| `notes/P05-SEC-01.md`, `docs/P05-SEC-01.md` | Pre-change plan, source patch provenance, actual run results and operator guidance |
**Read-only:** `auth/ui/v2/pnpm-workspace.yaml`, all `users/ui/src/**`, original Login V2 components/logic, backend/Compose and unrelated monorepo packages.
## P05-SEC-02 — focused transitive dependency file map
| Path | Exact responsibility |
| --- | --- |
| `auth/ui/v2/pnpm-workspace.yaml` | Seven exact **parent-targeted** glob/minimatch major fixes; previous workspace overrides unchanged |
| `auth/ui/v2/pnpm-lock.yaml` | Pinned PNPM v10.30.3 lock metadata, patched transitive versions, original four importers |
| `.gitea/workflows/p05-security-acceptance.yml` | Optional `login_only=true` manual dispatch, no Account rerun; Login install/build/unit and independent production strict security audit |
| `tests/ci/transitive_override_contract.py` | CI checks only seven exact parent overrides; old affected package versions absent; parents resolve patched version |
| `notes/P05-SEC-02.md`, `docs/P05-SEC-02.md` | Pre-edit parent-chain evidence, exact patch and actual run outcome |
Official Login V2 user/auth source, user Account Portal, backend Compose and production infrastructure remain unmodified.
+7
View File
@@ -109,3 +109,10 @@ The scripts execute in the **Gitea Actions** runner, not on the local developer
`tests/ci/security_advisory_gate.py` owns `main()`: it reads one npm or pnpm production registry audit JSON report, checks for report errors, validates required numeric severity counters and matching npm vulnerable-package or pnpm advisory records, prints the actual counts and **returns a failing CI exit code** if Moderate, High or Critical count is nonzero. Invalid or missing report information is also an error. It does **not** modify package manifests, bypass audit rules or accept a waived advisory. The upstream helper `tests/ci/advisory_triage.py` still displays exact GHSA/package/fix records and remains unchanged.
Workflow shell commands are written directly under `.gitea/workflows/p05-security-acceptance.yml`. No application runtime function or auth code changed in this phase.
## P05-SEC-02 — CI contract helper
`tests/ci/transitive_override_contract.py::main()` reads the existing `auth/ui/v2/pnpm-workspace.yaml` and resolved `pnpm-lock.yaml` (no network or side effects), verifies exactly seven parent-specific override selectors, checks the four required PNPM importers, rejects any known affected glob (>=9 <=14.0.1) or minimatch (>=7 <11.0.1) snapshot, and asserts that all seven parent dependencies resolve to the exact patched version. Failure returns nonzero in CI; it does not hide audit failures or alter dependencies.
Existing `tests/ci/security_advisory_gate.py` remains the independent **live registry report** gate, rejecting malformed reports and any Moderate/High/Critical finding. A clean lockfile alone cannot prove that the live advisory audit passes.
+7
View File
@@ -66,3 +66,10 @@ Run #86 on commit `03fb589` executed a backend-only manual Gitea Actions job and
**P05-SEC-01 Gitea verification result:** Run #87 on `752d243` proved both frozen installs and production builds, and the Login upstream unit suite **1219/1219 PASS**. Account production audit returned 0 vulnerabilities. Login production audit returned **2 Moderate transitive issues** (glob 14.x and minimatch 11.x patch lines require compatible override/parent work) and zero High/Critical. The strict Moderate gate **failed as intended**. Do not interpret the patched manifest/lockfile as full vulnerability clearance; P05-SEC-02 needs a newly approved change to the read-only PNPM workspace overrides.
## P05-SEC-02 — targeted PNPM workspace security patch
Pre-change source and registry metadata identified two direct `glob@10.5.0` parents and five direct `minimatch@10.2.5/10.2.6` parents. The seven *parent-specific* root workspace overrides point to published `glob@14.0.6` and `minimatch@11.0.9` (Node 22 supported). Pinned PNPM `10.30.3 install --lockfile-only --ignore-scripts --no-frozen-lockfile` generated only lock metadata without app installation/build/tests. `glob@14` now depends on patched `minimatch@11`; `minimatch@3/5` are unaffected by the reported GHSA version ranges.
These are **major** dependency migrations underneath older parents, not an upstream source edit. Only a green Gitea Login Nx production build and upstream unit tests, frozen PNPM install and registry audit can certify compatibility and advisory clearance. The existing security workflow has a manual `login_only=true` focused mode; previously accepted Account results remain from Run #87.
+23 -20
View File
@@ -1,27 +1,27 @@
# Source inventory ? all Git-tracked paths
# Git-tracked source inventory ? exact paths
**Snapshot:** 2026-11-22, P05-SEC-01 source and docs on approved baseline `1a60255`; Gitea Run #87 tested source commit `752d243` (3 PASS / 1 FAIL, 2 Moderate transitive advisories still open). Later documentation-only commit not a new CI test.
**Snapshot:** 2026-11-22, P05-SEC-02 source preparation from approved baseline `43eee54`. **The focused Gitea SEC-02 CI has not yet run.**
**Exact Git-tracked paths: 729.** Original upstream source semantics unchanged; untracked `AI_INSTRUCTIONS.md` and ignored local secrets excluded.
**Git-tracked paths: 732.** Untracked `AI_INSTRUCTIONS.md` and ignored secrets excluded.
This is a source locator, not proof of security acceptance. See `project/DEPENDENCY-SECURITY.md` for patch/advisory provenance and `notes/P05-SEC-01.md` for actual CI outcome.
This is a complete Git path inventory, not verification of interactive OIDC, application behavior or production. See `project/DEPENDENCY-SECURITY.md` and `notes/P05-SEC-02.md`.
| Top-level group | Files | Ownership |
| Group | Paths | Responsibility |
| --- | ---: | --- |
| `(repository root)` | 6 | Git-tracked root |
| `.gitea` | 7 | Manual Gitea CI workflows |
| `auth` | 639 | Original official Login V2 source plus security-only dependency metadata |
| `(repository root)` | 6 | Repository root |
| `.gitea` | 7 | Manual Gitea workflows |
| `auth` | 639 | Official Login V2 source and scoped PNPM dependency metadata |
| `core` | 2 | Backend dev orchestration |
| `deployment` | 2 | Dev-only Compose |
| `docs` | 16 | User/operator guides |
| `notes` | 8 | Pre-change plans/evidence |
| `packages` | 1 | Shared package placeholder |
| `project` | 11 | Developer file/functions/security maps |
| `scripts` | 1 | Script placeholder |
| `tests` | 12 | Focused CI contracts/verification tools |
| `users` | 24 | Account Portal/approved manifest and lock |
| `deployment` | 2 | Developer Compose |
| `docs` | 17 | User/operator guidance |
| `notes` | 9 | Scope and audit evidence |
| `packages` | 1 | First-party placeholder |
| `project` | 11 | Developer function/file/security maps |
| `scripts` | 1 | First-party placeholder |
| `tests` | 13 | Focused CI tooling |
| `users` | 24 | Read-only Account Portal |
## Exact Git-tracked paths
## Exact tracked paths
### (repository root) ? 6 files
@@ -694,7 +694,7 @@ This is a source locator, not proof of security acceptance. See `project/DEPENDE
- `deployment/README.md`
- `deployment/docker/compose.backend.dev.yaml`
### docs ? 16 files
### docs ? 17 files
- `docs/ARCHITECTURE.md`
- `docs/DEVELOPMENT.md`
@@ -707,13 +707,14 @@ This is a source locator, not proof of security acceptance. See `project/DEPENDE
- `docs/P05-CI-02.md`
- `docs/P05-CI-03.md`
- `docs/P05-SEC-01.md`
- `docs/P05-SEC-02.md`
- `docs/PHASES.md`
- `docs/README.md`
- `docs/SETUP-GUIDE.md`
- `docs/TROUBLESHOOTING.md`
- `docs/USER-GUIDE.md`
### notes ? 8 files
### notes ? 9 files
- `notes/CHANGELOG.md`
- `notes/DOCS-01.md`
@@ -722,6 +723,7 @@ This is a source locator, not proof of security acceptance. See `project/DEPENDE
- `notes/P05-CI-02.md`
- `notes/P05-CI-03.md`
- `notes/P05-SEC-01.md`
- `notes/P05-SEC-02.md`
- `notes/README.md`
### packages ? 1 files
@@ -746,7 +748,7 @@ This is a source locator, not proof of security acceptance. See `project/DEPENDE
- `scripts/README.md`
### tests ? 12 files
### tests ? 13 files
- `tests/README.md`
- `tests/ci/MINIFEST.md`
@@ -759,6 +761,7 @@ This is a source locator, not proof of security acceptance. See `project/DEPENDE
- `tests/ci/oidc_discovery.py`
- `tests/ci/security_advisory_gate.py`
- `tests/ci/source_contract.py`
- `tests/ci/transitive_override_contract.py`
- `tests/test_backend_dev.py`
### users ? 24 files
+1
View File
@@ -12,3 +12,4 @@
| [backend_acceptance.sh](backend_acceptance.sh) | Backend-only runner preflight, four-service health, Postgres restart marker and OIDC/JWKS CI checks | P05-CI-03 |
| [backend_cleanup.sh](backend_cleanup.sh) | Always-run cleanup of marked CI-owned Compose project/volumes, with leftover verification | P05-CI-03 |
| [security_advisory_gate.py](security_advisory_gate.py) | Strict CI registry JSON gate: rejects incomplete reports and any Moderate/High/Critical finding | P05-SEC-01 |
| [transitive_override_contract.py](transitive_override_contract.py) | Verify exact seven parent-scoped patched PNPM overrides and no known vulnerable resolved lock entries | P05-SEC-02 |
+2
View File
@@ -16,4 +16,6 @@ No real credentials or production domains are used. Never print bootstrap PATs,
- `security_advisory_gate.py` (P05-SEC-01) takes npm or pnpm registry audit JSON, rejects missing/errored/inconsistent metadata and requires **zero Moderate/High/Critical findings**. It is independent of the existing HIGH+ audit command and `advisory_triage.py` detailed advisory ID report. **Gitea Run #87** proved Account audit 0 and Login audit **2 Moderate** (`glob`, `minimatch`); strict Login gate correctly FAILED. Dedicated `.gitea/workflows/p05-security-acceptance.yml` is manual only; frozen installs/builds are CI-only and passed 1219/1219 Login unit regressions.
- `transitive_override_contract.py` (P05-SEC-02) validates exactly seven parent-scoped PNPM override selectors, absence of known advisory-affected glob/minimatch lock entries, preserved importer structure and each exact patched parent resolution. This is **source-only** and not a live security audit; still require strict Gitea registry `security_advisory_gate.py`, frozen pnpm install, Nx production build and unit suite. Trigger the existing Gitea security workflow with manual `login_only=true`; Account build/security jobs should be skipped.
Add new CI checks and update `MINIFEST.md`, `project/`, `docs/`, and `notes/` in the same approved phase.
+95
View File
@@ -0,0 +1,95 @@
"""P05-SEC-02: read-only PNPM targeted override and locked-resolutions contract.
Invoked in Gitea CI before frozen install. Deliberately no application execution
and no allowance for global/broad major-version overrides.
"""
from __future__ import annotations
from pathlib import Path
import re
import sys
ROOT = Path(__file__).resolve().parents[2]
WORKSPACE = ROOT / "auth/ui/v2"
GLOB_VERSION = "14.0.6"
MINIMATCH_VERSION = "11.0.9"
EXPECTED = {
"rimraf@5.0.10>glob": GLOB_VERSION,
"archiver-utils@5.0.2>glob": GLOB_VERSION,
"@eslint/config-array@0.23.5>minimatch": MINIMATCH_VERSION,
"@typescript-eslint/typescript-estree@8.67.0>minimatch": MINIMATCH_VERSION,
"eslint@10.8.1>minimatch": MINIMATCH_VERSION,
"nodemon@3.1.14>minimatch": MINIMATCH_VERSION,
"nx@22.7.12>minimatch": MINIMATCH_VERSION,
}
def overridden(data: str) -> dict[str, str]:
found: dict[str, str] = {}
for line in data.splitlines():
match = re.match(r"^ ['\"]?([^'\"#][^:]*>[^:'\"]+)['\"]?: ['\"]?([^'\" #]+)", line)
if match:
found[match.group(1)] = match.group(2).rstrip("'\":")
return found
def main() -> None:
work = (WORKSPACE / "pnpm-workspace.yaml").read_text(encoding="utf-8")
lock = (WORKSPACE / "pnpm-lock.yaml").read_text(encoding="utf-8")
if "lockfileVersion: '9.0'" not in lock:
raise AssertionError("Unexpected pnpm lock format")
if not lock.startswith("lockfileVersion:"):
raise AssertionError("Unexpected lock header")
before, after = lock.split("\nimporters:\n", 1)
expected = EXPECTED
found_workspace = overridden(work)
found_lock = overridden(before)
if found_workspace != expected:
raise AssertionError(f"Unexpected workspace parent-scoped overrides: {found_workspace!r}")
if found_lock != expected:
raise AssertionError(f"Lock and source override selectors diverged: {found_lock!r}")
if " - apps/login\n" not in work:
raise AssertionError("Official Login importer removed")
for part in (" apps/login:", " packages/zitadel-client:", " packages/zitadel-proto:"):
if part not in after:
raise AssertionError(f"Required importer missing: {part}")
# The package + snapshot registry sections (not arbitrary free text) must
# have no glob >=9 <=14.0.1 or minimatch >=7 <11.0.1.
for line in lock.splitlines():
m = re.match(r"^ ['\"]?(glob|minimatch)@([0-9]+)\.([0-9]+)\.([0-9]+)(?:['\"]?[:(]|:)", line)
if not m:
continue
name = m.group(1)
version = tuple(int(m.group(i)) for i in range(2, 5))
if name == "glob" and (9, 0, 0) <= version <= (14, 0, 1):
raise AssertionError(f"Vulnerable glob lock entry: {line.strip()}")
if name == "minimatch" and (7, 0, 0) <= version < (11, 0, 1):
raise AssertionError(f"Vulnerable minimatch lock entry: {line.strip()}")
if " glob@14.0.6:" not in lock or " minimatch@11.0.9:" not in lock:
raise AssertionError("Patched glob/minimatch snapshot not present")
snapshots = lock.split("\nsnapshots:\n", 1)[1]
refs: dict[str, list[tuple[str, str]]] = {}
for block in re.split(r"(?m)^ (?=\S)", snapshots):
header = block.splitlines()[0].rstrip(":").strip().strip("'")
for ln in block.splitlines():
m = re.match(r"^ (glob|minimatch): ([0-9]+\.[0-9]+\.[0-9]+)", ln)
if m:
refs.setdefault(header, []).append((m.group(1), m.group(2)))
for selector, version in expected.items():
parent, name = selector.rsplit(">", 1)
matches = [refs[key] for key in refs if key == parent or key.startswith(parent + "(")]
if len(matches) != 1 or (name, version) not in matches[0]:
raise AssertionError(f"Parent {parent} does not resolve exact {name}@{version}")
print("ZITPLANE_EXACT_SEVEN_PARENT_OVERRIDES_PASS")
print("ZITPLANE_GLOB_MINIMATCH_PATCHED_LOCK_CONTRACT_PASS")
if __name__ == "__main__":
try:
main()
except (AssertionError, ValueError, FileNotFoundError, IndexError) as exc:
print(f"ZITPLANE_TRANSITIVE_OVERRIDE_CONTRACT_FAIL: {exc}", file=sys.stderr)
raise SystemExit(1)