Release

Skarn 0.38.0: saved command approvals

Skarn now finds a password typed on a command line, in a session and in the permission rule an approval saved. skarn assess lists the credentials saved in assistant permission rules, the guard judges Cursor's file writes and deletes, and --evidence-home reads a copied home directory.

Published 2026-11-28. Updated 2026-11-28.

Credentials in saved command approvals

At a Claude Code permission prompt, the answer "Yes, and don't ask again" can save the whole command as a permission rule. A password or key in that command is saved with it, in plain text, in a settings file. Claude Code's changelog says that version 2.1.323, released on 2026-11-12, changed "don't ask again" so that an allow rule that looks like it holds a secret, or that would be saved to a settings.local.json that git tracks, lasts for the session only and is not saved. Saved command approvals hold secrets walks through it on one project.

Since 0.37.0, skarn vet reports a credential the bundled rules recognize in a saved rule as vet-permission-plaintext-credential, at high, with a masked preview of the value. 0.38.0 adds three things.

Passwords on a command line. A built-in detector reads the commands a POSIX shell tool call runs and reports a literal password of 8 or more bytes passed to sshpass, the MySQL and MariaDB clients, redis-cli, mongosh and mongo, docker login and podman login, sqlcmd and bcp, the OpenLDAP clients, and the Samba clients. It runs in session scans, in skarn guard and in skarn vet over saved rules, and each finding is high. It reads each tool's own options, so a docker login that takes the password from standard input is not a finding. It stays silent on a command it cannot read exactly: a remote, container or nested shell command (ssh host ..., docker exec, bash -c), a loop, a command substitution, a value that holds an expansion, a placeholder, and a PowerShell or cmd call.

skarn assess lists saved credentials. The report has a new section, Credentials in saved permission rules, read from the same files as skarn vet --all-projects. The section stays outside the risk score, the finding counts and the exit code. The terminal summary gains one line when the section lists a credential or did not complete.

skarn vet reads more files. New in 0.38.0: Cline, the Kiro CLI configuration (measured on macOS) with the Amazon Q Developer CLI files the Kiro CLI still loads, Gemini CLI policy files, Codex CLI rules files, Cursor CLI permissions, VS Code terminal auto-approve settings, and project-level Cursor, Gemini CLI, Codex and Copilot CLI files.

Run both on your machine:

skarn vet --all-projects skarn assess -o report.html

Skarn reports the rule and the file that holds it. It does not edit the file and does not rotate the credential.

Guard

  • Cursor file writes and deletes. The guard now judges Cursor's own file writes and deletes, through a fifth hook event, preToolUse. Cursor sends each edit as a write of the whole file, so in enforce an edit is blocked while the file it writes still holds a detected credential. Take the credential out of the file. For a value that is a confirmed false positive, use the accept command skarn guard report prints.
  • Two new detectors on every host. The guard flags an agent that removes, downgrades or silences its own skarn hook, and a shell command that names a credential file and runs a program whose name is computed at run time. Audit mode reports what the guard would decide. Enforce mode is for a team that has decided such calls stop, and it needs a paid tier: there, a hook change the hook file proves is denied, and the other cases ask, or deny where the event has no ask and under --strict. Neither finding can be accepted with skarn guard accept.
  • Copilot reads. Before a Copilot CLI or Copilot in Code read runs, the guard now scans the file the read names, without --strict, as it already did for a Claude Code Read.
  • Guard log. A tool name that carries a credential-shaped piece is written to the log as mcp__redacted, and as sdk-tool by the sdk adapter.

To pick up the Cursor event on an install made with skarn setup, install 0.38.0 and run the update. Until you do, skarn doctor reports the missing event as drift. --update rewrites Skarn's hook entries in audit mode unless you pass a mode, so use the form that matches how your hooks run, and add --strict if they had it:

skarn setup --update --agent cursor skarn setup --update --agent cursor --mode enforce

Both forms update the hooks in your user configuration. For hooks wired in a project, run the form for your mode in that project with --scope project.

On the Cursor plugin, update the plugin. It ships its hooks in audit mode, so if you run enforce, change --guard-mode audit to --guard-mode enforce in all five entries again. If you deploy the Cursor hooks centrally, redeploy them with the fifth entry. No other host's hook file changed.

