API / deployment

Redaction in a container without pretending it is a sandbox

A practical guide to redaction docker: the boundary, the controls and the failure modes that matter before the first document.

Redaction Docker: Deployment and Limits

Redaction in a container without pretending it is a sandbox. A container packages the service; it does not create the security boundary by itself. The host, the runtime, the volumes and the network rules decide what the container can reach and what survives after it exits.

What changes in this environment

A pinned image by digest, a non-root user, a read-only input mount, a separate writable output mount and no network unless the service needs it. Secrets come from a file or a runtime secret, not from the image or the compose file.

Where the data hides

The visible page is only one layer. In this environment, check:

The redaction flow

  1. Pull the image by digest and verify the signature.
  2. Mount the input read-only and the output separately.
  3. Run with no network and a non-root user.
  4. Read the report from the output mount.
  5. Remove the container and the writable layer.

Controls to verify

  • Pin by digest; do not use `latest`.
  • Drop capabilities and set a read-only root filesystem where possible.
  • A network policy of `none` for the offline path.
  • Resource limits so a large scan cannot starve the host.
  • A log driver that does not copy document text.

Retention and evidence

The container is ephemeral; the volumes are not. A deleted container can leave the input and output on the host, and a Docker volume can outlive the job. Decide what is deleted and prove it on the host, not only in the container.

Limits

Docker on a shared host is not a strong isolation boundary. GPU passthrough, large files and OCR are host-dependent. The image is only as trustworthy as its build and its registry.

Container isolation, honestly

A container isolates processes, not trust. The image shares the host kernel, so a container escape is a host compromise — which is why the container should run as a non-root user, with a read-only filesystem, with no Docker socket mounted, and with capabilities dropped to the empty set. Those four settings close the holes that make escapes easy and are one line each in the compose file. A container that processes the most sensitive documents in the organization is worth four lines.

Image provenance

The image is the supply chain: know where it came from and pin what you run. Pull from the vendor's registry by digest, not by the floating tag, and scan the image for known vulnerabilities on a schedule — a redaction image with a critical CVE is an irony that writes its own incident report. Generate a software bill of materials if the vendor provides one, and check the signature if they sign. Rebuild and redeploy on the vendor's release rhythm, not on the rhythm of remembered anxiety.

Secrets in containers

The container must never hold a credential in an image layer: anything baked in at build time is readable by anyone who pulls the image. Inject configuration at runtime — environment from the orchestrator, files from a mounted secret, a workload identity the container proves itself with. Scan the image for the usual accidents: a copied .env file, a test key, a debug endpoint left listening. The secrets review is part of the image review, because the layers keep what the Dockerfile forgot.

How Veilbrook fits

Veilbrook can run as a container with a policy and a report. The image digest, the mounts and the network rule are the controls you verify.

Before you release

Open the output in the same tool the recipient will use. Select each masked area and paste it into a text editor. Search for every value you removed, including the header, the attachment, the comment and the OCR layer. Compare the report with the file and keep both. If a value survives, the job is not done.

Common mistakes

What to ask before you build

Questions

Is Docker enough for isolation?

No. It packages the service. Use a dedicated host, a restricted runtime and network rules if the boundary matters.

Can it run with no network?

Yes, for an offline path, if the image and model are local. Test it with `--network none`.

Where do temp files go?

Ask and then check. The writable layer and the mounted volumes are the places to clean.