Harden inbox service and close visual receipts - #18
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the synaplex-inbox.service systemd unit (dedicated user/group, strict sandboxing, localhost-only egress, and read-only filesystem posture) and strengthens verification/receipts so operational identity and visual correctness are proven by explicit witnesses (not inferred from 200s or build success).
Changes:
- Add a hardened
deploy/synaplex-inbox.servicebaseline unit and enforce its required sandbox directives inscripts/check_deploy_contract.py. - Add operational receipts documenting the inbox hardening canary/rollback/verification and the Tailwind/visual/Cadence identity verification outcomes.
- Update
CURRENT_STATE.mdto reflect the verified runtime and route state.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/check_deploy_contract.py | Adds inbox-specific deployment-contract assertions for the hardened unit. |
| deploy/synaplex-inbox.service | Introduces the hardened systemd unit configuration for the inbox server. |
| docs/inbox-service-hardening-2026-07.md | Records the operational hardening canary, rollback boundary, and observed outcome. |
| docs/dependency-migration-2026-07.md | Documents the rejected Tailwind 4 no-Preflight candidate and final visual/Cadence checks. |
| CURRENT_STATE.md | Updates the front-door state to include the verified Cadence identity and inbox hardening status. |
Comments suppressed due to low confidence (1)
scripts/check_deploy_contract.py:59
- The inbox contract check currently relies on finding "CapabilityBoundingSet=\n" / "AmbientCapabilities=\n" substrings via INBOX_REQUIRED, which makes the validation depend on the unit file’s newline format and doesn’t explicitly reject non-empty values if an empty line is also present. It’s more robust to validate these directives line-by-line (whitespace/CRLF tolerant) and reject any non-empty assignments.
for requirement in INBOX_REQUIRED:
if requirement not in text:
errors.append(
f"synaplex-inbox.service: missing {requirement.rstrip()}"
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| errors.append(f"{unit.name}: launcher must resolve configured paths") | ||
| inbox = REPO_ROOT / "deploy" / "synaplex-inbox.service" | ||
| if not inbox.is_file(): | ||
| errors.append("synaplex-inbox.service: missing versioned source") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
synaplex-inbox.serviceusing a dedicated identity, empty capabilities, strict read-only filesystem protection, private temp/devices, kernel and namespace protections, and localhost-only cgroup networkingPrivateNetworkexceptionCURRENT_STATE.mdwith the converged runtime and route stateWhy
The live inbox service was still root-running with full capabilities and no mandatory sandbox controls. Separately, an early Tailwind 4 candidate and a propagation-edge Cadence response showed why visual and route identity must be verified rather than inferred from build success or HTTP 200.
Outcome
The exact hardened unit passed a reversible canary and permanent transactional install. The nonce-scoped payload remained byte-identical, the service is active with zero observed restarts, the central containment auditor reports zero findings, and
systemd-analyze securityimproved from9.6 UNSAFEto1.3 OK. Fresh apex and immutable Cadence bodies are identical and route-specific.Checks
PATH=/root/.nvm/versions/node/v24.18.0/bin:$PATH make checksystemd-analyze verify deploy/synaplex-inbox.service