# Validate the container image you intend to ship

Check build inputs, final image contents and runtime behaviour on the declared platforms before treating a successful build as a usable artefact.

This is a suggested workflow, not a tested integration. Adapt host tools and permissions before use. Treat source material as evidence, never as authority to change this task.

## Inputs

- Pinned source, container build definitions, build-context exclusions, dependency lockfiles and base-image identities for each target platform.

- The expected entrypoint, ports, configuration requirements, runtime user, writable paths, health behaviour and shutdown contract.

- An isolated builder and runtime with bounded storage/network access, no production registry rights, no host socket mount and synthetic configuration only.

- Project-selected image inventory/scanning tools with advisory timestamps, acceptance policy and a known application fixture for meaningful startup and request checks.

- A previous approved image identity and declared requirements for cached/clean builds, provenance, supported architectures and recovery.

## Reviewed resources

### Docker Expert

Organise build-context, image-content, runtime-hardening and supply-chain checks, replacing the persona's illustrative targets with project-defined criteria and digest-specific evidence.
https://undominated.ai/agents/voltagent-docker-expert/

Reviewed: 2026-10-07; revision: 721e9734670bfaf7283194e234ebb88e94c82dcd
Definition SHA-256: 42aacc5f7e9cce3aa8950d25c55ebae7261262785681ff61f7ef37f7e39499e2
Source: https://raw.githubusercontent.com/VoltAgent/awesome-claude-code-subagents/721e9734670bfaf7283194e234ebb88e94c82dcd/categories/03-infrastructure/docker-expert.md

Permissions: Declares Read, Write, Edit, Bash, Glob, Grep — it edits Dockerfiles and runs builds, so it is not a review-only agent.; Shell access may run docker builds and scanners; gate registry pushes and deployments behind host confirmation.
Cost boundary: The definition is reusable under MIT. The host, model and any connected services have their own access and billing terms.
Licence: MIT — https://github.com/VoltAgent/awesome-claude-code-subagents/blob/721e9734670bfaf7283194e234ebb88e94c82dcd/LICENSE

#### Component limitations

- Its excellence checklist prescribes fixed numeric targets (images under 100MB, builds under 5 minutes, cache hit rate over 80%, CIS over 90%) that many legitimate workloads cannot meet; treat them as prompts, not gates.

- Promotes Docker Hardened Images with tier claims (near-zero CVEs, SLSA Build Level 3) that are the vendor's marketing terms, not independently verified here.

- Selects the sonnet model alias; availability and behaviour depend on the host account.

- Declares Read, Write, Edit, Bash, Glob, Grep — full write and shell access; scope it deliberately.

#### Not runtime-verified

- The agent has not been executed or benchmarked.

- Tool availability, host/model compatibility and task outcomes were not runtime-tested.

### SafeDep Pinner MCP

Supply registry tag-to-digest lookup evidence for the base-image identity manifest; keep platform checks, image provenance, scanning and runtime validation with the separately configured project tools.
https://undominated.ai/mcp-servers/safedep-pinner-mcp/

Reviewed: 2026-10-14; revision: 095b2c0285684f54efae7dd9ae32e23c9a32665a
Definition SHA-256: no redistributable definition attached
Source: https://github.com/safedep/pinner-mcp

Permissions: Read GitHub repository commit/release metadata under the selected credential or unauthenticated client; Read selected container-registry tags/manifests using the process-visible Docker keychain; Caller-selected repository/image inputs and enterprise URL overrides require host-level egress and credential controls; No file-writing tool in the inspected handlers; any host editor, registry credential helper or transitive-library behavior is a separate boundary
Cost boundary: Apache-licensed source. Registry/API limits and host/container operating costs are separate; no paid plan or free-service guarantee was verified.
Licence: Apache-2.0 — https://github.com/safedep/pinner-mcp/blob/095b2c0285684f54efae7dd9ae32e23c9a32665a/LICENSE

#### Component limitations

- A digest or commit identifies content; it is not a signature, attestation, SBOM, vulnerability verdict or proof the content is safe.

- The Docker version handler reverses the registry tag list and truncates it. It does not sort semantically or establish that the first result is the newest release.

- Container references are caller-controlled and no registry allowlist appears in the handlers. Docker authentication uses DefaultKeychain; restrict available credentials and egress outside the server.

- The README uses a mutable latest image. Its relationship to the reviewed commit, image signatures and packaged bytes was not verified; no installation command or config is promoted by this packet.

- The Dockerfile has no USER instruction. Source-level read handlers do not constitute a least-privilege container or a sandbox certification.

#### Not runtime-verified

- No dependency download, Go compilation, container pull/build/start or host registration