Reading a copied home

--evidence-home <dir> reads a copied home directory in place of this machine's. skarn check, skarn assess, skarn vet, skarn inventory and the recall commands accept it, and it needs a Pro license. Scanning your own machine needs what it needed before. Under an evidence home Skarn follows no link it finds below the directory, ignores the variables that relocate a session store, reads the copied home's own assistant configuration only, and refuses an output path inside it.

Session stores and coverage

  • Copilot in Code on macOS is read with no setting.
  • For the SQLite stores of Cursor, VS Code Copilot Chat, Antigravity IDE and OpenCode, Skarn now reads the committed changes in the -wal file as well as the database, when it can read one consistent state of the two, and writes nothing beside the store. When it cannot, it counts the store as unreadable, and for Cursor, VS Code Copilot Chat and Antigravity IDE it can still return the rows the database file holds.
  • A link on a session store path that points to a network path is not followed. Skarn reports refused links on stderr as counts by reason, and in most cases counts the store as unreadable.
  • The recall commands now say what a run could not read: one stderr line per kind of gap, and in their summary JSON outputs the keys tools_dropped, stores_unreadable, sessions_truncated and session_folders_without_transcript. skarn serve and skarn mcp report coverage counts too; which ones depends on the route and the tool, and the manual lists them. skarn inventory prints the refused-link lines on stderr. skarn check --format json carries the coverage counts its SARIF output carries.

GitHub Action and pre-commit

The GitHub Action has an optional vet step that vets the repository's assistant config files and writes its own SARIF report. The pre-commit manifest has a second hook, skarn-vet. Neither needs a license.

If your workflow uploads the SARIF report of the check step, guard the upload with the sarif-file output:

if: always() && steps.skarn.outputs.sarif-file != '' with: sarif_file: ${{ steps.skarn.outputs.sarif-file }}

The example assumes the step that runs the action has id: skarn. The skipped output reports a missing license only, so it does not say whether a report exists.

Output changes

  • skarn assess --json has a new last key, saved_approvals, with state, reason, projects_checked, projects_missing, findings and unreadable. The output is no longer the shape skarn serve returns from /api/scan, which never carries the key. A --dossier result omits it too.
  • A report in which the saved-rules section prints no longer opens with Act on this first. The Markdown report carries the section right after its header lines, and the HTML report carries it above the Security view.
  • The assess outputs mask session fields with the values found in configuration, and mask the saved-rules section with every value the session scan found. A session field can still show a detected value shorter than 16 bytes written directly between letters or digits, or a copy written with an escaping Skarn does not recognize.
  • When the saved-rules section prints anything, the no-finding sentence leaves out the word Clean and says that no leaked credentials or attack patterns were found in AI coding sessions.

Corrections

  • Copilot CLI, Microsoft Scout and Copilot in Code: Skarn summed the totals each run of a resumed session recorded. Current versions of those tools record running totals, so the sum counted requests more than once. Skarn now counts each request once when the transcript shows which kind a record is, and a session that is still open shows its tokens.
  • The recall commands printed a credential-shaped tool name unmasked when no rule matched it. They mask it now.
  • skarn doctor counted a wired Copilot in Code profile hook file as protection. It now reports that file as unverified and names skarn setup --agent copilot --scope project, which wires a folder project.
  • skarn restore prints the resume command without cd when the recorded directory is not a local path on this operating system, and says so on stderr.
  • skarn check --audit-log refuses a symbolic link at the log path on every platform. Before, it refused one on macOS and Linux only.
  • Skarn skips the ._ companion files macOS writes on exFAT, FAT and SMB volumes instead of reading them as sessions.

Since 0.37.0

0.37.0 shipped without a release note. Besides the saved-rule check above, it added:

  • The Kiro CLI as a session source and a guard host, measured on macOS. Enforce blocks on macOS (Kiro CLI 3.3.0, both harnesses). Skarn does not yet claim enforcement on Linux with Kiro CLI 3.x, and on Windows the adapter runs in audit.
  • A Python package for agent runtimes and gateways: pip install skarn-guard.

Every command and option is in the manual.

Get 0.38.0

Install or update, then run skarn assess -o report.html to scan the AI coding sessions on the machine and see which saved permission rules Skarn flagged.

[email protected]