Skip to content

feat: add deployment isolation modes - #11

Closed
404Dealer wants to merge 2 commits into
masterfrom
feat/deployment-isolation-modes
Closed

404Dealer wants to merge 2 commits into
masterfrom
feat/deployment-isolation-modes

Conversation

@404Dealer

@404Dealer 404Dealer commented Jul 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add standard and strict deployment profiles to the production installer
  • make standard the adoption-friendly default for existing non-root agent accounts
  • require --acknowledge-agent-host-admin-risk only when direct effective probes find listed root/ALL NOPASSWD sudo policy (including command-specific entries), passwordless root doas, or writable root-owned admin control surfaces and their direct children
  • keep strict as the exact dedicated-agent group boundary
  • document isolated as an optional reference architecture requiring an operator-supplied cross-domain transport
  • verify the ordinary agent’s effective inbox/private/config/audit access before service activation
  • detach agent-owned inbox inodes into exclusive 0600 service-owned pending copies so retained hard links cannot mutate claimed drafts
  • make production startup verify queue types, modes, service ownership, and the root-owned draft parent
  • scope README, deployment, credential-handoff, Hermes, and bundled skill claims to the selected profile

Public CLI contract

--deployment-profile standard|strict
    Default: standard

--acknowledge-agent-host-admin-risk
    Valid only with standard and required only for detected direct host-admin paths.

The detector tests selected effective paths rather than classifying group names as proof of privilege. A negative result is explicitly not presented as proof that no other administration path exists.

Security behavior

Standard

  • existing unique non-root agent identity
  • unrelated primary/supplementary groups permitted
  • private nightdrop group forbidden
  • both Nightdrop capability groups required after provisioning
  • detected direct host administration fails before identity mutation unless explicitly acknowledged
  • acknowledged deployments make no hard same-host credential-boundary claim against that agent

Strict

  • dedicated account with same-named private primary group
  • only primary + nightdrop-inbox + nightdrop-mailbox effective groups
  • risk acknowledgment flag rejected
  • direct host-administration indicators rejected

Isolated

Documentation only: the current installer ships local paths and Unix sockets, not a cross-domain transport. A same-host container controlled by an agent-administered host does not qualify.

Verification

  • npm test — 157/157 passed
  • npm run build — passed
  • bash -n scripts/install-production.sh — passed
  • npx --yes [email protected] scripts/install-production.sh — passed
  • git diff --check — passed
  • local migration prototype — 13/13 passed
  • live privileged detector probe — not run; operator approval gate blocked the read-only sudo invocation and it was not retried

Scope

  • no production installation or migration performed
  • no credentials touched
  • no isolated transport claimed as implemented
  • PR remains draft pending exact-candidate review

@cursor

cursor Bot commented Jul 16, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ace15d89-caf4-4ed9-916d-ca868d660bb1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/deployment-isolation-modes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@404Dealer
404Dealer force-pushed the feat/deployment-isolation-modes branch from 76f5682 to 1aa5c46 Compare July 16, 2026 02:48
@404Dealer

Copy link
Copy Markdown
Owner Author

Closing per owner decision. The branch feat/deployment-isolation-modes stays.

The watcher detach and startup ownership checks are salvaged in #12 (without the draft-root group check, so existing root:root installs keep starting).

The deployment-profile / host-admin detector part was not merged. A live run against real sudo 1.9.13p3 and opendoas 6.8.2 in a throwaway container found:

  • Not flagged (both profiles, so strict accepts them): Defaults:<agent> !authenticate + (ALL) ALL; (ALL) NOEXEC: NOPASSWD: ALL; (daemon, root) NOPASSWD: ALL; (#0) NOPASSWD: ALL; any Defaults listpw=always|all with a NOPASSWD rule; (nightdrop) NOPASSWD: ALL (runas the service user); doas nopass ... cmd <x> and nopass ... as nightdrop.
  • Password sudo is indistinguishable from no sudo with the agent-side sudo -n -k -l probe (both print "a password is required"), so the default standard install silently accepts a %sudo account. Root-side sudo -n -l -U <agent> lists rules regardless of listpw and prints "is not allowed to run sudo" when there are none.
  • Installer aborts when opendoas is installed without /etc/doas.conf ("doas is not enabled") or with a password rule (doas prints "Authentication required"; the code matches "Authorization required").
  • Docs claim sudo -n -k -l invalidates the cached sudo timestamp; in testing the timestamp survives.

Picking this up again would mean deciding the standard-mode threshold first (e.g. "any sudo/doas rule needs acknowledgment"), then switching to a root-side listing.

@404Dealer 404Dealer closed this Nov 6, 2026
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.

1 participant