Files
ZitPlane/tests/ci/login_image

CI-only imported Login image acceptance helpers

This directory is used solely by the manual Gitea P05-OIDC-06 workflow. It builds the original imported Login V2 workspace inside a run-labeled disposable Node 22 Debian builder and packages only its generated Next standalone output with the unchanged upstream Login Dockerfile into a local Docker image.

  • build.sh: refuse preexisting state, run frozen pinned pnpm/Nx build, create local run-tagged image. No registry push, no production data, no host ports.
  • cleanup.sh: used by the workflow always() step, after the existing OIDC cleanup; verify labels and remove only this run's builder/image/temp build context.
  • The existing real browser acceptance harness remains the security authority; custom-image mode is explicit opt-in and uses separate Compose overlay.

P05-OIDC-10 CI-only provenance addition: provenance-lock.json pins the imported Git tree/PNPM lock/Dockerfile/entrypoint, public Docker Hub Node 22 Bookworm builder OCI index and Node 24 Alpine runtime OCI index, both linux/amd64. provenance.py validates source/OCI labels, nonroot image/entrypoint, 12 negative cases, and is designed to produce PARTIAL SPDX source/base materials and an UNSIGNED local attestation. The new manual p05-login-provenance.yml opts into this mode with ZITPLANE_PROVENANCE_CI=1; existing Run #99 workflow/default builder behavior is unchanged. Actual Run #106 / job #222 FAILURE: Git tree, 12/12 negatives, PNPM frozen standalone and pinned OCI image build/probe PASS, but IMAGE_SECRET_ENV_KEY FAIL before attestation files. Possible bare PAT matched harmless PATH is UNVERIFIED because exact key not logged. Always-owned builder/image/context cleanup PASS. No registry/production work; future P05-OIDC-10-A01 validator-only approval required. Never treat partial material SPDX as complete dependency/OS SBOM or a production signature.

P05-OIDC-10-A01 (source complete, CI pending): Only provenance.py changed after scope-first notes/P05-OIDC-10-A01.md: fixed known harmless OCI environment-key allowlist, sensitive credential token/segment checks, fail-closed unexpected/duplicate/malformed keys, diagnostics logging only preapproved safe key names or fixed generic classes. The old unanchored PAT check also matches benign PATH by source logic, but the exact rejected Run #106 image key remains UNKNOWN until fixed-name diagnostics actually execute. Original 12 negatives preserved; 14 additional credential/env rejection cases and benign PATH acceptance defined, NOT CI EXECUTED. Exactly one unchanged workflow dispatch Run #108 / Job #230 on 4452a61b0f5a0892399060fd7569231a564bce02 was QUEUED with no steps/log at last review. Runner online/capacity/labels UNKNOWN, no second dispatch and no post-dispatch source patch. Partial SPDX/unsigned provenance, pinned build and cleanup in Run #108 are NOT EXECUTED. Run #106 temporary image cleanup and original Run #99 OIDC acceptance remain separate historical facts. Next separately approved A02 should inspect existing Run #108, never rerun.

Update these helpers only in a separately approved source scope; maintain MINIFEST.md and never copy upstream source edits, credentials or CI output to Git.

A01 accepted update (2026-11-23): Gitea Run #99 / Job #214 SUCCESS on tested source 7d6b6d0704b9e39bcb6e74257dadf0b64a19fc0f. The upstream Git entrypoint stays 100644; its temporary standalone copy measured 644 owner 0:0. build.sh alone now checks mode/owner/no-symlink/shebang and changes that temporary copy only to 755, checks built image executable under its default non-root user without network/secrets, then uses the existing custom Login/Chromium OIDC workflow. Four services/actual running source-built Login image/PKCE/state/nonce/Auth.js protected session/negative/logout and both cleanup systems PASS. The Run #98 OCI failure is historical; production HTTPS/MFA/SSO untested.