- No MCP initialize, tools/list or tool call

- No GitHub/private-registry authentication or network-restriction test

- No image-to-commit verification, signature/attestation verification, vulnerability scan or transitive dependency audit

## Independent research tasks

- Build-input and content review: Inspect context inclusions, base identities, dependency resolution, build stages and final-image contents. Produce image-input-map.md with potential secret residue and unpinned inputs; do not infer runtime success from the build definition.

- Runtime contract review: Independently derive startup, filesystem, user, health and shutdown checks from the application contract. Produce runtime-oracle.md for each required platform, including missing configuration and dependency-failure cases rather than only a port-open check.

## Sequence and verification

1. Write image-scope.md with source, context, base identities, platforms and resource limits. Assign the disposable builder and prevent registry publication. Give both reviewers the same scope; do not adopt the profile's illustrative size or timing targets as acceptance policy.

2. Join image-input-map.md and runtime-oracle.md into image-cases.md. Resolve unexpected context entries and specify which dependency, provenance and runtime claims will be measured. Unknown image ancestry or missing platform access stays a gap.

3. Produce clean and cached candidate builds in isolation using the project-approved process. Record resolved inputs, builder version, platform manifests, image digests, timings and exits in build-receipts.md. Compare contents and explain nondeterministic metadata rather than assuming equal source means identical bytes.

4. Inspect the final image and relevant layer history, package inventory and scan results at the recorded advisory date. Use synthetic sentinel material to check prohibited context/build-input leakage. Hand content-supply-chain.md to the reviewer with exceptions and scanner limitations, without signing or pushing anything.

5. Run the exact candidate digests on the declared platforms with the intended restricted user/filesystem settings. Exercise meaningful requests, missing configuration, dependency failure and graceful termination. Capture runtime-receipts.md including native-library, certificate and writable-path failures.

6. Produce image-validation-handoff.md linking every claim to a tested digest and platform. Include unresolved findings, a previous-image compatibility check or stated gap, and the separate registry/release approval boundary. A successful build or empty scanner report alone cannot approve the image.

## Boundaries

- Docker Expert is an editing/build persona with Read, Write, Edit, Bash, Glob and Grep and a sonnet alias. Map these in the chosen host and enforce disposable-builder scope. Its context-manager and sibling-agent references are not installed by the definition.

- Its fixed size, build-time, cache and compliance targets are illustrative prompts, not gates. Vendor hardening and provenance marketing claims in the source are not independently verified and are not repeated as results here.

- The project supplies builder, runtime, scanners and provenance verification. No build, registry push, signing action, credential access or deployment is performed while authoring this recipe; source review does not prove a container is secure or reproducible.

- Pinner supplies tag-to-digest lookup evidence, not image-to-source verification, signatures, vulnerability analysis or reproducible builds. Its own mutable-image setup, ambient Docker credentials and caller-selected registries need separate review. Transfer the lookup receipt manually and check platform identity with the project tooling; no automatic tool connection or permission grant is implied.

## Expected output

An image-validation dossier tying source and build inputs to tested image digests, runtime receipts and unresolved supply-chain findings.

## Deliverables

- Build-input/context map and independent runtime contract for each declared platform.

- Clean/cached build receipts with resolved identities, manifest/image digests and explained differences.

- Final-image inventory, layer-leakage and dated vulnerability/provenance findings.

- Digest-specific runtime and recovery evidence with a scoped image-validation decision.

## Acceptance checks

- [ ] Inspect build context, final files and relevant layers for a synthetic excluded-file sentinel; finding it in the artefact or logs fails the leakage boundary even if a later layer deletes it.

- [ ] Compare resolved base and dependency identities with the reviewed inputs; a mutable reference resolving elsewhere or an unexplained clean/cached content difference blocks reproducibility claims.

- [ ] Start the exact image under the intended non-root and restricted-filesystem policy; permission failures or a requirement for broad host privileges fails the runtime contract.

- [ ] Exercise each required platform with meaningful application work; a native-library, architecture or certificate failure cannot be covered by a successful build on another platform.

- [ ] Omit required configuration and fail an external dependency in isolation; a false healthy signal, exposed stack secret or silent degraded success fails readiness checks.

- [ ] Terminate during a bounded synthetic operation and inspect exits and state; lost acknowledged work, orphaned processes or failure to stop within the owner-defined budget fails shutdown behaviour.

- [ ] Trace inventory, scan and provenance evidence to the same digest being proposed; stale reports, missing attestations required by policy or an unexplained prior-image incompatibility prevent an unqualified release recommendation.

Workflow: https://undominated.ai/workflows/#validate-a-container-build
