Skip to main content

Security Model

The CLI is an execution edge, not an authority. Every property below is enforced by the server or by a check the CLI cannot skip, and each maps to a command you can run to see it.

Credential absence​

The CLI holds no signing secret. A lease is an HMAC-signed token the server issues on claim and verifies again on POST /cli/claim/<leaseId>/verify before anything runs; the CLI only decodes the payload to read the act axes after that round trip succeeds. There is no configuration that lets vagaris dev spawn without a verified lease, and no local path that mints one.

Deny by default​

A lease without a tool policy means no tools, and a none policy refuses the spawn. Claude Code is launched with --allowedTools derived from the lease and never with claude --dangerously-skip-permissions; Codex is launched with codex --tool. Unknown adapters are refused rather than run unbounded. See Permissions.

Privileged acts never happen locally​

Pushing to a main branch, deploying, writing to a production database, mutating infrastructure, reading a secret or changing billing are brokered: the CLI sends a request, the server executes, approves, parks or denies, and the CLI reports the verdict. No local credential exists for these classes.

Machine identity​

vagary node enroll generates an Ed25519 key pair; the private key is written to ~/.vagris/node-identity.json (mode 0600) and never sent anywhere. vagary node doctor proves possession by signing a server nonce. A lease bound to a node is refused from any other node; A node revoke (POST /api/nodes/<id>/revoke) invalidates the node's leases and cancels its runs server-side. See Node Enrolment.

Containment of the executor​

  • Worktree isolation. Each run executes in its own git worktree, removed afterwards.
  • Environment sanitising. Before the spawn, the child environment is stripped of product variables, LD_*/DYLD_*, GIT_CONFIG_*, NODE_OPTIONS and other interpreter and shell startup hooks, infrastructure write tokens and seat-forbidden inherited secrets. The keys removed are listed in the dev report as strippedEnvKeys.
  • Kill-switch integrity. runctl cancel reports cancelled only when the server has confirmed the process is dead. A run whose process survived the kill attempt is shown as still running — never a false stop.

Evidence​

Every governed run records session boundaries, policy decisions (with the gate that made them), baseline probes, the executed command and its output, scope requests and errors into an evidence envelope the server can audit. dev prints the counts and the closure-gate verdict.

Credentials on your machine​

  • Board login access/refresh tokens and metadata default to ~/.vagaris/auth.json, with directory mode 0700 and file mode 0600. This is an explicit file-backed policy, not a fallback after a native-backend error. Atomic writes preserve other profiles; concurrent refresh is serialized. Existing OS-store marker records remain inactive and their OS items are untouched until a verified new sign-in replaces that API record.
  • The default-home upgrade moves existing private CLI files without signing in again. vagaris auth migrate-state refuses conflicting roots, symlinks, hard-linked files and live refresh operations. It leaves refusal markers at old credential paths, preserves profile bytes, and resumes interrupted moves from a private journal. Runtime and node data are not moved by this command.
  • vagaris auth logout revokes server-side before deleting locally. vagaris uninstall does the same before removing files.
  • Agent API keys are printed once by vagaris agent local-cli. Prefer context set --api-key-env-var-name over writing a key into the context file.
  • The .env next to the instance config (which holds VAGARIS_AGENT_JWT_SECRET) is written with mode 0600.

Writing into other tools' directories​

The CLI never writes into ~/.claude or ~/.codex unless you pass --install-skills to vagaris agent local-cli and consent (interactively, or with --yes). What it wrote is recorded, and vagaris uninstall removes only those recorded links that still point into its skills source; anything replaced or re-pointed since is kept and named.

Support bundles and telemetry​

vagaris support-bundle passes every field through a redactor: vendor API keys, tokens, connection strings, PII and raw customer content are replaced with stable [REDACTED:kind:hash] placeholders; environment variables are included by name only; source code and database rows are never collected. See Support.

The CLI sends no usage telemetry: the only destinations it contacts are the Vagaris endpoint a command uses and the identity service that endpoint advertises. A release gate fails any published package that reaches another destination. A server instance's own telemetry is controlled by telemetry.enabled in its config.

Known limits​

  • Revoking a node changes server state; a process already running on that node stops the next time it contacts the server, not at the moment of revocation.
  • Leases have a bounded lifetime, but an expired lease is refused on verification rather than swept proactively.
  • The MCP server ships with a stdio transport; there is no HTTP MCP endpoint to expose.

The full threat model with per-control status lives in the repository at doc/security/threat-model-cli.md.

Reporting a vulnerability​

Use the repository's GitHub Security Advisory form — never a public issue. Details on Support.

Product-specific native sessions​

A Vagaris operator session does not grant access to a separate product. Use the product's registered native client and issuer to approve a dedicated device session:

vagaris auth product-login --issuer https://auth.indexofnews.com \
--client-id app-index-of-news-cli --json
vagaris auth product-status --issuer https://auth.indexofnews.com \
--client-id app-index-of-news-cli --json
vagaris auth product-logout --issuer https://auth.indexofnews.com \
--client-id app-index-of-news-cli --json

The command prints a one-time URL and waits without opening a browser. It requests only openid profile email offline_access, verifies the authenticated subject through the same issuer's userinfo endpoint, and keeps access/refresh material in the private credential file. The record uses an issuer-and-client namespace distinct from the board/operator API origin; neither session replaces the other. Refresh stays with the native client and must retain the same subject. Revocation must succeed before local custody is removed, so a failed revoke remains retryable.

These commands establish and manage the product identity grant. Product API calls must still use the approved API origin, issuer/audience pair and backend permissions. A successful login is not a role grant, a product-admin claim, or proof that a backend accepted the token. Tokens are never printed by the commands; internal callers use the explicitly bound credential helper in memory.

Provider account pools​

These commands use the existing saved Vagary operator session. Provider consent remains a separate one-time step; the CLI prints its URL and never opens or reads the user's browser.

vagaris account-pool list --json
vagaris account-pool login-start vagary-admin --json
# For an intentional account replacement, bind the independently verified provider UUID:
vagaris account-pool login-start vagary-admin --expected-account-uuid <provider-account-uuid> --json
# Feed the provider's full code#state from a secure stdin source, never as an argument:
vagaris account-pool login-complete <session-id> --code-stdin --json
vagaris account-pool login-cancel <session-id> --json

A reconnect to an outstanding login reuses its URL and expected provider identity. Cancel it before selecting a different account. Existing pools bind their saved provider UUID by default; email labels are not sufficient proof that two accounts are the same. The server checks the returned profile UUID before replacing credentials. A failed exchange, wrong state or wrong account cannot clear a pool's limited status or report a successful login based on an older credential file.

The CLI checks that the server advertises account-bound login protocol2 before it starts an approval or reads an approval code from stdin; older servers are refused before any credential mutation.

The approval window is ten minutes and belongs to the running server process. Start it when ready to approve and after a planned deployment. list reports credential metadata; an expired token with a refresh string is not proof that the provider will accept a refresh or execute work. Verify actual provider access and governed execution before treating a recovered pool as usable capacity.