Dawnstar Labs Vardhold Docs

Policy reference

Every key a Vardhold policy accepts. Policies are plain YAML, validated with line-numbered errors before they apply.

7 min readUpdated October 2026Vardhold 0.1 (pre-release)

On this page
  1. File layout
  2. Rule keys
  3. Match keys
  4. Actions
  5. Verdicts
  6. Modes
  7. Path patterns
  8. The default policy

File layout#

YAML
version: 1          # required, always 1
mode: enforce       # monitor | enforce | strict (default enforce)
rules:              # read top to bottom; the first match decides
  - id: ...

An action that no rule matches is logged, except in strict mode, where an unmatched action checked before it runs needs approval.

Rule keys#

KeyValueMeaning
id1–100 characters: letters, digits, . _ -Required. Names the rule in prompts, events and the audit log.
descriptionTextShown to people deciding approvals and reading events.
enabledtrue | falseDefault true. A disabled rule never matches.
matchMapping, belowWhat the rule applies to. Every key given must match; no match matches everything.
verdictallow | log | ask | blockRequired. The decision.
verdict_strictA verdictReplaces verdict in strict mode.
verdict_trustedA verdictReplaces verdict for agents marked trusted.
severityinfo | low | medium | high | criticalDefault info. Carried into events and the SIEM.
alerttrue | falseRaise an alert when the rule matches, whatever the verdict. While that alert is open, further matches of the rule for the same agent within 10 minutes are counted on it ("+N more") rather than opening new alerts; each match is still in the timeline.
timeout_seconds5–3600For ask: how long to wait for a person. Without it, the approvalTimeoutSeconds setting applies.
on_timeoutblock | allowFor ask: what happens if nobody answers. Default block.

Match keys#

All match keys are optional. A key that takes a list also accepts a single value.

KeyMatches
agentAgent ids, with * wildcards: claude-code, cursor, mcp:github, mcp:*
actionOne or more actions
pathFiles or folders, as path patterns
path_notExceptions: the rule does not match these paths
outside_cwdtrue: the path is outside the agent's project. false: inside it. The project is the one the agent reports (Claude Code's project directory, the Cursor workspace folder the file is in), or else its working folder, so changing folders does not move it. A drive root, the user's profile or a folder above it is never a project: there, every path counts as outside.
command_regexA regular expression (case-insensitive) tested against the command line
hostHost names for net.connect, with * wildcards: *.github.com. A connection seen by Windows telemetry is named after the DNS lookup that returned its address; one without a known lookup is matched by its address.
host_not_inMatches hosts not in a list, given inline or as a file of one pattern per line
first_contacttrue: the first time this agent has contacted this host
toolMCP tool names (without the server), with wildcards: *exec*, create_*. Combine with agent: mcp:github for one server.
targetThe raw target (command, path, host or server/tool), with wildcards

Actions#

ActionTargetChecked before it runs
shell.execThe command lineClaude Code, Cursor
process.startThe command line of a process an agent startedRecorded as it happens
file.readThe file pathClaude Code, Cursor, MCP arguments
file.writeThe file pathClaude Code, Cursor, MCP arguments; also recorded as it happens
file.deleteThe file pathCursor; also recorded as it happens
net.connectThe hostAgent web tools; also recorded as it happens
mcp.callserver/tool, with the arguments checked tooEvery MCP server behind the proxy

Events also carry system actions such as agent.discovered, approval.decided, policy.changed, killswitch, integration.unprotected, audit.anchor and audit.integrity. Rules do not usually match them, but they appear in the timeline and the SIEM.

Verdicts#

VerdictBefore it runsAs it happens
allowRuns, not alertedRecorded
logRuns, recordedRecorded
askWaits for a personRecorded with its verdict
blockDoes not run; the agent is told whyAlert raised; headless agents can be suspended automatically

Modes#

  • monitor: rules match and alerts fire, but nothing is blocked or held.
  • enforce: rules apply as written.
  • strict: verdict_strict applies where a rule sets one, and checked actions that no rule matches need approval.

Path patterns#

