7.2

sbx policy ls --source org, --profile, and the audit JSONL

An organization writes policies in Docker Home, the daemon pulls them within five minutes, local rules can only narrow, and every decision is written to a rotating JSONL file.

Your security team asks which hosts the agents reached last week, who allowed each one, and whether a developer could have widened the list. On one laptop the answer is sbx policy log, and across a company it is an organization policy with an audit log behind it. When you finish this section, you can say what an organization policy changes on a developer machine and read one audit record.

What an organization can set

Organization policy: a named set of rules written in Docker Home, applied to every local sandbox of the organization or of chosen teams. Three kinds exist: Network access, Filesystem access, and MCP access. A network rule is HTTP, one destination with methods and path patterns, or All traffic over TCP, UDP, or both, with Allow or Deny. A network policy can require approval, so each destination it allows waits once for the developer's confirmation. An MCP policy is Cedar in the MCP namespace, default deny, where a forbid beats every permit. An organization holds at most 100 policies of 250 rules and 400 KB each.

A change reaches developer machines within 5 minutes, and sbx policy reset forces the pull at the price of every local rule and recorded approval. Network rules apply to the next request, filesystem rules only when a sandbox is created, and MCP registration rules at the next sbx mcp add. Sign-in enforcement lists allowedOrgs in a managed com.docker.sbx profile on macOS, the key HKLM\SOFTWARE\Policies\Docker\SBX on Windows, or /etc/docker-sbx/config.json on Linux. sbx login then revokes a credential from any other account. All of this is a separate paid subscription, Docker AI Governance, and local use stays free.

What an organization cannot do

Governance narrows and never widens. When a policy is active, only organization allow rules grant access, and deny rules from every source still apply. Local and kit allow rules are inactive. The help text for --deny-network says the same:

A local deny even beats an organization approval requirement, so the request is blocked and no prompt appears.

RuleEvaluated under organization governance
Organization allowyes
Organization denyyes
Local allowno
Local denyyes
Kit-defined allowno
Kit-defined denyyes

Governance covers local sandboxes only, and a cloud sandbox uses its own account and sandbox policy, as the cloud section describes. Audit records hold metadata and never prompt content, agent output, or parameter values.

This capture has no organization

the organization filters on a machine without governancetextFull log
$ sbx policy ls --source org
No policies match the selected filters.
[exit 0]

$ sbx policy ls --include-inactive
POLICY         SOURCE   APPLIES TO   SUMMARY
local-policy   local    all          network: 194 allow; filesystem read: 1 allow; filesystem write: 1 allow
[exit 0]
Both commands as recorded. The second shows the one local policy and no STATUS column, because nothing is inactive.
no profiles from remote governancejsonFull log
{
  "profiles": [],
  "policy_rules_unavailable": false
}
The JSON form only. The text form prints "No policy profiles found".

No Governance: Managed by <org> line appears, and the docs name that line as the test for an active policy. Every policy check in this capture reports "governance": {"active": false} (the capture). Profile: a named group of organization policies that a developer assigns with --profile at creation, listed by sbx policy profile ls. When no rule matches and no organization governs the machine, the proxy asks for approval. Its 403 body names sbx policy approval ls (the capture), a command the v0.47.0 help tree does not list (conflict C16).

The audit record

Audit record: one JSON object per policy decision or daemon session event, written by the daemon and never by the CLI. Records exist since v0.32.0. The daemon writes them only for a signed-in user with an AI Governance license under an enforced organization policy. This capture therefore produced none, and the directory listing planned as capture K32 was not recorded (conflict C37). The sample record in the docs carries the same reason string that sbx policy log printed for m101-policy:

