{
  "version": 1,
  "language": "en",
  "title": "Approved commands and sandbox limits",
  "description": "Compare an installation already allowed by permission rules, one requiring approval for specific access, and one denied before execution. The process-start count changes only when an allowed process starts.",
  "caption": "Permission rules let an installation proceed, ask for approval of specific access, or block it before a process starts. Author-created teaching scenarios, not security test results, a product policy order or a security guarantee. Playback time is not command latency.",
  "alt": "Flow diagram: an installation runs within sandbox limits, requests approval for extra access, or stops before execution.",
  "sources": [
    {
      "file": "../../post.md",
      "role": "Author-created permission and installation example"
    },
    {
      "url": "https://www.anthropic.com/research/claude-code-sandboxing",
      "role": "Independent containment mechanism reference"
    }
  ],
  "limitations": [
    "Constructed teaching scenarios; not a security guarantee or product policy order.",
    "A successful installation does not establish that the regression test passed.",
    "Playback timing is illustrative, not measured command latency."
  ],
  "targets": {
    "proposal": {
      "id": "authority-proposal",
      "kind": "node",
      "label": "Install request"
    },
    "policy": {
      "id": "authority-policy",
      "kind": "node",
      "label": "Permission rules"
    },
    "approval": {
      "id": "authority-approval",
      "kind": "node",
      "label": "Specific approval"
    },
    "process": {
      "id": "authority-process",
      "kind": "node",
      "label": "Sandboxed process"
    },
    "blocked": {
      "id": "authority-blocked",
      "kind": "node",
      "label": "Blocked outcome"
    },
    "observation": {
      "id": "authority-observation",
      "kind": "node",
      "label": "Process result"
    },
    "proposal-policy": {
      "id": "authority-proposal-policy",
      "kind": "edge",
      "label": "Check permission rules"
    },
    "allowed": {
      "id": "authority-allowed",
      "kind": "edge",
      "label": "Start allowed process"
    },
    "ask": {
      "id": "authority-ask",
      "kind": "edge",
      "label": "Ask for approval"
    },
    "approved": {
      "id": "authority-approved",
      "kind": "edge",
      "label": "Start approved process"
    },
    "denied": {
      "id": "authority-denied",
      "kind": "edge",
      "label": "Block before execution"
    },
    "process-observation": {
      "id": "authority-process-observation",
      "kind": "edge",
      "label": "Return process result"
    }
  },
  "stateLabels": {
    "action": "Tool call",
    "policy": "Permission decision",
    "approval": "Approval",
    "containment": "Sandbox limits",
    "executions": "Process starts",
    "observation": "Tool result"
  },
  "scenarios": [
    {
      "id": "scoped-approval",
      "title": "Approve this installation",
      "description": "Permission rules ask for approval of this install. The process starts only after that approval.",
      "initial": {
        "action": "One project-local install requested",
        "policy": "Not checked",
        "approval": "Not approved",
        "containment": "Workspace and temporary writes; network restricted",
        "executions": "0",
        "observation": "No process outcome"
      },
      "unselected": [
        "allowed",
        "denied",
        "blocked"
      ],
      "steps": [
        {
          "title": "Check the install request",
          "description": "Permission rules check the install request. This scenario requires approval.",
          "duration": 3400,
          "active": [
            "proposal",
            "policy"
          ],
          "paths": [
            "proposal-policy"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Ask: approve access for this install",
            "approval": "Not approved",
            "containment": "Workspace and temporary writes; network restricted",
            "executions": "0",
            "observation": "No process outcome"
          }
        },
        {
          "title": "Approve this install",
          "description": "Someone with permission approves this install in its specified environment. No process has started.",
          "duration": 3400,
          "active": [
            "approval"
          ],
          "paths": [
            "ask"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Ask: approve access for this install",
            "approval": "Approved for this install",
            "containment": "Workspace and temp; selected registry route",
            "executions": "0",
            "observation": "No process outcome"
          }
        },
        {
          "title": "Start the sandboxed process",
          "description": "The approved install starts in the sandbox. Only now does the process-start count become one.",
          "duration": 3400,
          "active": [
            "process"
          ],
          "paths": [
            "approved"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Ask: approve access for this install",
            "approval": "Approved for this install",
            "containment": "Workspace and temp; selected registry route",
            "executions": "1",
            "observation": "Process started; final result pending"
          }
        },
        {
          "title": "Record the process result",
          "description": "The constructed process exits successfully. The regression test remains a separate unexecuted action.",
          "duration": 3400,
          "active": [
            "observation"
          ],
          "paths": [
            "process-observation"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Ask: approve access for this install",
            "approval": "Approved for this install",
            "containment": "Workspace and temp; selected registry route",
            "executions": "1",
            "observation": "Installation exited 0; regression test has not run"
          }
        }
      ]
    },
    {
      "id": "already-allowed",
      "title": "Install already allowed",
      "description": "Permission rules already allow this install. No new approval is required.",
      "initial": {
        "action": "One project-local install requested",
        "policy": "Not checked",
        "approval": "Not approved",
        "containment": "Workspace and temporary writes; network restricted",
        "executions": "0",
        "observation": "No process outcome"
      },
      "unselected": [
        "ask",
        "approval",
        "approved",
        "denied",
        "blocked"
      ],
      "steps": [
        {
          "title": "Check the install request",
          "description": "The install fits the configured permission rules.",
          "duration": 3400,
          "active": [
            "proposal",
            "policy"
          ],
          "paths": [
            "proposal-policy"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Allow: install fits configured rules",
            "approval": "Already permitted",
            "containment": "Configured installation environment",
            "executions": "0",
            "observation": "No process outcome"
          }
        },
        {
          "title": "Start the allowed install",
          "description": "The process starts within its configured sandbox limits.",
          "duration": 3400,
          "active": [
            "process"
          ],
          "paths": [
            "allowed"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Allow: install fits configured rules",
            "approval": "Already permitted",
            "containment": "Configured installation environment",
            "executions": "1",
            "observation": "Process started; final result pending"
          }
        },
        {
          "title": "Record the process result",
          "description": "Record the installation result without claiming the regression ran.",
          "duration": 3400,
          "active": [
            "observation"
          ],
          "paths": [
            "process-observation"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Allow: install fits configured rules",
            "approval": "Already permitted",
            "containment": "Configured installation environment",
            "executions": "1",
            "observation": "Installation exited 0; regression test has not run"
          }
        }
      ]
    },
    {
      "id": "denied",
      "title": "Deny without execution",
      "description": "The deny path returns a blocked outcome. The process node and its result path remain unselected.",
      "initial": {
        "action": "One project-local install requested",
        "policy": "Not checked",
        "approval": "Not approved",
        "containment": "Workspace and temporary writes; network restricted",
        "executions": "0",
        "observation": "No process outcome"
      },
      "unselected": [
        "allowed",
        "ask",
        "approval",
        "approved",
        "process",
        "process-observation",
        "observation"
      ],
      "steps": [
        {
          "title": "Deny the install request",
          "description": "The install requests access the permission rules deny.",
          "duration": 3400,
          "active": [
            "proposal",
            "policy"
          ],
          "paths": [
            "proposal-policy"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Deny: install exceeds allowed access",
            "approval": "Not approved",
            "containment": "Workspace and temporary writes; network restricted",
            "executions": "0",
            "observation": "No process outcome"
          }
        },
        {
          "title": "Return a blocked result",
          "description": "No process is started. The execution count stays at zero and no process result is fabricated.",
          "duration": 3400,
          "active": [
            "blocked"
          ],
          "paths": [
            "denied"
          ],
          "state": {
            "action": "One project-local install requested",
            "policy": "Deny: install exceeds allowed access",
            "approval": "Not approved",
            "containment": "Workspace and temporary writes; network restricted",
            "executions": "0",
            "observation": "Blocked by permission rules; no process started"
          }
        }
      ]
    }
  ]
}