PatternMatches
**Any number of folders. dir/** also matches dir itself.
*Anything within one folder name
?One character
*.pemA pattern without a slash matches the file name only, in any folder
~, %USERPROFILE%, %APPDATA%, %LOCALAPPDATA%, %PROGRAMDATA%Expanded for the user the agent runs as

Use forward or back slashes; matching ignores case. Paths are compared the way Windows resolves them: .. and . are resolved, symbolic links, junctions and 8.3 short names are followed, and administrative shares, \\?\ prefixes, data streams and trailing dots are handled. Shell commands are also checked as the files they name.

The default policy#

New installs start with these rules, in this order. Edit or extend them like any other rule.

RuleVerdictProtects
protect-vardhold-filesblockVardhold's own policy, data and program files
protect-agent-hooksblockThe hook registrations that let Vardhold check agents
protect-vardhold-serviceblockThe Vardhold service, against being stopped, reconfigured or removed by an agent
protect-ssh-keysblockSSH keys and cloud, Kubernetes, Docker, git and npm credentials (not public keys or the known-hosts list)
protect-credential-filesblockReading tokens and credential stores: GitHub CLI, .netrc, PyPI, GnuPG, Kubernetes, gcloud, OCI, Terraform, Vault, Cargo, RubyGems, Databricks, pass, and Windows' own credential and DPAPI folders
token-printing-commandsaskCommands that print a token or stored credential: gh auth token, az account get-access-token, gcloud auth print-access-token, aws configure get, kubectl config view --raw, git credential fill and similar
protect-browser-datablockBrowser profiles: cookies and saved passwords
credential-managerblockWindows Credential Manager and credential-dumping tools
env-and-keys-outside-projectask.env files and private keys outside the current project (not templates such as .env.example)
build-folder-cleanuplogLets a plain delete of build and dependency folders by name (node_modules, bin, obj, dist, ...) through without asking
confirm-recursive-deleteaskRecursive deletes, disk formatting and git history rewrites
persistence-autorunaskAutorun registry keys, scheduled tasks and moving git's hooks folder (core.hooksPath)
download-and-runaskDownloading a script and running it at once: curl … | sh, irm … | iex, bash <(curl …), mshta URLs, certutil and bitsadmin downloads
code-that-runs-lateraskWriting files that run code later: git hooks (not the *.sample files), .gitconfig, VS Code tasks and settings, bash and PowerShell profiles, the Startup folders
mcp-config-filesaskChanging the MCP server configs of Cursor, Claude Desktop, VS Code, Codex, Windsurf, project .mcp.json files and installed Claude Code plugins (not Claude Code's plugin catalog, which it refreshes on its own and nothing loads)
defender-tamperingblockWindows Defender and the firewall, against being turned off
first-contact-egresslog + alertAn agent contacting a host it has never contacted before (ask in strict mode)
mcp-shell-toolsaskMCP tools that run arbitrary shell commands
agent-housekeepinglogAgent tools that only plan, track or talk to the person (to-do lists, sub-agents, questions)
web-searchlogWeb searches (pages opened afterwards are checked as connections)
read-only-commandslogSingle commands that only look: git status, git log, git diff, listings, reading and searching files, version checks
project-worklogReading and editing inside the current project

Ask rules in the default policy wait 60 seconds and then block.

The log rules at the end describe routine work. In enforce mode they only record it; in strict mode they are what runs without approval, while anything no rule matches is asked about. The build-folder and read-only rules match only a single plain command: no paths outside the working folder, quotes, wildcards, chaining, pipes, redirection or substitution. Anything else falls through to the rules that ask. The files a command names are still checked, so cat ~/.ssh/id_rsa is still blocked.

Vardhold reads a command's files the way the shell will: relative names after a cd (cd ~/.ssh && cat id_rsa), Git Bash and WSL drive paths (/c/Users/…, /mnt/c/Users/…), @file arguments (curl -d @file) and the cmd, PowerShell and bash names for the profile folders (%USERPROFILE%, $env:USERPROFILE, ${env:HOME}, $HOME). A path with wildcards meets a rule when it could name a file the rule covers, so cat ~/.ss*/id_* is blocked; a lone * at the end (ls ~/*) stands for the folder's contents and is not read as naming a protected file. Paths built at run time (string concatenation, Join-Path, variables the command sets itself) are not followed; telemetry still records what the command then touches.