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 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 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 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: if: ${{ github.event.inputs.login_only != 'true' }} 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