---
title: "Credentials, policy, and audit"
seo:
  description: "Manage GitHub access, the credential proxy, local secrets, and policy."
---

Manage GitHub access, the credential proxy, local secrets, and policy.

## `github`

Manage GitHub authentication. Specifically, the scoped fine-grained PAT (FGPAT) workflow that pairs `"pat"` mode with per-repo `github.pat["owner/repo"]` entries in the configuration. See the [GitHub auth section](/docs/configuration/github#github-auth) of the configuration reference for the full data model.

```
iso github <subcommand>
```

| Subcommand | Effect |
|------------|--------|
| `assign-pat --vm NAME --repo owner/name` | Persist selection of an existing stored entry for this VM; `--repo` is the entry key, not its full permission scope. Works while stopped. |
| `unassign-pat --vm NAME` | Remove only the VM association; leave the shared credential intact. |
| `setup-pat [--repo owner/name]` | Run the wizard end-to-end: open the GitHub PAT-creation form, validate the pasted token against `api.github.com`, store it in the macOS Keychain (no fallback store), and write a `github.pat["owner/repo"]` entry that references it with `cmd:`. The repo is auto-detected from `git remote get-url origin` when `--repo` is omitted. |
| `rotate-pat --repo owner/name` | Re-run the wizard for an existing entry (FGPATs expire — max 1 year). |
| `status [--vm NAME] [--probe] [--json]` | List configured entries and whether they are stored in the macOS Keychain. By default the `cmd:` reference is *not* resolved (so no Keychain or other prompt fires). Pass `--probe` to also resolve each entry (one secret-store unlock covers every `vault:` entry) and report whether the secret store still serves it. Pass `--json` for machine-readable output. |
| `forget-pat --repo owner/name` | Drop the `github.pat["owner/repo"]` entry and, when it references isolate's Keychain item, delete that item. A user-authored `cmd:` reference is left for you to clean up. Does **not** add a skip marker — use the auto-prompt's `never` answer if you want isolate to stop asking about this repo. Does **not** revoke the PAT on GitHub. |

```
iso github setup-pat --repo chr33s/iso
iso github status
iso github status --probe
iso github status --json
iso github rotate-pat --repo chr33s/iso
iso github forget-pat --repo chr33s/iso
```

`iso github status --json` emits `{ "mode", "entries", "skip" }`. `mode` is
`off`/`auto`/`env`/`pat`; each entry is `{ "repo", "storage", "probe" }` with
`storage` either `macos_keychain` (isolate's Keychain reference) or `null` (any
other `cmd:` reference) and `probe` (`ok`/`unexpected_format`/
`resolve_failed`, or `null` unless `--probe`). The token value is never emitted.

With `--vm NAME`, status also includes `vm: { "name", "assigned_entry", "source" }`.
`assigned_entry` is a stored entry key or `null`; `source` is `assignment`,
`missing_assignment`, `repository`, `auto`, `env`, `off`, or `no_matching_entry`.
The configured entry list remains present. `missing_assignment` means restore
the entry or unassign it; malformed state produces an error. `--probe` tests
retrieval, not GitHub permissions. See [VM PAT assignments](/docs/configuration/github#assign-an-existing-pat-to-a-vm)
for precedence, opt-out, conflicts, rotation, and bootstrap timing.

## `proxy`

Manage the host-side credential-injecting proxy. When a `proxy.<provider>`
upstream is configured, isolate runs a `iso-proxy` process on the host for the
lifetime of each remote-mode VM: the guest is pointed at the proxy and holds
only a per-instance capability token, while the real API key stays on the host
and is injected onto outbound requests the guest never sees. Applies only in
remote model mode (`iso model set remote <vm>`); local mode takes precedence. See
the [credential proxy guide](/docs/credential-proxy) and the
[`proxy` configuration reference](/docs/configuration/security#proxy-section) for the data
model.

| Subcommand | Effect |
|------------|--------|
| `setup [--anthropic] [--openai] [--vm <name>] [--api-key]` | Store a provider credential in the macOS Keychain and wire its `cmd:` reference into `proxy.<provider>` (the default) or a per-VM override. There is no fallback store; if the Keychain is unavailable, setup fails. Anthropic (Claude) is the default provider; pass `--openai` for Codex. `--vm <name>` stores the credential as a per-VM override in that instance's state instead of the global default. Anthropic only: `--api-key` stores an API key (`x-api-key`) instead of a Claude `setup-token`; ignored for `--openai`, whose keys are always injected as `Authorization: Bearer`. |
| `status [--vm <name>]` | Show what each VM's agents resolve to (per-VM override → default → off), with credentials redacted. Pass `--vm <name>` for the effective resolution of a single VM instead of all. |

```
iso proxy setup
iso proxy setup --openai
iso proxy setup --vm my-project
iso proxy setup --api-key
iso proxy status
iso proxy status --vm my-project
```

## `secrets`

Manage the local secret store under `<data_dir>/secrets/`. Unlocking it
needs both your passphrase (scrypt) and this Mac's Secure Enclave key (Touch ID
or password), every time; nothing stays unlocked between commands.
**There is no recovery path**: if this Mac or its Secure Enclave key is lost,
the stored secrets are gone, even with the passphrase and a copy of the files.
See [the design](/docs/design/embedded-secrets-spec).

```
iso secrets init [--accept-no-recovery]
iso secrets set <name> [--stdin]
iso secrets rm <name>
iso secrets list
iso secrets status
```

| Subcommand | Description |
|------|-------------|
| `init` | Create the store after the no-recovery warning. `--accept-no-recovery` skips the confirmation prompt (automation). |
| `set <name>` | Add or replace a secret. The value is prompted without echo, or read byte for byte from stdin with `--stdin`; it never appears on the command line. |
| `rm <name>` | Remove a secret. It cannot un-send a value already given to a running VM or proxy. |
| `list` | Print secret names and update times; never values. |
| `status` | Report whether the store exists and the Secure Enclave is usable, without unlocking. |

`iso uninstall --purge` does not remove the store; delete `<data_dir>/secrets/`
yourself if you want it gone.

Names match `[A-Za-z0-9][A-Za-z0-9._-]{0,127}`. The passphrase is read from the
terminal (`/dev/tty`) with echo off; for automation, pass it on an inherited
descriptor named by `ISO_SECRETS_PASSPHRASE_FD` (a regular file must not be
group- or world-readable). There is no passphrase flag or plaintext variable.

### Secrets in the guest environment

`--env NAME={vault:secret}` or a `NAME={vault:secret}` line in an `--env-file`
puts a stored secret into the guest environment. Only the reference is saved
with the instance; the value is resolved each time isolate opens a session, so
every `iso shell`, `exec` and agent launch of that instance asks for the
passphrase and Touch ID once. **The value is visible to everything in the
guest** — the Secure Enclave protects it at rest on the host only. The
reference must be the whole value (`URL=postgres://u:{vault:pw}@h` is
rejected).

A reference on a provider credential variable (`ANTHROPIC_API_KEY`,
`ANTHROPIC_AUTH_TOKEN`, `CLAUDE_CODE_OAUTH_TOKEN`, `OPENAI_API_KEY`) is
different: it never enters the guest. It becomes that instance's
[credential proxy](/docs/credential-proxy) credential, ahead of any per-VM
override or config default, and the guest gets only the proxy's capability
token. At most one per provider; under `proxy.mode = "off"` it is an error.
A generic reference may not name a secret that a proxy credential also reads. `up`, `start` and
`restore --reprovision` resolve every reference before doing VM work, so a
wrong passphrase or a missing secret stops them early. References work only
in `--env` and `--env-file`; a `{vault:` in devcontainer `containerEnv` or
config `guest_env` is passed as literal text (with a warning for
`containerEnv`). Every nonempty `guest_env.json` uses version 2 with typed
literal, secret-reference and provider-reference entries. Missing or unsupported
versions are rejected; resolved secrets are never written to the snapshot.

## `policy show`

Show the policy snapshot the instance's current (or latest) boot runs under:
mode, epoch, digest, governed actions, and each proxy launch slot claimed in
that boot with whether its process is observed now (not a health check). Also
reports whether the configured `policy` differs and is pending the next boot.
Read-only: it never reads proxy counters, resolves credentials or mints an
approval. See [`policy.md`](/docs/policy).

```
iso policy show [NAME] [--json]
```

## `policy effective`

Report what the configuration requests (transport, egress, preset,
`proxy.mode`, return and input modes, agent imports, GitHub mode, editor,
session lifetime), every relaxation from the secure defaults, and, for an
instance, what it recorded at creation (transport and egress, which are
fixed), its saved environment names and forwards, its saved grants with their
IDs and origin, pending and applied revocations, whether it is fenced, and
whether a stage is retained. Requested values that conflict with recorded
ones are listed. Read-only: no secret is resolved, no credential command or
provider is contacted, no VM is started or changed, nothing is audited;
unreadable records are reported as unknown.

```
iso policy effective [NAME] [--json]
```

Revoke a saved grant (a start-time `--env` entry or port forward) by listing
its ID in `security.revoked_grant_ids`. A revoked environment entry reaches no
later session, even on a running instance; the next start, restart or
reprovision also tombstones it, and the revocation stays recorded even if the
setting is later removed. Saved entries without provenance are likewise
withheld from sessions until given again. Giving the value again on the
command line creates a new grant with a new ID. An ID no instance records (for
example after its instance was destroyed) only draws a warning.

## `audit`

Show the boundary events isolate recorded for an instance: each boot's egress,
`proxy.mode`, proxied providers, provider-secret variable names and the
number of stored-secret references; raw provider variables forwarded into the
guest (names only); stops; and workspace returns (counts). Values, tokens,
file contents and request bodies are never recorded. The log is
`<instance>/audit.jsonl`, owner-only, capped at 1 MiB (older entries are
dropped first).

```
iso audit [NAME] [--suggest-config]
iso audit [NAME] --runs [--limit N] [--after CURSOR] [--output json|jsonl]
iso audit --run ID [--limit N] [--after CURSOR] [--output json|jsonl]
iso audit --run ID --follow [--output jsonl] [--after CURSOR] [--limit N]
iso audit --run ID --export PATH
```

`--suggest-config` prints an advisory JSONC fragment that only narrows what
was observed (for example `proxy.mode` `required` when every boot was proxied
and no raw key was forwarded). Guest network use is not observed, so `egress`
is suggested only when every boot already ran without it.

`--runs` and `--run` read the run history: each `iso run`, `claude`, `codex`
and `claude-agents` invocation prints its audit run ID on stderr, and the
history (kept outside instance directories, 7 days / 128 MiB) records its
request, effective environment, handoff, observed transport status and
cleanup, plus the boundary events of its exact boot. See
[`audit.md`](/docs/audit) for the event model, retention, cursors and the
`iso.audit.stream/v1` JSONL protocol.

| Flag | Description |
|------|-------------|
| `--runs` | List recorded invocations, newest first; `NAME` filters by recorded instance name, deleted instances included |
| `--run ID` | One invocation's summary and timeline |
| `--follow` | With `--run`, keep reading new records (text or `--output jsonl`) until interrupted |
| `--after CURSOR` | Continue from an earlier page's or stream's cursor |
| `--limit N` | Records per page (default 100, at most 1000) |
| `--export PATH` | With `--run`, write the full retained snapshot to a new file; never overwrites |
