Dawnstar Labs Vardhold Docs

Policy reference

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

4 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.
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 working folder. false: inside it.
command_regexA regular expression (case-insensitive) tested against the command line
hostHost names for net.connect, with * wildcards: *.github.com
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
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
confirm-recursive-deleteaskRecursive deletes, disk formatting and git history rewrites
persistence-autorunaskAutorun registry keys and scheduled tasks
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
project-worklogReading and editing inside the current project

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