Build without filesystem access so the image starts under a read-only root #2
Loading…
Reference in a new issue
No description provided.
Delete branch "no-fs-access"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
v0.1.1 crash-loops on the cluster: Coraza checks at startup that it can write a temp directory, and the Deployment runs with
readOnlyRootFilesystemand no/tmp:Change
Build, test and vet with Coraza's
no_fs_accesstag (MakefileTAGS, Dockerfile). CRS is embedded and request bodies are scored in memory, so nothing needs the filesystem. The training log is Centinela's own writer and is unaffected.Verification
TMPDIRat an unwritable directory; with the tag the same binary starts and scores requests, including a 120 KB body.TestLoadsWithoutWritableTmpcovers this (runs under the tag, whichmake testnow uses).centinela-eval -backend nonegives identical CRS scores at PL1-4 with and without the tag.make vet,make build,make testpass.Relation to gitops-infra #402
#402 mounts an emptyDir at
/tmp, which also fixes the crash. With this change the image no longer needs it; either is sufficient on its own.🔎 ojo scan results
Details (1)