Skip to content

Latest commit

 

History

History
111 lines (73 loc) · 5.56 KB

faq.md

File metadata and controls

111 lines (73 loc) · 5.56 KB

sir Troubleshooting

Note

sir is experimental — test on your own machine, not shared infrastructure. sir doctor recovers any wedged state; report bugs.

sir — Sandbox in Reverse — is an experimental security runtime for AI coding agents. It mediates tool calls at the hook layer and tracks secret taint via IFC, so a lot of its "blocks" are the intended design: you read a secret, and a later external sink is denied because the session is tainted. Use this page when sir is blocking something and you want the shortest path to the cause and the fix.

First checks

sir status
sir doctor
sir log verify
sir explain --last

If those are healthy, sir itself is usually fine and the block is a real policy decision.

How do I install, update, or uninstall?

# Install — and the same command updates in place (overwrites binaries, keeps ~/.sir state):
curl -fsSL https://raw.githubusercontent.com/somoore/sir/main/scripts/download.sh | bash

sir update            # check for a newer release and print the exact upgrade command
sir uninstall         # remove hooks from every detected agent (state preserved at ~/.sir)

For a full removal (binaries + all state, with confirmation):

curl -fsSL https://raw.githubusercontent.com/somoore/sir/main/uninstall.sh | bash

sir update never modifies the binary itself — a deliberate choice for a security tool; it tells you the verified command to run.

Why is sir blocking curl?

This is the most common "false alarm" and it is actually sir working as intended. The current turn probably approved a sensitive read such as .env. sir asks on the read, then tracks the taint forward — the external curl in the same turn is blocked because the session is carrying secret data. That is IFC taint propagation, not a bug.

Typical fixes:

  • Wait for the next turn boundary.
  • Run sir unlock.
  • Add the host with sir allow-host <host> if it is intentionally trusted.

How do I clear the secret-session lock immediately?

sir unlock

That clears the active secret-session posture and records the action in the ledger.

How do I check MCP posture?

sir mcp
sir mcp wrap
sir trust mcp <server-name>            # --remove to revoke

Use sir mcp to inventory servers, sir mcp wrap to harden raw command-based servers, and sir trust mcp only for servers you control or have reviewed (revoke with sir trust mcp <name> --remove).

What data does sir store?

By default, sir is local-only. State lives under ~/.sir/projects/<project-hash>/. The ledger records paths, labels, hashes, and verdicts, not secret file contents.

If SIR_OTLP_ENDPOINT is set, sir can export verdict metadata to your own collector. Secret-labeled file paths are hashed before emission. Set SIR_LOG_TOOL_CONTENT=1 only when you need redacted investigation evidence. Full attribute reference and SIEM query examples live in siem-integration.md.

What if sir detects posture tamper or starts failing closed?

Run:

sir doctor

Doctor verifies the hook config, lease, posture hashes, and ledger chain. If the local posture has drifted, doctor restores the sir-owned hook state from the canonical copy.

How do I verify a published release?

Run:

make verify-release RELEASE_TAG=vX.Y.Z

That wrapper downloads the tagged release assets, verifies the signed checksums, validates provenance, and checks the signed aibom.json.

Which agents are supported?

Claude Code has reference support, Gemini CLI has near-parity support, and Codex has limited support today. sir install auto-detects the supported agents already present on this machine, or you can pin one with sir install --agent <id>:

  • Claude Code: 11 hook events — reference support with native interactive approval, MCP scanning, delegation gating, config change detection, and elicitation coverage.
  • Gemini CLI 0.36.0+: 6 hook events — near-parity support for file IFC labeling, shell classification, MCP scanning, and credential output scanning. Missing lifecycle hooks: PermissionRequest, SubagentStart, ConfigChange, InstructionsLoaded, and Elicitation. See gemini-support.md.
  • Codex 0.118.0+: 6 hook events — limited support with partial tool-path coverage for Bash, native writes, MCP tools, and permission requests where Codex emits hooks. Requires enabling codex_hooks (codex features enable codex_hooks). Missing lifecycle hooks: SubagentStart, ConfigChange, InstructionsLoaded, SessionEnd, and Elicitation. See codex-support.md.

Honest limits

sir is v1 and experimental. Be transparent with yourself about what it does and does not cover:

  • sir is strongest at the hook and tool boundary. It is not a full host firewall and it cannot stop a tool executor that ignores the hook response.
  • MCP injection detection is heuristic (~50 regex patterns). It is an arms race by nature; tainted servers require re-approval as the mitigation.
  • Turn boundaries use a 30-second gap heuristic and are gameable in theory.
  • Shell classification covers the common bypass patterns (wrappers, combined flags, compound commands) but is not a full POSIX parser.
  • Codex remains limited by missing lifecycle hooks and upstream hook delivery gaps.
  • Model-internal paraphrase and arbitrary child-process behavior are out of scope.
  • The default lease is intentionally permissive for developer friction; lock it down with managed policy if you need stricter defaults.