5.0 KiB
P05-OIDC-06-A01 — CI-Only Entrypoint Executability RCA and Custom Login Runtime Acceptance
Date: 2026-11-23 (Asia/Dhaka)
Approved baseline (verified main): c656b5fbe1f1c2c819a600bad9a6b04105499e85
Prior run: Gitea Run #98, Job #213, source fcfa59e826c39b445faa1b5b26c47ce715d8c3d6: COMPLETED FAILURE. Frozen build and local custom image PASS, exec: "/app/entrypoint.sh": permission denied, real custom browser NOT EXECUTED, both old/new owned cleanup PASS. Previously accepted official prebuilt Run #96 remains SUCCESS.
Exact pre-source-change Scope Lock — approved
WRITE: This note created and committed before the source edit. One CI-only source file: tests/ci/login_image/build.sh. At most one new narrow helper under tests/ci/login_image/** only if strictly needed (not presently justified). Documentation: relevant notes/**, project/**, docs/**, associated README/MINIFEST, root README only if necessary.
STRICT READ-ONLY: imported auth/ui/v2/** including untouched upstream apps/login/Dockerfile, original entrypoint/source/lock, users/ui/**, core/**, all existing workflows including .gitea/workflows/p05-custom-login-acceptance.yml, both Compose files, tests/ci/oidc_e2e/** (browser, provision, original cleanup and run.sh), tests/ci/login_image/cleanup.sh, package manifests/lockfiles, runner settings, production infrastructure/secrets, unrelated files; preserve untracked AI_INSTRUCTIONS.md. No local builds/tests, CI reruns, real humans, public host ports, registry push, production, tags or releases.
Pre-source forensic observations
- Gitea recursive tracked tree at immutable approved baseline records
auth/ui/v2/apps/login/scripts/entrypoint.shmode100644and SHA2da2aca45348afeb7480323e02cf98902d479db3: the original script is NOT executable in Git; it starts with#!/bin/shand its content must remain unchanged. - The approved untouched upstream
auth/ui/v2/apps/login/DockerfileusesCOPY --chown=nextjs:nodejs .next/standalone ./,USER nextjsand directENTRYPOINT ["/app/entrypoint.sh","node","apps/login/server.js"]. Its standalone build script copiesscripts/*into.next/standalone/and does not chmod entrypoint. The existingtests/ci/login_image/build.shcopies generated.next/standaloneinto a temporary CI context and invokes the Dockerfile without changing the file mode. - Actual Run #98 successfully built the temporary image
zitplane-login-ci:98then failed at OCI before process startup withexec: "/app/entrypoint.sh": permission denied. This is consistent with missing executable bit. The exact copied context file mode and built image mode were NOT measured in Run #98; next run will report only sanitized numeric modes and execute-status without secrets.
Evidence-backed implementation design
- Immediately after
docker cpto the disposable build context and beforedocker build, check exact regular file, no symlink for$context/.next/standalone/entrypoint.sh; verify its first two bytes are#!without printing source contents; collect only numeric mode/UID/GID (stat) and test-x. A non-executable regular shebang file is the only permitted temporary-artifact remediation case:chmod 0755on that copied temporary file only; verify exact mode755and-x. Fail closed on missing, symlink, invalid shebang or unexpected mode/permissions. No upstream or Dockerfile edits. - After local image creation, before reporting image build PASS and before Compose, use
docker run --rm --network none --entrypoint /bin/sh "$image" -ec '...'with no secrets, mounts, published ports, or copied env to verify/app/entrypoint.shexists, is regular/not symlink,-xas default image user and has shebang; output only fixed PASS marker. Do not execute original entrypoint in the preflight or log file contents. Image label/ID still checked. - One focused source/security/diff audit, commit/push exact tested SHA; dispatch exactly one authorized fresh disposable manual
p05-custom-login-acceptance.ymlrun (no rerun). Verify frozen source build, temporary copy before/after mode, built image permission and ID, actual custom service health+image ID, exact private Host/issuer, official disposable project/client/user, real Chromium Login V2/PKCE/state/nonce/Auth.js callback/session, protected Account pages/API, negative cases/logout, exact old/new owned cleanup. Document PASS/FAIL/NOT EXECUTED and terminal Gitea outcome; no additional source patch or second run if blocked. - Documentation synchronization, one exact cumulative path/manifest security audit, remote main SHA verification. Tested source SHA and later documentation SHA distinct. Next phase recommendation only after observed results.
Pre-execution acceptance: Source and documentation remain entirely under Scope Lock; privacy/isolation preserved. Actual image/context file mode and custom browser flow pending one CI run.