the reason string in the policy logjsonFull log
  "blocked_hosts": [
    {
      "host": "example.com:443",
      "vm_name": "m101-policy",
      "proxy_type": "forward",
      "rule": "no applicable policies for op(action=net:connect:tcp, resource=net:domain:example.com:443)",
      …
      "reason": "No matching allow rule (default deny)"
The one blocked_hosts entry, cut after its reason.
a denied connection in the docs' sample audit recordjsonFull log
{
  "audit_event_id": "95e7257f-93c9-4f29-bde7-88830e2dae80",
  "timestamp": "2026-05-28T19:15:00.728933Z",
  "schema_version": "1.82.0",
  "category": "AUDIT_CATEGORY_EVALUATION",
  "decision": "AUDIT_DECISION_DENY",
  …
  "resource_id": "example.com:443",
  "os": "macos",
  "app_version": "v0.31.0",
  "client_name": "sbx",
  "hostname": "host-machine",
  "deny_reason": [
    "no applicable policies for op(action=net:connect:tcp, resource=net:domain:example.com:443)"
  ],
  "action_type": "network_egress",
  "network_egress": { "protocol": "tcp" },
  "agent": "claude"
}
The sample record from the Local audit logs page, cut to the fields the text names. The user, organization, and session fields are cut.

On macOS the files are audit-<utc-timestamp>-<process-uuid>-<seq>.jsonl under ~/Library/Logs/com.docker.sandboxes/sandboxes/auditkit/. The daemon finalizes a .tmp file into .jsonl every 5 minutes, 1000 events, or 50 MiB, and never deletes one. category is management, evaluation, or execution, and decision is one of five values from AUDIT_DECISION_ALLOW to AUDIT_DECISION_APPROVAL_DENY. action_type names the payload, such as network_egress, http_request with method, host, port, and path, or tool_invocation.

client_name is sbx and hostname names the machine, which is how a GitHub Actions run with runtime: docker-sbx appears. Docker Cloud delivery is on by default and keeps events searchable for 90 days, with CSV export up to 1 000 000 rows. From 0.39.0 on it also forwards to Splunk Cloud, Dynatrace, Datadog, or Sumo Logic.

Fig. 7.2from Docker Home to a SIEMflow
From Docker Home to a SIEM Top row: an organization policy written in Docker Home under AI Platform is pulled by sandboxd within five minutes and merged with the local policy, whose 194 allow rules become inactive while its deny rules stay active. Second row: the proxy decides one request, example.com:443 from m101-policy, with the reason no applicable policies for op(action=net:connect:tcp, resource=net:domain:example.com:443), and the decision AUDIT_DECISION_DENY. Third row: the daemon writes one record to an audit-<utc>-<uuid>-<seq>.jsonl file under the auditkit directory, and rotation finalizes the file every 5 minutes, 1000 events, or 50 MiB. Bottom row: Docker Cloud delivery keeps the record searchable for 90 days and forwards it to a SIEM destination. A note says this capture had no organization and wrote no record. WHERE THE RULES COME FROM Docker Home Network, Filesystem, MCP policies, org or team scope sandboxd pulls within 5 minutes sbx policy reset forces it local-policy 194 allow: inactive deny: still applied pull merge the proxy decides: example.com:443 from m101-policy no applicable policies for op(action=net:connect:tcp, resource=net:domain:example.com:443), decision AUDIT_DECISION_DENY effective rules audit-<utc>-<uuid>-<seq>.jsonl ~/Library/Logs/com.docker.sandboxes/sandboxes/auditkit/ written by the daemon under an enforced org policy one record per decision rotation every 5 min, 1000 events, or 50 MiB, .tmp to .jsonl Docker Cloud delivery (default on) searchable 90 days, CSV up to 1 000 000 rows app.docker.com, AI Platform, Audit logs SIEM destination Splunk Cloud, Dynatrace, Datadog, Sumo Logic needs sbx 0.39.0 and cloud delivery upload this capture: no organization, no license, no record written (03-policy-org.txt)
One policy decision becomes one JSONL record on the developer machine, and only an enforced organization policy makes the daemon write it. Read top to bottom. The daemon pulls the organization policy, merges it with the local deny rules, and decides each request at the proxy. The record goes to the auditkit directory, where rotation finalizes it and cloud delivery forwards it.

Docker Sandboxes (sbx) and Docker Agent (docker-agent) sbx 0.47.0, docker-agent 1.149.0 · bf4169c · 2026-10-07 · Edition 2026.10