# Detour container security

Detour is being stabilized in this repository first. The current goal is a
traceable, scanned, restricted build; registry identity and signed public
releases come later.

## Required before calling the repository build stable

- Build only from reviewed commits on protected `main`.
- Use lockfiles, a digest-pinned Python base image, and pinned CI action SHAs.
- Run Hadolint, Trivy, Gitleaks, dependency review, and image scanning.
- Generate an SPDX or CycloneDX SBOM for every CI image.
- Keep the source commit, image digest, scan result, and SBOM together in CI.
- Do not claim a public release identity before the registry exists.

## Runtime requirements

- Non-root user, localhost-only port binding, named data volume only.
- Read-only root filesystem, dropped capabilities, and `no-new-privileges`.
- No privileged mode, host networking, Docker socket, or broad host mounts.
- Optional SQL, file, shell, and test tools disabled until explicitly scoped.
- Imports are untrusted data; reject path traversal, symlinks, oversized files,
  and executable content.
- No telemetry or remote sync in local mode. Sharing is explicit and selective.

## Free tooling

Trivy, Syft, Cosign, Gitleaks, Hadolint, Dependabot or Renovate, and GitHub
dependency review provide the initial no-cost pipeline. The CI gate fails on
unfixed `HIGH` or `CRITICAL` image findings unless a reviewed, time-limited
exception exists.

The full working framework is maintained in the repository at
`docs/container-security-framework.md`.

## Later release gate

After the local build is stable, choose an official registry, establish a
release identity, publish immutable versioned images, and add keyless Cosign
signing and digest verification for installers.
