Skip to content

docs: document container hardening for untrusted deployments - #53

Open
mccahan wants to merge 3 commits into
gotenberg:mainfrom
mccahan:docs-harden-container
Open

mccahan wants to merge 3 commits into
gotenberg:mainfrom
mccahan:docs-harden-container

Conversation

@mccahan

@mccahan mccahan commented Nov 23, 2026

Copy link
Copy Markdown

Documents how to harden the Gotenberg container, the image-level mitigations that cover dropped binaries without any code change.

Changes

  • operate/secure.mdx — a new "Harden the container" section: a read-only root file system, noexec,nosuid tmpfs mounts for /tmp and the home directory, cap_drop: ALL, no-new-privileges, and shm_size, with a compose.yaml example. Links to outbound filtering for the egress half.
  • getting-started/installation.mdx — the Kubernetes deployment.yaml sample now sets readOnlyRootFilesystem, runAsNonRoot, runAsGroup, capabilities: drop: [ALL], seccompProfile: RuntimeDefault, and in-memory emptyDir mounts for the writable paths. The prose notes that an emptyDir tmpfs has no per-mount noexec in vanilla Kubernetes, and the 386 socketcall seccomp exception.
  • cookbook/user-html.mdx — a cross-link from the untrusted-HTML recipe to the hardening section.

Verification

The compose.yaml example was checked against a running container: /proc/mounts confirms noexec,nosuid on both tmpfs mounts, execution from /tmp is refused, and an HTML-to-PDF conversion through Chromium still returns 200. npm run build passes with every cross-link anchor resolving.

@gulien

gulien commented Nov 23, 2026

Copy link
Copy Markdown
Member

Hello @mccahan 👋

AFAIK, there might be more folders that should be writable. I know it did bite my hand last time I tried. Maybe though LO conversions?

@mccahan

mccahan commented Nov 23, 2026

Copy link
Copy Markdown
Author

Hey Gulien, do you happen to remember (even vaguely) what might have bitten you about it? I tried the hardened config against the corpus QA doc set without issue.

I did add one small notes change about /home (and tmp being the important one), but I did go back this morning and make sure I tested both LO and Chromium with these settings and it passed.

(FYI I made those MITRE submissions, but no idea how backlogged they are. I did see a GitHub Community post that GH is running ~5 weeks for submissions through them directly)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants