skarn(1)
AI coding session security scanner with built-in session search
skarn 0.39.0
New to Skarn? The scanning guide walks through the first skarn assess run per assistant; the research pages publish the measured precision behind the rules.
Real-time guard: every hook event it gates, per host, is documented in the guard hook-event reference.
To wire the guard into your agents, start at the Wire the guard section of the install page.
Synopsis
skarn check [options] skarn assess [options] skarn vet [options] skarn mcp skarn baseline <audit|accept> <file> [<fingerprint>] [options] skarn search <query> [options] skarn recent [options] skarn restore <session> skarn messages <session> [options] skarn stats [options] skarn tools [options] skarn mcps [options] skarn cmds [options] skarn export [options] skarn guard [report|accept <fingerprint>] [options] skarn setup [options] skarn doctor [options] skarn completion <shell> skarn serve [options] skarn taxonomies skarn license [<file>|-|renew] [options] skarn eula [accept] skarn fleet <aggregate|readout> <path> [options] skarn inventory [options] skarn --version skarn --help
Description
Skarn is an AI coding session security scanner with built-in session search. It detects leaked credentials and the attack patterns that cause or exploit them in the local session transcripts of AI coding assistants (Claude Code, Gemini CLI, Antigravity, Codex CLI, Grok Build (formerly Cursor), VS Code Copilot Chat, GitHub Copilot CLI, Copilot in Code, Kimi Code CLI, Grok Build CLI, Grok Bot, OpenCode, Cline, and Kiro CLI, plus Claude Code and Cowork transcripts exported from a Claude Enterprise organization through the Compliance API), and it lets you search, browse, and analyze those sessions.
Skarn is a single static binary. It scans locally and makes no network connection by default; the only features that transmit data off the machine are opt-in and named explicitly in the SECURITY section below.
Skarn has two faces over one parsing engine. The recall commands (search, recent, stats, and friends) are the daily use surface. They match and filter on the raw session text, then mask every detected secret in what they print, which runs the detector over the sessions a command emits: a value the detector matches in any session of that output is masked in every session of it, while a value it matches nowhere in that set prints as recorded. A credential-shaped piece of a recorded tool name is masked the same way, wherever the output prints it, even when no rule matched it. A session that is still being written when a command reads it is stamped, scanned and read again, up to three times, so what prints always comes from bytes the scan covered; one that keeps changing is left out of that run with a count on stderr, and a single-session view of it asks you to re-run once it is quiet. The check command is the security scanner: it runs the detection rules, correlates attack chains, and computes a session risk score for CI/CD gating. Every finding is mapped to MITRE ATLAS, the OWASP Top 10 for LLM Applications 2025, and CWE; run skarn taxonomies to print the crosswalk and the pinned framework versions.
Every recall command (search, recent, stats, cmds, tools, mcps, messages, export and restore) says what it could not read. Once per run, after anything it writes to stdout, it prints one stderr line for each kind of gap whose count is not zero: how many session sources failed discovery, how many session stores could not be read in full, how many sessions hold truncated or compacted transcript content, and how many Copilot in Code session folders hold no transcript, so no session is listed for them; the first two lines also say that sessions or content those sources and stores hold may be missing from the output. A Copilot in Code session folder counts when it holds no events.jsonl and the profile's session-store.db does not list its id, which would list it as a session from the index. The JSON objects that describe a whole output carry the same counts as tools_dropped, stores_unreadable, sessions_truncated and session_folders_without_transcript: right after compliance_withheld in recent, stats without --by and export in json, and right after total_failed in the tools and mcps aggregates. Output that is a JSON array, one object per line, or one object for one session keeps its shape and gets the stderr lines only. A link on a session store path whose target is a network path, a link Skarn cannot resolve or a component it cannot check for links, and under --evidence-home any link below the evidence home, is not followed: each such link counts once in stores_unreadable, except a Copilot in Code session-state link inside a profile or a linked profile candidate folder, which is skipped without a count, and one more stderr line per reason (network target, a link that could not be resolved, a path that could not be checked for links, below the evidence home) gives its count after the gap lines; a recorded working directory that passes through a link Skarn does not follow gets its own line and is not counted. A dropped source and an unreadable store are reported whenever they occur; sessions_truncated counts the sessions in the command's window, and on a lookup by session id only the session found; session_folders_without_transcript counts the folders whose own modification time falls in the command's window, and none on a lookup by session id. --cli narrows the counts, except on a lookup by session id, which covers every assistant over all history; --project, --user and --until never narrow them. These counts change no recall exit status.
macOS writes an AppleDouble companion named ._<name> beside a file that carries an extended attribute when it copies that file onto a volume that cannot store the attribute itself, such as exFAT, FAT or some SMB shares. In every session store, Skarn skips a regular file whose name starts with ._ and whose first four bytes are the AppleDouble header 00 05 16 07: it is not read as a session, a record or a member of one, and no count or notice includes it. A ._ file that is a link, has a second hard link, cannot be opened or lacks the header is handled like any other file in the store.
Commands
check [options]- Scan AI sessions for leaked credentials and attack patterns.
assess [options]- Scan every AI session, print a redacted summary. Free, no license.
Scan every AI session on this machine and print a friendly risk summary, with an optional shareable redacted report and a scoped incident dossier. Outside a dossier it also lists any credential saved in an assistant's permission rules, which it reads on this machine from the configuration files that
skarn vet --all-projectsreads. Free, no config, no license on this machine. Reading a copied home with--evidence-homerequires Pro, and assess then reads saved permission rules from the copied home's own configuration files. Run at a terminal without--evidence-homeit also names, once per release, a hook in your own per-user assistant config that has fallen behind this build, so an event a newer template gates does not go unscanned unnoticed; it looks at that config only, never at a repo's committed hooks and never at a fleet-managed one. vet [options]- Vet the local AI config, read-only and offline. Free, no license.
Statically vet the local AI assistant configuration (hooks, MCP servers, permission grants and rules, terminal auto-approve rules, plugins and skills) for risky patterns across Claude Code, Codex CLI, Grok Build (formerly Cursor), the Copilot CLI and VS Code Copilot Chat, Copilot in Code, Gemini CLI, Grok Build CLI, Grok Bot, Cline, the Kiro CLI (including its migrated Amazon Q Developer CLI configuration), and Microsoft Scout. Read-only, and offline for local roots; free, no license for a live home. With
--evidence-home<dir> (Pro), vet reads only the copied home's own configuration files. mcp- Local stdio MCP server: read-only, redacted scan and config tools.
Run a Model Context Protocol server on stdin and stdout for one client. Messages are newline-delimited JSON-RPC 2.0, one message per line, UTF-8, with no embedded newline; a request frame larger than 1048576 bytes is answered with a single -32600 error and skipped. The client opens with initialize and the server replies with the negotiated protocolVersion, a tools capability, its serverInfo and a short instructions paragraph; tools/list and tools/call before that reply are answered -32600, while ping is answered at any time. Notifications, including notifications/initialized and notifications/cancelled, are accepted and never answered. An unparseable frame is -32700, a frame that is not a JSON-RPC 2.0 request object is -32600, an unknown method is -32601, and a malformed initialize or an unknown tool name is -32602. An argument a tool refuses - an unknown key, a wrong type, an out-of-range number, a string over 4096 bytes or one carrying control characters - comes back as a normal tool result marked isError so the model can correct itself, never as a protocol error. On first run the End User License Agreement notice is printed as one line on stderr before the protocol loop starts and the server proceeds;
skarn eula accept, orSKARN_EULA_ACCEPTED=1 in the client's env block, silences it. Nothing but MCP messages is ever written to stdout. Stderr is not part of the protocol and may carry a diagnostic from the scan path, for example when the home directory cannot be resolved; the tool still answers with a normal result marked isError and the server stays up. Register the server in a client with the commandskarnand the argument list ["mcp"], which requires skarn on PATH; the documented alternative is the version-pinned formnpx -y @skarn-security/skarn@X.Y.Z mcp, which downloads that exact version from the npm registry on first use and caches it. An unpinned npx form is reported as a finding byskarn vet, so pin the version. baseline <audit|accept> <file> [<fingerprint>] [options]- Triage into a baseline (audit); accept a false positive (accept).
Interactively triage findings into a committed baseline (audit), or record a false-positive fingerprint (accept).
search <query> [options]- Search past AI sessions (literal text, or --regex).
recent [options]- List recent sessions.
restore <session>- Restore a session.
Print the shell command that resumes a session, so
eval $(skarn restore <session>)returns you to its working directory. When the recorded working directory or session id carries a byte the running shell would read back as something else, skarn refuses to render the command: stdout stays empty, the refusal is named on stderr, and restore exits 1. When the recorded working directory is not a local absolute path for this operating system, a directory on it cannot be checked, or a link on it points to a network path, the command is printed withoutcd <dir> &&(the Cursor and VS Code forms without the workspace argument), and one stderr line says the directory was not used without naming it. messages <session> [options]- Show the messages of a session.
stats [options]- Session analytics: tokens, models, tools, and timing.
Session analytics: tokens, models, tools, and timing (text, json, csv, or html).
tools [options]- Show the tools used across sessions.
mcps [options]- Show the MCP calls made across sessions.
cmds [options]- Show the shell commands run across sessions.
export [options]- Export sessions as text, json, ndjson, html; secrets masked.
Export sessions as text, json, ndjson, or html, with every detected secret masked.
guard [report|accept <fingerprint>] [options]- Pre-execution hook: read an event on stdin, emit a verdict.
Real-time pre-execution hook for AI coding assistants; reads an event on stdin and emits a verdict. Server-side agent runtimes call it through the sdk host, which reads Skarn's own versioned envelope and writes one JSON verdict object. guard report summarizes the audit log and forecasts what enforcing would cost. It recommends switching the hooks to enforce only once the flagged calls in the window span five or more days with no deny or would-be deny recorded among them. A recorded ask does not stop the recommendation, even on a host that answers an ask with a block in enforce mode, and neither does a detect-only record; the recommendation carries the
skarn setupcommand for each host setup wires and the manual step for any other host; the sdk host gets the step that switches its runtime client to enforce. The guard logs nothing but flagged calls, so a window with none is no evidence that the hook ran and gets no recommendation. At a terminal it also names, once per release, a hook in your own per-user assistant config that has fallen behind this build. guard accept records a flagged finding as a false positive so the guard stops flagging it. guard report counts an sdk window by runtime. setup [options]- Wire the guard hook into detected assistants, then self-test it.
Wire the
skarn guardhook into detected AI coding assistants, then verify it with the guard self-test. Setup merges its entries into each assistant's existing config, backs up every file before changing it, and--removedrops those entries again. A config file that is itself a symlink is written through at user scope, to the file it names, and the link stays in place; a link whose file is missing, or whose directory setup cannot write, is refused on install, and--removereports a link whose file is missing as unchanged. At--scopeproject setup refuses that file, and a file behind a symlinked directory, instead. A config file setup creates is readable by its owner only on macOS and Linux, and an existing file keeps its mode. doctor [options]- Check whether skarn is actually protecting this machine.
Check whether skarn is actually protecting this machine: binary, license, wired assistant hooks, guard log, session stores, and the guard self-test.
completion <shell>- Print a completion script for bash, zsh, fish, or powershell.
PowerShell is the fourth shell:
skarn completion powershellprints a script that registers a native argument completer for skarn and skarn.exe, to dot-source from a PowerShell profile (Windows PowerShell 5.1 and PowerShell 7). Every script is generated from the same command model as this manual, so each one completes every verb and flag it documents. A shell name outside bash, zsh, fish, and powershell prints the supported list on stderr and exits 1. serve [options]- Local web UI on 127.0.0.1, with every detected secret masked.
Start the local web UI (search, recent, stats, and a redacted scan view) bound to 127.0.0.1, with every detected secret masked.
taxonomies- Print the crosswalk plus Cyber Resilience Act process evidence.
Print the standards crosswalk (MITRE ATLAS, OWASP LLM Top 10, CWE) and the EU Cyber Resilience Act obligation axis (process evidence relevant to an obligation, not proof of product conformity).
license [<file>|-|renew] [options]- Show the active license, install one, or renew it.
Show the active license, install one from a file (or stdin), or renew it from the license service.
eula [accept]- Print the End User License Agreement, or record acceptance.
Print the End User License Agreement embedded in the binary (the same text distributed as EULA.md and published at https://getskarn.com/terms/), or record acceptance of the current agreement version with
skarn eula accept. Skarn presents the agreement on first run: on a terminal it asks for acceptance before the invoked command runs (declining exits 1 and performs no operation; the next run asks again), and in a non-interactive run (CI, pipes, containers) it prints a one-line notice on stderr and proceeds - running Skarn constitutes acceptance, and recording it withskarn eula acceptsilences the notice. Acceptance is recorded locally in ~/.config/skarn/eula-accepted.json (honoring $XDG_CONFIG_HOME) and never transmitted; installing a License Token withskarn license <file>records it too, mirroring the acceptance given on the registration form. A record that cannot be written never blocks the run - Skarn proceeds and asks again next time. Reading the agreement never requires accepting it first:skarn eula,--help,--version, bareskarn,skarn completion,skarn doctor, and every form ofskarn guardrun without the acceptance interaction. When a new agreement version is published, a changed major version re-prompts; a minor change prints a one-line notice and continues.SKARN_EULA_ACCEPTED=1 suppresses the interaction for a run without recording anything. fleet <aggregate|readout> <path> [options]- Fold drops into the org aggregate; render the executive readout.
Fold a directory of per-machine drop artifacts into the fleet aggregate that serve
--fleetrenders (aggregate), or render the leadership readout from one or two aggregates (readout). Both are Enterprise: without a covering license they refuse with exit 5 before reading any file, and with no usable license at all they exit 7;--helpstays ungated. inventory [options]- Inventory assistants, MCP servers, guard mode. Free, no license.
Print one inventory record for this machine: per assistant, the completeness of its session and configuration observation, its declared session store roots, the client versions observed in a session, its declared and called MCP server counts, its last activity and session count; per machine, the configured and effective guard mode. Inventory needs no license for a live home. With
--evidence-home<dir> (Pro), the record describes the copied home's sessions and home-layer configuration. The window defaults to all history, and--projectfilters sessions only.
Options
Check options
Control the security scan: which rules run, the scan window, the output format, and CI gating. check needs a license and exits 7 before scanning without a usable one. The free license is issued at https://getskarn.com/free after an email confirmation, and skarn verifies it offline. Only --audit-verify is exempt. With --evidence-home, check --format ndjson writes the skarn.inventory line after the summary. It describes the copied home's sessions and home-layer configuration. If the home is an existing directory typed in a refused path spelling, the inventory line reports one gap at the home and Skarn reads no configuration there. The policy file (--policy), the org baseline directory that --baseline unions and --baseline-merge consolidates, and the hash-chained audit log (--audit-log) are Pro capabilities of check: check reads the policy file and the org baseline directory, and it reads the audit log's chain head before appending this scan's record. When it decides a verdict, skarn guard consults only the personal accepted-findings file. The four permissive keyword-assignment rules (generic-api-key, inline-credential-assignment, dotenv-contents-leaked and export-secret-env) report a match on a line that starts with a comment marker in a user message or tool result as suppressed with reason comment, so it does not gate, until the same rule matches the same value on a live line or a true-positive baseline label confirms it. A finding from those four rules is one severity step lower when its key name carries a test word, a file-read tool returned it from a test directory, or a write, or an edit whose path field is serialized first, targets an env template (.env.example, .env.template, .env.sample, .env.dist; on a host that records the tool input as flattened key-value lines, which the JSON-argument hosts do not); the lower step never hides it, and the finding also reports confidence low and likely test value. The same four rules report confidence low, with the severity untouched, when the field name immediately before the value is a form token (csrf, xsrf, authenticity_token, nonce and _token spellings) or the match came back from a web-fetch tool and from nowhere else in the session; nothing is removed by either. A provider secret-key rule reports high on its own, without source promotion. The forty-one rules that shared one delimiter group (the Anthropic, OpenAI, Stripe, GCP, npm, Grafana and Hugging Face keys among them) match a key whatever delimiter follows it, a delimiter being any character outside the shared key alphabet of letters, digits, underscore, plus, slash, equals and hyphen (a comma, a closing parenthesis, a period or a space as much as a quote); generic-api-key, whose value class includes the period, ends only at whitespace, a quote, a backtick or one of ; , ) ] } < > |, so a value with ! or & in it is matched whole or not at all, and the JWT and SendGrid rules refuse a dotted continuation because their alphabets include the dot, with the captured value ending at the key; a rule with its own delimiter shape, such as the Postman or Vault token, is unchanged. The by-severity line names how many critical findings are attack chains or behaviors with no secret value. A dynamic-payload exfiltration that names at least one URL and whose every named destination is a loopback literal (localhost, 127.x.x.x in canonical octets, ::1, 0.0.0.0) reports high instead of critical, with a description saying so, because a loopback address in the command does not prove the data stayed on the machine; a proxy, DNS, interface or connection-override option or a proxy variable on the command line that names a host outside the loopback set, a config variable, a unix socket or URL file, a command substitution that is not a plain local read, an unknown command in the pipeline, or a destination it cannot read as a loopback literal keeps it critical. The text findings list and the credential recap print one row per distinct secret value per session file (a keyword-prefixed rule such as cloudflare-api-key captures its keyword with the value, so it stands beside a permissive match on the same value rather than grouping with it), the row carrying the strongest finding (an active finding before a suppressed one, then the highest severity, then the highest confidence, then the most specific rule; an identifier value such as a package or variable name is never grouped or counted) and naming the others after also matched; every incident stays in the machine formats, where the primary carries alsoMatched, a member carries groupedUnder, and the top-level distinctSecretValues counts the primaries (one per distinct value per session file, so a value leaked in five sessions counts five) beside the unchanged incident list. A link on a session store path that Skarn does not follow counts as one unreadable store per link: its target is a network path, it cannot be resolved, a path component on it cannot be checked for links, or, under --evidence-home, it lies below the evidence home. The one exception is Copilot in Code, whose session-state link inside a profile and linked profile candidate folder are skipped without a count. On Windows a link whose target is a device path other than a drive letter or a volume GUID path is not followed either: a MUP or UNC device path counts as a network target, and any other device path as a component that could not be checked for links. After the output, stderr gives one line per reason with its count, and the --format evidence pack lists the same lines under Coverage; a recorded working directory that passes through such a link gets its own line and is not counted. Skarn checks a path for links immediately before each open, so a directory or file replaced by a link, or a link whose target changes, between the check and the open is followed. A path component that could not be checked for links has no file identity, so two different spellings of it can count twice.
Assess options
The zero-config machine-scan wedge: scan every AI coding session on the machine and print a friendly risk summary, no flags and no license. Reading a copied home with --evidence-home requires Pro. -o writes a shareable redacted report (HTML or Markdown); --json emits the redacted scan for scripting. The scan is scoped by the same filters as check. The Findings line says how many critical findings are attack chains or behaviors with no secret value, so a reader knows why the exposures list below can hold fewer rows than the critical count. The summary, the Markdown report and the HTML report show one row per distinct secret value per session file, naming the other rules that matched it after also matched; --json keeps every incident and marks the primary with also_matched, a member with grouped_under, and stats.distinct_secret_values with the number of primaries, one per distinct value per session file. Assess also lists the credentials it detects in saved assistant permission rules, including Gemini CLI's user policy files and Codex CLI's rules files, and in VS Code Copilot Chat's terminal auto-approve rules, the finding skarn vet reports as vet-permission-plaintext-credential, for every assistant that rule covers, under the heading Credentials in saved permission rules. Without --evidence-home, it reads the configuration files skarn vet --all-projects reads: the home layer, the system managed layer, VS Code's user directory (its rows carry the anchor vscode_user in --json and the location VS Code user followed by the file in the reports), the project at the working directory, and every project Claude Code records in ~/.claude.json and in the .claude.json of each directory named by CLAUDE_CONFIG_DIR or SKARN_CLAUDE_DIRS, under the same root variables vet follows. Gemini CLI's user settings row carries the anchor gemini_home and the relative path settings.json in --json. The reports show gemini home settings.json for that row and gemini home policies/ followed by the file name for a user policy. A credential from Codex CLI's user rules files carries the anchor codex_home and a path relative to that directory, such as rules/default.rules, in --json, and the reports show codex home followed by that path. A project Claude Code never recorded is read only when assess starts in it, so the section can differ by start directory. The section stays outside the risk score, the severity and finding counts, the risk band and the exit code: a configuration file that could not be read or was not fully scanned is a gap named inside the section, never an exit 6, and never part of the session coverage sentence. On a live home, the terminal summary gives the section one line, after the next-step lines and before the share line, and only when the section lists a credential or did not complete; the line counts the rules and the files that carry them and names skarn assess -o report.html as the place that lists every one. --cli keeps the rows of the assistants that map to that tool, and every row is high, so --severity low, medium or high keeps them all. --project, --session, --user and --severity critical leave the section out of scope, and assess reads no assistant configuration file for it; --hours and --baseline do not change it. With --evidence-home, the same filters apply. When the section is in scope, assess checks the copied home's own configuration. An existing directory typed in a refused home spelling produces one gap at the home, and assess reads no configuration there. Even when the section lists no credential, the terminal summary and the Markdown and HTML reports include the sentence Read from the evidence home's own configuration files; project files and the system layer were not read. Each half of the output is masked with what the other half detected: the section with every value the session scan detected, including values below the requested severity, and the session fields, such as contexts and project names, with every value vet detected in configuration. For a VS Code terminal auto-approve key, the session fields are also masked with the regular-expression-escaped spelling VS Code saves the value in and with the whole key as JSON decodes it, slashes and anchors included; a transcript that quotes a settings file's own bytes in another spelling, such as a JSON escape, is not matched. A detected value shorter than 16 bytes, or its escaped spelling, that a session field writes directly between letters or digits is not masked there. Assess counts a link on a session store path that Skarn does not follow as check does, prints its lines on stderr after the summary or the --json output, and lists them in the Markdown and HTML reports, the --dossier ones included.
Vet options
Statically vet this machine's AI assistant configuration - hook commands, MCP server definitions, permission grants and rules, Gemini CLI's user policy files, Codex CLI's rules files, VS Code Copilot Chat terminal auto-approve rules, and installed plugins and skills across Claude Code, Codex CLI, Grok Build (formerly Cursor), the Copilot CLI and VS Code Copilot Chat, Copilot in Code, Gemini CLI, Grok Build CLI, Grok Bot, Cline, the Kiro CLI (including its migrated Amazon Q Developer CLI configuration), and Microsoft Scout - and report the risky patterns it finds: hooks that exfiltrate local content or fetch-and-execute remote code, hooks that post the session event envelope to a remote http endpoint, hooks that rewrite an assistant's own config, MCP endpoints on remote hosts, MCP launchers with no pinned version or digest, permission grants that approve a whole class of actions, grants that let the assistant ask to widen its own authority, and extensions installed from a remote source or carrying no integrity marker. Two more patterns come from permission metadata and declared posture flags alone: plaintext credential stores whose file modes grant group or other read, and an assistant configured with an always-on local-exec and egress channel. Vet reports declared configuration, not the effective merge across layers, so a grant a higher layer denies, or a permission mode an administrator lock disables, is still surfaced: the declaration exists and is one edit away from active. Without --evidence-home, vet reads project configuration at the working directory, at the top of its git repository and, in a linked worktree, at the main checkout, so a host that also loads configuration from other directories is covered at those three and no further. At each of them vet reads Claude Code's project files and the project-level Cursor (.cursor/mcp.json, .cursor/hooks.json, and the Cursor CLI's .cursor/cli.json), Gemini CLI (.gemini/settings.json), Codex (.codex/config.toml, .codex/hooks.json, and the .codex/rules/ directory, which Codex CLI loads only in a trusted project) and Copilot CLI (.github/mcp.json, and the bare entries of .mcp.json) files and VS Code's .vscode/settings.json, whether or not the host trusts the folder, and reports each apart from the home file of the same name. Vet reads only the .vscode/settings.json directly at each of those directories, and under --all-projects at each recorded project directory and its own git top and main checkout, never one in a folder below them, so a subfolder's file is read only when vet starts there or Claude Code recorded it as a project. --all-projects adds the projects Claude Code records in ~/.claude.json and in the .claude.json of each config directory named by CLAUDE_CONFIG_DIR or SKARN_CLAUDE_DIRS; those declared directories contribute only their projects keys, and Skarn does not vet their other content. --project-only reads the project files alone. Vet deduplicates project file visits across roots and keeps the first visit's path; separate hard links still count as separate files outside Cline's file-identity checks. A hook entry's command, bash and powershell fields are each vetted, and the hook rules also match the PowerShell forms of a download, an upload, an execution and a write, in any letter case; a command passed through -EncodedCommand or an abbreviation of it is flagged as dangerous and is not decoded. Vet is read-only: it opens each config file it reads for reading and never writes one. For local roots it is also offline and makes no network call. When vet accepts a network path as a root, the second line of its text report ends at read-only. A config file that does not exist is skipped; a config file that exists but cannot be read is a coverage gap that fails closed under a --fail-on flag. Each per-assistant configuration file listed below whose contents vet reads is opened once by each row that reads it, and its permission metadata is read off that same handle. The stat-only stores are the exception, because their contents are never wanted: Grok Bot's sand-secrets.json, the Copilot CLI's data.db and each Copilot in Code profile's data.db, whose file mode alone decides a finding, and Grok Bot's local-exec-daemon-connection.json, whose presence alone does, are measured by a stat that does not follow a symlink and are never opened, so a symlinked store is reported as a coverage gap named SymlinkNotFollowed rather than measured through its target. Cline's secrets.json and settings/providers.json are also stat-only: vet reads only their modes. In a live local home, vet follows local links after inspecting each path component, and refuses network targets. In a live local home, vet follows links to other fixed-path config files, so a dotfiles-managed configuration keeps its coverage; vet also follows local links inside Cline hook directories after inspecting each component and refuses network targets. In Gemini CLI's user policies/ directory and each Codex CLI rules/ directory, vet lists up to 4096 directory entries, reads up to 64 .toml or .rules files in byte order by name within a total of 4 MiB per directory, and reports a linked .toml or .rules entry as a coverage gap. In other walked hook, agent or workspace-roots directories, vet does not follow file symlinks and reports a coverage gap. A path that is not a regular file is named as a coverage gap rather than read. The config-file count the report prints, and the configFilesRead field in the json and sarif output, count every such file vet examined, including those stores. A file that several config rows open at the same path, such as a project .mcp.json that the Claude Code and Copilot CLI rows both read, counts once; one file that two different rows open under two different paths through a link, such as a Grok config linked to a Codex config, counts once per path. The other hook directories and the extension manifests vet walks keep their own older read path. A JSON config that repeats a key is read both ways, as the reader that keeps the first value sees it and as the one that keeps the last does, every finding either reading carries is reported, and the repetition itself is reported as vet-config-duplicate-key at medium, never as a coverage gap, so --fail-on-severity medium now exits 1 on such a file where it used to exit 6. Vet also reads the env block and the headers block (Codex's http_headers table) of every MCP server definition in the files above, whatever the server's transport, and reports vet-mcp-plaintext-credential when a value carries a credential as a literal: high when a detection rule from the embedded pack matches inside the value, naming that rule, and medium when no rule matches but the key is secret-named and the whole value is a secret-shaped literal. A value that is entirely a reference to an environment variable, a secret manager or a file path, spaces included, is not reported unless it embeds a credential the detection rules recognize. A dotted TOML env key, a TOML value that continues on a later line, any other mcp_servers line the TOML reader cannot read whole (an unbalanced bracket, a root-level or bare-section mcp_servers assignment, a table nested under env) and a Grok Build CLI env sub-table stay coverage gaps, and the stat-only stores are still never opened. Only a redacted preview of the matched value is printed. Every matched value is scrubbed from every field of every finding in the report and from every coverage-gap path and reason, in each spelling vet derives for it: case, percent-encoding, control masking, and the escaped spelling that a Codex CLI rules file or a Gemini CLI policy file uses for that value inside a string vet checks for credentials, found by one search over those strings that ignores ASCII case, as the scrub itself does. Overlapping matches are masked as one span, and a field the scrub cannot finish within its fixed work bound is masked whole. A value written in more than sixteen distinct escaped spellings across the rules and policy files read, or a search for escaped spellings that passes its fixed work or memory bound, masks every text field of the report whole, such as a title, a detail and a locator, shows every path as [path withheld] and makes the file being searched one coverage gap that vet names as not fully scanned; the rule ids, severities, counts and the gap's fixed reason stay readable. Vet derives no escaped spelling for a value's percent-decoded form, for a Gemini pattern between its TOML and its regular-expression unescaping, or for a value inside a Codex justification or a match or not_match example, none of which vet checks for credentials; skarn assess derives none for a value that only its session scan found, and skarn inventory derives them separately for its home and project passes, so a project file's escaped spelling of a value found only in a home file is not matched. Every path, a finding's config path and a coverage path alike, is scrubbed before it is masked or shortened for display. If the embedded rule pack cannot be loaded, that is a coverage gap that the stderr notice names and the other rules still run; if the gap itself cannot be recorded, vet exits 6. A detection rule that stops at its regex work limit on an MCP server env or header value, or on a permission grant or rule, has not checked the whole value, so vet masks that value whole wherever it appears, reports no secret-shaped finding for it, keeps any finding a rule did complete with its preview fully masked, as it masks the preview of the same value in any other finding, reports an overbroad grant with its rule text withheld, and lists the file once as a coverage gap that it names as not fully scanned rather than unreadable; that gap fails closed under a --fail-on flag like any other. The command-line password detector returns at most 64 values from one permission rule, and for a rule that reaches that limit, exactly 64 values included, vet keeps the rule's one finding with its preview fully masked, masks the rule whole, and lists its file as not fully scanned. A value after the first 64 is masked wherever the rule's complete text appears, but a copy of it that stands alone in another field is not reliably masked. Vet also runs the embedded rule pack over every permission grant and rule string it reads from any host, including Claude Code allow, ask, and deny entries directly under permissions and legacy allowedTools lists directly under an entry in the root projects object in ~/.claude.json, both as written and with a Name(command) tool wrapper and one trailing :* or * removed, and reports a match as vet-permission-plaintext-credential at high, naming the matched detection rule with a redacted preview. When the wrapper names a POSIX shell tool that the session scan also reads as one (Bash, run_shell_command, shell, exec_command and the others, but not powershell), vet also runs the built-in command-line password detector over the unwrapped command, with the stated limits it has in a session scan, and reports a hit the same way, naming the detector's rule id, such as sshpass-password or mysql-client-password; a rule that both match is reported once, under the detector's id. From the Cursor CLI's ~/.cursor/cli-config.json and a project's .cursor/cli.json, vet reads only permissions.allow, as grants, and permissions.deny, as rules, and nothing else in either file. In Gemini CLI's user policy files, allow, ask_user, deny, and safety checker entries can produce vet-permission-plaintext-credential findings, and in Codex CLI's rules files, allow, prompt and forbidden calls can. Vet reports an unrestricted shell allow as vet-permission-overbroad at high with the detail run_shell_command(*). From VS Code's user and profile settings.json files and a workspace's .vscode/settings.json, vet reads only the entries of chat.tools.terminal.autoApprove and of the deprecated chat.agent.terminal.autoApprove that VS Code still merges over it, un-escapes each key from the regular-expression form VS Code saves an exact command line in, and runs the rule pack and the command-line password detector over the bare command text whatever the entry's value, a deny included; only an approving key whose pattern is on a closed list that matches every command, such as /.*/ or /^/, is reported as overbroad. The files section states the rules and the limits. Only the rule pack and the command-line password detector decide whether a rule string carries a credential; there is no secret-shaped tier for rule strings. Vet never judges ask or deny entries, or Claude Code's legacy allowedTools lists, as overbroad. The matched values and their derived spellings join the report-wide scrub set; for a detector hit, the spelling the command used for the value, each literal source piece of the value of 4 bytes or more (the parts between its quotes, escapes, brackets, colons and equals signs), and a value shorter than 16 bytes are masked whole wherever they appear. An overbroad finding on a grant that carries a matched value prints the detail rule text withheld: it carries a value a detection rule matched. Vet surfaces risky configuration and does not change it. With --evidence-home <dir> (Pro), vet reads only the copied home's own configuration. It skips project files and the system managed layer. It ignores roots named by GEMINI_CLI_HOME, CODEX_HOME, GROK_HOME, COPILOT_HOME, KIRO_HOME, CLINE_DIR, CLINE_DATA_DIR, CLINE_MCP_SETTINGS_PATH, CLINE_PROVIDER_SETTINGS_PATH, CLINE_GLOBAL_SETTINGS_PATH, CLAUDE_CONFIG_DIR, SKARN_CLAUDE_DIRS, VSCODE_APPDATA, or SKARN_MANAGED_ROOT. It locates the VS Code and Cursor user directories and Copilot in Code profiles under the copy using the operating system it runs on. You cannot combine --evidence-home with --all-projects or --project-only. The text report opens with Skarn vetted an evidence home's AI assistant configuration. On stderr, vet prints skarn: vet read the evidence home's own configuration; project files and the system layer were not read. Vet and inventory accept a plain UNC home or a root you name with GEMINI_CLI_HOME, CODEX_HOME, GROK_HOME, COPILOT_HOME, KIRO_HOME, CLINE_DIR, CLINE_DATA_DIR, CLINE_MCP_SETTINGS_PATH, CLINE_PROVIDER_SETTINGS_PATH, CLINE_GLOBAL_SETTINGS_PATH, LOCALAPPDATA or VSCODE_APPDATA. Use either separator in \\server\share\path, including //server/share/path on macOS and Linux. The same rule applies when assess reads saved approvals or check builds the inventory line. If HOME uses a refused spelling, discovery reports one NetworkPathRefused gap and reads nothing under it. Skarn still refuses network paths in recorded project keys, session records, gitdir: pointers and link targets. With --all-projects in a live network home, vet checks recorded project keys and gitdir: pointers and opens accepted paths as it does for a local home. It still refuses a network path to a CLAUDE_CONFIG_DIR or SKARN_CLAUDE_DIRS state file. Below an evidence home or a network root you name, vet and inventory skip each symbolic link. A network target gives NetworkPathRefused and any other target gives SymlinkNotFollowed. EntryKindUnresolved means Skarn cannot determine an entry's kind. PathLeavesAnchor means a path would climb above its root through .. or contains a Windows component with a colon. A Grok hooks-paths entry outside its evidence home or live network Grok root gives OutsideAnchor. Skarn never opens that entry, even if it names a local hook file. A live local registry can still name an outside file. Skarn refuses \??\ and \Device\ registry entries in every mode. Skarn cannot see a link that an SMB server resolves itself. A Distributed File System referral can direct the client to another server.
Mcp options
Run a local Model Context Protocol (MCP) server so an AI coding assistant can call Skarn directly. The transport is stdio: newline-delimited JSON-RPC 2.0 on stdin and stdout, one server process per client, and the process exits 0 when the client closes stdin. The negotiated protocol version is 2025-11-25. A client that asks for 2025-06-18 gets that version back; any other request, including the batch-era 2025-03-26 and the stateless 2026-07-28, is answered with 2025-11-25. Batched requests are not accepted: a top-level JSON array is answered with one -32600 error. Four read-only tools are exposed by default, and --enable-recall adds search_sessions and get_session, which return transcript text and are described under that option. scan_sessions returns the same redacted scan report that skarn assess --json prints, minus the saved_approvals key, minus the per-incident context snippet, minus the reach object and minus every transcript-authored label, which means the project labels on both the incidents and the attack chains and the tool name on an incident; it takes severity, hours, project and user, where user is a comma-separated list of the user ids or email addresses a Compliance API export recorded, an id matched exactly and an address case-insensitively. Unlike assess, scan_sessions does not mask session fields with the values vet detects in assistant configuration. vet_configs returns the masked findings report that skarn vet --format json prints and takes no arguments; those findings quote this machine's own configuration, including hook command lines and MCP server definitions, with any credential-shaped value masked. list_sessions returns recent sessions as identifiers and counts only - session id, assistant, the two timestamps, message and tool counts, token totals, and the user id a Compliance API export recorded - and takes hours, limit, project, cli and user. session_stats returns the same aggregate counts across those sessions and takes hours, project, cli and user. Every tool is annotated read-only, non-destructive and closed-world. No tool writes, changes or removes a file, no tool opens a network connection, and no default tool returns session message text or a label authored inside a transcript such as a project name, a git branch, a model id or a tool name. Every value a detector matched is reported only in its masked form, which keeps at most the first character and last two characters and discards the middle; a value under 16 characters, and any personal data, is replaced whole. That is a truncated preview rather than a one-way transform of the whole value. Three classes of string are still passed through as they are: a file path, a session id, and a timestamp. Each is a locator the tools exist to hand back, and each is read from the transcript or the store rather than generated by Skarn, so a credential deliberately planted in a session id or a directory name reaches the client verbatim. A Claude Code store also encodes the project directory into its transcript file name, so the returned session_file carries that directory in encoded form. Every other Skarn surface passes those three through the same way, with one exception: a scan report, scan_sessions included, prints the file path of a session whose own project, project root or working directory label stopped a detection rule at its regex work limit as [withheld: regex work limit] followed by a short hash of the path. The user id and workspace id a Compliance API export recorded are passed through as locators too, on list_sessions rows and scan_sessions incidents and chains, while the email address it recorded never reaches any tool result. Tool results are returned to the MCP client that spawned the server, which is the assistant, so they travel wherever that assistant sends its context. The verb needs no license. vet_configs reads project configuration at the server process's working directory, at the top of its git repository and, in a linked worktree, at the main checkout; the client chooses the working directory when it spawns the server. The tool takes neither --all-projects nor --project-only; use the CLI for either scope. The vet_configs tool refuses every network root, including plain UNC shares. For a network-spelled HOME it reports one NetworkPathRefused gap and reads nothing under that home. Neither skarn mcp nor skarn serve accepts --evidence-home. list_sessions, session_stats, search_sessions and get_session carry tools_dropped, stores_unreadable and sessions_truncated after compliance_withheld, and list_sessions, session_stats and search_sessions also carry session_folders_without_transcript, limited to the hours window; get_session carries it as 0, because a lookup of one session counts no folders. list_sessions and session_stats count the sources the cli argument selects, with sessions_truncated limited to the hours window, and never narrow by project or user; search_sessions counts every assistant over its hours window, or over all history when project is given without hours; get_session counts every assistant over all history and reports sessions_truncated for the returned session only. A get_session call for a session id that is not found returns an error whose text is the not-found message followed by one line for each non-zero tools_dropped or stores_unreadable count. scan_sessions keeps stores_unreadable, sessions_truncated, turns_unavailable and turns_unverified in its stats beside tools_dropped and sessions_incomplete.
Baseline options
Interactive baseline triage. audit walks each new finding and records a true/false-positive decision with a reason into the committed baseline; accept records a single false-positive fingerprint non-interactively. audit runs the same scan check runs and requires a license the same way, any tier including the free one, and it exits 7 before any scan when none is usable; accept scans nothing and needs no license. The audit scan is scoped by the same filters as check. A false positive is suppressed on every later scan. A finding labeled a true positive is recorded and keeps firing until the credential is rotated, and those are the same labels the real-time guard honors. A true-positive label also overrides comment suppression, so a confirmed leak on a commented line keeps gating. A true positive wins over a false positive on the same fingerprint wherever the two meet, in one file or across the member files of an org baseline directory, so one member cannot silence a leak another member confirmed. A true positive recorded with its secret hash also wins over every false positive on the same value, under any rule, so that hash is enforcement data. When a confirmed entry's secretSha256 is not a 64-character hash, or does not reproduce the fingerprint of an entry that names its rule, every scan keeps all confirmations from that baseline and honors none of its value-wide accepts. accept, audit and --baseline-merge refuse such a baseline, and one holding two different hashes for one fingerprint, and write nothing. A finding that carries a secret is fingerprinted by that secret, so its acceptance follows the secret across sessions and machines. A finding with no secret, such as a behavioral prompt-poisoning finding, is fingerprinted by the session it fired in, so accepting it silences that rule in that session only and the same rule in any other session keeps firing. To accept a finding the guard flagged, use skarn guard accept <fingerprint>: it takes the value fingerprint from the guard's audit record, which covers every rule that fires on that value, and defaults to the personal baseline the guard reads. An audit's decisions are merged into the file as it stands when the audit ends, under the baseline lock, and never downgrade a true positive recorded meanwhile; an audit whose every decision was overtaken that way leaves the file untouched and counts those decisions as skipped. When the lock cannot be taken (a directory, a link, or an unopenable file at <file>.lock), audit refuses before it shows the first finding, so no decision is typed and then lost. Every baseline write lands through one atomic save that is readable by its owner only on macOS and Linux, and a write whose sibling .lock file cannot be opened or created is refused with nothing written. When a detection rule stopped at its regex work limit during the audit scan, audit says so: with nothing to triage it reports the scan as incomplete instead of saying there is nothing to triage, and with findings it says they are a floor. baseline audit prints the lines for links on a session store path that Skarn did not follow on stderr before the first finding, so they are seen before any triage.
Guard options
Control the real-time pre-execution hook used for editor/agent integration with Claude Code, Grok Build (formerly Cursor), Codex CLI, Copilot CLI, Gemini CLI, Grok Build CLI, the Antigravity CLI, Kimi Code, Cline, and the Kiro CLI. report reads the guard's own audit log rather than an event. It summarizes the flagged calls per assistant (verdicts, top rules, latency, the most recent denies), states what enforcing that window would have cost in blocks per day and prompts per day, and prints the enforce flip once the window spans at least five days with zero denies; for a host wired by skarn setup, that flip is a skarn setup --update --mode enforce command, which leaves plugin-installed hooks in audit. That command flips the user-scope hooks only, which for Copilot in Code are the profile hook files, so for every host setup wires at project scope the text output adds the skarn setup --update --agent <agent> --scope project --mode enforce run for a project's hook file: under Copilot in Code it names --agent copilot and a folder project's .github/hooks/skarn.json, the file Code on macOS was observed running, and for Cline it names a repository's .clinerules/hooks and adds the hand edit for ~/.cline/hooks. Run at a terminal it reads one thing more, your own per-user hook configs, so it can name a hook that has fallen behind this build once per release; piped or as json it skips those configs, and reads the Copilot in Code hook configuration only to find the expected Code log, as described below. The guard logs only flagged calls, so every count and every rate report prints is over flagged actions, never over all traffic. accept closes that loop. An audit record whose top finding carries a secret gets a fingerprint, the same secret-scoped key check writes to SARIF partialFingerprints, and a value fingerprint that names the value alone. report prints the accept command with the value fingerprint under each such deny, and skarn guard accept <fingerprint> records the value as a false positive, so every rule that fires on that value stops flagging it on any call, check included. A PII finding gets no value fingerprint, so its accept line carries the rule fingerprint and covers that rule only. A secret-less deny - a structural egress detector, a typosquat, a chain - carries no fingerprint and no accept line. Only the highest-severity finding of a call carries the fingerprint, so a call hiding several distinct secrets peels one accept at a time. In the log record, the tool name is screened first, as --log describes, and a value found in the call is then masked wherever the record's working directory, session id or a kept tool name copies it. The command-line password detector, which reports a password passed to a database, directory, file-share or registry client in a shell tool call, and the structural egress detectors are built into the engine rather than the rule pack. The egress detectors tier themselves. An egress whose whole payload is visible in the command itself is held at the ask tier: a bare request, a literal body, or query parameters, with no file sent, no credential store named, no earlier secret read in the same call, and no payload bytes the command text does not show. A command substitution, an environment expansion, a shell redirect, a form read, or a pipe feeding the target all keep the deny, and so does a payload carrying a recognized credential file or upload form, a co-detected secret, or recon earlier in the same call, with one exception. A dynamic payload is reported at high rather than critical when its command names at least one URL, every destination, proxy and connection override it names (-x, --proxy, --socks*, --connect-to, --resolve, --dns-*, --interface, a *_proxy variable on the command line) is a loopback literal (localhost, 127.x.x.x in canonical octets, ::1, 0.0.0.0), every command substitution in it is a plain local read (printenv, env, cat and the like with no pipe or nested command), and every stage of the pipeline is a known network client or a known local filter with no config variable, unix socket, URL file or unknown command; it is reported at high because a proxy variable inherited from the environment, an HTTP redirect (-L is not read as a reason to keep critical) or a local forwarder can still carry the payload off the machine with nothing in the command to show it. That finding never disappears, enforce mode asks on it as on any other high finding, and a formed chain still denies. A detection rule that stops at its regex work limit on a tool input has not read the rest of it, so the guard floors that call the way it floors input it cannot fully classify: ask, deny under --strict, with a reason that names the work limit when the floor raised the verdict (the truncation reason wins when both apply), answered through each host's own ask channel or its documented degradation. A read of a dotenv file larger than the 4 MiB the guard reads before the call floors the same way on Claude Code, the Copilot CLI and Copilot in Code when the lines the read asks for are not all inside those bytes, and on VS Code Copilot Chat a read_file of such a file floors whatever lines it asks for, with a reason that says the file is larger than the guard reads; a read the guard loads nothing for (a missing, empty or binary file, or a path the guard declines to open) keeps its verdict. A call that removes, downgrades, silences or edits the skarn hook, on a hook file of any supported assistant, is reported as agent-hook-removal: a removal, a downgrade or a silencing is denied when the hook file the guard reads proves the effect, and every other such call floors the same way. A shell command that names a credential file and runs a program whose name is computed at run time is reported as unresolved-program-exfiltration and floors the same way. Ask means a real approval prompt on the primary shell surfaces (Claude Code PreToolUse outside bypassPermissions and dontAsk, Copilot preToolUse on both the CLI and VS Code, Cursor shell and MCP hooks) and a block on the channels with no ask (Codex, Claude Code PermissionRequest, Copilot permissionRequest, Cursor file-read events, Gemini, Grok Build CLI, the Antigravity CLI, Kimi Code, Cline, the Kiro CLI). Both subverbs are ungated: report reads the log, the Copilot in Code hook configuration, plus your own hook configs at a terminal, and accept writes only a file. With no --log and no SKARN_GUARD_LOG, report lists guard-copilot-code-audit.jsonl when that log exists, and before it exists when a Code profile hook logs there and the report covers copilot-code (no --agent, or --agent copilot-code), reading the profile hook files and the layers doctor reads with them to find out; when no expected log exists yet beside such a profile, the text output names skarn doctor and one flagged Code action as the next step, not skarn setup --update. On a flagged call the guard consults the personal accepted-findings baseline it shares with check (~/.config/skarn/baseline.json, the file form only, never the org-union directory, so the guard can never hit a paid gate). A finding accepted as a false positive is dropped from the verdict. A finding a human confirmed as a REAL leak (skarn baseline audit, label true-positive) is never suppressed and keeps being blocked until the credential is rotated, and a value accept never silences another rule on that value. A correlated attack chain still denies even when every secret in the call has been accepted, and a baseline that is missing, unreadable, or malformed suppresses nothing at all: a broken baseline means more blocking, never less. Server-side agent runtimes call the guard through the sdk host and its versioned envelope.
Setup options
Guided onboarding: detect installed AI coding assistants (Claude Code, Grok Build (formerly Cursor), Codex CLI, Copilot CLI, Gemini CLI, Grok Build CLI, Copilot in Code, Cline, the Kiro CLI), merge the skarn guard hook into each one's native config in audit mode, and prove the wiring with the guard self-test. Copilot in Code gets one hook file per profile, <profile>\hooks\skarn.json, for every profile under the CopilotCodingHome directories of %LOCALAPPDATA% on Windows and under ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/ on macOS; on either system no matching guard event was observed from the profile file on Copilot app 158.0.4370.33, while Copilot app 156.0.4314.58 on Windows ran it; its folder projects, measured on Windows and on macOS, read the .github/hooks/skarn.json that --agent copilot --scope project writes, so --agent copilot-code refuses --scope project. --scope project writes committed, shareable configs whose commands are portable by construction: a PATH-guarded invocation and a literal $HOME log path, never this machine's absolute paths. Gemini CLI and Grok Build CLI are the one honest exception, because each reads a single cross-platform command field: a file committed from a POSIX machine carries the POSIX form, and a native-Windows teammate's hook then fails open with a warning instead of running. Grok's project hooks additionally wait on a /hooks-trust grant. Cline is the other exception, for a different reason: a project run writes only the pair for the platform it runs on, the extensionless PreToolUse and UserPromptSubmit on POSIX or the .ps1 files on Windows, so a .clinerules/hooks/ directory committed from one platform holds no hook a teammate's Cline on the other platform runs, and doctor on that machine does not count the committed files as protection. On native Windows, or with a --command that names a drive or UNC path, setup still writes the Claude Code and Cursor hooks, which have no Windows arm, and prints one warning line when doctor's Windows reading finds no hook wired. Cursor runs that hook through PowerShell, which does not parse its POSIX form, so the hook fails open and actions run unscanned. Claude Code runs it through Git Bash when that is installed, which skarn has not validated, and otherwise through PowerShell, where the guard never starts and a tool call can be blocked instead. --plugin commits the claude plugin requirement instead of hook entries; the two project routes are mutually exclusive, and each removes the other's skarn-owned entries so the guard can never fire twice. Existing foreign hooks are never touched. Every modified file is backed up first (*.skarn-bak.<timestamp>, carrying the target's own permissions) and rewritten atomically, and a JSON target file that does not parse as JSON is refused rather than overwritten. At --scope project skarn also refuses a target that is a symlink, that sits behind a symlinked directory, or whose path it cannot examine at all, before anything is read or created: a committed symlink can name any file on the machine, and following it would copy that file's bytes into a backup beside it and rewrite it in place. At user scope setup writes through a symlinked config to the file it names and leaves the link in place, because a dotfiles manager legitimately puts one there; it refuses a link whose file is missing or whose directory it cannot write, --remove reports a link whose file is missing as unchanged, and a rewrite that fails or is rolled back after its verify read leaves no backup behind. A Copilot in Code hook file reached through a link whose target is a network path is refused before anything is read or created. When setup cannot open a Copilot in Code coding home or profile folder, or finds a link where it looks for profiles, it prints one stderr line per folder, at most eight and then a count, and goes on with the profiles it found and the other agents; an absent coding home prints nothing. A JSON config file setup creates is readable by its owner only on macOS and Linux, while an existing file keeps its mode; on Windows a new file takes the permissions of the directory it is created in. On a terminal setup runs an interactive wizard: the mode prompt accepts audit, enforce, or an empty line for audit, each install prompt accepts y, yes, n, no, or an empty line for yes, and any other answer is asked again. --yes accepts everything and --print writes nothing. The result names the mode it wired, and whether an enforce request runs audit because the machine is unlicensed or its license is on the free tier. Cline gets executable PreToolUse and UserPromptSubmit files with mode 0755 on POSIX, or PreToolUse.ps1 and UserPromptSubmit.ps1 on Windows. At user scope setup writes only ~/Documents/Cline/Hooks/, which both runtimes read. Documents is the literal folder joined to HOME, and CLINE_DIR does not move it. Setup never writes ~/.cline/hooks/, because installing in both directories would make the CLI run two skarn hooks per call. At project scope it writes .clinerules/hooks/. Setup never creates PostToolUse, but --update and --remove include a recognized PostToolUse file already there. Those operations accept only a file setup recognizes as its current render or the older hand-copied plugin file; they refuse other guard-invoking scripts. The extension reads the files on its next hook event; reload the window if it does not. Restart a running cline CLI session. The Kiro CLI gets two surfaces, because its two harnesses read hooks from different places: the hook file ~/.kiro/hooks/skarn.json, which the V3 harness loads in every session, and the guard merged into every agent config in ~/.kiro/agents/, because the V2 harness runs hooks only from the agent config a session selects. $KIRO_HOME moves both when it names a directory of its own. Setup reads each agent config the way kiro-cli agent upgrade --dry-run does: it merges into a V2-format, out-of-sync or upgraded agent in the form that agent's hooks value takes, skips a V3-only profile on install while --update and --remove still maintain a Skarn entry it carries, and refuses a file Kiro does not read as an agent config. Setup never creates an agent config, so a machine with none gets the hook file and a skipped row saying that V2 sessions run unscanned. Kiro reads a single command field on every platform, so a committed .kiro/hooks/skarn.json or agent config carries the same caveat as Gemini and Grok. Start a new kiro-cli session to load the hooks; in a workspace, an interactive V3 session runs only once the workspace is trusted.
Doctor options
Health, wiring, and dead-hook detection. Doctor runs one named check per line: the binary and its path, the license, the hook config of every assistant this machine has installed or carries a managed config for, whether each wired hook command still resolves to an executable, whether the guard mode the hook asks for (audit or enforce) is what runs under this binary's license, whether the wiring matches what this version of skarn writes, the guard log's freshness, the session stores it can enumerate, the guard self-test, the cache directory, and how current the detection rules are. Every warning or failure names the exact command that clears it, or the resource that explains it when no single command applies: a free binary whose bundled rules have aged has no command to run, so that check carries the editions link instead of a fix, and so do the guard-scope and guard-conformance checks on the free tier, where a license is already installed and only a paid tier enforces. Except for Cline, doctor reads each assistant's hook config as ordered precedence layers: the MDM/fleet-managed system paths first, then the repo's committed project config in the working directory (./.claude/settings.json, ./.cursor/hooks.json, ./.codex/hooks.json, ./.github/hooks/skarn.json, ./.gemini/settings.json), then the per-user config. A machine wired only through the managed layer reports as protected and names the managed file, and a repo carrying a committed project config is inspected wherever doctor runs. On Claude and Codex a managed lockdown key (allowManagedHooksOnly / allow_managed_hooks_only) makes every lower layer inert, and doctor reports an inert user or project hook instead of counting it as protection; Cursor and Copilot layer additively, so every present layer runs. Copilot in Code is read per profile: each profile's hooks\skarn.json is its own user layer. A coding home or profile folder skarn cannot open, a link where it looks for profiles, and a coding home reached through a link to a network path are a coverage failure on the Copilot in Code host only: agent_config_copilot_code warns that whether a profile there carries a guard hook is unknown, names each folder in its notes and inspects the first one without following a link, the other hosts' checks still run, and an absent coding home stays silent. On macOS and Windows no matching guard event was observed from a profile's hook file on Copilot app 158.0.4370.33, while Copilot app 156.0.4314.58 on Windows ran it, so doctor reports a wired profile file as unverified on every system, never counts it as protection, and names skarn setup --agent copilot --scope project, the folder project file that was observed running the hook. A profile whose settings.json sets disableAllHooks gets both fixes, the switch first. Once doctor can confirm the hooks run, the guard_scope_<agent> check names the enforce flip by where the audit hooks sit: skarn setup --update --agent <agent> --mode enforce for user-scope hooks; skarn setup --update --agent <agent> --scope project --mode enforce for the project hook file setup writes, with --agent copilot for a Copilot in Code folder project; both, the user-scope flip first, when both scopes hold audit hooks; and a hand edit for a project file setup does not write, such as .claude/settings.local.json, or one reached through a symlink, which project-scope setup refuses. A managed layer adds no flip, so audit hooks that sit only in a managed layer get none. The guard_scope_copilot_code check leaves profile hook files out of its reading once any other hook file is wired, so a profile hook file does not hide the folder project's mode or flip. The Copilot policy directory, a repository project's .github/hooks and a disableAllHooks switch were not measured on Code, so doctor reports those layers unverified there, never inert and never as protection. Claude Code reads exactly ONE managed source and ignores the rest rather than merging them, so doctor reports the losing source as inert and never counts its hooks as protection. The sources, in the order they outrank each other, are the organization's server-managed settings delivered at sign-in from the claude.ai admin console or a self-hosted gateway, read from the copy Claude Code caches in remote-settings.json in its config directory (CLAUDE_CONFIG_DIR, else ~/.claude), then an MDM/OS-level policy (the Windows HKLM SOFTWARE\Policies\ClaudeCode key, or the macOS managed-preferences plist), then the system managed-settings.json with its managed-settings.d/ drop-in directory, then the user-writable HKCU key. A cached document that is an empty object is absent, since Claude Code caches one for an organization with no server-managed settings; any other cached document wins, so a system file's hooks are inert beside it even when the cached document carries no hooks. Under SKARN_MANAGED_ROOT the cache is read below the staging root like every other managed source. When the highest-ranked managed source sets managedSourcesBehavior to merge (Claude Code 2.1.242 and later), Claude Code combines the sources instead, so doctor keeps every lower source's hooks running, except the user-writable HKCU key, which never merges; a source carrying only managedSourcesBehavior or wslInheritsWindowsSettings does not win the tier. One more sits above all of them and doctor cannot read it: a policyHelper executable that computes managed settings at startup. A hook at the retired C:\ProgramData\ClaudeCode\managed-settings.json is never counted. On WSL the whole Windows policy chain is out of reach of a Linux binary and outranks /etc/claude-code. The FILES section documents what doctor reports for each of these. Gemini is the one host whose managed layer is NOT read first. Its precedence is system-defaults, then user, then project, then the system settings file on top, which has the final say, and doctor reports its layers in exactly that order. Hook arrays still concatenate across all four, so every present layer runs. What turns hooks off is hooksConfig rather than a lockdown key: enabled is a single value and the highest layer that sets it wins, disabled is a list of hook names unioned across every layer, and a hook either switch silences is reported inert rather than counted as protection. A committed project hook gets its own guard-command verdicts. An absolute machine-local path or an unrendered __SKARN_PATH__ placeholder FAILs, because that file protects nobody but its author. A PATH-resolved command that does not resolve on this machine FAILs with the install command as the fix, since the hook exits 0 here and the repo is not protecting this machine. Outside the session_stores check, doctor never probes a UNC path (\\server\share or //server/share) or a local link that reaches one; a mapped drive letter is not recognized as one. The session_stores check runs session discovery, which reads a home or a store root spelled as a network path. When such an entry comes on PATH before the first local entry holding skarn, or a hook names a skarn on such a path, the check WARNs that it cannot confirm the binary, and a guard log on such a path WARNs without being opened. Cursor at project scope WARNs naming the GUI-PATH gap, the documented cost of a portable committed config. A committed log destination other than the portable per-user default FAILs whichever arm of the hook carries it, including the arm this machine does not run, because that arm runs on a teammate's machine. An arm that does not run skarn is not read. The license check WARNs when there is no license at all (check does not run, exit 7; the guard still works, as do assess and the recall commands without --evidence-home, which requires Pro) and FAILs only when a license is present but broken. The eula check PASSes when an EULA acceptance is recorded, showing the accepted version, timestamp, and method, and WARNs when none is, with fix skarn eula accept; doctor itself never asks, so a diagnostic is never blocked by the acceptance gate. The guard-scope check WARNs when a hook wired with --guard-mode enforce runs on an unlicensed binary or on the free tier, where the guard silently runs audit: it records the would-be verdict and blocks nothing. The guard-conformance check appears only when a managed layer declares a skarn hook, and answers whether this machine runs what the org declared. It WARNs when the managed layer declares enforce on an unlicensed binary or on the free tier (the fleet is observing, not blocking), when the declared command does not resolve to an executable or names a UNC path doctor does not probe (the managed config alone deploys nothing, so the binary must ride the same MDM payload), when a declared event is not gated, or when a hook disagrees with the declared mode. Every branch is a WARN, never a FAIL, because a policy divergence is a fleet fact rather than a broken install, and every branch but the free-tier one carries an exact fix. The grokbot check appears only where Grok Bot is installed, xAI's always-on desktop agents app and a different product from the Grok Build CLI. It is a warning that carries no fix, because no skarn command changes what it reports: skarn states the posture and leaves what to do about it to you. When the daemon-connection state is present the warning names the always-on local-exec daemon that lets a cloud agent execute here, and its egress tunnel when that is on; when only the app root is found it reports plain presence and claims no channel. Detection is stat-only over ~/.grokbot/ and the macOS app root. The one file skarn opens there is ~/.grokbot/settings.json, for its two posture flags, and it is read only once skarn has proved that path is that file and nothing else - not a link, not a hard link to a credential file, not a pipe - so no daemon or OAuth credential value can reach the report. On Windows doctor reads the arm that machine runs: a $env:SKARN_GUARD_LOG assignment that opens a PowerShell arm, or opens its leading if block, is the hook's log, a double-quoted $env:USERPROFILE path in it resolves against USERPROFILE, and guard_log_<agent> checks that file; a hook with no such assignment and no --log flag reports logging disabled. A hook with no Windows arm is read under the same rules, where a POSIX VAR=x cmd prefix does not parse, so doctor reports no hook wired for it. config_drift_<agent> takes the executable and the log of each arm from that arm and compares everything else, on every OS, so a flag, a wrapper or a missing event on either arm still warns, and so does a log the guard would refuse. On Windows an entry an earlier setup wrote with a backslash path on its POSIX arm warns until setup --update replaces it. A POSIX-only entry that an earlier re-run left behind reads as foreign, and doctor does not name it. The claude_config_dirs check appears once claude is inspected, and claude is inspected whenever such a directory exists. It lists every Claude Code config directory skarn setup --config-dir all would take: for each one, the guard hooks in its settings.json and those in its cached organization managed settings. A directory without a cached document is covered by the system managed settings when they wire the guard; a cached document displaces them for that directory. It WARNs when one directory runs both its local hooks and managed hooks, because those events reach the guard twice. When the managed hooks cover every local event the fix is skarn setup --agent claude --config-dir <dir> --remove; when the local hooks cover more, removing them would drop that coverage, so the fix is to add the missing events to the managed settings first. Local hooks under allowManagedHooksOnly do not run and do not count, including a lockdown from the system managed settings that a cached document set to merge leaves in force. It WARNs when a directory runs no guard hook: the fix is skarn setup --agent claude --config-dir <dir>, or adding the hooks to the organization's managed settings when allowManagedHooksOnly silences local hooks there. It also WARNs, naming the file and a command to inspect it, when a file in a directory cannot be parsed or sits on a network path, which doctor never opens; when the system managed settings a directory relies on cannot be fully read; and when the home directory cannot be listed. Check ids (binary, license, eula, agent_config_<agent>, guard_command_<agent>, guard_scope_<agent>, config_drift_<agent>, guard_log_<agent>, self_test_<agent>, guard_conformance_<agent>, claude_config_dirs, grokbot, session_stores, cache_dir, rule_age) are a stable, greppable contract for fleet scripts. A failure exits 1; a warning never does; --json is a data mode that always exits 0 once a report is rendered, with two refusals that precede any check: an unknown option exits 1, and a home directory that cannot be resolved exits 6. Doctor is hermetic: it opens no network connection of its own, shells out to nothing, and enumerates the session stores without reading a session's content. The session_stores check notes how many Copilot in Code session folders hold no transcript and are listed by no session index, so no session is listed for them; that note leaves its status unchanged. Set SKARN_MANAGED_ROOT to validate a staged managed payload before pushing it; the active root is echoed in the report header and in --json, so a staged report can never pass as a live one. A hook config layer that repeats a JSON key is reported unverified with the key named, never as malformed: a reader that keeps the first value may run different hooks from one that keeps the last, so the hooks either reading carries are shown but never counted as protection, and a lockdown or kill switch whose two readings disagree leaves the layers it would silence unverified instead of inert. With no skarn hook in either reading the ordinary unwired warning stands. A skarn hook in Codex's user or project hooks.json is reported unverified, never as protection, because Codex runs it only after it is trusted in /hooks and skarn cannot read that trust state; a hook in Codex's managed requirements.toml or managed plist is unaffected. For Cline, doctor reads ~/Documents/Cline/Hooks/, <CLINE_DIR or ~/.cline>/hooks/, <workspace>/.clinerules/hooks/, and <workspace>/.cline/hooks/ as four peer directories: every directory runs and any cancel wins. It reports per file, catches a non-executable hook on POSIX, and names duplicates that would double one runtime's audit record. A hook directory doctor cannot list is a coverage gap, and the PATH lookups for cline and a hook's interpreter skip network paths. It reads hooksEnabled in <data dir>/globalState.json as a partial kill switch: false silences the extension, but the CLI still runs hooks. CLINE_DATA_DIR selects that data directory, otherwise CLINE_DIR/data or ~/.cline/data. Doctor never counts a file no runtime reads as protection, and it checks coverage per runtime: for the extension and for the CLI, whichever it finds, each default event needs a guard hook that runtime runs. On Windows it counts a .ps1 hook for the extension only, because the CLI starts it with powershell -File, which a Restricted execution policy refuses, and doctor cannot read the policy. Cline has no managed policy layer, so there is no guard_conformance_cline check. Doctor cannot see the CLI's invocation-time --hooks-dir or --yolo, or a CLI run only through npx cline. The session_stores check warns when a session store could not be read in full, which includes a link on a session store path that the scan does not follow because its target is a network path; on macOS the hook check, setup and vet still refuse a Copilot in Code home spelled as a network path, which the session scan reads.
Serve options
Control the localhost web UI. Access requires the per-run token embedded in the URL the command prints at startup: opening that URL sets a session cookie, and a script can pass the token as a token= query parameter instead. Every route that returns session content masks each detected secret first, with no opt-out, because the response crosses into a browser. Search masks before it runs the query, so a raw credential typed as the query returns no rows while an adjacent word returns the row with the value masked. The recent rows, the four session views, the filter facets and the by-date totals mask every label a transcript authored: the project name, the repository root, the working directory, the git branch, the model id and the assistant name. A facet whose displayed value the mask rewrote is marked filterable false, because sending that value back as a filter would match nothing; the UI renders it as a label with its count. Two detection scans run at a time. A further request answers 503 with redaction_busy and a Retry-After header rather than waiting, and a scan that cannot start at all answers 500 with redaction_unavailable and no rows. A session whose file changes on disk while it is being read is left out of that answer rather than served unmasked, because the scan indexed the older bytes. The search stream, the recent page, the meta response and the by-date trend each report how many they left out in a skipped field, and reloading picks the session up again; search appends its count as one line after its rows, only when a session was left out. The recall views (search, recent, stats) need no license. The security view (/api/scan) is the same engine as check and requires one the same way: without it the endpoint answers 403 and the Security tab shows how to register free. Opening a finding in the Security view shows a detail drawer with the severity, the reach (sessions, assistants, projects, execution, chains and suppressed occurrences, never a project name), the taxonomy crosswalk, the attack-chain context and the redacted code context, and from there you can accept the finding into your baseline as a false positive. That is the same write path as skarn baseline accept, and it records only the finding's fingerprint, never its secret. The license is resolved once at startup, so installing one while the server is running needs a restart. The four index routes (/api/recent, /api/meta, /api/stats and /api/stats/by-date) carry tools_dropped, stores_unreadable, sessions_truncated and session_folders_without_transcript after compliance_withheld. The counts come from the walk that built the cached index for the request's hours, over every assistant; cli, project and user filter rows only and never narrow them. /api/search appends one line per non-zero count, such as {"tools_dropped":2}, after its rows and after the skipped and compliance_withheld lines; these counts cover every assistant over the request's hours, and cli, project and user do not narrow them. /api/session sends the counts as x-skarn-tools-dropped, x-skarn-stores-unreadable, x-skarn-sessions-truncated and x-skarn-session-folders-without-transcript, which is always 0 for one session, beside x-skarn-compliance-withheld, where x-skarn-sessions-truncated is 1 only when the returned session's own transcript content was truncated or compacted, and sends x-skarn-coverage-hours for the window the counts cover: the hours of the unexpired cached index that found the session, or 0 for a walk over all history. A 404 for a session id that is not found carries the same headers, with x-skarn-coverage-hours set to 0, and the same counts in its body as compliance_withheld, tools_dropped, stores_unreadable, sessions_truncated and session_folders_without_transcript. /api/scan takes its coverage counts from the one walk its cache stamps and revalidates against. A cached scan whose refused session store links still refuse is reused within its freshness window; a session sidecar that becomes a link after a cached scan, while no transcript changed, is counted at the next full scan.
Global options
Available on a bare invocation.
Recent options
List and filter recent sessions. The project, branch, model and assistant columns are masked wherever a detected secret appears in them.
Messages options
Show one session's messages. The session is a positional id or --session; the other flags only narrow which session a prefix resolves to. Every message and every label is printed with detected secrets masked.
Search options
Search past sessions. The query is positional and flag order is free. The match runs on the raw text and the printed snippet is masked: when the match falls inside a masked value, the row carries the mask's offset instead, with match_in_secret set in json output and no highlight in text, and a no-result or error message never repeats the query.
Restore options
Restore a session by id. The resume command is printed from the raw session, because a masked working directory would not be a usable command: when the recorded working directory carries a detected secret, restore refuses with exit 1, says on stderr that the resume command cannot be printed, and prints nothing to stdout. The match hint on stderr masks the session id, project, branch and assistant name, and a comment line that names a session shows its id masked the same way. When the recorded working directory is not a local absolute path for this operating system (a network, device or relative path, a path written for the other operating system, or one with a control character), a directory on it cannot be checked, or a link on it points to a network path, restore prints the resume command without cd <dir> &&, the Gemini form prints gemini --list-sessions because its resume index counts the sessions of the current directory, the Grok prompt-log form prints grok sessions without it, and the Cursor and VS Code forms print cursor and code without the workspace argument; one stderr line says the recorded directory was not used and does not repeat it. A directory on it that passes through a link the session link check refuses for another reason (a link it cannot resolve, or a component it cannot check for links) takes the same fallbacks with a different stderr line: that line names the recorded directory, cut at the label length as the evidence-machine line is, and says Skarn did not follow a link on it or could not check a component of it for links. The secret refusal and the shell-byte refusal still exit 1.
Stats options
Session analytics. A positional session id switches to a per-session view. Under --show timing the active-time number answers to three different key names depending on the output shape, and a reader that asks for the wrong one gets null rather than an error: a by-date or by-project row calls it active_secs, the ungrouped totals and a per-session view call it active_time_secs, and a by-date row carries a second number the other shapes do not, active_wall_secs. The two by-date numbers count differently. active_secs adds each session's own active time to the first day that session touched inside the window, so two sessions you ran side by side both count in full and a day can total more than the clock allows. active_wall_secs merges the same active intervals per calendar day, so overlapping sessions count once, and that is the number to bill from. A per-session view lists its pauses under idle_gaps, keyed gap_secs and after_message. Every shape, the html report included, prints its model names, tool names and project labels with detected secrets masked. Kiro CLI's Classic database and V3 harness record credits rather than tokens, and Skarn does not yet read V2 token counts, so all three stores show zero token and cost totals. A Kiro model recorded as auto means Kiro did not record which model served the session. A Kiro session's command and MCP call counts equal the rows cmds and mcps list for it.
Export options
Export session data. Every exported field is printed with detected secrets masked.
Cmds options
Shell commands run across sessions. Commands, their output and the labels are printed with detected secrets masked, while --cmd and --failed match the raw text. For Kiro CLI, cmds lists agent shell calls with a command string: execute_bash and Windows execute_cmd in the Classic database, shell in V2, and execute_bash and Windows execute_pwsh in V3. Skarn never reads the Classic history table of user shell activity; tools still lists shell calls whose arguments contain no command string.
Mcps options
MCP calls made across sessions. Server names, tool names and call arguments are printed with detected secrets masked, while --mcp and --failed match the raw text. A recorded tool name, and every server and tool label taken from one, is also screened for a credential-shaped piece (16 or more mixed letters and digits, read across underscores and hyphens up to an all-lowercase word, or a long value after a credential word): the piece is masked in place even when no rule detected it, and where one recorded name gives both labels of an MCP call, a masked piece that crosses the split prints as **** in each label. Kiro CLI server names come from the conversation's tool declarations in the Classic database, the result's tool kind in V2, and the tool::<server>::<tool> id of a tool_call call in V3; Classic removes hyphens from MCP tool names, so they differ from the server's manifest. Skarn reports a name declared by two servers or by a server and a Kiro built-in as (ambiguous), and a call with no recorded server as (unattributed); neither placeholder counts as a called server in skarn inventory. A Copilot CLI, Microsoft Scout or Copilot in Code call is an MCP call when its tool name starts with the mcpServerName its record names, followed by a hyphen, an underscore or nothing, as WebGrounding-web starts with WebGrounding; the server is that name and the tool the rest of the tool name, or the recorded mcpToolName when the rest ends with it, and skarn tools keeps the recorded tool name.
Tools options
Tools used across sessions. Tool names, inputs and results are printed with detected secrets masked, while --tool and --failed match the raw text. A credential-shaped piece of a tool name (16 or more mixed letters and digits, read across underscores and hyphens up to an all-lowercase word, or a long value after a credential word) is masked in place too, even when no rule detected it. For Kiro CLI, tools maps fs_read, read and read_file to Read; fs_write, write and fs_append to Write; str_replace to Edit; execute_bash, execute_cmd, shell and execute_pwsh to Bash; glob to Glob; and grep and grep_search to Grep. It lists every other tool name and every MCP call under the recorded name, including tool_call for all V3 MCP calls, and excludes the Classic dummy placeholder declaration.
License options
Show the active license, install one, or renew it. With no argument it reports what license this machine is using, where it came from, and when it expires. With a file argument, or - to read stdin, it validates the license and installs it to the config directory, backing up any license already there. With renew it asks the license service for a fresh license for the current subscription, verifies the reply against the signing keys built into this binary BEFORE writing a single byte, and installs it; a reply that does not verify is discarded and nothing is written. Verification is not signature-only: the reply must move the expiry forward, and must carry the same license id when both the installed and the returned license are version 2 claims, so a valid artifact belonging to another subscription is refused too. Renewal happens only when you type it - check, the recall verbs, serve, and guard never renew on their own - and it is the only network call skarn makes besides the opt-in maintained-feed fetch. The endpoint defaults to https://api.getskarn.com and $SKARN_LICENSE_RENEW_URL replaces the whole URL; ENVIRONMENT carries the default in full and the https, loopback and userinfo rules the URL must satisfy. Renew exits 0 when the new license is installed; 1 when the renewal could not complete and nothing was installed (the service could not be reached, there is nothing to renew, a local target was refused, the reply was unreadable, or a verified artifact could not be written); 2 when the service declines (its reason is printed as the service worded it, after any echo of the license token is redacted, terminal control bytes are masked, and the text is capped at 300 bytes); and 3 when the reply fails verification. It never prints the license token itself, and it works without a license, and with an expired one, so it never exits 5.
Fleet options
The consuming half of the fleet kit, inside the binary. fleet aggregate reads the drop artifacts under <dropdir> (flat <dropdir>/*.json, or one <dropdir>/<identity>/ subdirectory per machine named the way check --drop names it), validates every one of them against the drop schema and against the scope it declares, refuses the run outright when any drop is rejected (naming the drop and the reason on stderr, writing nothing, exit 1), and writes aggregate schema version 4 atomically to -o. Given --roster it also refuses a drop from a machine the roster does not name or a project the roster does not permit that machine, accepts an unscoped drop only from a machine the roster marks allowUnscoped, and records coverage: how many machines were expected, how many reported, and which did not. fleet readout renders the Markdown readout a leadership audience reads from one aggregate, or from two when --prior names the previous period's aggregate, which is what turns positions into movements; --json emits the underlying comparison object. Both subcommands are Enterprise: without a covering license they refuse with exit 5 before reading any file, and with no usable license at all they exit 7 like check; --help is ungated. The aggregate carries what the drops carry plus a guard block the aggregator maps from the newest enforced pre-execution deny across the newest drop per machine, and the readout prints machine identities, counts and months, never a finding, a rule id, a project name or a secret preview.
Inventory options
Print one inventory record for this machine: per assistant, how completely Skarn could observe its sessions and its configuration, the declared session store roots, the client versions observed in a session and when, how many MCP servers its configuration declares by transport and how many its sessions called in the window, the last activity and the session count; per machine, the guard mode the configured hooks ask for and the mode the guard runs in. On a live home, inventory reads the session stores, the assistant configuration files skarn vet reads, the guard configuration layers and the installed license, all read-only and offline. A path is written as an anchor such as ~/.claude.json or $COPILOT_HOME/mcp-config.json, never as its expanded value, and a user-named hook file, plugin directory or custom-tool root as <custom>. VS Code's user settings file is listed under copilot as $VSCODE_APPDATA/Code/User/settings.json when VSCODE_APPDATA is set and not empty, and otherwise as ~/Library/Application Support/Code/User/settings.json on macOS, $XDG_CONFIG_HOME/Code/User/settings.json or ~/.config/Code/User/settings.json on Linux, and $APPDATA/Code/User/settings.json or $USERPROFILE/AppData/Roaming/Code/User/settings.json on Windows; each VS Code profile's settings file counts in copilot's <custom> row, and a project's .vscode/settings.json is listed in a --project run. The copies of Cline's MCP settings that the Cline extension left in VS Code's and Cursor's user directories are listed under cline in the same form, ending in globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json, with Cursor in place of Code for Cursor's copy. A run with no --project writes no server name and no project name; with --project, the names of servers called in sessions in scope and of servers declared in the project-local configuration of a project root those sessions recorded are written masked. Versions are observed in a session, never installed, and each is written as the session recorded it with no masking, so a detected credential that is byte-identical to a recorded version string prints there. The record is the same object skarn check --format ndjson writes as its skarn.inventory line, documented in NDJSON-CONTRACT.md. Inventory of a live home is free and needs no license. It returns exit 0 on success, 1 on a usage error, 6 when the home directory cannot be resolved, the --rules pack cannot be loaded or the collection fails. If collection fails, inventory writes a record with event.outcome failure and an error.code to stdout. With --evidence-home <dir> (Pro), inventory reads the copied home's session stores and home-layer configuration. The --hours window defaults to all history. With --project, stderr says --evidence-home: the inventory read no project configuration file; --project filtered the sessions only. Each root uses its default token, such as ~/.grok. The record omits skarn.guard_mode, skarn.guard_effective and skarn.scope.project_roots_truncated. The host name, skarn.identity, skarn.org and skarn.scanner_user identify the examiner's machine. Inventory's configuration discovery follows the same rules as vet for operator-named network roots and links below an evidence home or network root; its session counts come from the session scan, which follows no link below an evidence home and no link to a network path anywhere, and counts each refused link as an unreadable store. After the record, inventory prints the same per-reason stderr lines for refused links as check; stdout and the record are unchanged.
Exit status
0- Clean, or informational output only.
Details, including mcp
For mcp: the client closed stdin, which is the normal shutdown.
1- A finding at or above the
--fail-on-severitythreshold was reported.Details, including setup and guard --self-test, doctor, restore, mcp, and license
For setup and guard
--self-test: a target was refused or a verification failed. For doctor: at least one check FAILED (a warning never exits nonzero), or an unknown option was passed, which is refused before any check runs. For restore: the recorded working directory or session id could not be rendered safely, or the working directory carries a detected secret, so the resume command cannot be printed, nothing was printed to stdout and the refusal is named on stderr. Also: the first-run EULA prompt was declined, so the invoked operation was not performed. For mcp: an unknown argument was passed, which is refused before the protocol loop starts. For license: an install or a renewal was refused or did not complete, for example because an argument was invalid, a license did not verify, a replacement was declined, there was no license to renew, the renewal endpoint was refused or could not be reached, or a file could not be read or written. A failure before the new license is written leaves the installed license as it was. Skarn refuses an empty--evidence-homevalue. The evidence home cannot contain the examiner's own home or Skarn's config or cache directory, or lie inside either Skarn directory. Skarn refuses any named or default output under the evidence home and any existing output file with a second hard link. On Linux and macOS it also refuses an output path with .. in a part that does not yet exist; Windows resolves .. before the lookup, so there Skarn checks the resolved path. Vet refuses--evidence-homewith--all-projectsor--project-only. Guard, mcp and serve refuse--evidence-home. Check refuses it with--drop,--audit-verifyor--baseline-merge. 2- The session risk score exceeded the
--fail-on-riskthreshold.Details, including setup and license
For setup: no terminal to prompt on and no
--yes; the exact non-interactive command is printed. For license: the license service declined the renewal that license renew asked for, and nothing was written. 3- A canary token was triggered (a proven breach).
Details, including license
This overrides every other gate. For license: license renew refused the license the service returned, because it did not verify, could not be used (revoked or expired, for example), or did not supersede the license being renewed or the one already at the destination, so nothing was written.
4- A policy precondition was not met: a required rule is missing, the policy requires a baseline and none was supplied or the one supplied did not load, or the
--policyfile itself could not be read or parsed.Details
A policy that never loaded is never quietly replaced by the embedded default, which gates nothing.
5- A requested paid feature is not covered by the active license (a Pro or Enterprise flag without a license that covers it).
Details
Refused before any scan. With no usable license at all, check exits 7 before this gate is consulted. With
--evidence-home, check, assess, vet, inventory and the recall commands exit 5 if the installed license does not cover Pro. 6- The scan could not complete:
Details, including check --audit-verify, vet, and doctor
session discovery or the scan itself failed, including a home directory that could not be resolved so no session store was ever located, or the detection rules could not be loaded so no scan was ever defined. Under
--fail-on-scan-erroran otherwise-complete run exits 6 as well whenever coverage was partial: a tool source dropped out of discovery, a session store that exists could not be read, a session's parse failed, a session held a record that could not be parsed (in a Gemini CLI chat after such a record, also a patch record whose target the lost line held) and so was scanned only as raw text, up to its first 1 MiB and within a per-session budget of 256 such records or 16 MiB, past which the record was not scanned at all (an unterminated last line that does not parse but begins a JSON object, in an uncompressed file modified within the last 5 minutes, is a write in progress and is exempt), a session held a record with a string value over 8 MiB that was shortened before parsing and so was scanned without the rest of that value, a session held a value nested deeper than 64 levels that was not scanned, a detection rule stopped at its regex work limit before the end of its text, the assistant compacted a session before the scan so its transcript no longer holds the whole conversation, or the run read no sessions at all. That verdict is computed BEFORE the report is rendered, so the SARIF invocation exit code, the evidence pack and the audit record all carry 6 rather than describing the run as clean and then exiting nonzero. A--baseline-createrun is refused on the same condition before it writes anything, so an incomplete scan is never recorded as the accepted set and the previous baseline survives. For check--audit-verify: the audit log exists but could not be read, so the hash chain was never examined (an absent log is a valid empty chain and exits 0). For vet: the home directory could not be resolved outside--project-only(so the configuration was never located at all), or a config file that exists was not read - it could not be read, or it was skipped because it is not that assistant's live configuration - so the configuration was only partly seen, or a file that was read was not fully scanned, because a detection rule stopped at its regex work limit or the command-line password detector reached its 64-value limit on one permission rule. For doctor: the home directory could not be resolved, so every per-assistant check would have read an empty machine - a diagnostic that could not be produced is never reported as a healthy one. Fail-closed - the result is not trustworthy, so it is never reported as clean. Skarn exits 6 if the--evidence-homepath is missing, contains *, does not name a directory, names a directory Skarn cannot read, or names a directory whose real path Skarn cannot resolve. If a session scan finds a readable directory with no session store, Skarn names the evidence home in the zero-session message and exits 0 by default. Vet and inventory exit 6 before opening an evidence home whose absolute path is a namespace or device path (\\?\ or \\.\, with either separator), a server without a share, a pipe, mailslot or IPC$ share, or a . or .. component after the share. A value that starts with one separator on Windows, such as \??\ or \Device\, is first made a path on the working drive, and a relative value on macOS and Linux a path under the working directory; that local path is what Skarn judges and opens. They printerror: --evidence-home <path>: this spelling of a network or device path is not read. For a control character, the message ends witha path that holds a control character is not read. 7- No usable license is present - none was found via
SKARN_LICENSE,SKARN_LICENSE_FILE, or the installed file - so check, baseline audit, fleet aggregate or fleet readout refused before scanning or reading a file.Details
The free license is issued at https://getskarn.com/free after a quick email confirmation and is verified offline. Also used when a license IS present but cannot be used at all (revoked, tampered, or signed by an untrusted key). With
--evidence-home, assess, vet, inventory and the recall commands exit 7 only when no usable license is present. Skarn checks the license before accessing the evidence home. Without a usable license, check prints its usual refusal. For assess, vet, inventory and recall, the refusal names the verb and its Pro requirement, explains the license problem, gives the editions URL and says the verb runs without a license without the option. The commands baseline accept, guard accept, guard, setup, doctor, mcp, license, taxonomies and check--audit-verifynever exit 7.
Environment
SKARN_SCAN_THREADS- Cap the worker-pool size for every parallel sweep (scan and recall).
Details
1 forces a fully serial run. Default is one worker per core, capped at 32. Output is identical for any value; only latency changes.
SKARN_CLAUDE_DIRS- Colon-separated list of additional Claude Code config directories to scan beyond the default ~/.claude.
Details
Each entry is the dir that contains projects/. Roots are de-duplicated.
skarn vet --all-projectsalso reads the projects keys of each entry's .claude.json, and none of its other content.skarn assessreads the same projects keys for its saved permission rules section. The colon separator cannot carry a Windows drive path, for either session scans or vet. SKARN_TZ_OFFSET- Default timezone offset in hours applied when grouping recall and stats output by time.
SKARN_NO_TIMING- Suppress the dim "Scanned N sessions" timing line that recall commands print after a text run on a terminal.
Details
Already auto-suppressed for json/sarif/csv output and for non-TTY stdout.
SKARN_LICENSE_RENEW_URL- License-service endpoint
skarn license renewposts to.Details
Defaults to https://api.getskarn.com/v1/license/renew; set it to route renewals through an enterprise proxy. It must be https, with plain http accepted only against loopback, and must carry no userinfo, so a poisoned environment can neither redirect the license token to a cleartext endpoint nor hand credentials to the one it names. No other command reads it.
SKARN_GUARD_LOG- Path to append a redacted JSONL verdict log for guard (opt-in; off when unset).
Details
One record per flagged call, carrying the rule fingerprint and the value fingerprint that
skarn guard accepttakes; clean calls, and calls whose every finding was already accepted, are not logged. GEMINI_CLI_SYSTEM_SETTINGS_PATH- Gemini CLI's own override for the path of its managed system settings file.
Details
When set it REPLACES the default path, and Gemini also takes its system-defaults file from that path's directory. Doctor resolves both gemini managed layers through it, so the report names the files Gemini actually reads rather than default files it is not.
GEMINI_CLI_SYSTEM_DEFAULTS_PATH- Gemini CLI's own override for the path of its system-defaults file, the lowest of its four settings layers.
Details
When set it REPLACES the path Gemini would otherwise derive from the system settings file's directory, and doctor reads the override.
SKARN_IDENTITY- Local-first identity tag (an SSO subject, email, or CI principal) stamped as provenance on baseline entries created with
--baseline-create.Details
Optional; Skarn never authenticates it. It is also stamped as skarn.identity on every check ndjson line.
SKARN_ORG- Local-first org or team tag stamped alongside
SKARN_IDENTITYon baseline provenance.Details
Optional. It is also stamped as skarn.org on every check ndjson line.
SKARN_FEED_URL- Default feed channel URL used by check
--update-ruleswhen--feed-urlis not given (Pro).Details
It must be https, with plain http accepted only against loopback, and must carry no userinfo, so a poisoned environment cannot redirect the subscriber credential to a cleartext endpoint.
SKARN_FEED_TOKEN- Credential presented to the subscriber feed channel when fetching a maintained feed (Pro).
SKARN_EULA_ACCEPTED- Set to 1 to suppress the first-run EULA prompt and notice for this run without recording anything (ephemeral environments: containers, CI).
Details
Running Skarn constitutes acceptance either way;
skarn eula acceptrecords it durably instead. SKARN_LICENSE- License token, resolved before
SKARN_LICENSE_FILEand the config path. SKARN_LICENSE_FILE- Path to a file containing a license token.
CLAUDE_CONFIG_DIR- A Claude Code config directory visible in Skarn's environment; folded into the claude source like an
SKARN_CLAUDE_DIRSentry.Details
skarn vet --all-projectsalso reads the projects keys of that directory's .claude.json, and none of its other content.skarn assessreads the same projects keys for its saved permission rules section. When the value is an absolute path,skarn setupwrites the claude hook into that directory's settings.json instead of ~/.claude/settings.json, for wiring,--update,--removeand--printalike, andskarn doctorreads that settings.json and that directory's remote-settings.json as claude's user and organization managed layers; a relative or empty value leaves ~/.claude in place.skarn setup --config-dirnames other config directories in one run. COPILOT_HOME- GitHub Copilot CLI config directory visible in Skarn's environment.
Details
The CLI itself treats it as REPLACING ~/.copilot, and vet follows that: it reads mcp-config.json, config.json, settings.json, data.db and the hooks folder from the directory this names and not from the default. Scanning deliberately diverges: the copilot source scans this root AND the default ~/.copilot, because a scanner's subject is every local store, and sessions stranded in an abandoned default root still hold the secrets they held the day they were written. A store present under both roots is two real files, and both are read: either may hold a secret the other lost. Microsoft Scout sets this variable to ~/.scout/copilot in the environment of the Copilot CLI child process it spawns, not in the user's shell, so Skarn's own process never sees it; that root is declared in the scanner rather than read from here, exactly as
$CODEX_HOMEand$KIMI_CODE_HOMEare declared rather than guessed. Copilot in Code sets this variable to its profile directory in the environment of the hooks it runs. A value that names a directory directly inside a CopilotCodingHome directory is a Copilot in Code profile: the copilot-code source scans it and the copilot source does not, and vet reads it as that profile and reads ~/.copilot as the Copilot CLI root. Any other value that is neither ~/.copilot nor ~/.scout/copilot is split per session between the two sources by the client_name in each session's workspace.yaml, as the CopilotCodingHome entry under FILES describes.skarn assessfollows it the same way for its saved permission rules section. GROK_HOME- Grok Build CLI's data and configuration directory, read when it is visible in Skarn's environment; grok itself REPLACES the default ~/.grok as grok's home rather than layering.
Details
Setup writes its hook file under the directory this names, doctor resolves grok's config, requirements, hooks, and folder-trust files from it, and the guard's agent-hook-removal check watches config.toml, managed_config.toml, requirements.toml, and the hooks/ directory under it as well as under ~/.grok. Vet reads the whole Grok home surface from the directory this names in place of ~/.grok - config.toml, managed_config.toml, requirements.toml, the hooks/ directory, and the hooks-paths registry - so a relocated Grok home is examined rather than reported clean over an unexamined one.
skarn assessreads the same relocated surface for its saved permission rules section. Session discovery deliberately diverges: Skarn folds both roots,$GROK_HOMEand ~/.grok, de-duplicated, resolved via expandPath, and reads under each the sessions/ directory and the two Grok Build 2.0 roots, agent-host/sessions/ and agent-host-daemon/sessions/, whichever exist, so sessions left under ~/.grok stay visible. GROK_FOLDER_TRUST- Grok Build CLI's folder-trust switch. Set to 0 it ungates every project-scope hook, MCP server, and LSP server, the same as [folder_trust] enabled = false in grok's config
Details
doctor honors it, so a machine that turned the gate off is not reported as having a silenced project hook layer.
KIMI_CODE_HOME- A Kimi Code CLI data directory visible in Skarn's environment; replaces the default ~/.kimi-code as the kimi root, folded into the kimi source, de-duplicated, resolved via expandPath.
Details
Each root contributes its sessions/ and user-history/ children.
CODEX_HOME- A Codex CLI data directory visible in Skarn's environment; folded into the codex source alongside the default ~/.codex, de-duplicated, resolved via expandPath.
Details
Each root contributes its sessions/ and archived_sessions/ children. For Codex configuration, vet, assess, inventory and the MCP vet_configs tool use it in place of ~/.codex when it is nonempty: they read config.toml, hooks.json and the rules/ directory only under it, with no fallback. A value that names no existing directory reads nothing, because Codex CLI refuses to start then. Vet resolves . and .. components and reads a relative value from the working directory. The CLI commands accept a plain UNC path. The MCP tool refuses a network path named in the variable itself. A refused network or device spelling produces a NetworkPathRefused coverage gap at the directory itself, and a control character in a local path produces ControlCharacterInPath there. With
--evidence-home, the commands ignore it. Setup and doctor still read ~/.codex. SKARN_MANAGED_ROOT- Prefix prepended to every managed (MDM/fleet) config path skarn reads, so a fleet admin can validate a staged payload directory before pushing it to a single machine (
SKARN_MANAGED_ROOT=/tmp/stageskarn doctor).Details
Empty or unset means the live system paths. Doctor applies it to every managed hook config it inspects, and vet applies it to the system Grok Build CLI layers it reads at /etc/grok.
skarn assessapplies it to the same layers for its saved permission rules section. Whenever it is active, doctor echoes the root in the report header and emits it as managed_root in--json, so a staged report can never pass as a report about the live machine. It is a filesystem prefix and cannot re-root a registry key;SKARN_MANAGED_REGISTRY_ROOTdoes that. SKARN_MANAGED_REGISTRY_ROOT- Registry key doctor reads the Windows managed policy keys under, so an administrator can validate a staged payload without touching live Group Policy
Details
. For example,
SKARN_MANAGED_REGISTRY_ROOT='HKCU\Software\SkarnStage' makes doctor read HKCU\Software\SkarnStage\HKLM\SOFTWARE\Policies\ClaudeCode. The hive stays a key component under the staging root, so the HKLM and HKCU policies stage to distinct keys instead of collapsing into one. Empty or unset means the live policy keys. Whenever it is active, doctor echoes it in the report header and emits it as managed_registry_root in--json, so a staged report can never pass as a report about the live machine. Only doctor reads it. XDG_CACHE_HOME- Base directory for the rule and feed cache.
Details
Defaults to ~/.cache, so the cache lives in ~/.cache/skarn/.
SKARN_COMPLIANCE_EXPORT_DIR- Export root scanned by the Compliance API session source.
Details
Reading the export needs an Enterprise license: a run that reaches discovery under a lesser entitlement (check and baseline audit under a registered Free, Pro or Team license, assess and the recall verbs under any) counts the export sessions it found, reads none of them, and every session-reading surface prints the notice
N compliance export session(s) found; reading them needs an Enterprise license, once per run on stderr and as a complianceWithheld or compliance_withheld field where the surface is machine-readable; the count is never a partial-scan verdict and never changes an exit code, and every other session store on the machine scans as before. Set an absolute, non-empty path; a relative or empty value is refused and the source is dropped with a warning, never resolved against the working directory. This root REPLACES the default: exactly one root is scanned. UnlikeCOPILOT_HOMEandGROK_HOME, it is not folded in beside the default because this directory is Skarn's own artifact, written by the exporter in integrations/anthropic-compliance/. There is no abandoned foreign default to keep visible, and selecting one organization's export must not also scan a stale one. When unset, the root is $XDG_DATA_HOME/skarn/compliance-export if XDG_DATA_HOME is absolute, else ~/.local/share/skarn/compliance-export/. A ~/.skarn.json tools.claude entry with sessions_path repoints every builtin named claude, this store included; sessions_path set to null disables them, and a based_on: claude clone yields one clone per builtin named claude. The layout is <root>/<organization_uuid>/<session_id>.json. The walk enters only directories at the root and descends exactly one level; .watermark.json and export-log.jsonl at the root are never read. Inside an organization directory, only regular *.json files with a non-empty stem drawn from [A-Za-z0-9_] are read, and session.id must match that stem. The stem charset is the exporter's contract and has not been validated against live ids. A rejected filename, a symlinked session file or a session file with more than one hard link raises the unreadable-store count once per store as a partial-scan signal. Sessions carry no project and no cost: any--projectvalue excludes them, stats records zero cost, and recent prints a dash. The surface ids cowork and claude_enterprise are counted in stats but are not--clivalues; use--cliclaude to select the store, while--clicowork exits 6. An admin who exports their own organization and also runs Claude Code locally sees their own sessions twice, once under a clls_ id and once under an on-disk UUID. Run the exporter on a machine without a local Claude store, or scope with--project. On Windows, the unset default is %LOCALAPPDATA%\skarn\compliance-export, and XDG_DATA_HOME is not consulted. LOCALAPPDATA must be an absolute path with a drive letter or a UNC prefix; otherwise, the source is dropped and counted as one dropped source, exactly as a relativeSKARN_COMPLIANCE_EXPORT_DIRis: check and assess report the drop as a partial scan, doctor reports a failed source, and the recall commands list nothing for it. On Windows,SKARN_COMPLIANCE_EXPORT_DIRkeeps its meaning, and absolute means a drive letter or a UNC prefix; a bare rooted path such as /x is refused because it carries no disk designator. Write the value natively asC:\Users\dev\exportsorC:/Users/dev/exports, which works in every Windows shell. An MSYS-style/c/Users/dev/exportscarries no disk designator and is refused whenever it reaches the process unconverted. Git Bash and MSYS2 usually convert such a value to native form before a native binary sees it, but it arrives unconverted when MSYS2_ENV_CONV_EXCL excludes it, when a process outside that shell exports it, or when a scheduler or service passes it through. USER- Read only to fill skarn.scanner_user on check ndjson lines on macOS and Linux, before
LOGNAME.Details
Skarn never authenticates it, and a value that contains @ is written as ****.
LOGNAME- Read only to fill skarn.scanner_user on check ndjson lines on macOS and Linux when
USERis unset or empty.Details
Skarn never authenticates it, and a value that contains @ is written as ****.
USERNAME- Read only to fill skarn.scanner_user on check ndjson lines on Windows.
Details
Skarn never authenticates it, and a value that contains @ is written as ****.
COMPUTERNAME- The Windows host name, written as host.name on every check ndjson line and carried by the
--dropartifact.Details
On macOS and Linux the host name comes from the operating system instead.
KIRO_HOME- Kiro CLI's home directory. When it is set to an absolute path other than a filesystem root, the home directory or an ancestor of the home directory, skarn also reads
$KIRO_HOME/sessions/cli for V2 harness sessionsDetails
and
$KIRO_HOME/sessions for V3 sessions. Skarn always reads the ~/.kiro defaults. A probe with Kiro CLI 3.3.0 on macOS measured both paths. The scan reads nothing else underKIRO_HOME.skarn setup --agentkiro writes$KIRO_HOME/hooks/skarn.json and merges into$KIRO_HOME/agents/*.json under the same rule, and doctor reads both; doctor names the agents directory under a setKIRO_HOMEas unverified for the V2 harness, which was not measured reading agent configs there. For vet,KIRO_HOMErelocates the Kiro CLI's configuration directory, default ~/.kiro, and with it the whole Kiro configuration surface vet reads: agents/, hooks/, settings/mcp.json, mcp.json, settings/permissions.yaml, and workspace-roots/, so vet examines a relocated home rather than reporting it clean without examining it. Under Kiro's own fallback, a relative path, a filesystem root, the home directory, or an ancestor of the home directory falls back to ~/.kiro. Vet accepts a plain UNC path and reports a coverage gap for any other network or device spelling or a control character. Vet never reads session stores or the account database, and never parses a Markdown profile's body.skarn assessreads the same relocated surface for its saved permission rules section. The guard's agent-hook-removal check watches the hooks/ and agents/ directories underKIRO_HOME, taken as set without Kiro's fallback rule, as well as under ~/.kiro. CLINE_DIR- Cline root in place of ~/.cline.
Details
Session discovery uses its data directory unless
CLINE_DATA_DIRselects another. Setup uses this directory for Cline detection but still writes user hooks only to ~/Documents/Cline/Hooks/, with Documents joined literally to HOME. Doctor reads the CLI's SDK-only hooks directory under this root and its data/globalState.json unlessCLINE_DATA_DIRselects another data directory. Vet reads hooks under <CLINE_DIR>/hooks and the five data files under <CLINE_DIR>/data unlessCLINE_DATA_DIRselects another data directory or a per-file override replaces a path. For vet, surrounding whitespace is trimmed, and a value that names something other than a directory is the NotADirectory coverage gap.skarn assessfollows it the same way for its saved permission rules section. CLINE_DATA_DIR- Cline data directory in place of
CLINE_DIR/data or ~/.cline/data, for session discovery and the globalState.json whose hooksEnabled setting doctor reads.Details
That setting silences only the extension, not the CLI. Setup uses this directory for Cline detection; it does not move the user hook destination ~/Documents/Cline/Hooks/. Vet reads the five Cline data files under this directory, unless a per-file override replaces a path; this variable does not move the hook directories. For vet, surrounding whitespace is trimmed, and a value that names something other than a directory is the NotADirectory coverage gap.
skarn assessfollows it the same way for its saved permission rules section. CLINE_MCP_SETTINGS_PATH- Surrounding whitespace is trimmed and a blank value is unset, as Cline reads it.
Details
Replaces only the path to Cline's settings/cline_mcp_settings.json under its data directory.
skarn vet,skarn assessfor its saved permission rules section, the MCP vet_configs tool, andskarn inventoryfollow it; inventory names the path$CLINE_MCP_SETTINGS_PATH. Configuration discovery accepts plain UNC paths except in vet_configs, which refuses every network path. All four refuse other network or device spellings. ClineOverrideAlias reports an override that names a file another vetted row reads: vet skips the override and reads the other row as usual, unless that row is also an override, in which case vet skips both. CLINE_PROVIDER_SETTINGS_PATH- Surrounding whitespace is trimmed and a blank value is unset, as Cline reads it.
Details
Replaces only the path to Cline's settings/providers.json under its data directory.
skarn vet,skarn assessfor its saved permission rules section, the MCP vet_configs tool, andskarn inventoryfollow it; inventory names the path$CLINE_PROVIDER_SETTINGS_PATH. Configuration discovery accepts plain UNC paths except in vet_configs, which refuses every network path. All four refuse other network or device spellings. ClineOverrideAlias reports an override that names a file another vetted row reads: vet skips the override and reads the other row as usual, unless that row is also an override, in which case vet skips both. CLINE_GLOBAL_SETTINGS_PATH- Surrounding whitespace is trimmed and a blank value is unset, as Cline reads it.
Details
Replaces only the path to Cline's settings/global-settings.json under its data directory.
skarn vet,skarn assessfor its saved permission rules section, the MCP vet_configs tool, andskarn inventoryfollow it; inventory names the path$CLINE_GLOBAL_SETTINGS_PATH. Configuration discovery accepts plain UNC paths except in vet_configs, which refuses every network path. All four refuse other network or device spellings. ClineOverrideAlias reports an override that names a file another vetted row reads: vet skips the override and reads the other row as usual, unless that row is also an override, in which case vet skips both. VSCODE_APPDATA- VS Code's user data root.
Details
When it is set and not empty, vet, assess, inventory, the inventory record check
--formatndjson writes, and the MCP vet_configs tool read VS Code's user settings and profiles and the legacy copy of Cline's MCP settings under$VSCODE_APPDATA/Code/User on every platform, and the legacy copy of Cline's MCP settings that Cursor holds under$VSCODE_APPDATA/Cursor/User, because Cursor is built from VS Code and inherits the variable. When it is unset or empty they read %APPDATA%\Code\User on Windows (falling back to %USERPROFILE%\AppData\Roaming\Code\User), ~/Library/Application Support/Code/User on macOS, and $XDG_CONFIG_HOME/Code/User on Linux (falling back to ~/.config/Code/User), and the same directories with Cursor in place of Code for Cursor. Configuration discovery accepts a plain UNC root except in vet_configs. A relative path, any other network or device spelling, or a control character gives one coverage gap per directory. For a plain UNC root, vet_configs also reports those gaps. Under--evidence-homeit is ignored: the VS Code and Cursor user directories resolve under the copied home. Session recall does not read it. GEMINI_CLI_HOME- Gemini CLI uses
$GEMINI_CLI_HOME/.gemini as its home whenGEMINI_CLI_HOMEis nonempty and ~/.gemini otherwise.Details
Vet resolves . and .. components the way Gemini CLI joins the path, and reads a relative value from the working directory, as Gemini CLI does. For Gemini user configuration, vet, assess, inventory, and the MCP vet_configs tool read settings.json and the policies/ directory only under the selected home, with no fallback. The CLI commands accept a plain UNC path. The MCP tool refuses a network path named in the variable itself. A refused network or device spelling produces a NetworkPathRefused coverage gap at the override directory itself. A control character in a local path produces ControlCharacterInPath there. With
--evidence-home, the commands ignore the override. Setup and doctor use ~/.gemini for user settings, and session discovery ignoresGEMINI_CLI_HOME.
Files
/Library/Application Support/ClaudeCode/managed-settings.json, /etc/claude-code/managed-settings.json, C:\Program Files\ClaudeCode\managed-settings.json- Claude Code's MDM-managed settings (macOS, Linux/WSL, Windows).
Details
Doctor reads the platform's path as the claude host's managed precedence layer; allowManagedHooksOnly: true there makes every lower layer inert. Read-only; never written.
/Library/Application Support/ClaudeCode/managed-settings.d/*.json, /etc/claude-code/managed-settings.d/*.json, C:\Program Files\ClaudeCode\managed-settings.d\*.json- Claude Code's managed-settings drop-in directories (macOS, Linux/WSL, Windows), where separate teams deploy policy fragments without editing one shared file.
Details
Doctor folds a drop-in directory into the SAME managed layer as its sibling managed-settings.json, in the order Claude merges them: the base file first, then every *.json in the directory sorted by name, wired hooks unioned and de-duplicated on the event and the exact command, and allowManagedHooksOnly taken from the last file that sets it (a file that omits the key changes nothing, a file that sets it to false unlocks an earlier true). Files whose name begins with a dot are ignored, as Claude ignores them. Read-only; never written.
C:\ProgramData\ClaudeCode\managed-settings.json- Claude Code's retired Windows managed-settings path.
Details
Claude Code no longer reads it, so doctor never counts a hook found there as protection: when the file is present the report carries a note naming the supported path (C:\Program Files\ClaudeCode\managed-settings.json), and when it is absent it is silent. Read-only; never written.
HKLM\SOFTWARE\Policies\ClaudeCode, HKCU\SOFTWARE\Policies\ClaudeCode- Claude Code's Windows registry policy keys (a Settings value of type REG_SZ or REG_EXPAND_SZ holding the same JSON), deployed through Group Policy or Intune.
Details
Doctor reads both as claude's managed precedence layer, so a fleet managed entirely through Group Policy or Intune is examined rather than skipped, and finding one is enough to examine the host even where Claude Code itself is not installed. A REG_EXPAND_SZ value is read verbatim without environment expansion, because doctor reports what is configured rather than what it resolves to on this machine. Claude Code reads exactly ONE managed source and ignores the rest rather than merging them, so HKLM outranks the system managed-settings.json and its drop-ins, which in turn outrank the user-writable HKCU key; doctor reports the loser as inert and never counts its hooks as protection. A key that exists but whose Settings value cannot be read or is not a string type is a coverage gap with a reg query command, never a silent absent. On WSL, Claude Code reads the Windows policy chain in addition to /etc/claude-code and gives the Windows sources priority (wslInheritsWindowsSettings, default true), and a Linux skarn binary cannot reach the registry from there. Rather than report a protection a Windows-side allowManagedHooksOnly may already have silenced, doctor downgrades what would have been a claude pass to a warn naming that unread chain, with /status inside Claude Code as the way to see which source won. Read-only; never written.
server-managed settings (claude.ai admin console or a self-hosted Claude apps gateway)- Claude Code's remotely delivered managed settings, fetched at sign-in, and the policyHelper executable that can compute managed settings at startup.
Details
Both outrank every local managed source and, because Claude Code reads only its highest-precedence managed source, both silence the file and registry policies below them. Claude Code caches the server-managed document as remote-settings.json in its config directory (
CLAUDE_CONFIG_DIR, else ~/.claude), beside remote-settings.json.signature.json and remote-settings.json.synced-at, and doctor reads that cache as claude's top managed layer: guard hooks found there are reported as wired via organization managed settings, and the file and registry policies below it are inert. An empty object is what Claude Code caches for an organization with no server-managed settings, and doctor treats it as absent. The cache reflects the last sync, so a machine that has not signed in since the organization changed its settings reports what it last fetched; underSKARN_MANAGED_ROOTit is read below the staging root. Doctor cannot read a policyHelper output, so a fleet whose hooks arrive only through one sees its machines report as unwired. Declared here so the set of managed delivery surfaces is complete. Confirm the winning source on a machine with /status inside Claude Code, which names the delivery channel it loaded. Read-only; never written. /Library/Managed Preferences/com.anthropic.claudecode.plist- Claude Code's macOS managed-preferences domain, and the macOS half of the same MDM/OS-level policy tier the Windows HKLM registry key occupies.
Details
Declared as a managed source but not decoded; when present, doctor surfaces it as a coverage gap with a plutil command to inspect it, never as a silent absent. Because that tier outranks the file-delivered policy and Claude Code reads only its highest-precedence managed source, a present plist also stops doctor from counting the hooks in managed-settings.json and its drop-ins: those hooks genuinely never run, and the report names the coverage gap instead of a protection it cannot confirm.
/etc/codex/requirements.toml, %ProgramData%\OpenAI\Codex\requirements.toml- Codex's admin-managed requirements file (Unix, Windows).
Details
Doctor reads it as the codex host's managed precedence layer via a scoped reader (allow_managed_hooks_only and the [[hooks.<Event>.hooks]] command strings); allow_managed_hooks_only = true makes every lower layer inert. Read-only; never written.
/Library/Managed Preferences/com.openai.codex.plist- Codex's macOS managed-preferences domain. Doctor decodes the XML form
Details
(requirements_toml_base64 and config_toml_base64, base64 to the same scoped reader; the lockdown key is honored only from the requirements payload, matching Codex); a binary plist is surfaced as present-but-unreadable with the exact plutil conversion command, never as a silent absent.
/Library/Application Support/Cursor/hooks.json, /etc/cursor/hooks.json, C:\ProgramData\Cursor\hooks.json- Cursor's enterprise-managed hooks (macOS, Linux/WSL, Windows).
Details
Doctor reads the platform's path as the cursor host's managed precedence layer; Cursor layers additively (no lockdown key), so every present layer stays active. Read-only; never written.
/etc/github-copilot/policy.d/*.json, C:\ProgramData\GitHub\Copilot\policy.d\*.json- Copilot's managed policy directory (Linux/macOS, Windows).
Details
Doctor folds every *.json in the directory into the copilot host's managed precedence layer, sorted by name; Copilot layers additively. On a machine with a Copilot in Code profile the same layer is reported unverified for copilot-code, because whether Code reads it was not measured. Read-only; never written.
/Library/Application Support/GeminiCli/system-defaults.json, /etc/gemini-cli/system-defaults.json, C:\ProgramData\gemini-cli\system-defaults.json- Gemini CLI's managed system-defaults file, the LOWEST of its four settings layers.
Details
Read by doctor. Gemini derives this path from the system settings file's directory, so
$GEMINI_CLI_SYSTEM_SETTINGS_PATHmoves it too, and$GEMINI_CLI_SYSTEM_DEFAULTS_PATHreplaces it outright; doctor reads whichever path wins. Hook arrays concatenate across layers, so hooks declared here run alongside the user and project ones rather than replacing them. /Library/Application Support/GeminiCli/settings.json, /etc/gemini-cli/settings.json, C:\ProgramData\gemini-cli\settings.json- Gemini CLI's managed system settings file, the HIGHEST of its four settings layers - it has the final say on single-valued settings such as hooksConfig.enabled.
Details
Read by doctor.
$GEMINI_CLI_SYSTEM_SETTINGS_PATHreplaces this path, and doctor reads whichever path wins; hook arrays still concatenate across every layer. ./.claude/settings.local.json- Claude Code's personal, gitignored project settings file.
Details
Claude merges hooks across every settings file and runs all of them, so a guard wired here protects this checkout and doctor reads it as part of the project layer.
skarn setupnever writes it: it writes only the committed ./.claude/settings.json. ./.claude/settings.json, ./.cursor/hooks.json, ./.codex/hooks.json, ./.github/hooks/skarn.json, ./.gemini/settings.json- A repo's committed project-scope hook configs (claude, cursor, codex, copilot, gemini)
Details
written by
skarn setup --scopeproject and read by doctor as each host's project precedence layer whenever it runs in that directory. Copilot in Code reads the copilot file in a folder project; in a working directory holding a .git entry doctor reports it unverified for copilot-code, because a repository project was not measured. Portable by construction: the committed command resolves skarn from PATH at run time and exits 0 where skarn is not installed. Gemini reads one command field on every platform, so its committed POSIX command fails open on a native-Windows teammate; Gemini also runs hooks from a project file only once that folder is trusted. ./.github/copilot/settings.json, ./.github/copilot/settings.local.json, ~/.copilot/settings.json- The repository's Copilot CLI settings.
Details
Doctor reads one key from them, the top-level disableAllHooks: setting it true makes the CLI skip the user- and repository-delivered hooks for that repository, the operator's own user-scope hook included, and the CLI logs nothing when it does, so the state is knowable only by reading the file. The settings.local.json sibling takes precedence over settings.json, the CLI reads the same key from the shared cross-tool ./.claude/settings.json and ./.claude/settings.local.json, and the operator's own ~/.copilot/settings.json (honoring
$COPILOT_HOME) carries it too, outranked by whatever the repository says. Doctor resolves the repository scope first and consults the user file only when no repository file spoke. Nothing documents which of the two repository families wins when they disagree, so it honors a true from either: reporting a live hook as silenced is a false alarm the named file settles, while reporting a silenced hook as protection is not. Comments are tolerated on a retry, since the CLI documents JSONC for its settings. When the switch is on, doctor reports the user and project hook layers as inert instead of counting them as protection, and reports a managed policy layer with a note rather than as either: the switch does not stop a host application's own in-process hooks, which arrive through the SDK rather than from a file, and machine policy hooks kept running under it on CLI 1.0.82, the one version measured (GitHub documents them as exempt). The switch takes effect only once the CLI trusts the folder: on 1.0.82 an untrusted repository carrying the switch still ran the user hook, and doctor reads the switch but not the CLI's trustedFolders list, so in an untrusted folder it can call a user hook inert that the CLI still runs. Read-only; never written. ~/.grokbot/- Grok Bot's local-exec daemon state: the daemon connection and credential files, its settings.json, and its rolling daemon log.
Details
Doctor detects this directory and the daemon-connection file beside it by stat alone, each one only when the path is of the kind its name implies. It reads exactly one body here, settings.json, for the egressTunnelEnabled and webauthnProxyEnabled posture flags, and only once the open handle itself proves the path is that file and nothing else, so a symlink, a hard link to a credential file, or a pipe left at that name is refused unread. The connection and credential files hold a gateway bearer token, a network token and VNC proxy tokens; skarn never opens them, so no value from them can reach the report. Presence is reported as a warning with no fix, because no skarn command changes it. Read-only; never written.
~/Library/Application Support/Grok Bot/ (macOS)- Grok Bot's desktop app root.
Details
Doctor detects the directory and its sand-secrets.json and sand-client-persistence markers by stat alone and reads no body here at all; the transcript replicas under sand-client-persistence are scanned by the session commands, not by doctor, and the token store is never opened by either. The probe is macOS-only, the platform where the app root is observed; ~/.grokbot/ is checked on every platform. Read-only; never written.
~/.skarn.json- Optional tool configuration: the set of assistant tools and their session paths, plus an optional projects alias map.
Details
Both the recall surface and scan discovery (check, assess, baseline audit, the guard's stop advisory, and serve's Security scan) read it, so the security scan and the recall views cover the same corpus. Falls back to a builtin tool set when absent. The projects object renames a resolved project for display: a key beginning ~, $, or / is a path prefix (with ~ and a leading $VAR expanded like sessions_path) matched against the canonical project root on whole path components, longest match winning (so /repo never matches /repository); any other key matches the derived display name case-insensitively; the value is the shown name. Aliases change display only, never the grouping key.
~/.cache/skarn/- Cache for downloaded rule and maintained-feed bundles.
Details
Honors
$XDG_CACHE_HOME. ~/.config/skarn/baseline.json- The personal accepted-findings baseline, applied automatically when it exists: check, assess, and serve suppress its findings, and guard stops flagging them.
Details
Written by
skarn baseline audit/acceptandskarn guard accept. Honors $XDG_CONFIG_HOME. Holds fingerprints and hashes, never a raw secret; treat it as sensitive. ~/.config/skarn/eula-accepted.json- The EULA acceptance record: the agreement version accepted, an RFC-3339 timestamp, and the method (prompt, command, env, license-install).
Details
Written when acceptance is given at the first-run prompt, by
skarn eula accept, or by installing a License Token; never transmitted. Honors $XDG_CONFIG_HOME. ~/.claude/- Default Claude Code session root.
Details
Scanned automatically; extend with
$SKARN_CLAUDE_DIRSor$CLAUDE_CONFIG_DIR. Every security scan (check, assess, baseline audit, the serve scan, the MCP scan_sessions tool and the guard's session-end advisory) also reads the top-level .txt and .json files Claude Code saves in projects/<project>/<session-id>/tool-results/ as part of that session, each file its own finding location under the session's id and project, and a tool-results directory with no transcript beside it as a session named by its directory. A saved file over 16 MiB, one with a NUL byte in its first 8 KiB (UTF-16 output has one whenever those bytes hold an ASCII character, a space or a line break included) and one past the session's 64 MiB or 512-file budget is a skipped record. Recall lists and shows the transcripts only, and reads a saved file only to mask a value first found in it. ~/.kimi-code/sessions/- Default Kimi Code CLI session root.
Details
One wire.jsonl per agent under sessions/<workdir-key>/<session-id>/agents/<agent>/; the main conversation and every sub-agent stream are scanned as separate sessions. Relocate with
$KIMI_CODE_HOME. The legacy python kimi-cli root ~/.kimi/ stores a different session layout and is not scanned;kimi migrateconverts it. ~/.kimi-code/user-history/- Kimi Code CLI's per-working-directory prompt log, one file per workdir.
Details
Scanned in addition to the session tree because it retains prompts from sessions that were aborted before any session record was written. Relocate with
$KIMI_CODE_HOME. ~/.local/share/opencode/opencode*.db- OpenCode's SQLite session store, since v1.2.0.
Details
The filename carries the release channel, so a non-stable channel writes opencode-<channel>.db beside it and every matching file in the directory is read. Relocate the whole data root with $XDG_DATA_HOME, which OpenCode honours on macOS and Windows too - it uses the XDG path on every platform, not Application Support or %APPDATA%. The store is WAL-mode and OpenCode holds it open while running, so skarn reads the database and its -wal into an in-memory image and opens that image read-only; nothing is written beside the store. A store that cannot be read consistently is reported as unreadable, which makes the scan incomplete rather than clean.
~/.local/share/opencode/storage/- OpenCode's pre-v1.2 session tree, one JSON record per session, message and part.
Details
Upgrading to the SQLite store neither imports nor deletes it, so sessions written before v1.2 live only here and both layouts are scanned. A session id present in both is reported once, preferring the database copy.
~/.cline/data/sessions/<sid>/<sid>.messages.json- Cline's session store since 4.0.0, shared by the VS Code extension, the CLI and the JetBrains plugin.
Details
The transcript is Anthropic Messages format with tool_use and tool_result blocks, appended to across compaction rather than rewritten, and the <sid>.json manifest beside it carries the working directory, model and timestamps. The <sid>.compaction.json sibling holds the compaction summaries the model is handed instead of the pruned turns. A summary repeats the commands that ran, credentials included, so it is scanned as part of the same session, and a summary line the transcript already carries is not counted twice. Relocate the data root with
$CLINE_DATA_DIR, or the whole ~/.cline with$CLINE_DIR, which Cline honours on every platform. ~/.cline/data/tasks/<taskId>/api_conversation_history.json- Cline's pre-4.0 task tree under the shared data root: the request history in Anthropic Messages format, tool outputs included, with the UI transcript in ui_messages.json beside it.
Details
Cline 4.x still reads these tasks from here and never rewrites them. Each task is scanned as the union of both files, because the pre-4.0 compaction replaced the request history in place while the UI transcript kept the earlier turns. The same task present byte-for-byte under two roots is reported once; two copies that differ in either file are both scanned.
~/Library/Application Support/{Code,Cursor,Windsurf}/User/globalStorage/saoudrizwan.claude-dev/tasks/<taskId>/- The same pre-4.0 task tree under each VS Code-family fork's extension storage (Linux: ~/.config/<fork>/User/..., Windows: %APPDATA%/<fork>/User/...).
Details
The publisher directory is the same in every fork; only the User directory varies, so all three are walked and the Code copy wins a byte-identical tie.
~/.grok/sessions/- Default Grok Build session root.
Details
One transcript per session at sessions/<url-encoded-cwd>/<session-id>/chat_history.jsonl, with a summary.json sidecar beside it read for the session id, branch, timestamps, model, and title, and for the working directory when the path yields none. The session title is scanned like any other session text. The recorded working directory is re-derived from the group directory name, or from its .cwd file when the encoded path exceeds 255 bytes, and a recorded directory always wins over the sidecar's copy. Relocate with
$GROK_HOME. updates.jsonl, rewind_points.jsonl, events.jsonl, and session_search.sqlite are deliberately not scanned. One more sidecar, signals.json, is read for two counters only, compactionCount and totalTokensBeforeCompaction, and so is a non-empty compaction_checkpoints or compaction directory beside the transcript. Grok rewrites the transcript when it compacts a session, dropping turns from the only file Skarn reads, so a session either signal reports as compacted is counted as incomplete coverage and named in the scan-incomplete warning. The two signals are independent rather than a fallback chain, and either alone is enough: a saved checkpoint means the compaction happened whatever a sidecar written at some other moment says. An empty checkpoint directory counts for nothing, and neither does a sidecar that is missing, unreadable, or malformed; the counter is raised only by a positive signal, never by the absence of one. No session content is taken from either. ~/.grok/sessions/<url-encoded-cwd>/prompt_history.jsonl- Grok Build CLI's per-working-directory prompt log, one file beside the session directories of that working directory.
Details
Each record carries a session id, so one file holds prompts from many sessions and each id is scanned as its own session. It is read in addition to the transcripts because it outlives them: a removed, pruned, or partially copied session directory takes its transcript and leaves its prompts, text cleared before it was sent is saved here and reaches no transcript at all, a shell prompt entered with a leading ! is recorded here as the bare command it ran, without the !, while the transcript keeps only a rendered narration of it, and a torn transcript still leaves the prompt. It is not a record of prompts written ahead of the transcript: the transcript is written first. A prompt the session transcript already carries is dropped at scan time, matched on the exact text within the same working directory and session id, so it is reported once; a session whose every prompt the transcript carries does not appear at all. Shell prompts additionally surface in
skarn cmds. Relocate with$GROK_HOME. ~/Library/Application Support/Grok Bot/sand-client-persistence/ (macOS), ~/.config/Grok Bot/sand-client-persistence/ (Linux), the same directory under %APPDATA% (Windows)- Grok Bot's local chat-transcript store.
Details
Grok Bot is xAI's always-on desktop agents app, a different product from the Grok Build CLI above, and it keeps a cleartext replica of every agent's conversation here, so a credential pasted into a Grok Bot chat lands on disk in this directory. One .blob per persistence slice, each filename the base32 (RFC 4648, unpadded lowercase) encoding of a dotted slice name. Skarn decodes the name and scans only a sand.client.slice.account.<account>.transcript.replicas.<agent-id> slice, so the drafts, roster, send-journal, selection, sidebar and client-meta slices beside it are excluded by construction. One replica is one session, identified by the decoded agent id, and two blobs decoding to the same agent id are reported once. A .blob whose filename does not decode is counted once per store as incomplete coverage, so it raises the unreadable-store count in the scan-incomplete warning rather than being passed over; the warning carries that count, not the offending filename. A document whose value object is missing, is not an object, or holds an entries member that is not an array is reported unreadable rather than as an empty session. An absent entries member reads as an empty replica only at the schema version Skarn was verified against, so a truncated envelope or a later schema that renamed the collection is reported unreadable too, as is a non-empty entries array in which no entry declares a kind Skarn knows. An entries array is otherwise read whatever version the document declares, and recognized entries that carry no text of their own still make a valid session. On Linux the store list also folds $XDG_CONFIG_HOME, where Electron places userData when that variable is set, and an agent replicated into both roots is still reported once. Inside the document, whatever carries a content string is read, an agent turn at message.content and a chat message at content, both stamped in epoch milliseconds, whatever type the entry declares, so a body type a later Grok Bot release introduces is scanned rather than skipped; the widget, attachment and approval bodies observed keep their payload under other keys and so contribute no text. No entry records a working directory, so a Grok Bot session has no project and is left out of project grouping rather than named after the directory it sits in. The app names no data-directory variable, so there is nothing to relocate the store with. Grok Bot's other local files are deliberately not read: its OAuth token store, its local-exec daemon state under ~/.grokbot/, the Electron cookie stores, and its crash and memory telemetry.
~/.copilot/session-state/, ~/.scout/copilot/session-state/- GitHub Copilot CLI session roots, one events.jsonl per session under <root>/session-state/<id>/.
Details
Both are scanned automatically, each only when it has a session-state child, and
$COPILOT_HOMEadds another when it names a distinct root. The second root is Microsoft Scout's. Scout spawns the Copilot CLI it bundles withCOPILOT_HOME=~/.scout/copilot, so that CLI writes its transcript there in the clear, in the same format as the standalone CLI, and that transcript is what Skarn reads. Discovery under ~/.scout goes to that one location and nowhere else: the root directory is never enumerated, so Scout's own encrypted session index (~/.scout/m-sessions/sessions-index.json) and every other m- file are outside what discovery reaches, and nothing is decrypted. Naming a project for the session afterward uses the same resolver every source uses, on two inputs: a workspace.json probed three directories above the transcript, which neither the Copilot CLI nor Scout writes, and the cwd the transcript itself names, with a .git pointer stat'd beside it. No session content is read from either. Verified against Scout 0.23.331, 2026-07-30. Beside each events.jsonl, Skarn reads the name: title of workspace.yaml, only when that file is a regular file and not a link, and scans that workspace title as a user message unless it repeats the first prompt. The text a prompt's transformedContent adds around what the user typed is scanned as injected context, and a credential inside a <cross_session_message> block carries the tool name send_session_message. A$COPILOT_HOMEthat names a Copilot in Code profile is not one of these roots, and a session that Copilot in Code wrote under any other$COPILOT_HOMEis reported by the copilot-code source instead; the CopilotCodingHome entry describes both. Skarn reads a session's token totals and cost from what the CLI records, never from its own price table. A run of the CLI that closes normally writes one session.shutdown record. Current versions write the totals since the session started, and earlier versions wrote each run's own totals. Skarn takes the last running total and adds per-run records, so each request counts once when the transcript shows which kind a record is: the usage records, the output tokens that assistant messages state or the record's request count settle it. A record they do not settle shows its own totals and no cost, and the runs before it drop out of the totals. Skarn then adds the readable session.usage_record records written after the last session.shutdown record it could read. A usage record holds one model request; a usage record written before a readable session.shutdown record is left out, so that a request the shutdown record counts is not counted twice. A session that is still open, or that ended without a session.shutdown record, therefore reports the requests its usage records hold. Without a readable usage record, Skarn counts instead the output tokens that assistant messages state after the last session.shutdown record, or in the whole transcript when there is none. The cost is the AI credits those records state; when a usage record after the last session.shutdown record states no AI credits or carries malformed usage fields, the session shows no cost rather than an estimate. ~/.claude/settings.json, ~/.claude/settings.local.json, ./.claude/settings.json, ./.claude/settings.local.json- Claude Code hooks and permission rules (allow, ask, deny).
Details
Read, never written. Vet reads the project-local pair at the working directory, the git top and, in a linked worktree, the main checkout. Assess reads the project-local pair in the working directory's project and in every project Claude Code records.
~/.claude.json, ~/.mcp.json, ./.mcp.json- Claude Code MCP server definitions and the legacy per-project allowedTools lists in ~/.claude.json.
Details
Read, never written. Vet reads the project-local file at the working directory, the git top and, in a linked worktree, the main checkout. Assess reads the project-local file in the working directory's project and in every project Claude Code records. The Copilot CLI also loads a project .mcp.json, so vet reads its bare entries as Copilot CLI servers under the Copilot CLI's own source row: each top-level key other than mcpServers whose value is an object, and mcpServers itself when that object holds a command, url, httpUrl, serverUrl or endpoint string directly; the servers inside mcpServers stay Claude Code's. ~/.mcp.json has no Copilot CLI row of its own, but when the home directory is itself a visited project, vet reads the .mcp.json there as that project's file under both rows, as the Copilot CLI loads a .mcp.json from the working directory. A container server's locator starts mcpServers.<name> and a bare server's starts <name>, so the two can coincide (a container server a and a bare server named mcpServers.a), and a finding does not say which reading produced it.
--all-projectsreads the projects keys in ~/.claude.json and also in$CLAUDE_CONFIG_DIR/.claude.json and each$SKARN_CLAUDE_DIRSentry's .claude.json; Skarn does not vet those declared directories' other content. ~/.claude/plugins/, ~/.claude/skills/- Installed Claude Code plugins and skills.
Details
Vet reads each plugin.json and skill.json manifest for its install source and integrity marker.
~/.codex/sessions/, ~/.codex/archived_sessions/- Default Codex CLI session roots, scanned automatically and extendable with
$CODEX_HOME.Details
zstd-compressed rollouts (rollout-*.jsonl.zst, written for rollouts older than 7 days) are read transparently through the same reader as plain ones; when both a plain rollout and its .zst twin exist the plain one is preferred. Only rollout-* files are parsed as sessions, so session_index.jsonl is never scanned.
~/.codex/config.toml, ~/.codex/hooks.json- Codex CLI MCP server definitions and hooks.
Details
Read by vet through a scoped reader that keeps only the launcher command, its arguments, and the endpoint url. When
CODEX_HOMEis nonempty, vet, assess, inventory and the MCP vet_configs tool read$CODEX_HOME/config.toml and$CODEX_HOME/hooks.json instead, with no fallback to ~/.codex; setup and doctor still read ~/.codex. ~/.cursor/mcp.json, ~/.cursor/hooks.json- Cursor MCP server definitions and hooks.
Details
Read by vet.
~/.copilot/mcp-config.json, ~/.copilot/config.json, ~/.copilot/settings.json- Copilot CLI MCP server definitions, application state, and user settings, all resolved under
$COPILOT_HOMEwhen it is set, which replaces the default root rather than layering over it.Details
A declared root holding no Copilot store reads exactly as an absent default one does: installation is decided by a config file that was actually read, or by the session-state and hooks markers under whichever root is in force, never by the root's own existence. Read by vet. From settings.json vet resolves whether CLI sessions are exported to GitHub. remoteExport: false is the opt-out GitHub documents as the way to stop session syncing, remoteSessions: true forces export back on regardless of it, and the documented default with neither set is sync on. remote is recorded as a contributing key but never decides, because GitHub documents it two ways that do not agree: the settings table says off keeps session data local only, while the page on session syncing names remoteExport as the opt-out and does not mention remote at all. A config carrying only remote: off is therefore reported as exporting, and the finding lists every key that was set, so a reader who has decided the settings table is authoritative can see exactly what skarn read and dismiss it. Where no settings.json exists at all, which is the state a fresh install is in since neither the CLI nor its
--no-remote-exportflag writes one, the documented default is reported against the path the file would occupy, so an untouched machine is not mistaken for an opted-out one. Comments are tolerated, since GitHub documents JSONC for this file and the CLI writes a comment header into config.json beside it. Read-only; never written. ~/.scout/m-settings.json- Microsoft Scout's permission grants, auto-approve settings, and experiment flags.
Details
Read by vet. The path has no platform branch. Scout resolves its config root to ~/.scout on macOS and Windows alike.
~/.scout/m-mcp-servers.json- Microsoft Scout MCP server definitions.
Details
Read by vet. A user-added server nests its launcher or endpoint under a config object; a built-in server has none, because Scout generates its command at run time.
~/.copilot/data.db- The Copilot CLI's SQLite state store, which holds the signed-in GitHub account's access token and any bring-your-own-key provider headers alongside projects, workflows and review comments.
Details
Vet reads this file's POSIX mode by a non-following stat and never opens it: no byte of its contents is read, the database is never opened as a database, so no token and no header value can reach a finding and the only thing reported is whether the mode grants group or other read; a symlinked store is reported as a coverage gap rather than measured through its target, and a store whose owner-read bit is off is still measured. Its presence marks ~/.copilot as a live Copilot CLI install for the Microsoft Scout residue rule, the same way session-state/ and hooks/ do, so the row is never skipped as residue. Never a scan source: the session commands do not read it.
~/Library/Application Support/Grok Bot/sand-secrets.json- Grok Bot's plaintext third-party credential store, on macOS.
Details
Grok Bot is xAI's always-on desktop agents app, a different product from the Grok Build CLI. Vet reads this file's POSIX mode by a non-following stat and never opens it: not one byte of its contents is read and the store is never parsed, so no key name and no value from it can reach a finding and the only thing reported is whether the mode grants group or other read; a symlinked store is reported as a coverage gap rather than measured through its target. The path carries no platform branch, so the store is vetted on macOS only; the Linux and Windows locations are not read.
~/.grokbot/settings.json- Grok Bot's local-exec daemon settings.
Details
Vet reads two declared posture flags from this file, egressTunnelEnabled and webauthnProxyEnabled, and records only whether each is present and true. A flag that is absent or false raises nothing, so a default install stays silent.
~/.grokbot/local-exec-daemon-connection.json- Grok Bot's local-exec daemon connection state: the gateway base URL and the bearer, network and VNC proxy tokens the cloud side uses to execute on this machine.
Details
Vet treats the file as a presence signal and never parses it, so the gateway URL and every token stay out of the process as well as out of every output format. Its presence declares that the channel is configured, not that a daemon is running.
~/.gemini/settings.json- Gemini CLI's user settings: MCP server definitions read by vet, and the hooks object
skarn setup --agentgemini merges the guard into and doctor reads as the user precedence layer.Details
When
GEMINI_CLI_HOMEis nonempty, vet, assess, inventory, and the MCP vet_configs tool read$GEMINI_CLI_HOME/.gemini/settings.json instead. Setup and doctor still use ~/.gemini/settings.json. ~/.grok/hooks/skarn.json- Grok Build CLI's user hook file for skarn, written whole by
skarn setup --agentgrok and read by doctor as the setup-owned half of grok's user layer.Details
Grok loads every *.json in ~/.grok/hooks, so skarn owns a file of its own there and never merges into a foreign one; doctor folds the directory's other files into the same layer, so a hook wired by hand under another name still counts.
$GROK_HOMEmoves the whole directory. .grok/hooks/skarn.json- Grok Build CLI's project hook file for skarn, written by
skarn setup --agentgrok--scopeproject and meant to be committed.Details
Grok runs a project hook only after the folder is trusted (/hooks-trust, or launching with
--trust); until then it skips the file silently, so doctor reports that layer as inert rather than as protection. ~/.grok/trusted_folders.toml- Grok Build CLI's folder-trust store, the single gate for whether a repository's own hooks, MCP servers, and LSP servers run.
Details
Doctor reads it to decide whether a project hook layer counts: a grant covers its folder and cascades to subdirectories, the nearest recorded folder wins (so an explicit untrust beats an ancestor's grant), and an over-broad key naming the filesystem root or the home directory is ignored the way grok ignores it. A store skarn cannot read or parse is reported as a coverage gap, never as an absent grant. Read-only; never written.
/etc/grok/managed_config.toml, ~/.grok/managed_config.toml- Grok Build CLI's organization-distributed config, root-owned at the system path and server-synced at the user path.
Details
Doctor reads the [[hooks.<Event>]] groups through a scoped reader that takes both documented handler notations (an inline-table array and the nested [[hooks.<Event>.hooks]] form) and reports them as managed precedence layers. Grok has no managed-only lockdown key, so these layers add hooks and never silence the others. The system path exists on Unix only; grok resolves no system config directory on Windows. Read-only; never written.
/etc/grok/requirements.toml, ~/.grok/requirements.toml- Grok Build CLI's requirements layer, the highest-authority config tier an organization distributes.
Details
Doctor reads its hooks with the same scoped reader as managed_config.toml and reports them as managed layers, which is what makes a skarn hook declared there visible to the fleet conformance check. The system path exists on Unix only. Read-only; never written.
~/.grok/config.toml- Grok Build CLI's user config. Doctor reads two things from it:
Details
the [[hooks.<Event>]] groups a user can declare there instead of in a hook file, and [folder_trust] enabled, which when false ungates every project hook (as does
GROK_FOLDER_TRUST=0) and so decides whether an untrusted project layer is reported inert at all. Read-only; never written. ~/.grok/config.toml, ~/.grok/managed_config.toml, ~/.grok/requirements.toml- Grok Build CLI's user, managed, and requirements configuration layers.
Details
Read by vet through a scoped TOML reader that collects MCP server launchers and endpoints, the variable NAMES (never the values) of an MCP env table, the [ui] permission_mode and yolo settings, allow-action [permission] rules in both the compact string-array and the structured rules forms, hook handlers in both TOML notations, and [[ui.notifications.hooks]] commands. Relocate the whole directory with
$GROK_HOME. Syntax the reader does not model, such as a multiline string, is reported as a coverage gap naming the file and line rather than skipped silently. /etc/grok/managed_config.toml, /etc/grok/requirements.toml- Grok Build CLI's system-wide managed and requirements layers, deployed by an organization.
Details
Read by vet exactly as the user layers are;
SKARN_MANAGED_ROOTprefixes both paths, so a staged payload can be vetted before it reaches a machine. ~/.grok/hooks/, ~/.grok/hooks-paths- Grok Build CLI's global JSON hook directory and the registry file naming extra hook sources.
Details
Vet reads the .json files one level down in the directory, regular files only, and loads each ABSOLUTE line of the registry as a further hook source; relative lines are ignored the way Grok ignores them, and a UNC or //host/share target is recorded as a coverage gap and never opened. Both are bounded per directory and per registry, and exceeding a bound is reported rather than silently truncated.
./.grok/config.toml, ./.grok/hooks/- Grok Build CLI's project-scoped configuration and hook directory, contributing MCP servers, plugins, and permission rules.
Details
Vet reads them at the working directory, the git top and, in a linked worktree, the main checkout, while Grok itself discovers a .grok/config.toml at every level from the repository root down. Project hooks are collected whatever the folder-trust state, because a declared hook becomes live the moment the folder is trusted, with no configuration change. Assess reads them in the working directory's project and in every project Claude Code records.
~/.local/share/skarn/compliance-export/- Compliance API transcript export written by integrations/anthropic-compliance/, with one JSON document per session at <root>/<organization_uuid>/<session_id>.json.
Details
$SKARN_COMPLIANCE_EXPORT_DIRreplaces the default root; it must be absolute and non-empty. When unset, use $XDG_DATA_HOME/skarn/compliance-export if XDG_DATA_HOME is absolute, else this path. The walk enters only directories at the root and descends exactly one level, so .watermark.json and export-log.jsonl at the root are never read. Inside each organization directory, only regular *.json files whose non-empty stem uses [A-Za-z0-9_] are read; session.id must match the stem. A rejected filename, a symlinked session file or a session file with more than one hard link raises the unreadable-store count once per store. On Windows, the default is %LOCALAPPDATA%\skarn\compliance-export, and it never passes through ~. XDG_DATA_HOME is not consulted there. LOCALAPPDATA must be an absolute path with a drive letter or a UNC prefix; otherwise, the source is dropped and counted: check and assess report a partial scan, doctor reports a failed source, and the recall commands list nothing for it. A sessions_path written as~/...under tools.claude in ~/.skarn.json resolves through HOME before USERPROFILE, so a Git Bash or MSYS2 shell that sets HOME moves it. SettingSKARN_COMPLIANCE_EXPORT_DIRdoes nothing while that entry stays in place because the configured path is used before the variable is read. Write the entry as an absolute path, or remove it so the default and the variable apply again. Seeintegrations/anthropic-compliance/CENTRAL-SCAN.mdfor a guide to capture coverage and the data-protection facts. %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\, %LOCALAPPDATA%\Packages\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe\LocalCache\Local\Microsoft\Copilot\User Data\CopilotCodingHome\ (Windows)- Copilot in Code session roots.
Details
Copilot in Code is the coding workspace of the Microsoft Copilot app on Windows and macOS; it runs the GitHub Copilot CLI agent, which writes one events.jsonl per session under <profile>\session-state\<session id>\ in the format the copilot source already reads, and Skarn reports these sessions under the separate copilot-code source. On Windows Skarn reads both CopilotCodingHome directories when LOCALAPPDATA is an absolute path with a drive letter or a UNC prefix; otherwise the source is dropped and counted as one dropped source. The second directory is where an MSIX install of the app would keep the first; it was absent on the verified install and is read when it exists. Every directory inside a CopilotCodingHome directory is a profile when it has a session-state child, whatever its name. Discovery does not count or open a session-state or a profile folder that is a link, a junction included. A
$COPILOT_HOMEthat names a Code profile can still name a linked folder, unless the link points at a network path or, under--evidence-home, lies below the evidence home, and that profile's session-state still must not be a link. A coding home reached through a link is read too, unless the link points at a network path or, under--evidence-home, lies below the evidence home. Inside session-state only a directory whose name is a canonical UUID is read, so the .session-operation-locks folder and the inuse.<pid>.lock, inuse.<pid>.hold and .workspace-fork.lock files are skipped without being opened and without a coverage count. A$COPILOT_HOMEthat names a directory directly inside a CopilotCodingHome directory is one more profile of this source and never a copilot root. A$COPILOT_HOMEthat names any other root except ~/.copilot and ~/.scout/copilot is split per session: a session whose workspace.yaml carries client_name: github/autopilot is reported here, and so is a session without a workspace.yaml whose session.start names the producer copilot-agent and whose first system message opens with You are Copilot in Code; every other session stays with the copilot source. This source reads no such root when the root, a folder on the way to it, or its session-state is a link whose target is a network path; each such link counts once as an unreadable store, while a session-state link inside a profile, including a profile a$COPILOT_HOMEnames, and a linked candidate folder are skipped uncounted, live and under--evidence-home. A session-state that Skarn cannot classify at all, such as one whose probe is refused with access denied on Windows, counts once as a component that could not be checked for links. On macOS Skarn reads ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/, which the macOS entry under FILES describes. On Linux there is no default directory; set tools.copilot-code.sessions_path in ~/.skarn.json to one CopilotCodingHome directory to scan a copy of it, which is then the only directory read on any platform, and set it to null to turn the source off on every platform, including the sessions a$COPILOT_HOMEreaches. Select the source with--clicopilot-code; stats counts it under copilot_code_count and in the copilot_code column. On Windows a session is attributed to the project folder its session.start context names. With GitHub Copilot CLI1.0.93Copilot in Code wrote no session.shutdown record, so a session carries no recorded cost and shows a dash; on macOS with GitHub Copilot CLI1.0.108a session that was closed wrote one holding its totals since it started, and a session continued after that wrote another, so Skarn reads the totals from the last one. Copilot in Code has no resume command, soskarn restoreprints a comment that names the session and the Code tab of the app. Verified against Copilot app156.0.4314.58with GitHub Copilot CLI1.0.93. %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\session-state\<session id>\files\, ...\research\, ...\checkpoints\ (Windows)- Copilot in Code session artifacts: the files, research and checkpoints folders inside a session folder, beside its events.jsonl.
Details
The scan behind
skarn checkandskarn assessreads the regular files in these three folders of every copilot-code session that has a transcript, through 8 folder levels counting the folder itself, up to 512 files per session, 16 MiB per file and 64 MiB per session. Links and other entries that are not regular files are skipped. A file whose first 8 KiB holds a zero byte is treated as binary and skipped without a coverage count. A file over a size cap and a file or folder that cannot be read each count as a record that could not be read, a coverage gap; a session with more than 512 files stops at that cap and counts one more such record. A finding in one of these files carries the content source artifact and the folder name, files, research or checkpoints, as its tool name. Only the copilot-code source reads these folders; the session folders of the standalone Copilot CLI are not read. On macOS the same folders are read under ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/session-state/<session id>/, and on Linux in the copy that tools.copilot-code.sessions_path names. The recall commands never show this text. The cached scan ofskarn serveis not refreshed when only one of these files changes; a change to the transcript, or a session-store.db row change that moves the session's updated time, refreshes it. Verified against Copilot app156.0.4314.58with GitHub Copilot CLI1.0.93. %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\session-store.db (Windows)- Copilot in Code session index, a SQLite database the app keeps in each profile.
Details
Skarn reads it for every profile under a CopilotCodingHome directory and for a
$COPILOT_HOMEthat names a Code profile, never for any other$COPILOT_HOME; on macOS it is read at ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/session-store.db, and on Linux in the copy that tools.copilot-code.sessions_path names. Nothing is written under the profile or under the temporary directory, and SQLite never opens a file of the store, because it creates a missing session-store.db-wal or session-store.db-shm even for a read-only connection. Skarn reads the database and its write-ahead log into memory, applies the committed write-ahead log frames the way SQLite's own recovery does, and opens the resulting image read-only in memory. On Windows it opens the files with shared access and takes no lock on them. A frame that fails its salt or checksum ends the replay, and frames after the last commit are ignored. A store whose database and write-ahead log together exceed 192 MiB, whose described database would, or whose in-memory image cannot be allocated, is read in place from the same files through read-only handles Skarn holds itself, with its write-ahead log rows; its index rows count against 192 MiB per store and 384 MiB across profiles, and a store over either limit, or whose read in place would track more than 524,288 pages, is unreadable. Any other store holds its image in memory while its rows are read. A store that keeps changing during the read, a page that neither the database nor its write-ahead log holds, and a non-empty session-store.db-journal, a rollback journal, each make the store unreadable. The tables read are sessions (id, cwd, repository, branch, summary, and the created and updated times), turns, checkpoints, forge_trajectory_events (command, output and event value) and the full-text rows of search_index, which are read from its plain search_index_content table. A full-text row of type turn is skipped when the store has a turns table, whose rows already hold its text, and read when the store has none. Skarn does not read session_files, session_refs, assistant_usage_events, dynamic_context_items or forge_skill_proposals. Only live rows are read: text that a deleted session leaves outside the live rows, in superseded write-ahead log frames or in freelist pages, is not read, and this is a known gap. Rows of a session whose folder exists attach to that session: turn text is scanned as user message and assistant message, checkpoint fields and full-text rows as artifact, commands as tool input, outputs as tool result, and the summary, cwd, branch and repository as user message, each with the tool namesession-store.db <table>, for examplesession-store.db turns. These rows never change that session's message counts or what the recall commands show for it, and the cached scan ofskarn serveis not refreshed by a row change that leaves the session's updated time unchanged. A session whose folder is gone is reported as its own copilot-code session whose file is the session-store.db path;skarn recent, messages, search and export list it, masked as every recall command masks, and it moves no coverage count. A store that cannot be opened or has an unknown schema counts as one unreadable store, and the transcripts are scanned as before. Rows whose session id is not a UUID, and a cell over 16 MiB of a session with no folder, count as one incomplete session per database; a cell over 16 MiB of a session whose folder exists counts as a record that could not be read. Verified against Copilot app156.0.4314.58with GitHub Copilot CLI1.0.93. %LOCALAPPDATA%\copilot-tmp\, %LOCALAPPDATA%\Packages\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe\LocalCache\Local\copilot-tmp\ (Windows)- Copilot in Code tool-output spill files.
Details
Skarn follows at most one spill file per Copilot in Code tool result: the first line of that result that starts with
Saved to:and names an absolute path whose file name contains copilot-tool-output- and ends in .txt, one folder below one of these two directories; lines that name any other path are passed over, and the file is read only when its real path stays inside that directory. The scan behindskarn checkandskarn assessreads that file as a regular file of up to 16 MiB and scans it as the tool result of that call, under that call's tool name. A missing file, a link, a file whose first 8 KiB holds a zero byte and a path that fails a check are ignored; a file that cannot be read or is over 16 MiB counts as a record that could not be read. The recall commands never show spill text. These directories are read on Windows only, and only when LOCALAPPDATA is an absolute path with a drive letter or a UNC prefix. On macOS the spilled part of a result is not read: Copilot app158.0.4370.33saved an oversized result as a file directly in the per-user temporary directory, and a tool result that holds a recognized spill reference counts as one record that could not be read, a coverage gap. A recognized reference is a line that isSaved to:and an absolute path, or a line that opens withOutput too large to read at once (and ends with). Saved to:and an absolute path, where the file name contains copilot-tool-output- and the path ends in .txt. No spill file was observed on Copilot app156.0.4314.58with GitHub Copilot CLI1.0.93. %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\hooks\skarn.json, the same file under the MSIX twin of that directory (Windows)- The skarn-owned hook file of one Copilot in Code profile.
Details
skarn setup --agentcopilot-code writes it for every profile it finds, a directory inside a CopilotCodingHome directory that holds session-state, hooks or data.db, plus a$COPILOT_HOMEthat names one, with the usual backup, atomic write and verify. Discovery does not count or open a marker or a profile folder that is a link, a junction included, and data.db counts only as a file; a$COPILOT_HOMEthat names a Code profile can still name a linked folder unless the link points at a network path. Setup prints a line and doctor's agent_config_copilot_code names each such link, each coding home or profile folder skarn cannot open, and a coding home or named profile reached through a link to a network path; the check then warns that whether a profile there carries a guard hook is unknown, and appears even when no profile was found. A profile's hooks folder may be a link to a local folder, and setup writes through it and doctor reads through it; when the hooks folder, or a folder on the way to the hook file, is a link whose target is a network path, setup refuses that profile before anything is read or created (refused network-target in the JSON result) and doctor reads nothing through it and warns that the hook file is reached through a link to a network path. The profile's settings.json is read through a link to a local file or folder; when it, or a folder on the way to it, is a link whose target is a network path, doctor reads nothing through it, reports whether its disableAllHooks silences the hooks as unknown, and names a command that inspects the link itself. Its content is the shipped copilot hook file with the guard log moved to guard-copilot-code-audit.jsonl; the command still pins--agentcopilot. Doctor reads each profile's settings.json for disableAllHooks. Copilot app156.0.4314.58on Windows ran this file; on Windows and macOS no matching guard event was observed from it on Copilot app158.0.4370.33, while the .github/hooks/skarn.json of a folder project ran the hook, so doctor reports a wired profile file as unverified on every system, never as protection, and namesskarn setup --agentcopilot--scopeproject. On macOS setup and doctor also find every profile under ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/. On Linux setup and doctor reach a profile only through a$COPILOT_HOMEthat names it. Verified against Copilot app156.0.4314.58. %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\mcp-config.json, %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\config.json, %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\settings.json (Windows)- The configuration files of one Copilot in Code profile, read by vet.
Details
A profile is a directory inside either CopilotCodingHome directory of %LOCALAPPDATA%, the MSIX twin included, or on macOS inside ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/, that holds session-state, hooks or data.db, plus a
$COPILOT_HOMEthat names a directory inside a CopilotCodingHome directory. On Linux only that$COPILOT_HOMEreaches a profile. Such a$COPILOT_HOMEis never the Copilot CLI root, so the Copilot CLI rows read ~/.copilot instead. mcp-config.json is the file the Copilot CLI documents under$COPILOT_HOME, and a profile is Code's$COPILOT_HOME; the file was absent on the verified install and the survey did not establish whether Code reads it, so vet reports it as declared configuration only when it exists. config.json is read with the comment header the app writes. From settings.json vet reports only an export the file declares, remoteSessions: true. The sync default GitHub documents is the Copilot CLI's, so a profile with no settings.json, or one that sets neither remoteSessions nor remoteExport, raises no finding. Vet does not read a profile's installed-plugins or extensions folder, a repository's .github\extensions folder, the Copilot app's own MCP configuration or the project folders under the Copilot projects root, because neither their layout nor their file names were measured. A profile folder that exists but cannot be opened is a coverage gap. A CopilotCodingHome directory, or a$COPILOT_HOMEprofile, reached through a link whose target is a network path is not opened and is a coverage gap named NetworkPathRefused. Read-only; never written. Verified against Copilot app156.0.4314.58with GitHub Copilot CLI1.0.93. %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\data.db (Windows)- The SQLite app database of one Copilot in Code profile; its accounts table has an access_token column.
Details
Vet reads this file's POSIX mode by a non-following stat and never opens it: no byte of its contents is read, and the only thing reported is whether the mode grants group or other read. A symlinked store is reported as a coverage gap rather than measured through its target. Windows has no POSIX mode, so on Windows vet counts the file as examined and reports no mode finding. On macOS the finding applies to the data.db of every profile under ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/, and on macOS and Linux to a profile that a
$COPILOT_HOMEnames. Vet reads none of its rows. Verified against Copilot app156.0.4314.58. %LOCALAPPDATA%\Microsoft\Copilot\User Data\CopilotCodingHome\<profile>\hooks\ (Windows)- The hook folder of one Copilot in Code profile, where
skarn setup --agentcopilot-code writes skarn.json.Details
Vet reads the .json files one level down, regular files only, under the same bounds as the other hook directories, and reports each command, bash and powershell field of a hook entry, flat or nested, at its own locator, for example hooks.preToolUse[0].powershell. Copilot in Code loaded a hook file from this folder under any file name. When the folder, or a folder on the way to it, is a link whose target is a network path, vet opens nothing through it and reports a coverage gap named NetworkPathRefused on the folder. Verified against Copilot app
156.0.4314.58with GitHub Copilot CLI1.0.93. ~/.copilot/hooks/- The Copilot CLI's personal hook folder, under
$COPILOT_HOMEwhen it is set and does not name a Copilot in Code profile.Details
Vet reads the .json files one level down, regular files only, and reports each command, bash and powershell field of a hook entry. On a Microsoft Scout machine whose ~/.copilot is only residue the row is skipped, as the other ~/.copilot rows are.
./.github/hooks/- The working directory's Copilot hook folder, which the Copilot CLI and the Copilot cloud agent read, and which Copilot in Code read in a folder project.
Details
Vet reads the .json files one level down, regular files only, at the working directory, the git top and, in a linked worktree, the main checkout, and reports each command, bash and powershell field of a hook entry. Vet reads it whatever the project type; Copilot in Code reading it in a repository project was not measured. Assess reads it in the working directory's project and in every project Claude Code records.
~/.cursor/projects/<workspace>/terminals/<id>.txt, ~/.cursor/projects/<workspace>/agent-tools/<id>.txt- Cursor agent terminal and tool output files.
Details
Cursor writes one text file under terminals/ for each background command its agent runs: a header block that names the command, its working directory and its start time, then the command's output, then a footer with the exit code. The header holds the command as one quoted string, with each line break of a multi-line command written as \n. The Cursor cloud agent also saves tool outputs under agent-tools/. All of a workspace's files are one cursor session, ordered by start time, whose id is 16 hex digits followed by -cursor-agent-outputs; text listings print the first eight characters of that id, which come from the workspace hash, and
--jsonprints the full id that--sessiontakes. The scan behindskarn checkandskarn assessreads each file as its own unit under that session id and counts the workspace as one session: the header is scanned as tool input exactly as Cursor wrote it, the decoded command as the tool call, and the rest of the file as tool result; a finding names the file and, for a matched value, the value's line in that file, which for a value inside the command is the header's command line. It reads up to 512 files per workspace, 16 MiB per file and 64 MiB per workspace, newest first; a file over a size cap, a file beyond the first 512, and a file or folder that cannot be read each count as a record that could not be read, a coverage gap. Links and entries that are not regular files are skipped. The files read are always the regular .txt files directly under terminals/ and agent-tools/ of each workspace in ~/.cursor/projects: a sessions_path of null for cursor in ~/.skarn.json turns the source off, and no other sessions_path or session_glob given to cursor or to a based_on: cursor clone changes which files are read. A value that one file exposes and another file echoes back is reported as a cross-session chain between the two files; a value that one command prints and another command only sends, plainly or encoded into a URL, is reported as two findings with no chain. The recall commands show each command as a tool call and its output as a tool result, masked like every other session text: recent lists the session, messages prints the calls and results in start order, search reaches each command and the first 1 MiB of each output, tools lists every call, and cmds lists the decoded command of every terminal file that names one; a command value that is not a well-formed quoted string is shown as written. Verified against desktop Cursor 3.30.14 on macOS for terminals/, multi-line commands included; the agent-tools/ layout comes from a Cursor cloud agent, and the Windows and Linux layouts are unverified. ~/Library/Application Support/kiro-cli/data.sqlite3, ${LOCALAPPDATA}/kiro-cli/data.sqlite3, ~/.local/share/kiro-cli/data.sqlite3- Kiro CLI conversation database on macOS, Windows and Linux, respectively.
Details
On Linux, skarn also reads $XDG_DATA_HOME/kiro-cli/data.sqlite3. Each conversations_v2 or legacy conversations row is one session; its key supplies the working directory. The auth_kv and state tables hold sign-in credentials and are never read, nor is history. A database that cannot be opened or read makes the scan incomplete. The Windows path has been verified only under emulation. cmds, mcps and tools list this store's calls, with MCP server names from the conversation's tool declarations.
~/Library/Application Support/amazon-q/data.sqlite3, ${LOCALAPPDATA}/amazon-q/data.sqlite3, ~/.local/share/amazon-q/data.sqlite3- Amazon Q Developer CLI conversation database on macOS, Windows and Linux, respectively.
Details
On Linux, skarn also reads $XDG_DATA_HOME/amazon-q/data.sqlite3. This frozen store remains after conversion to Kiro. A conversation converted into the kiro-cli database during the Amazon Q to Kiro conversion is listed once per database under the same session id. Skarn reads the two files independently and never merges them. Each legacy conversations row is one session; its key supplies the working directory. Skarn never reads auth_kv, state or history. A database that cannot be opened or read makes the scan incomplete. The Windows path has been verified only under emulation. cmds, mcps and tools list this store's calls, with MCP server names from the conversation's tool declarations.
~/.kiro/sessions/cli/<uuid>.json, $KIRO_HOME/sessions/cli/<uuid>.json- Kiro CLI V2 harness sessions: metadata in <uuid>.json and the transcript in <uuid>.jsonl beside it.
Details
Skarn never reads sess_<uuid>.history. Measured only on macOS with Kiro CLI 3.3.0; Linux and Windows are assumed to use the same home-relative path. Resuming a V2 session in V3 creates a V3 copy, so the conversation lists twice under two ids. Cloud sessions are not local and skarn does not read them. cmds, mcps and tools list this store's calls, with MCP server names from the result's tool kind.
~/.kiro/sessions/<key>/sess_<uuid>/, $KIRO_HOME/sessions/<key>/sess_<uuid>/- Kiro CLI V3 session directories: skarn reads session.json and messages.jsonl.
Details
It never reads .lock, .index/, session-index/, session-leases/ or workspace-roots/. A session stopped before its first message lists as empty. Measured only on macOS with Kiro CLI 3.3.0; Linux and Windows are assumed to use the same home-relative path. Resuming a V2 session in V3 creates a V3 copy, so the conversation lists twice under two ids. Cloud sessions are not local and skarn does not read them. The reader cannot distinguish a CLI session from a Kiro IDE session if the IDE writes here. cmds, mcps and tools list this store's calls, with MCP server names from the tool_call id tool::<server>::<tool>.
~/Documents/Cline/Hooks/- Cline's shared user hook directory, read by the extension and the CLI.
Details
Documents is the literal folder joined to HOME;
CLINE_DIRdoes not move it. Setup writes only this user directory to avoid duplicate CLI invocations, using executable PreToolUse and UserPromptSubmit files on POSIX or PreToolUse.ps1 and UserPromptSubmit.ps1 on Windows. Doctor reports each file as part of the four peer directories. Vet reads each file whose name a loader for this directory accepts, whether or not it is executable: the extension accepts the exact names TaskStart, TaskResume, TaskCancel, TaskComplete, PreToolUse, PostToolUse, UserPromptSubmit, Notification, and PreCompact, extensionless on macOS and Linux and with .ps1 on Windows, and the SDK accepts TaskStart, TaskResume, TaskCancel, TaskComplete, TaskError, PreToolUse, PostToolUse, UserPromptSubmit, PreCompact, and SessionShutdown, case-insensitively, with no extension or one of .sh, .bash, .zsh, .js, .mjs, .cjs, .ts, .mts, .cts, .py, and .ps1; vet rates each logical line, joining physical lines through a backslash, backtick, or open-quote continuation, an unclosed Python bracket, or a trailing pipe, |&, or &&, and reports <file>:L<n> using the first physical line number; it inspects each path component, follows local links, and refuses network targets with NetworkPathRefused, reporting SymlinkLoop after eight links along the whole path, the links that reach the hook directory included, and NotARegularFile for a non-regular file; it rates the first 16 KiB and reports HookScriptTruncated for a longer file, counts physical lines only in that prefix, including comments and blanks, and rates the first 256 physical lines with HookScriptLineBudgetExceeded for further lines; it rates an unfinished logical line at either limit, but does not rate Python or JavaScript exfiltration through its own standard library with no shell-shaped string, or a command assembled from string literals split across lines or joined with +. A JavaScript line whose code starts with // is a comment; a trailing or block comment is still rated. A hook file that is the same file as a credential store at its default location, which vet reads stat-only, is never read and is reported as ClineOverrideAlias, and so is every hook while a credential store exists that vet cannot identify; a store relocated by an override never stops a hook from being rated. The Cline extension resolves Documents through the operating system (the Windows Documents folder, the Linux XDG documents directory), so when that folder is redirected or localized, vet reads this literal path and not the folder the extension loads. ~/.cline/hooks/- Cline's CLI-only user hook directory, relocated to <
CLINE_DIR>/hooks whenCLINE_DIRis set.Details
Doctor reads it as a peer of the shared user and two workspace directories. Setup never writes here, because the CLI also reads ~/Documents/Cline/Hooks/ and would run duplicate hooks. Vet reads each file whose name a loader for this directory accepts, whether or not it is executable: the SDK accepts TaskStart, TaskResume, TaskCancel, TaskComplete, TaskError, PreToolUse, PostToolUse, UserPromptSubmit, PreCompact, and SessionShutdown, case-insensitively, with no extension or one of .sh, .bash, .zsh, .js, .mjs, .cjs, .ts, .mts, .cts, .py, and .ps1; vet rates each logical line, joining physical lines through a backslash, backtick, or open-quote continuation, an unclosed Python bracket, or a trailing pipe, |&, or &&, and reports <file>:L<n> using the first physical line number; it inspects each path component, follows local links, and refuses network targets with NetworkPathRefused, reporting SymlinkLoop after eight links along the whole path, the links that reach the hook directory included, and NotARegularFile for a non-regular file; it rates the first 16 KiB and reports HookScriptTruncated for a longer file, counts physical lines only in that prefix, including comments and blanks, and rates the first 256 physical lines with HookScriptLineBudgetExceeded for further lines; it rates an unfinished logical line at either limit, but does not rate Python or JavaScript exfiltration through its own standard library with no shell-shaped string, or a command assembled from string literals split across lines or joined with +. A JavaScript line whose code starts with // is a comment; a trailing or block comment is still rated. A hook file that is the same file as a credential store at its default location, which vet reads stat-only, is never read and is reported as ClineOverrideAlias, and so is every hook while a credential store exists that vet cannot identify; a store relocated by an override never stops a hook from being rated.
.clinerules/hooks/- Cline's shared workspace hook directory, read by the extension and the CLI.
Details
Setup writes PreToolUse and UserPromptSubmit here with
--scopeproject, or PreToolUse.ps1 and UserPromptSubmit.ps1 on Windows. Doctor reads it as a peer of both user directories and .cline/hooks/. .cline/hooks/- Cline's CLI-only workspace hook directory.
Details
Doctor reads each file as a peer of the other three hook directories; any cancel wins. Setup writes project hooks only to .clinerules/hooks/.
~/.kiro/hooks/skarn.json- The Kiro CLI's user hook file for skarn, a v1 document whose hooks array runs
skarn guard --agentkiro on PreToolUse and UserPromptSubmit.Details
skarn setup --agentkiro writes it whole, and doctor reads it as the setup-owned half of Kiro's user layer. The V3 harness loads every *.json in ~/.kiro/hooks in every session, so doctor folds the directory's other files into the same layer; the V2 harness never loads a hook file. An entry with enabled set to false is skipped by Kiro, so doctor does not count it.$KIRO_HOMEmoves the directory. .kiro/hooks/skarn.json- The Kiro CLI's workspace hook file for skarn, written by
skarn setup --agentkiro--scopeproject with a PATH-guarded command and meant to be committed.Details
The V3 harness loads it in every session in the workspace; an interactive session runs only once the workspace is trusted, and headless runs are not gated.
~/.kiro/agents/- The Kiro CLI's user agent configs.
Details
skarn setup --agentkiro merges the guard into each one Kiro reads as an agent config: the camelCase hooks object of a V2-format or out-of-sync agent, or the camelCase hooks array of an agent Kiro upgraded. It skips a V3-only profile on install and refuses a file that is not an agent config. Both harnesses run an agent's hooks only while a session selects that agent, so doctor names the agent files that carry a skarn hook and states V2 coverage as those agents only. Kiro skips an entry with enabled set to false in an upgraded agent's hooks array but runs it in the object form, and doctor counts each the way Kiro runs it. Vet reads JSON agent configs and parses only the front matter of Markdown profiles, including nested agent directories up to the walk depth, for hooks, MCP servers, and blanket shell grants.$KIRO_HOMEmoves the directory, and doctor then reports it as unverified for the V2 harness. .kiro/agents/- The Kiro CLI's workspace agent configs, which
skarn setup --agentkiro--scopeproject merges into with a PATH-guarded command and doctor reads as a project layer, under the same rules as ~/.kiro/agents/. .amazonq/cli-agents/- The legacy Amazon Q agent directory of a workspace.
Details
Doctor reads it as a V2-only layer, and only in a workspace with no .kiro directory, the one case the V2 harness was measured loading it; the V3 harness does not read it. Setup never writes here.
~/.kiro/settings/mcp.json- The Kiro CLI's user MCP configuration.
Details
Vet reads MCP server launchers, endpoints, environment entries, and headers. Relocate with
$KIRO_HOME. ~/.kiro/mcp.json- The home MCP configuration that Kiro CLI 2.x reads.
Details
Vet reads MCP server launchers, endpoints, environment entries, and headers. A probe with Kiro CLI 3.4.0 on macOS found that neither harness read
$KIRO_HOME/mcp.json, so vet reads this file for 2.x installs. Relocate with$KIRO_HOME. ./.kiro/settings/mcp.json- The Kiro CLI's project MCP configuration.
Details
Vet reads MCP server launchers, endpoints, environment entries, and headers. Assess reads it in the working directory's project and in every project Claude Code records.
~/.kiro/hooks/- The Kiro CLI's user standalone JSON hook files.
Details
Vet reads hook commands, including command actions and confirmation commands, directly in this directory. Relocate with
$KIRO_HOME. ./.kiro/hooks/- The Kiro CLI's project standalone JSON hook files.
Details
Vet reads hook commands, including command actions and confirmation commands, directly in this directory. Assess reads them in the working directory's project and in every project Claude Code records.
~/.kiro/settings/permissions.yaml- The Kiro CLI's user permissions file.
Details
Vet reads permission rules and policies, reports only a blanket shell allow as overbroad, and checks every rule pattern for a saved credential. Relocate with
$KIRO_HOME. ~/.kiro/workspace-roots/<key>/permissions.yaml- The Kiro CLI's workspace permissions files, one per workspace key.
Details
Vet reads permission rules and policies, reports only a blanket shell allow as overbroad, and checks every rule pattern for a saved credential. A permissions.yaml that is a symlink is not followed and is reported as a coverage gap. Relocate workspace-roots/ with
$KIRO_HOME. ~/.aws/amazonq/settings/mcp.json- A legacy Amazon Q Developer CLI MCP configuration location that machines migrated to Kiro CLI 2.x can carry.
Details
Vet reads MCP server launchers, endpoints, environment entries, and headers, and findings name the legacy file itself.
~/.aws/amazonq/agents/- Legacy Amazon Q Developer CLI agent configs from the fallback that the Kiro CLI's agent upgrade reads when the user .kiro/agents directory does not exist.
Details
Vet reads JSON files directly in this directory for hooks, MCP servers, and blanket shell grants, and findings name the legacy file itself.
~/.aws/amazonq/cli-agents/- Legacy Amazon Q Developer CLI agent configs from the fallback that the Kiro CLI's agent upgrade reads when the user .kiro/agents directory does not exist.
Details
Vet reads JSON files directly in this directory for hooks, MCP servers, and blanket shell grants, and findings name the legacy file itself.
./.kiro/agents/- The Kiro CLI's workspace agent configs.
Details
Vet reads JSON agent configs and parses only the front matter of Markdown profiles, including nested agent directories up to the walk depth, for hooks, MCP servers, and blanket shell grants. Assess reads them in the working directory's project and in every project Claude Code records.
./.amazonq/cli-agents/- The legacy Amazon Q agent directory of a workspace.
Details
Vet reads JSON agent configs for hooks, MCP servers, and blanket shell grants from this fallback that the Kiro CLI's agent upgrade reads when the workspace's .kiro/agents directory does not exist, and findings name the legacy file itself. Assess reads them in the working directory's project and in every project Claude Code records.
./.amazonq/mcp.json- The legacy Amazon Q MCP configuration of a workspace.
Details
Kiro's Amazon Q migration guide says the Kiro CLI keeps reading a project's .amazonq folder when the project has no .kiro folder. Vet reads MCP server launchers, endpoints, environment entries, and headers, and findings name the legacy file itself. Assess reads it in the working directory's project and in every project Claude Code records.
~/.cline/data/settings/cline_mcp_settings.json- Cline MCP server definitions. Vet reads flat servers and nested transport objects, including nested env and headers.
Details
ClineStateShape reports a root or an mcpServers value that is not an object; an empty mcpServers object is valid.
CLINE_MCP_SETTINGS_PATHreplaces this file path. Relocate the data directory withCLINE_DATA_DIR, otherwiseCLINE_DIR/data (default ~/.cline/data). Vet inspects each path component before opening it, follows local links, and refuses links to network shares; it reports SymlinkLoop after eight links, NotARegularFile for a non-regular file, and NetworkPathRefused for a network target. ClineOverrideAlias reports a Cline row vet skips because it is the same file as another vetted row: an overridden row that names any other row's file, a content row that is a credential store at its default location, or the later of two Cline files linked to each other. The other row is read as usual unless it is also an override naming the same file, in which case both rows are skipped. A credential store is never opened through any Cline row. ~/.cline/data/globalState.json- Cline extension state. Vet reads only the eight autoApprovalSettings.actions booleans:
Details
executeSafeCommands is HIGH because the extension's reader applies it to every command tool; editFiles, useMcp, and useBrowser are MEDIUM; readFiles is LOW. The legacy keys executeAllCommands, readFilesExternally, and editFilesExternally have no shipped runtime reader and produce no finding. False values produce no finding. Vet reports what the file declares: a default install that persists its true defaults reports three MEDIUM findings and one LOW finding. ClineStateShape reports a root, autoApprovalSettings, or actions value that is not an object, or a known action that is not a boolean; vet still reads the remaining known actions. Relocate the data directory with
CLINE_DATA_DIR, otherwiseCLINE_DIR/data (default ~/.cline/data). Vet inspects each path component before opening it, follows local links, and refuses links to network shares; it reports SymlinkLoop after eight links, NotARegularFile for a non-regular file, and NetworkPathRefused for a network target. ClineOverrideAlias reports a Cline row vet skips because it is the same file as another vetted row: an overridden row that names any other row's file, a content row that is a credential store at its default location, or the later of two Cline files linked to each other. The other row is read as usual unless it is also an override naming the same file, in which case both rows are skipped. A credential store is never opened through any Cline row. ~/.cline/data/settings/global-settings.json- Cline CLI settings. Vet reads only toolAutoApprove; true is HIGH and false produces no finding.
Details
A CLI with no persisted value auto-approves every tool by default but declares nothing on disk, so vet reports nothing there. ClineStateShape reports a root that is not an object or a toolAutoApprove value that is not a boolean.
CLINE_GLOBAL_SETTINGS_PATHreplaces this file path. Relocate the data directory withCLINE_DATA_DIR, otherwiseCLINE_DIR/data (default ~/.cline/data). Vet inspects each path component before opening it, follows local links, and refuses links to network shares; it reports SymlinkLoop after eight links, NotARegularFile for a non-regular file, and NetworkPathRefused for a network target. ClineOverrideAlias reports a Cline row vet skips because it is the same file as another vetted row: an overridden row that names any other row's file, a content row that is a credential store at its default location, or the later of two Cline files linked to each other. The other row is read as usual unless it is also an override naming the same file, in which case both rows are skipped. A credential store is never opened through any Cline row. ~/.cline/data/secrets.json- Cline credential store. Vet uses stat-only permission metadata: mode only, with no byte read.
Details
Cline creates this file at 0600. Group or other read permission produces a HIGH finding; Windows has no POSIX mode and produces no mode finding. Relocate the data directory with
CLINE_DATA_DIR, otherwiseCLINE_DIR/data (default ~/.cline/data). Vet inspects each path component before opening it, follows local links, and refuses links to network shares; it reports SymlinkLoop after eight links, NotARegularFile for a non-regular file, and NetworkPathRefused for a network target. ClineOverrideAlias reports a Cline row vet skips because it is the same file as another vetted row: an overridden row that names any other row's file, a content row that is a credential store at its default location, or the later of two Cline files linked to each other. The other row is read as usual unless it is also an override naming the same file, in which case both rows are skipped. A credential store is never opened through any Cline row. ~/.cline/data/settings/providers.json- Cline provider credential store. Vet uses stat-only permission metadata: mode only, with no byte read.
Details
Cline creates this file at 0600. Group or other read permission produces a HIGH finding; Windows has no POSIX mode and produces no mode finding.
CLINE_PROVIDER_SETTINGS_PATHreplaces this file path. Relocate the data directory withCLINE_DATA_DIR, otherwiseCLINE_DIR/data (default ~/.cline/data). Vet inspects each path component before opening it, follows local links, and refuses links to network shares; it reports SymlinkLoop after eight links, NotARegularFile for a non-regular file, and NetworkPathRefused for a network target. ClineOverrideAlias reports a Cline row vet skips because it is the same file as another vetted row: an overridden row that names any other row's file, a content row that is a credential store at its default location, or the later of two Cline files linked to each other. The other row is read as usual unless it is also an override naming the same file, in which case both rows are skipped. A credential store is never opened through any Cline row. ./.clinerules/hooks/- Cline project hook scripts. Vet reads this directory at the working directory, the top of its git repository, and, in a linked worktree, the main checkout.
Details
Vet reads each file whose name a loader for this directory accepts, whether or not it is executable: the extension accepts the exact names TaskStart, TaskResume, TaskCancel, TaskComplete, PreToolUse, PostToolUse, UserPromptSubmit, Notification, and PreCompact, extensionless on macOS and Linux and with .ps1 on Windows, and the SDK accepts TaskStart, TaskResume, TaskCancel, TaskComplete, TaskError, PreToolUse, PostToolUse, UserPromptSubmit, PreCompact, and SessionShutdown, case-insensitively, with no extension or one of .sh, .bash, .zsh, .js, .mjs, .cjs, .ts, .mts, .cts, .py, and .ps1; vet rates each logical line, joining physical lines through a backslash, backtick, or open-quote continuation, an unclosed Python bracket, or a trailing pipe, |&, or &&, and reports <file>:L<n> using the first physical line number; it inspects each path component, follows local links, and refuses network targets with NetworkPathRefused, reporting SymlinkLoop after eight links along the whole path, the links that reach the hook directory included, and NotARegularFile for a non-regular file; it rates the first 16 KiB and reports HookScriptTruncated for a longer file, counts physical lines only in that prefix, including comments and blanks, and rates the first 256 physical lines with HookScriptLineBudgetExceeded for further lines; it rates an unfinished logical line at either limit, but does not rate Python or JavaScript exfiltration through its own standard library with no shell-shaped string, or a command assembled from string literals split across lines or joined with +. A JavaScript line whose code starts with // is a comment; a trailing or block comment is still rated. A hook file that is the same file as a credential store at its default location, which vet reads stat-only, is never read and is reported as ClineOverrideAlias, and so is every hook while a credential store exists that vet cannot identify; a store relocated by an override never stops a hook from being rated. Assess reads this directory in the working directory's project and in every project Claude Code records.
./.cline/hooks/- Cline project hook scripts. Vet reads this directory at the working directory, the top of its git repository, and, in a linked worktree, the main checkout.
Details
Vet reads each file whose name a loader for this directory accepts, whether or not it is executable: the SDK accepts TaskStart, TaskResume, TaskCancel, TaskComplete, TaskError, PreToolUse, PostToolUse, UserPromptSubmit, PreCompact, and SessionShutdown, case-insensitively, with no extension or one of .sh, .bash, .zsh, .js, .mjs, .cjs, .ts, .mts, .cts, .py, and .ps1; vet rates each logical line, joining physical lines through a backslash, backtick, or open-quote continuation, an unclosed Python bracket, or a trailing pipe, |&, or &&, and reports <file>:L<n> using the first physical line number; it inspects each path component, follows local links, and refuses network targets with NetworkPathRefused, reporting SymlinkLoop after eight links along the whole path, the links that reach the hook directory included, and NotARegularFile for a non-regular file; it rates the first 16 KiB and reports HookScriptTruncated for a longer file, counts physical lines only in that prefix, including comments and blanks, and rates the first 256 physical lines with HookScriptLineBudgetExceeded for further lines; it rates an unfinished logical line at either limit, but does not rate Python or JavaScript exfiltration through its own standard library with no shell-shaped string, or a command assembled from string literals split across lines or joined with +. A JavaScript line whose code starts with // is a comment; a trailing or block comment is still rated. A hook file that is the same file as a credential store at its default location, which vet reads stat-only, is never read and is reported as ClineOverrideAlias, and so is every hook while a credential store exists that vet cannot identify; a store relocated by an override never stops a hook from being rated. Assess reads this directory in the working directory's project and in every project Claude Code records.
./.codex/config.toml, ./.codex/hooks.json- Codex CLI project MCP server definitions and hooks, read by vet at the working directory, the git top and, in a linked worktree, the main checkout
Details
through the same readers as ~/.codex/config.toml and ~/.codex/hooks.json, whether or not Codex trusts the project, and reported apart from the home files. Assess reads them in the working directory's project and in every project Claude Code records.
./.cursor/mcp.json, ./.cursor/hooks.json- Cursor project MCP server definitions and hooks, read by vet at the working directory, the git top and, in a linked worktree, the main checkout
Details
, whether or not the workspace is trusted, and reported apart from ~/.cursor/mcp.json and ~/.cursor/hooks.json. Assess reads them in the working directory's project and in every project Claude Code records.
./.github/mcp.json- The Copilot CLI's project MCP server definitions, read by vet at the working directory, the git top and, in a linked worktree, the main checkout and reported apart from ~/.copilot/mcp-config.json.
Details
Both shapes the Copilot CLI documents for a project file are read: servers under a top-level mcpServers object, at locators that start mcpServers.<name>, and the bare form, where each top-level key whose value is an object is a server name, at locators that start <name>. An mcpServers object that itself holds a command, url, httpUrl, serverUrl or endpoint string is also read as a bare server named mcpServers, and an mcpServers value that is not an object is a coverage gap named UnsupportedCopilotMcpShape. Permission grants anywhere in the file (autoApprove, alwaysAllow and the other grant keys) are read as they are in ~/.copilot/mcp-config.json. Assess reads it in the working directory's project and in every project Claude Code records.
./.gemini/settings.json- Gemini CLI's project settings: MCP server definitions and hooks, read by vet at the working directory, the git top and, in a linked worktree, the main checkout
Details
whatever the folder-trust state, because the file is on disk before the developer decides whether to trust the folder. Reported apart from ~/.gemini/settings.json. Assess reads it in the working directory's project and in every project Claude Code records.
~/Library/Application Support/Code/User/settings.json (macOS), ~/.config/Code/User/settings.json (Linux), %APPDATA%\Code\User\settings.json (Windows), ~/Library/Application Support/Code/User/profiles/<key>/settings.json (macOS), ~/.config/Code/User/profiles/<key>/settings.json (Linux), %APPDATA%\Code\User\profiles\<key>\settings.json (Windows)- VS Code's user settings and the settings of each VS Code profile, read by vet and by assess for VS Code Copilot Chat's terminal auto-approve rules.
Details
The directory follows VS Code's own rule:
$VSCODE_APPDATA/Code/User whenVSCODE_APPDATAis set and not empty, on every platform; otherwise %APPDATA%\Code\User on Windows (falling back to %USERPROFILE%\AppData\Roaming\Code\User), ~/Library/Application Support/Code/User on macOS, and $XDG_CONFIG_HOME/Code/User on Linux (falling back to ~/.config/Code/User). A directory that is relative, spelled as a network or device path, or holds a control character is one coverage gap, and nothing under it is read; the CLI verbs admit a plain UNC directory and follow no link below it, while the MCP vet_configs tool refuses it. Under--evidence-homethe directory is the copied home's own, located by the layout of the operating system Skarn runs on, andVSCODE_APPDATAis ignored.--project-onlyreads none of these files. VS Code Insiders, VSCodium and the other forks, the--user-data-dirswitch, portable mode, remote and agent-host settings are not read. Vet reads two settings and nothing else: chat.tools.terminal.autoApprove and the deprecated chat.agent.terminal.autoApprove, which VS Code still merges over it. The four deprecated list settings beside them (chat.agent.terminal.allowList, chat.agent.terminal.denyList and their github.copilot.chat.agent.terminal twins) are read by nothing in VS Code and not by vet, and no other setting can produce a finding. Comments, a byte-order mark and a trailing comma after a complete value are tolerated as VS Code tolerates them; a file that still does not parse is a coverage gap. Every spelling VS Code honors is read: the dotted key, nested objects, a mix of both, and a top-level key that extends the setting id, whose rest VS Code splits on every dot; a dotted key inside a nested object is not a setting path, as in VS Code. Every occurrence of a repeated setting is read. An entry's locator is the setting id with the entry's ordinal in document order, which is not VS Code's last-wins merge, and the key text never enters a locator; a repeated setting, a repeated ancestor object that holds the setting, a repeated rule key and a repeated property inside a rule value are each reported as vet-config-duplicate-key with the setting id as its locator, and, unlike the other JSON files, a repeated key anywhere else in the file is not reported. An empty or comment-only file is an empty configuration. Each key is un-escaped from the regular-expression form in which VS Code saves an exact command line, and the rule pack and the command-line password detector check the command text whatever the key's value: an approving entry, a deny (false), a null and {approve: false} alike, each reported at most once as vet-permission-plaintext-credential at high. An approving key is reported as vet-permission-overbroad at high only when it is a regular expression whose pattern is on a closed list that matches every non-empty single-line command (.*, ^, $, ., .+, ^., ^.+, ^.+$, .+$, [\s\S], [\s\S]+, [\S\s], [\w\W], [\d\D], [^], \S, \S+) with flags VS Code accepts, the sticky y flag only on ^, whose empty match never advances the rule, and the detail is the canonical pattern, such as /.*/. Any other pattern that matches the empty string, such as /^.*$/, approves nothing in VS Code, which exempts only .*, ^, $, ^$ and ^\s*$, and is not reported; a plain key is literal command text and is never overbroad; a universal pattern outside the closed list is not reported. Each profile directory's settings.json is read by the walked-directory rules: a symlinked profile directory is a coverage gap named SymlinkNotFollowed, the walk stops at 64 files or 4 MiB, and a profile with no settings file of its own, such as the built-in agents profile, is skipped. Stated limits: the command-line password detector reads POSIX shell syntax, so a PowerShell-only quoting form can be missed. A settings file reached under another reader's name (a symlinked or hard-linked file, a Cline override, a hook directory that resolves to a profile) is also read by that generic reader, whose locator can carry a rule key in which nothing was detected. On Windows vet masks a detected value in a path before it converts forward slashes to backslashes for display, so a detected value that holds a backslash can show in a path that spelled it with forward slashes. The user settings file is opened before its type is checked, so a FIFO at that path can block the read, and a network-linked file is refused only where vet refuses network links, as for every fixed-path file. ./.vscode/settings.json- A workspace's VS Code settings, read by vet and by assess for the same two terminal auto-approve settings and by the same rules as the user settings file above.
Details
Vet reads the file directly under each project directory it visits: the working directory, the top of its git repository and, in a linked worktree, the main checkout, and under
--all-projectseach recorded project with its own git top and main checkout;--project-onlyreads it too. Vet does not search folders below a visited directory, so a subfolder's file is read only when vet starts in that subfolder, and the folder VS Code has open is not known to vet. In a multi-root workspace VS Code keeps workspace settings in the .code-workspace file, which vet does not read. ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/ (macOS)- Copilot in Code session roots on macOS.
Details
The Microsoft Copilot app on macOS keeps each profile in this directory, with one events.jsonl per session under <profile>/session-state/<session id>/, and Skarn reads it with no environment variable set, by the rules the Windows CopilotCodingHome entry states for profiles, links, canonical UUID session folders and
$COPILOT_HOME. Session discovery reads this directory when the home directory is an absolute path, a network spelling included; setup, doctor's hook check and vet still read it only when the home directory is not spelled as a network path. With no absolute home it is not read, and the source counts as one dropped source unless a$COPILOT_HOMEnames a profile or another root that Skarn reads. No second directory was found on the verified install. The app closed a session after 10 minutes without a request, and the session then wrote a session.shutdown record holding its totals since it started; a session continued after that wrote another, and Skarn reads the token totals from the last one. Before its first close, a session's transcript held one session.usage_record per request and no session.shutdown record, and Skarn reads an open session's token totals from those records; a continued session shows its last session.shutdown record's totals plus the usage records written since. On the verified install those records stated no AI credits for the bring-your-own-key model in use, so an open session shows no cost until it closes. Verified against Copilot app158.0.4370.33with GitHub Copilot CLI1.0.108. ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/session-state/<session id>/files/, .../research/, .../checkpoints/ (macOS)- Copilot in Code session artifacts on macOS: the files, research and checkpoints folders inside a session folder, read by the bounds and rules the Windows entry for these folders states.
Details
The verified session held all three folders. Verified against Copilot app
158.0.4370.33with GitHub Copilot CLI1.0.108. ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/session-store.db (macOS)- Copilot in Code session index on macOS, read as the Windows entry for session-store.db states.
Details
Copilot app
158.0.4370.33kept it at schema version 9 with the sessions, turns and checkpoints tables, and Skarn read it without counting an unreadable store. Verified against Copilot app158.0.4370.33with GitHub Copilot CLI1.0.108. ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/hooks/skarn.json (macOS)- The skarn-owned hook file of one Copilot in Code profile on macOS.
Details
skarn setup --agentcopilot-code writes it for every profile under this CopilotCodingHome directory, and doctor reads it, by the rules the Windows entry for this file states. On the verified install no profile held a hooks folder. With the file written there, no matching guard event was observed from it, while the .github/hooks/skarn.json of a folder project ran the hook, so doctor on macOS reports a wired profile file as unverified, never as protection, and namesskarn setup --agentcopilot--scopeproject. Verified against Copilot app158.0.4370.33. ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/mcp-config.json, ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/config.json, ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/settings.json (macOS)- The configuration files of one Copilot in Code profile on macOS, read by vet when present, by the rules the Windows entry for these files states.
Details
On the verified install a profile held config.json and held no mcp-config.json or settings.json. A home directory that is spelled as a network path or holds a control character is a coverage gap, and vet opens nothing under it. Read-only; never written. Verified against Copilot app
158.0.4370.33. ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/data.db (macOS)- The SQLite app database of one Copilot in Code profile on macOS; its settings table has a github_access_token column.
Details
Vet reads this file's mode by a non-following stat and never opens it, as the Windows entry for this file states, and reports a mode that grants group or other read. On the verified install the mode was 0600. Verified against Copilot app
158.0.4370.33. ~/Library/Application Support/Microsoft/CopilotAppHost/CopilotCodingHome/<profile>/hooks/ (macOS)- The hook folder of one Copilot in Code profile on macOS, read by vet when present, as the Windows entry for this folder states.
Details
On the verified install no profile held one. Verified against Copilot app
158.0.4370.33. ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (macOS), ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (Linux), %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json (Windows)- The copy of Cline's MCP server definitions that the Cline extension wrote in VS Code's user directory before it moved them to ~/.cline/data.
Details
The extension's migration reads this copy and leaves it in place, so a server it lists stays on disk after the move. Vet reads it as it reads ~/.cline/data/settings/cline_mcp_settings.json: flat servers and nested transport objects, including nested env and headers, and each server's autoApprove list; assess lists a credential in an autoApprove entry in its saved permission rules section. ClineStateShape reports a root or an mcpServers value that is not an object, and a file that does not parse is a coverage gap. Vet inspects each path component before opening it, follows local links, and refuses links to network shares; it reports SymlinkLoop after eight links, NotARegularFile for a non-regular file, and NetworkPathRefused for a network target. ClineOverrideAlias reports a copy vet skips because it is the same file as a credential store at its default location or as an earlier Cline file, such as ~/.cline/data/settings/cline_mcp_settings.json; a Cline override variable that names a copy's file is skipped instead, and the copy is read. When this copy and the current file hold the same server, each file reports its own findings. The directory follows VS Code's own rule:
$VSCODE_APPDATA/Code/User whenVSCODE_APPDATAis set and not empty, on every platform; otherwise %APPDATA%\Code\User on Windows (falling back to %USERPROFILE%\AppData\Roaming\Code\User), ~/Library/Application Support/Code/User on macOS, and $XDG_CONFIG_HOME/Code/User on Linux (falling back to ~/.config/Code/User). A directory that is relative, spelled as a network or device path, or holds a control character is one coverage gap, and nothing under it is read; the CLI verbs admit a plain UNC directory and follow no link below it, while the MCP vet_configs tool refuses it. Under--evidence-homethe directory is the copied home's own, located by the layout of the operating system Skarn runs on, andVSCODE_APPDATAis ignored. On Windows, whenVSCODE_APPDATA, APPDATA and USERPROFILE are all unset or empty, vet reads neither legacy copy and reports no gap.--project-onlyreads neither legacy copy. VS Code Insiders, VSCodium, Windsurf and the other forks are not read. ~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (macOS), ~/.config/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json (Linux), %APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json (Windows)- The copy of Cline's MCP server definitions that the Cline extension wrote in Cursor's user directory when it ran in Cursor, before it moved them to ~/.cline/data.
Details
The extension's migration reads this copy and leaves it in place. Vet reads it as it reads ~/.cline/data/settings/cline_mcp_settings.json: flat servers and nested transport objects, including nested env and headers, and each server's autoApprove list; assess lists a credential in an autoApprove entry in its saved permission rules section. ClineStateShape reports a root or an mcpServers value that is not an object, and a file that does not parse is a coverage gap. Vet inspects each path component before opening it, follows local links, and refuses links to network shares; it reports SymlinkLoop after eight links, NotARegularFile for a non-regular file, and NetworkPathRefused for a network target. ClineOverrideAlias reports a copy vet skips because it is the same file as a credential store at its default location or as an earlier Cline file, such as ~/.cline/data/settings/cline_mcp_settings.json; a Cline override variable that names a copy's file is skipped instead, and the copy is read. When this copy and the current file hold the same server, each file reports its own findings. Cursor is built from VS Code, so the directory follows VS Code's rule with Cursor in place of Code:
$VSCODE_APPDATA/Cursor/User whenVSCODE_APPDATAis set and not empty, on every platform; otherwise %APPDATA%\Cursor\User on Windows (falling back to %USERPROFILE%\AppData\Roaming\Cursor\User), ~/Library/Application Support/Cursor/User on macOS, and $XDG_CONFIG_HOME/Cursor/User on Linux (falling back to ~/.config/Cursor/User). TheVSCODE_APPDATAhandling is inherited from VS Code's source and has not been measured on a Cursor install. A directory that is relative, spelled as a network or device path, or holds a control character is one coverage gap, and nothing under it is read; the CLI verbs admit a plain UNC directory and follow no link below it, while the MCP vet_configs tool refuses it. Under--evidence-homethe directory is the copied home's own, located by the layout of the operating system Skarn runs on, andVSCODE_APPDATAis ignored. On Windows, whenVSCODE_APPDATA, APPDATA and USERPROFILE are all unset or empty, vet reads neither legacy copy and reports no gap.--project-onlyreads neither legacy copy. ~/.cursor/cli-config.json- Cursor CLI permissions. Vet reads only permissions.allow, as grants, and permissions.deny, as rules, and nothing else in the file, which also holds account and cache fields.
Details
The CLI parses this file and the project file as strict JSON, so vet reports a file with a comment, which the CLI rejects, as a coverage gap. The Cursor CLI documents five entry forms, Shell(command), Read(path), Write(path), WebFetch(domain) and Mcp(server:tool), and vet reads each of them, and Bash(command) as the Shell alias the CLI also accepts, trimming whitespace around the entry, before the opening parenthesis and inside the parentheses as the CLI does, where whitespace is what JavaScript counts as whitespace, the no-break space included; an entry with a line break or a Unicode line or paragraph separator inside its parentheses is not one the CLI reads. In a Shell entry, the CLI splits the pattern at its first colon and approves a command whose name or whole text matches the part before the colon and whose arguments match the part after it, as well as a command that matches the pattern as written. Vet runs the rule pack and the command-line password detector over two readings, each on its own: the command name, a space and the arguments, as in mysql -p<value> shop, and the stored text, as in smbclient://host/share or a Basic authorization header, so a password one reading would hide is still found. Vet takes the command name from the text before the colon, up to its first star or whitespace, when only stars and whitespace follow it there, so Shell(mysql *:-p<value> shop) and Shell(mysql*:-p<value> shop) are both read as mysql -p<value> shop; a star inside the name, as in m*sql, leaves only the stored text. The command name must not be empty, must have arguments after the colon, must not be a Windows drive letter and must have no =, quote, parenthesis, $, backslash or shell operator in it; any other entry is read only as stored, such as one with an Authorization header after a command name, a URL argument or an environment assignment. These allowed entries approve a whole class of actions and are reported as vet-permission-overbroad, never when they are denied: a Shell entry whose pattern starts with a star and holds only stars, whitespace and colons, such as Shell(*), Shell(**) or Shell(*:*), with the detail Shell(*), which includes the near-blankets Shell(* *), which the CLI applies to every command with an argument, and Shell(*:), which it applies to every command without one; an Mcp entry whose server and tool parts are each only stars, with the detail Mcp(*:*); WebFetch(*) and WebFetch([*]), whose brackets the CLI removes; and a Read or Write entry whose path, after an optional leading /, is star segments separated by single slashes, such as *, **, /** or */*, with the detail Read(**) or Write(**), which includes a path such as /*/*/* that the CLI applies to every file at that depth or deeper. A Read or Write path that the CLI applies only to some paths, such as *:* to a path with a colon, */ to a path that ends in a slash and *//* to a path with a double slash, or to none, such as .* and ./**, which no absolute path matches, is not a blanket. A Shell blanket is high and the other blankets medium, so the pre-commit hook's default
--fail-on-severityhigh fails only on a Shell blanket. Any other string, such as a token the Cursor CLI may add later, an undocumented wildcard form such as Mcp(*), or a bare *, ** or *:* entry, which the CLI ignores because it has no wrapper, is still checked for a credential, as a rule that is never reported as overbroad, and raises no coverage gap, so a new Cursor entry form does not stop the pre-commit hook or the GitHub Action. A value that is not a string, a list that is not an array and a permissions value that is not an object are coverage gaps named by the entry's index or the list, never by its content, and the entries beside them are still read; one gap budget covers both readings of a file that repeats a key. A repeated key is read both ways and reported as vet-config-duplicate-key at the file, never by the key's name. In the one case measured, a curl command with an Authorization header on cursor-agent 2026.11.22, the CLI's always-allow choice saved only Shell(curl), without the header; other commands can be saved with their arguments. CURSOR_CONFIG_DIR and XDG_CONFIG_HOME are not followed. ./.cursor/cli.json- Cursor CLI project permissions, read by vet at the working directory, the git top and, in a linked worktree, the main checkout
Details
with the same reader and the same rules as ~/.cursor/cli-config.json, whether or not the workspace is trusted, and reported apart from the home file. The CLI also reads and merges a .cursor/cli.json in each directory between the git root and the working directory; vet reads neither those directories nor a .cursor/cli.json in a subdirectory below the working directory. When the file is committed with the repository, an entry that carries a credential reaches every clone; the pre-commit hook, and the GitHub Action when its vet input is true, read it through
--project-only. Assess reads it in the working directory's project and in every project Claude Code records. ~/.gemini/policies/- Gemini CLI's user policy files.
Details
When
GEMINI_CLI_HOMEis nonempty, vet reads$GEMINI_CLI_HOME/.gemini/policies/ instead. Vet skips a missing directory silently. If vet cannot open an existing directory, it reports the error as a coverage gap. Vet lists only direct children. If the directory has more than 4096 entries, vet reports RuleDirEntryBudgetExceeded before reading any file. It sorts names ending in .toml in byte order and checks the first 64, reporting RuleFileCountBudgetExceeded if there are more. A matching symbolic link or other entry that is not a regular file produces NotARegularFile, also below an evidence home or a network root. Gemini CLI itself skips linked files. Vet skips a file that aliases a protected credential store, or that vet cannot distinguish from such a store, and reports ProtectedStoreAlias. Vet reads up to 4 MiB of policy content in total. A file over 4 MiB is reported as StreamTooLong and the walk continues. A smaller file that exceeds the bytes left in the budget stops the scan of the directory with RuleDirByteBudgetExceeded. Vet also parses at most 65,536 values in the directory, counting every table header, every Codex CLI call, and every string, number, boolean, date, list and inline table: the file in which the count passes that limit reports RuleDirValueBudgetExceeded, keeps the findings of what vet read before that point, and vet reads no later file in the directory. A file that holds fewer bytes when read than its size when opened, because it shrank during the read, produces FileShrankDuringRead and contributes nothing. Vet checks a file against the protected credential stores before it applies the budget. Vet reads [[rule]] and [[safety_checker]] tables, and a [safety_checker.checker] table that follows its safety checker, the form Gemini CLI's own policies use. An allow decision creates a grant. An ask_user or deny decision creates a rule and can still produce a high vet-permission-plaintext-credential finding. Vet checks each commandPrefix string as run_shell_command(prefix). For commandRegex and argsPattern, vet removes a leading caret, an unescaped trailing dollar sign, and backslashes before punctuation. It checks the commandRegex text as run_shell_command(text). Gemini matches argsPattern against a tool's JSON arguments, so vet checks that text as written, without the run_shell_command wrapper; the command-line password detector sees it only when the pattern itself spells a shell tool call such as Shell(command). A safety checker approves nothing. Vet checks its command fields and the strings inside its checker and toolAnnotations tables for credentials. Vet reports a high vet-permission-overbroad finding with the detail run_shell_command(*) when a valid allow rule names run_shell_command or * in toolName, either directly or in an array, supplies no mcpName or toolAnnotations, and either supplies no commandPrefix, commandRegex or argsPattern or has a commandRegex or argsPattern that, after vet removes a leading caret and an unescaped trailing dollar sign, is one of .*, .+, .*?, .+?, [\s\S]*, [\s\S]+, [\S\s]*, [\S\s]+, [^]*, [^]+, (.*), (.+), (?:.*) or (?:.+). An empty string in any of the three command fields imposes no restriction, and an empty element of a commandPrefix array matches every command that starts with whitespace, so vet reports either as the blanket. Gemini treats a prefix of *, ** or *:* as literal text, so vet never reports that prefix as a blanket grant. Gemini CLI offers "Allow this command for all future sessions" only when security.enablePermanentToolApproval is true. In Gemini CLI 0.71.1, that choice saved only the command name. A credential in a command argument reaches the policy file through a manually written entry. Vet reports unsupported syntax at line N for a value of the wrong type, an empty toolName or commandPrefix array, a repeated or dotted key, a key before the first table, or a table header other than [[rule]] or [[safety_checker]], and then continues with the next table. When vet cannot parse the TOML text at a line, for example an unclosed value, a malformed header line, a malformed number, date or line ending, a control character or an escape outside the TOML escapes in a string, an array that mixes value types, or a repeated or conflicting inline table member, it reports that line and reads nothing after it, because Gemini CLI loads nothing from a file that fails to parse. The tables above that line keep their findings. A rule requires toolName, decision, and priority. A safety checker requires toolName and checker. A missing required field produces the same gap. A rule with commandPrefix or commandRegex requires toolName to be the single string run_shell_command. Either field alongside argsPattern, both fields together, or either with another toolName form produces a gap. Vet still checks the command fields in these conflicting combinations for credentials. Vet reports up to 16 syntax gaps per file, then one overflow gap, unsupported syntax on more than 16 lines. Vet checks up to 4096 entries per file and reports artifact budget exceeded at the next entry. A coverage gap makes vet exit 6 under--fail-on-scan-error. An otherwise valid rule with an unknown decision or mode, a numeric priority outside 0 to 999 or with a fractional part, or an empty toolName, mcpName, or subagent string produces no gap. Vet checks its command fields for credentials and skips overbroad scoring. In a toolName array, an empty string leaves the other names in effect. Gemini ignores unknown keys. Vet checks every string under an unknown key or under toolAnnotations for credentials and omits the key name from the report. When masking cannot settle on a safe spelling of a policy file's path, vet prints [path withheld] in its place and assess withholds the location. Gemini CLI disables workspace policies. Vet skips workspace .gemini/policies/, system policy directories, and paths in settings.policyPaths. Assess lists a credential from a user policy under Credentials in saved permission rules at gemini home policies/ followed by the file name. ~/.codex/rules/- Codex CLI's user rules files.
Details
When
CODEX_HOMEis nonempty, vet reads$CODEX_HOME/rules/ instead. Codex CLI writes a command the user approves with Yes, and don't ask again for commands that start with a prefix to default.rules here, as a prefix_rule call holding the command's tokens. Measured on codex-cli 0.172.0 with two such approvals, a curl command carrying a bearer header and a command that starts with a PGPASSWORD= assignment: each stored call held every token of the command, the credential included, and the command that starts with the assignment was stored as the shell argv that ran it, /bin/zsh -lc followed by the whole command line. Vet walks the directory as it walks Gemini CLI's policies/ directory, with the same budgets and the same coverage gaps, reading names that end in .rules; Codex CLI itself skips a linked file, which vet reports as NotARegularFile. Codex CLI evaluates these files as Starlark. Vet evaluates nothing: it reads top-level calls whose arguments are literal strings, numbers in the spellings Codex CLI accepts, True, False, None and lists of them nested at most 64 deep, given by keyword or by position in Codex CLI's order. A prefix_rule call with decision allow, or with no decision, creates a grant. A prompt or forbidden call creates a rule and can still produce a high vet-permission-plaintext-credential finding. Vet joins the pattern's tokens with single spaces, quotes a token that is empty or holds whitespace, a quote, a shell metacharacter or a glob character, and checks the result as exec_command(command line), so the rule pack and the command-line password detector see the command line the user approved. Codex CLI treats every token as literal text, so a * token never makes a grant overbroad. A list of alternatives inside the pattern expands to one entry per combination, up to 16 per call, reported as prefix_rule[n].pattern[k]; a prefix_rule call with no alternatives is reported as prefix_rule[n]. n counts every prefix_rule call in file order, including one vet rejects, so a rejected call never shifts the index of a later one. Vet checks the type of the match, not_match, justification and canonical_matching values and then skips them, and does the same for host_executable and network_rule calls, which approve no command line. A call that Codex CLI rejects but vet can read raises no coverage gap: an unknown decision, an unknown keyword with a literal value, or an empty or whitespace-only justification makes vet check the call's patterns as rules that are never overbroad. So does a string escape that vet does not decode, such as \a, \0 or \U: Codex CLI accepts those, and vet keeps the escape as written. A backslash before a line break inside a string continues the string, as Starlark reads it. Vet also checks every string under an unknown keyword, and every string in a top-level call of another name, reported at call[n], and prints neither the keyword nor the call's name. Vet reports unsupported syntax at line N, and reads nothing from that call, for a value of the wrong type, a missing or empty pattern, an empty or nested alternatives list, more than 16 combinations, a repeated keyword, a positional argument after a keyword, more positional arguments than the call takes, a number Codex CLI rejects such as 007 or 1e+, a list nested more than 64 deep, a variable, an expression, a raw, byte, f- or triple-quoted string, or a statement that is not a call; it then reads the next statement. An unclosed string, call or list, a line break inside a single-quoted string, a closing bracket that does not match, or brackets nested more than 256 deep is one gap at the statement's first line, and vet reads nothing after it. Codex CLI applies no user or project rule at all when any rules file fails to load, so a gap or an unknown form in one file can mean that none of the rules is in force. Vet reports up to 16 syntax gaps per file, then unsupported syntax on more than 16 lines, and checks up to 4096 entries per file, reporting artifact budget exceeded at the next entry. It also builds at most 16 MiB of command text per file, so a call whose alternatives would repeat a long literal past that reports artifact budget exceeded too. Assess lists a credential from a user rules file at codex home rules/ followed by the file name. ./.codex/rules/- Codex CLI project rules files, read by vet at the working directory, the git top and, in a linked worktree, the main checkout
Details
with the same reader and the same rules as ~/.codex/rules/, and reported apart from the home files. Codex CLI loads them only in a project the user marked trusted; vet reads them whenever they are present. A directory reached through both this row and the home row, such as ~/.codex/rules/ when vet runs in the home directory or a project's .codex/rules/ when
CODEX_HOMEnames that project's .codex, is read once, under the home row; with--project-onlythere is no home row and it is read under this one. When the files are committed with the repository, an entry that carries a credential reaches every clone; the pre-commit hook, and the GitHub Action when its vet input is true, read them through--project-only. Assess reads them in the working directory's project and in every project Claude Code records. ~/.grok/agent-host/sessions/<session-id>/session.sqlite, ~/.grok/agent-host-daemon/sessions/<session-id>/session.sqlite- Grok Build 2.0 session databases, one session.sqlite in each session folder.
Details
The terminal app writes the first root, and Skarn lists its sessions under grok; the desktop app writes the second, and Skarn lists its sessions under cursor. Skarn reads each database together with its write-ahead log, so a session whose rows are still only in the log is read. Recall shows the prompts, the assistant's replies, and the tool calls in the order the database records them; when the database holds no prompt list and the root its manifest names is absent or unreadable, recall shows no conversation for the session and counts a skipped record, and the scan still reads its messages. The scan also reads every other row the database holds, such as reasoning text and rows no longer part of the conversation, and scans a text the database stores several times once. The session id, title, model, and update time come from the database, the working directory and the times from meta.json beside it, and the token counts from usage.json when the terminal app wrote one. A prompt the database holds is dropped from the Grok Build prompt log's session of the same id in the same Grok home, once for each time the database holds it; a shell entry and a prompt the database lacks stay. A session is dated by the update time the database records when that is earlier than its files, so a session the desktop app copied from an older Cursor session does not enter a recent window on the day it was copied, and recall lists such a copy once, under its Cursor composer, when the same run reads that composer and the session has not been used since; otherwise the copy itself is listed. The scan reads the copy in every case. A database Skarn cannot decode counts as a session store that could not be read, so the scan-incomplete warning and every recall command report the count,
--fail-on-scan-errorexits 6, andskarn doctornames the root that holds it; a row Skarn cannot decode inside a readable database counts as a skipped record.skarn inventorylists the first root under grok and the second under cursor. Skarn looks for both roots under$GROK_HOMEas well.
Guard hook hosts
The hook events skarn guard receives on each supported host, what each event lets the guard scan, and the decision channel it answers on. Events marked opt-in are supported but not wired by the shipped configs.
Claude Code
Claude Code fires PascalCase events with a JSON envelope on stdin. Six events are wired by default, the batch output scan among them; the per-result output scan is supported but opt-in because it fires on every tool result.
Events and routing
Codex shares Claude's PreToolUse and PermissionRequest names, so auto-detection keys on a Codex-only tell (turn_id, or the apply_patch/spawn_agent tools); a Claude event carries none of them and routes to the Claude adapter. VS Code Copilot also shares the envelope, so its own tool-name vocabulary routes it to the Copilot adapter. The shipped Claude PermissionRequest hooks pass --agent claude explicitly anyway.
Claude Code fails OPEN on a guard failure: an exit code other than 0 or 2, a hook that cannot start, invalid JSON on stdout and a timeout all let the action go ahead unless the hook entry sets onFailure to block (Claude Code 2.1.295 or later), which the shipped configs leave unset; the one exception is Windows without Git Bash, where a shell-form PreToolUse or PermissionRequest command hook that fails or times out with onFailure unset blocks the call. Elsewhere exit 2 and a blocking JSON decision are the only blocks, and exit 2 is not honored on PermissionRequest, where only the decision object denies. In enforce, an event the guard cannot fully classify (unparseable, oversized, a repeated key, a tool input nested past the flatten bound, or a Read of a dotenv file whose requested lines lie past the 4 MiB the guard reads) asks, and denies under --strict, with the same verdict the guard log records; when the event is too large to parse, the answer takes the shape of the event named in the bytes the guard did read; with no event name and no --event pin it takes the PreToolUse shape, which another event may ignore. On PreToolUse, when the event's top-level permission_mode is bypassPermissions or dontAsk, every ask the guard would write is a deny instead, because Claude Code 2.1.322 was measured to run the tool with no prompt after a hook's ask in both modes. That covers a rule-driven ask, whose reason keeps the rule id and redacted preview and adds that the permission mode runs an ask without a prompt, the regex work-limit floor, and every unclassifiable ask, a rules-load or analysis failure included. For an oversized or malformed event the guard looks for the mode at the top level of the bytes it received, where any occurrence that names bypassPermissions or dontAsk counts, and it takes the event name from those bytes only when every top-level occurrence is readable and agrees; when no such mode is found (it sits past the 4 MiB read cutoff, or the bytes hold no top-level permission_mode the guard can read), the ask stands and --strict turns it into a deny. An absent mode or any other mode (default, acceptEdits, plan, auto) changes nothing, PostToolBatch still reports an ask through additionalContext, and PermissionRequest still denies every ask it receives. The host documentation says PermissionRequest fires only when a call needs a permission decision, which those two modes skip, so the PreToolUse answer is the gate there. Audit reports the would-be deny wherever it already reports a verdict, and blocks nothing. Because audit decides nothing, Claude Code's own permission handling is unchanged: when its rules ask for a call the guard flagged, its permission dialog can offer to save the command, secret included, as a permission rule, and on Claude Code 2.1.325 that dialog did not show the guard's audit systemMessage. A scan-infrastructure failure (unreadable rules) still asks in enforce with or without --strict, denies in bypassPermissions and dontAsk, and writes no guard log line. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Grok Build (formerly Cursor)
Grok Build (formerly Cursor) fires camelCase events, each with its own stdin shape and its own verdict schema - unlike Claude's single envelope. Skarn wires five blocking events by default, preToolUse with the matcher Write|Delete.
Events and routing
Four of the five camelCase event names are unique to Cursor. preToolUse is also an event name of the Copilot CLI and of Kiro, so under auto-detection a preToolUse event routes to Cursor only when it carries cursor_version, which every Cursor event sends and no other host does. The shipped Cursor configs pin --agent cursor.
In enforce, an unparseable event exits 2 (Cursor's schema-agnostic hard block) and a tool input the guard cannot fully classify asks on the shell and MCP events, with or without --strict (--strict turns that ask into a deny); audit records the would-be verdict and blocks nothing. A scan-infrastructure failure (unreadable rules) still exits 2 only under --strict plus enforce. A shell command, or a Cursor file write or delete, that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way. Cursor's own file writes, edits and deletes reach the guard through preToolUse, which does not enforce ask, so enforce answers every would-be ask there as a deny. Cursor sends an edit as a write of the whole file after the edit, so a credential already in that file is judged again on every edit and blocks the edit in enforce until the value is accepted with skarn guard accept.
Codex CLI
Codex's hook system mirrors Claude's - PascalCase events and a near-identical PreToolUse JSON - but its verdict semantics differ: permissionDecision ask and a bare allow both FAIL OPEN, so a would-be ask degrades to deny. Codex fires more events than Skarn wires; the rest are evaluated and deliberately left off the matrix (verified against the OpenAI Hooks guide, 2026-08-30): SessionStart and SubagentStart carry only session and subagent metadata (model, permission_mode, agent_id/type), no credential-bearing tool or prompt content; PreCompact and PostCompact carry only a compaction trigger over already-seen transcript the recall scan covers; SubagentStop carries last_assistant_message (so it is NOT content-free), but that post-hoc subagent output lands in the session store the recall scan and the turn-end advisory already cover, so it is a deliberate deferral pending the cross-action daemon the codex README names. SessionEnd, which the previous sweep recorded as absent and the reference now documents, carries a session id, a transcript path where one exists, and a reason (always other); it fires on archive, on deletion, on a normal close, and after 30 minutes idle, so it reaches a lifecycle moment the turn-scoped Stop row cannot - a codex session that ends without another turn produces no Stop, and if the shared hourly advisory budget was spent on the other host in the meantime that session's nudge is simply lost. It stays unwired anyway: its output is advisory and cannot steer Codex, so the nudge has no committed surface there, and Codex runs it synchronously under a 1-second default timeout capped at 3 seconds, which the recent-session scan can exceed on a large store. The gap is recorded rather than closed.
Events and routing
Codex shares Claude's event names, so pass --agent codex explicitly. Auto-detection falls back to a Codex-only tell: turn_id (on every turn-scoped event, PermissionRequest included) or the apply_patch/spawn_agent tools.
In enforce, an event the guard cannot fully classify (unparseable, oversized, a repeated key, or a tool input nested past the flatten bound) is denied in the schema of the event that fired, with or without --strict (Codex has no ask channel, so the ask the log records degrades to a deny); when the event is too large to parse, the deny takes the shape of the event named in the bytes the guard did read; with no event name and no --event pin it takes the PreToolUse shape, which another event may ignore. Audit records the would-be verdict and blocks nothing. A scan-infrastructure failure (unreadable rules) still denies only under --strict plus enforce. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
GitHub Copilot CLI
The Copilot CLI's native payload is camelCase (toolName / toolArgs / sessionId) and carries no event-name field on most events, so the event is inferred from the field shape; permissionRequest is the exception: on CLI 1.0.82 its payload names itself with hookName and carries the arguments as toolInput rather than toolArgs (measured live 2026-08-30), the guard reads both keys, and the shipped config entry still pins it with --event permissionRequest so an older CLI that sends the preToolUse shape there is answered in the right schema. preToolUse and permissionRequest both block; the other events run full detection and write the audit log but cannot decide. GitHub documents fourteen Copilot CLI hook events; Skarn declares five of them (preToolUse, permissionRequest, userPromptSubmitted, userPromptTransformed, postToolUse) plus preMcpToolCall, and evaluates the rest as deliberately not wired (verified against the GitHub hooks reference, 2026-08-30): sessionStart carries an initialPrompt (scannable), but a session-open detection arm beyond userPromptTransformed is out of this round's scope; subagentStart and subagentStop carry subagent metadata (agentName, transcriptPath), and the subagent's own tool calls are gated by preToolUse while any post-hoc output lands in the session store the recall scan covers; postToolUseFailure carries the failed call's toolArgs plus its error text, which can hold output preToolUse never saw, so leaving it unwired is a deliberate coverage deferral of the same class as the opt-in postToolUse output scan; errorOccurred and notification carry human-readable error and message text (a low-value surface deferred this round, not a claim they can never carry a secret); preCompact carries a compaction trigger and any customInstructions over already-seen transcript; agentStop (Stop) and sessionEnd carry only a stopReason/reason over transcript the recall scan covers. Every one of these is a deliberate coverage deferral, not an assertion that the event can never carry a credential.
Events and routing
The camelCase field set is the CLI tell. A Copilot payload in Claude-compat mode is byte-indistinguishable from a real Claude event (field names AND tool names), so the shipped Copilot configs always pass --agent copilot explicitly. The CLI loads hooks from policy, then the user, then the repository (its hook files and its inline settings block), then plugins (GitHub hooks reference, 2026-08-30), and how several hooks for one event compose differs by event. On preToolUse any hook returning deny blocks the tool, so a Skarn deny there is final; measured on CLI 1.0.70 the entries after the denying one did not run at all, and on 1.0.61 under SDK 1.0.1 the host's own SDK-registered callback was never invoked for that call either. On permissionRequest every configured hook runs and their outputs are MERGED with later outputs overriding earlier ones, so a Skarn deny there is not final: a hook loading after it that answers allow replaces the decision. That is why preToolUse remains the durable gate and permissionRequest is a second chokepoint rather than a stronger one. A sandbox escape narrows what the merge can produce: when toolInput carries requestSandboxBypass: true, GitHub's reference states that a hook allow never pre-approves the request or short-circuits the user prompt and only a deny propagates, so the merged permissionRequest decision on such a call can block it or leave it to the interactive prompt, never pre-approve it; a hook loading after Skarn can still replace the deny with an allow that falls through to the user. A top-level disableAllHooks: true in the repository's .github/copilot/settings.json skips every hook from repository files, user files, plugins and inline blocks for that repository, the operator's own included, and logs nothing when it does; machine policy hooks keep running under it (GitHub documents them as unaffected; measured on CLI 1.0.82 in a trusted repository, where the same session suppressed the user hook and honored the policy hook's deny). It silences the layers it reaches across events (sessionStart as well as preToolUse) and leaves the host application's own SDK-registered callbacks running, so doctor reads that file and reports the file layer as inert rather than counting it as protection or calling the machine unprotected.
preToolUse fails CLOSED on a non-zero exit, but a hook TIMEOUT fails OPEN (the shipped configs set timeoutSec 10). permissionRequest treats exit 2 as a deny. In enforce, an unparseable event exits 2, and a tool input the guard cannot fully classify, or a read of a dotenv file whose requested lines lie past the 4 MiB the guard reads, asks on preToolUse (denies under --strict, and on permissionRequest, which has no ask), with or without --strict; audit records the would-be verdict and blocks nothing. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
GitHub Copilot (VS Code agent mode)
VS Code agent mode speaks a second Copilot dialect, with PascalCase event names in a Claude-shaped envelope, camelCase tool_input keys, and VS Code's own tool-name vocabulary (such as run_in_terminal and create_file), which Skarn maps to canonical names. MCP calls arrive as PreToolUse with an mcp_<server>_<tool> name.
Events and routing
VS Code discovers hooks from ~/.claude/settings.json (chat.hookFilesLocations), so a machine already running Skarn's Claude guard receives VS Code Copilot events. The VS Code tool-name vocabulary routes them to the Copilot adapter instead of a silent Claude fast-allow; the shipped configs pin --agent copilot.
VS Code blocks only on exit 2; any other non-zero exit fails OPEN. In enforce, an unparseable event exits 2, and a tool input the guard cannot fully classify, or a read of a dotenv file larger than the 4 MiB the guard reads (a read_file of one whatever lines it asks for), asks (denies under --strict), with or without --strict; audit records the would-be verdict and blocks nothing. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Gemini CLI
Gemini CLI fires eleven PascalCase events with a JSON envelope on stdin; hooks ship on by default since v0.26.0. Skarn gates three of them - BeforeTool (the enforcing pre-execution gate), BeforeAgent (the submitted prompt, an egress channel), and AfterTool (the tool result, opt-in) - and every other event fast-allows. The stdout protocol is strict: the host requires that a hook print nothing to stdout but its final JSON object, so the guard's emit arm is the sole stdout writer and an allow prints nothing at all. Gemini's PUBLISHED output schema documents only allow and deny (alias block), with no ask value; gemini-cli 0.49.0 does route an undocumented decision "ask" on BeforeTool to an interactive confirmation, but skarn deliberately does not emit it: a version that drops the undocumented behavior would read "ask" as no decision and let the call through, so a would-be ask degrades to deny (fail-closed on an undocumented channel). Timeouts are MILLISECONDS here, not seconds (the shipped entries use 5000).
Events and routing
The Before*/After* event vocabulary is unique to Gemini - no other host uses those names - so auto-detection is unambiguous; the shipped configs pin --agent gemini anyway, the same policy every other host follows. MCP tools arrive named mcp_<server>_<tool> with SINGLE underscores, so the guard keys MCP treatment on that prefix rather than on the canonical mcp__ form.
A non-2 non-zero exit is a warning and fails open; exit 2 blocks with stderr as the reason. A licensed enforce exits 2 on an event the guard cannot parse (malformed, oversized, or a repeated key) and denies a tool input it cannot fully classify (nested past the flatten bound), with or without --strict, and the guard log records the same verdict; a scan that cannot run (unreadable rules) exits 2 only under --strict plus enforce; an out-of-scope action still fast-allows, and an unlicensed or free-tier guard is forced to audit and exits 0. A hook that runs past its timeout has its decision discarded and the call proceeds, and the observed wait tracks the hook's own runtime up to about 30 seconds rather than the configured value, so the timeout bounds nothing - a fast guard is the real protection. From gemini-cli 0.56.0 a crashed, timed-out, or exit-2 hook also prints a 'Hook execution for <event>: N succeeded, M failed' summary and a '[WARNING] Hook(s) [skarn-guard] failed' line on stderr; only the exit-2 case blocks. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Grok Build CLI
Grok Build CLI fires a PascalCase event set with a JSON envelope on stdin, in a camelCase dialect of its own: hookEventName carries a snake_case VALUE ("pre_tool_use"), the tool fields are toolName/toolInput/toolUseId/toolInputTruncated, and PostToolUse adds toolResult. Skarn gates three of those events - PreToolUse (the only enforcement point grok offers), UserPromptSubmit (the submitted prompt, an egress channel), and PostToolUse (the tool result, opt-in) - and every other event fast-allows. Grok has NO non-deciding channel: its passive events ignore stdout entirely and every recognized PreToolUse output decides, so the guard emits nothing at all in audit mode and the would-be verdict lands only in the guard log, which skarn guard report reads. Timeouts are seconds (the shipped entries use grok's 5-second default). The honest posture is fail-open: every grok hook failure, timeout, crash or malformed output is recorded for the session scrollback and blocks nothing, so an explicit deny is the only thing that stops a call.
Events and routing
The camelCase hookEventName key is unique to grok - Claude, Codex, Cursor and VS Code Copilot spell it hook_event_name, and the Copilot CLI carries no event-name field - so an unpinned grok payload auto-detects on key presence, before the Copilot CLI's toolName/sessionId structural tells that it would otherwise trip. Grok is also the ONE place the guard overrides an explicit --agent pin: grok natively runs the hooks configured in ~/.claude/settings.json and ~/.cursor/hooks.json and invokes them with its own dialect, so a hook pinned --agent claude is handed grok events it cannot read. When the process environment carries GROK_HOOK_EVENT (grok's runner injects it for every hook and strips any value a config sets) AND the payload carries hookEventName, the event routes to the grok adapter whatever the pin says. Neither signal alone moves a pin, and a real Claude payload under a claude pin is unaffected either way. MCP tools arrive under their resolved server__tool name with no prefix; the guard rewrites that to the canonical mcp__ form so every tool-keyed detector sees an MCP call, and an MCP call never fast-allows.
Every failure fails open, which is grok's own posture for hooks: a non-zero exit other than 2 is recorded and blocks nothing. Exit 2 is an explicit PreToolUse deny, and a deny on stdout is honored regardless of the exit code (a stdout allow paired with exit 2 still denies, so the guard never pairs the two). A licensed enforce turns an unparseable event into one stderr line and exit 2, and denies a tool input it cannot fully classify, with or without --strict; audit records the would-be verdict and blocks nothing. A scan-infrastructure failure (unreadable rules) still exits 2 only under --strict plus enforce. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Antigravity CLI (agy)
The Antigravity CLI (agy) fires five PascalCase events - PreToolUse, PostToolUse, PreInvocation, PostInvocation, Stop - with a camelCase protojson envelope on stdin and NO event-name field: the hooks.json entry that fired is the only thing that names the event, so the adapter reads the event off the payload shape (a toolCall whose error key is absent or null is the PreToolUse it gates; any other error value, including the empty string a successful PostToolUse carries, marks a non-tool event, and every other shape fast-allows). PreToolUse is the whole guard surface on this host: PreInvocation carries no prompt text and PostToolUse carries no tool output, so there is no prompt-submit gate and no result scan (verified on agy 1.1.18 and 1.1.19). The stdout contract is a flat {"decision","reason"} object, and agy FAILS CLOSED on everything but an explicit allow: a deny blocks, and a crash, a timeout (seconds; the shipped entries use 5), invalid JSON, and an empty {} (a missing decision) all block the call and the model sees the hook-failure text; only an empty stdout was observed to proceed (1.1.19), which is undocumented and which the guard never relies on. The guard therefore answers EVERY tool event with an explicit decision: enforce prints deny or allow, audit prints allow with the would-be verdict in reason (agy has no non-deciding channel), an out-of-scope tool gets an explicit allow, and a non-tool event gets the empty object. ask is not a block on agy (it hands the call to the permission layer, which auto-denies in print mode), so a would-be ask degrades to deny. An allow never grants a permission: agy's own permission check still runs after the hook.
Events and routing
The camelCase toolCall / conversationId / workspacePaths / artifactDirectoryPath field set is unique to agy - Claude, Codex, Cursor, Gemini, and VS Code Copilot use snake_case envelopes, the Copilot CLI spells its fields toolName/toolArgs/sessionId, and grok's tell is hookEventName - so an unpinned agy payload auto-detects (before the Claude PascalCase fallback, so a future payload that adds hook_event_name still routes here); the shipped configs pin --agent antigravity anyway, uniform policy. The agy tool vocabulary on the hook wire was pinned live (1.1.19): a file write fires as write_to_file (TargetFile/CodeContent) and an edit as replace_file_content or multi_replace_file_content (TargetFile/ReplacementContent), while run_command, view_file, browser_*, the read_url_content/open_browser_url/search_web network steps, and the agency_tool_call/invoke_subagent/browser_subagent subagent steps keep their step-type spellings; the step-type spellings of the write tools (file_change, code_action, edit_notebook) stay mapped and matched as drift aliases. The MCP dispatch is call_mcp_tool on the hook wire (the binary's hook tool table) and mcp_tool in the transcript the scan parser reads; both are rewritten to the canonical mcp__ form (from the ServerName/ToolName args), so an MCP call never fast-allows. The grok override still applies: a hook process grok spawned routes to grok whatever the pin.
Fail-closed by the host's design, on every outcome but an explicit allow: a crashed, slow (past the entry's timeout, in seconds), or malformed skarn BLOCKS the tool call, and a missing skarn binary blocks every matched call the same way (sh -c exits 127). Enforce and audit are both hard gates here - audit cannot fail more open than enforce, so a machine where the hook is wired and the binary is gone blocks matched calls until the binary is back or the entry is removed. A licensed enforce answers an event the guard cannot parse, or a tool input it cannot fully classify, with an explicit deny, with or without --strict; audit answers an explicit allow that names the would-be verdict. A scan-infrastructure failure (unreadable rules) still denies only under --strict plus enforce and answers an explicit allow otherwise. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Kimi Code
Kimi Code fires PascalCase events with a JSON envelope on stdin - hook_event_name, session_id, cwd - because its hook runner builds the payload from camelCase keys and snake-cases them on the way out, so the shape is Claude's with two differences that matter: every payload carries a client_type naming the host, and UserPromptSubmit delivers prompt as an ARRAY of content blocks rather than a string (verified on kimi-code 0.39.1). Of the twenty events kimi defines, only PreToolUse, UserPromptSubmit and Stop can block; the rest are fire-and-forget, so a verdict on one would be a claim the host does not honor. Both blocking events skarn gates are wired by default. PermissionRequest is deliberately not wired - it is observation-only on kimi, unlike Claude Code, where it is a real second gate - and Stop stays unwired because blocking it forces the assistant to keep going.
Events and routing
Kimi shares Claude's envelope and event names, so the tell is the client_type field its own hook runner stamps on every payload: no other host emits it, and the value is matched rather than just the key, so only kimi's own CLI identity routes here. The pin still matters and every shipped entry carries it: a host embedding kimi's older hook engine sends no client_type, and that payload is byte-shaped like Claude's. The misroute is not symmetric - a claude-routed PreToolUse deny happens to be schema-compatible and still blocks, but a claude-routed UserPromptSubmit answers with a top-level decision block that kimi does not honor, so the prompt is allowed while the guard log records a deny that never happened, under a claude label that corrupts the per-assistant denominators guard report is built from. The kimi tool vocabulary is Claude's for everything skarn gates except FetchURL (mapped to WebFetch), Agent and AgentSwarm (mapped to spawn_agent) and ReadMediaFile (mapped to Read); MCP calls already arrive in Claude's own mcp__<server>__<tool> form.
Fail-open by the host's design: exit 2 blocks, exit 0 with a deny object blocks, and every other non-zero exit, every hook error and every timeout allows the action. The shipped entries set timeout = 10, below kimi's 30-second default. A licensed enforce answers an unparseable event with exit 2 and one stderr line, and denies a tool input it cannot fully classify, with or without --strict; audit records the would-be verdict and blocks nothing. A scan-infrastructure failure (unreadable rules) still exits 2 only under --strict plus enforce. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Cline
Cline runs hooks as executable files named after the event, one file per event, discovered in ~/Documents/Cline/Hooks/ and a workspace's .clinerules/hooks/ (the CLI also reads ~/.cline/hooks/, .cline/hooks/ and a --hooks-dir). Two runners read those files. The VS Code extension's runner sends the PascalCase event under a camelCase hookName - PreToolUse, PostToolUse, UserPromptSubmit - beside clineVersion, taskId and workspaceRoots, with the tool call under preToolUse as a tool name and a map of string parameters, and gives the hook 30 seconds. The SDK runner behind the cline CLI maps the same file names onto its own event names - tool_call, tool_result, prompt_submit - and sends those under hookName, with the real tool input under tool_call.input beside the legacy object, and gives a tool hook 120 seconds (verified on cline 3.0.60 and the 4.1.16 extension source). Each runner reads one JSON object from stdout on the events it waits for: cancel true ends the task with errorMessage as the reason, both runners append contextModification as hook context for PreToolUse, and once that object parses the exit code is ignored. The extension's own runner handles 4.x extension sessions and waits for every event it fires; since extension 4.1.26 it also injects a UserPromptSubmit contextModification into the model context; the SDK runner waits only for tool_call and tool_result and fires prompt_submit detached with stdout discarded, so the prompt event blocks under the extension's runner alone. Both gated events are wired by the shipped executables; PostToolUse is supported opt-in, and the task lifecycle, notification and compaction events carry nothing to gate and fast-allow.
Events and routing
Cline's tell is the camelCase hookName key beside a taskId or clineVersion: both of its runners stamp them and no other host sends hookName, so an unpinned event auto-detects. The shipped executables pin --agent cline all the same, because Cline's event names collide with Claude Code's and Codex's and a hook file is copied between machines and forks where nothing else names the host. The SDK tool vocabulary is mapped onto the canonical tool names - run_commands and execute_command to Bash, read_files and read_file to Read, editor and replace_in_file to Edit, write_to_file to Write, fetch_web_content and web_fetch to WebFetch, search_codebase and search_files to Grep, new_task to spawn_agent, apply_patch and spawn_agent unchanged - and use_mcp_tool is rebuilt as mcp__<server>__<tool> from its own server_name and tool_name. The gated set matches the Claude arm: Grep fast-allows and Read is strict-only.
Fail-open by the host's design: only a parsed stdout object carrying cancel true blocks. A non-zero exit without that object, a timeout, and an unparseable stdout all allow the action. The extension also skips a POSIX file without the exec bit; the CLI can run it through its shebang interpreter. The guard always exits 0 and speaks only through the object. A licensed enforce answers an unparseable event, or a tool input it cannot fully classify, with the cancel object, with or without --strict; audit records the would-be verdict and blocks nothing. A scan-infrastructure failure (unreadable rules) still cancels only under --strict plus enforce. The shipped files include POSIX shell and Windows PowerShell hooks. On Windows both runners look for <HookName>.ps1 and ignore the extensionless files. The extension runs powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -File; the CLI runs powershell -File and does not run a .ps1 hook under a Restricted execution policy. Both launch forms are tested with native skarn.exe: stdin arrives byte for byte and stdout reaches Cline as exactly one JSON object without a byte-order mark. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Copilot in Code
Copilot in Code is the coding workspace of the Microsoft Copilot app on Windows. It runs the GitHub Copilot CLI agent, and that agent runs command hooks from the Copilot CLI's own hook file format, so the copilot adapter answers them and the shipped copilot configs serve both hosts. Code reads every *.json in each profile's hooks folder, where skarn setup --agent copilot-code writes skarn.json, and the .github/hooks folder of a folder project, which skarn setup --agent copilot --scope project writes. A new session loaded a changed profile hook file; whether an app restart is also needed was not measured. On Copilot app 156.0.4314.58 with GitHub Copilot CLI 1.0.93 on Windows, preToolUse, postToolUse, userPromptSubmitted, sessionStart and sessionEnd fired a command hook; errorOccurred was registered and did not fire; permissionRequest, userPromptTransformed and preMcpToolCall were not shown to fire. A repository project's .github/hooks, and its worktrees, were not measured, and neither was whether Code shows additionalContext. On macOS setup writes the same hook file to each profile. On Copilot app 158.0.4370.33, with GitHub Copilot CLI 1.0.108 on macOS, no matching guard event was observed from a profile's hook file on Windows or macOS, while the .github/hooks/skarn.json of a folder project fired userPromptSubmitted, preToolUse and permissionRequest in audit mode on both; whether a deny is honoured on app 158.0.4370.33 was not measured.
Events and routing
Code sends the Copilot CLI's flat camelCase payload, one call per hook run, including each call of a parallel batch: sessionId, timestamp, cwd, toolName and toolArgs as an object. The shipped configs pin --agent copilot, so the call takes the copilot adapter's CLI dialect. Nothing in the payload names Code, so the guard reads the attribution from its own environment instead. Code sets COPILOT_HOME to the profile directory, and a COPILOT_HOME whose parent directory is named CopilotCodingHome labels the record copilot-code rather than copilot (a linked COPILOT_HOME resolves through its session-state directory, as the scan side does). Code's terminal tool undocked-terminal-run_terminal is scanned as Bash with its command, WebGrounding-web as WebSearch and WebGrounding-browse as WebFetch. A terminal canvas is scanned as Bash too: open_canvas with canvasId terminal carries the command in input.command, and invoke_canvas_action with actionName send_terminal_input carries it in input.input. A terminal canvas call the guard cannot read takes the ambiguous-input verdict over its raw text, an ask in enforce (a deny with --strict) that Code receives as a deny: an input that is not an object, a command or input field that is not a string, a send_terminal_input with no input field, and a toolArgs string that does not parse. A terminal canvas opened with no command runs nothing and fast-allows, because the terminal's own schema makes input.command optional. Every other canvas call, rename_session and list_canvas_capabilities fast-allow. A payload carrying only a batched toolCalls array, the shape the agent records for its own in-process hooks, is unclassifiable and exits 2 in enforce.
On Copilot app 156.0.4314.58 a preToolUse deny was honoured and its reason shown, and a hook that exited nonzero denied the tool. A hook that ran past timeoutSec was killed and the tool it held then ran, measured on one call; the shipped configs set timeoutSec 10. A would-be ask is answered with a deny in enforce on Copilot in Code, because ask was not measured there and Code can run unattended; the standalone Copilot CLI keeps its interactive ask. The guard log keeps the decided ask, so skarn guard report counts that call as a prompt, as on every host that turns an ask into a block. A tool input the guard cannot fully classify, and a read of a dotenv file whose requested lines lie past the 4 MiB the guard reads, are such a would-be ask. In enforce an unparseable event exits 2; audit records the would-be verdict and blocks nothing. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Server-side agent runtimes (skarn envelope)
Your runtime client wraps LangChain, Strands, AgentCore, the OpenAI Agents SDK, Google ADK, an MCP server or an in-house loop and calls skarn guard --agent sdk on stdin. You send Skarn's own versioned JSON envelope with v 1, event and a required runtime label. You can include session_id, cwd and identity; identity is an assertion that the guard does not authenticate. For pre_tool_use and post_tool_use, tool carries name, kind, optional server and input as an object or string. A post_tool_use also carries result as a string or object; a user_prompt_submit carries prompt as a string. The guard maps kind shell to Bash, write to Write, edit to Edit, read to Read, fetch to WebFetch and mcp to mcp__<server>__<name>. A missing kind or kind other maps to sdk-tool, which has no structural meaning in the engine; the guard scans the content and never gives the runtime tool name structural meaning. For kind mcp the guard builds the name the way every host builds an MCP name, so a known MCP tool such as serena read_file keeps the meaning it has on every other host. The guard also scans the raw tool name as a tool: <name> line. In the verdict object and log it replaces the name with sdk-tool when the name exceeds 64 bytes, contains a byte outside [A-Za-z0-9_.-], looks like a credential by the same screen the fleet drop applies to a tool, or contains a matched value, and whenever a finding in the call was decoded out of an encoded payload, because an encoded name does not contain its decoded value. The guard scans every kind without --strict, including read; the strict Read gate is a laptop-host rule. You get v, verdict, enforce, reason, rule, fingerprint, severity, incidents, chain, tool and notice in the JSON verdict object. Enforce needs a paid license; audit is the default. You need no hook config file: skarn setup and skarn doctor do not cover this host, and no shipped config wires it. The guard reads stdin and writes stdout; it opens no socket.
Events and routing
The guard checks for an integer v and a string runtime after every vendor tell. Your runtime client pins --agent sdk anyway. Without the pin, an envelope that lacks an integer v or a string runtime is not recognized as sdk and falls to the Claude adapter, so the one-object answer to an unclassifiable call holds only under --agent sdk; with the pin, the sdk object answers even inside a grok hook process.
Your client is a program that reads the verdict object. Every call gets one object and exit 0. An unclassifiable call answers ask, or deny under --strict; a scan-infrastructure failure answers ask. Missing or unknown v or event, a missing runtime, an unknown kind, a result that is a number or a bool, unparseable JSON or a repeated key gets reason unparseable tool event and tool sdk-tool. An input nested past the flatten bound gets reason tool input too deeply nested or ambiguous to classify. Audit returns the same object with enforce false, as does a call without a paid license. Your client blocks nothing when enforce is false. Your client must treat a nonzero exit or a missing or unparseable object as its own failure and fail closed to ask. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Kiro CLI
Kiro CLI 3.x runs two agent harnesses in one binary, V3 by default and V2 on request, and each reads hooks from its own surface. V3 runs every standalone hook file in ~/.kiro/hooks/ and the workspace's .kiro/hooks/, a v1 document whose hooks array carries PascalCase triggers with a command action, plus the hooks of the agent or profile a session selects. V2 runs only the camelCase hooks of the agent config a session selects and never loads a hook file. Both harnesses send one JSON envelope on stdin with hook_event_name, session_id and cwd, plus tool_name and tool_input on tool events. The verdict is the process exit code: exit 2 blocks the call and the model receives the stderr text as the reason, exit 0 lets it run, and Kiro reads every other code as a warning and runs the tool. Skarn gates PreToolUse, the one event that blocks, and scans UserPromptSubmit, PostToolUse, Stop and the session-start events; every other trigger is allowed at exit 0. Hook-file timeouts are seconds, and the shipped entries use 10. Enforcement was measured blocking on macOS on both harnesses with Kiro CLI 3.3.0. On Windows, where Kiro CLI 2.18.1 ran hooks and ignored their exit codes, the adapter runs audit semantics by design, and enforcement on Linux is not yet claimed for 3.x.
Events and routing
No field of a Kiro payload tells it apart from the hosts Skarn also guards: a V3 tool event has the shape of a Claude Code or Copilot CLI event, and a V2 tool event that of a Copilot CLI one. An unpinned V3 execute_bash call reaches an adapter that leaves it unscanned, an unpinned V3 read_file or MCP call gets a JSON answer Kiro ignores, and an unpinned V2 tool event is refused as unparseable under the wrong host name. Kiro therefore never auto-detects, every shipped entry pins --agent kiro, and doctor reports a wired hook without the pin as dead. Tool names arrive in each harness's own vocabulary (V2 read, write and shell; V3 read_file, fs_write and execute_bash) and map to the canonical tools. A V2 MCP call arrives as @server/tool and a V3 one as mcp_server_tool; a name the adapter does not recognize is scanned as a possible MCP call and never fast-allowed.
Exit 2 is the only block, and the guard never exits 1. A timeout, a missing binary and a hook that fails to start all let the call run. Kiro has no ask channel, so in enforce an ask blocks like a deny. A licensed enforce answers a tool event the guard cannot parse, and a tool input nested past its flatten bound, with exit 2 and one stderr line. The exit 2 decision is made before anything is written, so a closed stderr still blocks. A scan-infrastructure failure (unreadable rules) exits 2 only under --strict plus enforce. A Windows build exits 0 on every event and records the would-be verdict as an audit record. A call that removes, downgrades, silences or edits the skarn hook is an agent-hook-removal finding: enforce denies a removal, a downgrade or a silencing that the hook file the guard reads proves, and answers every other such call the way it answers a tool input it cannot fully classify. A shell command that names a credential file and runs a program whose name is computed at run time is an unresolved-program-exfiltration finding, answered that same way.
Examples
Show which license this machine is using, where it came from, and when it expires.
skarn license
Validate a license file and install it; the previous license, if any, is backed up alongside it.
skarn license ~/Downloads/team.skarnlicense
Fetch a fresh license for this subscription, verify it against the keys built into this binary, and install it; nothing is written unless it verifies.
skarn license renew
Scan every AI coding session on this machine and print a friendly risk summary in one command; no flags, no license.
skarn assess
Drive the MCP handshake by hand: the server answers one JSON-RPC line on stdout and exits 0 when stdin closes.
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}' | skarn mcpRun the MCP server with the two content tools enabled; put the argument in the client's own mcpServers args, never in a shipped plugin.
skarn mcp --enable-recall
Print what the MCP server exposes and how to register it in a client; it returns before the protocol loop starts.
skarn mcp --help
Write a self-contained, redacted security report to share with a colleague; -o report.md writes a plain-text version.
skarn assess -o report.html
Statically vet this machine's AI assistant configuration - hooks, MCP servers, permission grants and rules, plugins and skills - and list the risky patterns found. Read-only, offline, no license.
skarn vet
Emit the config findings as SARIF for a code-scanning pipeline and exit 1 on anything high or above; an unreadable config file exits 6 rather than reporting a partial view as clean.
skarn vet --format sarif --fail-on-severity high
Detect installed AI coding assistants and wire the guard hook into each one in audit mode, with a wizard on a terminal; ends with the guard self-test and a list of every file touched.
skarn setup
Print the exact Cursor hooks.json content that setup would write, without writing anything.
skarn setup --print --agent cursor
Check that skarn is really protecting this machine: license, every wired assistant hook, the guard log, and the guard self-test. Each warning or failure names the command that fixes it.
skarn doctor
The same checks as one JSON object for fleet scripts; the check ids are stable and a rendered report always exits 0 (an unknown option is refused with exit 1 and an unresolvable home directory with exit 6, both before any check runs).
skarn doctor --json
Flip every assistant that already carries skarn entries from audit to enforce, leaving everything else alone.
skarn setup --update --mode enforce
Summarize the last 30 days of flagged calls per assistant: verdicts, top rules, latency, and the most recent denies. When the window is clean, meaning the flagged calls span five or more days with no deny among them, report also prints the exact command that flips the hooks to enforce.
skarn guard report --window 30d
The same aggregate as one JSON object for fleet scripts: counts are over flagged actions, since the guard does not log clean calls.
skarn guard report --format json
Accept a finding the guard flagged (the fingerprint printed under the deny in guard report) as a false positive. The printed fingerprint names the value, so every rule that fires on that value stops blocking it. Writes the personal baseline the guard reads; a real leak is never accepted this way.
skarn guard accept 7d343e3a105ae026589b3371d565a4ad2943dd5ba5f81a19c7500b2ab4dbb1f0 --reason 'internal test credential'
Prove the guard wiring: run synthetic benign and fake-credential events through each adapter's real code path and report the verdicts (credential shown redacted).
skarn guard --self-test
Scan the default window (the last 30 days) of all sessions for leaked secrets and attack patterns.
skarn check
Scan all history, report only high-severity-and-above findings, and emit JSON for a pipeline.
skarn check --hours 0 --severity high --format json
Exit non-zero in CI when a session's risk score exceeds 60.
skarn check --fail-on-risk 60
Write a redacted Markdown evidence pack for one product build (Pro); redirect it to a dated file such as skarn-evidence-2026-07-24.md to file into a technical file. Omitting the lineage flags renders a pack that states it cannot be attached to a specific technical file.
skarn check --format evidence --product acme-gateway --product-version 3.2.1 --build-id 9f2c1ab
Search past sessions for a regular-expression pattern.
skarn search 'AWS_SECRET' --regex
List recent Claude Code sessions.
skarn recent --cli claude
Render per-project analytics to a self-contained HTML file.
skarn stats --by project --format html -o stats.html
Browse and scan sessions in a local web UI on 127.0.0.1:7777 (localhost only, no egress); open the token-carrying URL printed at startup.
skarn serve --port 7777
Serve the web UI with a custom rule pack layered on the bundled rules; the Security view surfaces its findings too.
skarn serve --rules ./team-rules.toml
Walk each new finding and label it a true or false positive with a reason; the decisions are written into the committed baseline and survive re-scans.
skarn baseline audit .skarn-baseline.json
Record a single false-positive fingerprint (from SARIF partialFingerprints or the ndjson skarn.fingerprint field) into the baseline without the interactive loop.
skarn baseline accept .skarn-baseline.json 7d343e3a105ae026589b3371d565a4ad2943dd5ba5f81a19c7500b2ab4dbb1f0 --reason 'internal test credential'
Vet project configuration at the working directory, the git top and the main checkout, without reading home, system, host-home or profile files.
skarn vet --project-only
Add every project Claude Code records in the default and declared config directories' .claude.json files and print the masked JSON findings with project counts.
skarn vet --all-projects --format json
List recent sessions from Alice's copied home.
skarn recent --evidence-home /cases/alice/home
Scan Alice's copied home, write JSON and return a failure if coverage is incomplete.
skarn check --evidence-home /cases/alice/home --fail-on-scan-error --format json
Write a redacted Markdown report beside Alice's copied home.
skarn assess --evidence-home /cases/alice/home -o /cases/alice/report.md
Check the assistant configuration in Alice's copied home.
skarn vet --evidence-home /cases/alice/home
Print one inventory record for the sessions and configuration in Alice's copied home.
skarn inventory --evidence-home /cases/alice/home --format ndjson
Security
Skarn scans locally and makes no network connection by default. Secrets are redacted in check's reports, in everything the recall commands print (search, recent, messages, stats, cmds, tools, mcps, restore, export), in the ndjson stream, the evidence pack, the artifacts written by --drop, serve and assess, the baseline files, the mcp tools, the guard, and every serve API route that returns session content. No flag lifts the mask. A detection rule that stops at its regex work limit in the masking scan that the recall commands, serve and the mcp content tools run before they print has not checked the rest of that text, so the request prints no session content and names the refusal instead; one such session refuses the whole output.
Two commands transmit anything off the machine, and only when you type them. skarn check --update-rules fetches a signed feed bundle from the subscriber channel, presenting $SKARN_FEED_TOKEN as a bearer credential; --feed-url names that channel when $SKARN_FEED_URL does not. The feed is off by default and is disabled by --offline. skarn license renew posts the installed license token to the license service to receive a re-signed one. Both refuse any endpoint that is not https, or http against loopback, and any endpoint carrying userinfo. No session content, no finding, and no scanned secret ever leaves the machine through a connection skarn makes. skarn mcp makes no network connection; the results it hands to the connected MCP client (redacted findings by default, redacted session content only with --enable-recall) are forwarded by that client to its model provider - that egress is the client's, and it happens only when you configure the server.
skarn vet reads the AI assistant configuration files listed under FILES read-only: it opens each one for reading, never writes, rewrites, or removes one, and makes no network call. It reports what it finds and leaves every decision about the configuration to you. --offline is accepted for parity and changes nothing. skarn assess reads the same files the same way for its saved permission rules section.
skarn mcp reads the same session stores as assess and the same configuration files as vet, read-only and with no network call, and answers only the AI coding assistant that spawned it over stdin and stdout. Its results are the redacted scan report, the masked vet report, and session metadata carrying neither message text nor any label authored inside a transcript; with --enable-recall the two content tools add session text and labels with every detected secret masked, and the search response carries no echo of the query or of the project filter. Because the assistant receives those results, they travel wherever that assistant sends its context, so treat them as leaving the machine even though skarn itself opens no socket.