AZ-012 — Supply-chain and container quality

Status

Done

Context

Read README, CI, Docker, techstack, testing and DoD. Formatting/lint/types/tests/builds, coverage/OpenAPI/TypeDoc and clean Docker initialization already block PRs. Secret scanning, dependency vulnerabilities, Dockerfile linting and periodic container/license inventories do not. CI has six validation jobs plus trusted-main migration and separate docs publishing. Installed Argon2/session dependencies and auth migrations from AZ-005 make these checks concrete.

Goal

Add useful blocking supply-chain/secret/Dockerfile/migration checks plus bounded periodic diagnostics, preserving existing gate/artifact/deployment contracts.

Requirements

Blocking PR checks

Periodic/informational checks

Non-goals

No replacing ESLint/Prettier, security platform subscription, CodeQL/Sonar requirement, broad image/runtime migration, production registry/deployment, arbitrary license policy or scanner count maximization. Full HTML validation and accessibility remain other tasks' responsibilities.

Implementation guidance

Use root scripts/ and tests/ci/ for thin orchestration, respecting lint's existing .mjs coverage. Wrappers handle paths safely, clean temporary output and validate downloads. Scan the actual pnpm dependency graph/lockfile, not invented npm package-lock files. Handle private checkout permissions/read-only artifacts explicitly. If a known real secret is found, stop exposure/record the blocker and required credential rotation; scanner suppression is not a fix. Do not rotate external credentials or send messages without authorization.

Acceptance criteria

Verification

pnpm quality
pnpm test:ci
pnpm security:dependencies
pnpm secrets:check
pnpm containers:lint
pnpm db:check
pnpm build

The four new scripts are introduced by this task, not baseline commands. Run pnpm validate:docker if Dockerfiles/config/dependencies change; no duplicate integration/E2E rerun. Add and execute the periodic script(s) introduced in implementation on safe local/CI inputs; record exact commands. Hosted workflow conclusions/check discovery/report uploads require real revision-specific CI evidence; local fixture tests cannot prove Actions permissions or upload success.

Documentation

Update CI/DoD enforcement mapping (new required job and periodic reports), development (setup/new commands/triage), techstack (tools/pinning), Docker (lint exceptions/targeted packaging changes), testing (infrastructure fixture tests), current-state/handover. Do not duplicate the whole gate table into AGENTS.md; retain canonical quality requirement.

Dependencies

AZ-005. May proceed independently of AZ-006–011 with coordinated config/lockfile/CI edits.