fix(security): patch Next and OpenTelemetry dependencies with CI gates
This commit is contained in:
1 parent
1a602551ad
commit
752d243ae8
29 files changed
+1138
-9280
No files matched your search
@@ -6,3 +6,4 @@
|
||||
| [MINIFEST.md](MINIFEST.md) | Workflow directory file inventory | P05-CI-01 |
|
||||
| [p05-ci.yml](p05-ci.yml) | Isolated account/login/backend CI verification on Gitea | P05-CI-01/P05-CI-02 |
|
||||
| [p05-backend-acceptance.yml](p05-backend-acceptance.yml) | Manual backend-only disposable Compose, persistence and OIDC acceptance; no Account/Login build rerun | P05-CI-03 |
|
||||
| [p05-security-acceptance.yml](p05-security-acceptance.yml) | Manual isolated Account/Login frozen builds, security advisory triage and strict Moderate+ gate | P05-SEC-01 |
|
||||
@@ -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-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. Both security jobs require the previous HIGH/CRITICAL gate and a separate STRICT zero Moderate/High/Critical threshold from `tests/ci/security_advisory_gate.py`; any remaining Moderate advisory blocks the security phase. No source authentication changes, deployment or secret use. 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`.
|
||||
|
||||
**Run #81 evidence:** backend's first revision failed during checkout because Alpine had no Git. Added a pre-checkout Git installation afterward; the corrected backend job remains **UNVERIFIED** until a separately approved CI rerun. See `docs/P05-CI-01.md`.
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
name: ZitPlane P05-SEC-01 Dependency Security Acceptance
|
||||
|
||||
# Manual only. No PR triggers, production access, real credentials or deployment.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
account:
|
||||
name: Account Portal frozen install, typecheck and production build
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-bookworm
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
- name: Source/lockfile and auth guard contracts
|
||||
run: |
|
||||
set -eu
|
||||
python3 tests/ci/source_contract.py
|
||||
echo ZITPLANE_SECURITY_SOURCE_LOCK_CONTRACT_PASS
|
||||
- name: Reproducible Account build
|
||||
working-directory: users/ui
|
||||
run: |
|
||||
set -eu
|
||||
npm ci --no-audit --no-fund
|
||||
npm run typecheck
|
||||
npm run build
|
||||
echo ZITPLANE_SECURITY_ACCOUNT_BUILD_PASS
|
||||
- name: Negative Account Portal identity checks (no real user)
|
||||
working-directory: users/ui
|
||||
run: |
|
||||
set -eu
|
||||
export AUTH_SECRET="$(node -e "process.stdout.write(require('node:crypto').randomBytes(48).toString('base64url'))")"
|
||||
export AUTH_URL=https://localhost:3001
|
||||
export AUTH_TRUST_HOST=true
|
||||
export ZITADEL_ISSUER=https://zitadel-ci.invalid
|
||||
export ZITADEL_CLIENT_ID=disposable-negative-only
|
||||
export ZITADEL_CLIENT_SECRET=disposable-negative-only
|
||||
npm run start -- -p 3001 > /tmp/zitplane-security-account.log 2>&1 &
|
||||
server_pid=$!
|
||||
trap 'kill "$server_pid" 2>/dev/null || true' EXIT
|
||||
python3 ../../tests/ci/account_negative.py
|
||||
echo ZITPLANE_SECURITY_ACCOUNT_NEGATIVE_REGRESSIONS_PASS
|
||||
|
||||
login:
|
||||
name: Login V2 pnpm frozen build and unit regressions
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-bookworm
|
||||
timeout-minutes: 55
|
||||
env:
|
||||
NX_NO_CLOUD: "true"
|
||||
NX_DAEMON: "false"
|
||||
CI: "true"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
- name: Exact pinned pnpm frozen workspace install
|
||||
working-directory: auth/ui/v2
|
||||
run: |
|
||||
set -eu
|
||||
corepack enable
|
||||
corepack prepare pnpm@10.30.3 --activate
|
||||
pnpm install --frozen-lockfile
|
||||
echo ZITPLANE_SECURITY_LOGIN_FROZEN_INSTALL_PASS
|
||||
- name: Build original proto, client and Login V2 with security-only dependencies
|
||||
working-directory: auth/ui/v2
|
||||
run: |
|
||||
set -eu
|
||||
: > apps/login/.env
|
||||
trap 'rm -f apps/login/.env' EXIT
|
||||
pnpm exec nx run @zitadel/login:build --skip-nx-cache
|
||||
test -f apps/login/.next/standalone/apps/login/server.js
|
||||
echo ZITPLANE_SECURITY_LOGIN_BUILD_PASS
|
||||
- name: Unmodified upstream Login V2 Vitest regressions
|
||||
working-directory: auth/ui/v2
|
||||
run: |
|
||||
set -eu
|
||||
pnpm --filter @zitadel/login run test-unit
|
||||
echo ZITPLANE_SECURITY_LOGIN_UNIT_PASS
|
||||
|
||||
security_account:
|
||||
name: Account production High/Critical audit and Moderate acceptance
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-bookworm
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
- name: Fail-closed production advisory audit
|
||||
working-directory: users/ui
|
||||
run: |
|
||||
set -eu
|
||||
npm audit --omit=dev --audit-level=high
|
||||
echo ZITPLANE_SECURITY_ACCOUNT_HIGH_CRITICAL_GATE_PASS
|
||||
npm audit --omit=dev --json > /tmp/zitplane-sec-account.json || true
|
||||
python3 ../../tests/ci/advisory_triage.py npm /tmp/zitplane-sec-account.json
|
||||
python3 ../../tests/ci/security_advisory_gate.py npm /tmp/zitplane-sec-account.json
|
||||
|
||||
security_login:
|
||||
name: Login production High/Critical audit and Moderate acceptance
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22-bookworm
|
||||
timeout-minutes: 25
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://dev.ivib.cc
|
||||
- name: Fail-closed pinned pnpm production advisory audit
|
||||
working-directory: auth/ui/v2
|
||||
run: |
|
||||
set -eu
|
||||
corepack enable
|
||||
corepack prepare pnpm@10.30.3 --activate
|
||||
pnpm audit --prod --audit-level high
|
||||
echo ZITPLANE_SECURITY_LOGIN_HIGH_CRITICAL_GATE_PASS
|
||||
pnpm audit --prod --json > /tmp/zitplane-sec-login.json || true
|
||||
python3 ../../../tests/ci/advisory_triage.py pnpm /tmp/zitplane-sec-login.json
|
||||
python3 ../../../tests/ci/security_advisory_gate.py pnpm /tmp/zitplane-sec-login.json
|
||||
Reference in new issue
Block a user