Deploy: close the test gaps and two hardening items from the PR #51 reviews #52
Labels
No labels
boundary:crosses
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/messages-mind-mcp#52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Two reviews of PR #51 (issue #18, head
b116792, merged as13a2fc8) found no blocker. The shipped files meet the spec. The items below are gaps intests/test_deploy.py, where a drift that breaks a security property still leaves the suite green, and two hardening items. The correctness review ran 46 mutations; 13 survived, and each survivor is listed here.Should fix: hardening
syncandapishare one disk-backed/tmpwith no size limit (deploy/k8s/base/messagesmind.yaml, thetmpemptyDir). Both run as uid 10001, so the volume is a writable channel between the two processes, and a compromised api can fill the node's ephemeral disk. Compose gives each service its own tmpfs; Kubernetes does not. Fix: one emptyDir per container, withmedium: Memoryand asizeLimit.messagesmind.kubectl apply -k deploy/k8s/base, or an overlay with a wrongimagesentry, deploys an unpinned image. Docker and containerd resolve it todocker.io/library/messagesmind:latest; CRI-O can search other registries. That pod would mount the store key and the tokens. The tests assertimage == "messagesmind". Fix: a fully qualified, digest-pinned placeholder in the base, so the base alone fails closed.Should fix: tests that a drift passes
patcheslist. Apatchesentry in the base kustomization, or apatchesJson6902entry in the overlay, that adds egress to0.0.0.0/0passes.kustomize buildconfirmed that the rendered policy then holds0.0.0.0/0. Fix: an exact key allow-list for each kustomization (base:apiVersion,kind,resources,labels; overlay addsnamespace,configMapGenerator,images,patches), and the baseresourcespinned to exactly the two manifests.syncwith an extra mount ofapi-secretspasses. Fix: the set of secret volumes that each container mounts equals its own.COPY --link --from=<unpinned image>passes, because only lines that start withCOPY --from=are checked. A lower-caserun apt-get installpasses theRUN/ADDallow-list, and a lower-caseuser 0would pass theUSERcheck. Fix: parse instructions case-insensitively, and find--from=anywhere on aCOPYline.apiremoved fromallowed_hostsin the composeapi.toml; the compose Feeder url on another port; thefeederservice readingread-token; the smoke--urlonsync. Fix: assert that the Feeder url matches thefeederservice and its--port, that the smoke host is in the api'sallowed_hosts, and that each token-file path names the right secret file.Notes
hostNetwork: trueon the pod passes, and a NetworkPolicy does not apply to a host-network pod. The README names the Pod Securityrestrictedlevel, which refuses it, but no test checks. The compose hardening test does not checkprivileged,userornetwork_mode.containerPortset to8421passes, while the probes and the server stay on8420.COPY src/...path, or a removedCOPY --from=build /app/.venv, passes. Only the host build catches them.compose_stack.py feederverb; only the host smoke does..dockerignoreadmits any file undersrc/messages_mind_mcp/that is not.pyc, for example a stray local.dbor.toml. Allow*.pyonly.tombstones.db; a later Rebuild would then re-import Forgotten messages. This is integrity, at the trust level of the api's store key. Record it inSECURITY.md, or split the volume.test_deploy.effective_policy()re-implements the JSON patch instead of running kustomize. The kubeconform and kustomize CI step (operator surface,.woodpecker/) would close this.pipandsetuptoolsfrom the Python base.Acceptance criteria
Triage rulings (2026-11-15)
Operator word "accept leans / after #13, triage #58 and dispatch" (sha256:a999fb29c997).
.woodpecker/. The step runskustomize buildon the base and on each overlay, and runskubeconformin strict mode on each result..woodpecker/is an operator surface; this ruling allows that one step only. Pin each tool by version and by sha256. The step checks the rendered NetworkPolicy, so it replaces the re-implemented JSON patch intest_deploy.effective_policy()or runs beside it.ready-for-agent. The follow-ups #52, #54 and #56 run one at a time, after #13 and #58.Blocked by
Filed under: operator word "merge 51" sha256:d300361cfa20
Moved to
ready-for-agentunder ruling 8. The body now holds the rulings for this issue (ruling 6, the kustomize and kubeconform CI step; ruling 7, no macOS lane). The six should-fix items and the notes are bounded todeploy/, the Containerfile,.dockerignore,tests/test_deploy.pyand one.woodpecker/step. Dispatch waits for the operator'ssvd:go.spec-verify-dispatch Half B for dev/messages-mind-mcp#52 deploy-close-the-test-gaps-and-two-hardening-items-from-the completed integration verify.
f929a91961docker compose --profile smoke run --rm smokeprints smoke=ok) and the pinned Woodpeckermanifestsstep going green.