Skip to content

Policy Schema Reference

Complete field reference for Sigil security policy YAML. Use this to generate or validate policy files.

Drop .yml files into the Sigil policy directory. Sigil watches it and reloads any change automatically.

OSPath
macOS~/Library/Application Support/Sigil/policy/
Windows%LOCALAPPDATA%\Sigil\policy\
Linux$XDG_DATA_HOME/Sigil/policy/ (or ~/.local/share/Sigil/policy/)

In the Sigil app, the Security tab → Open Policy Directory opens this folder in the system file manager.

version: "1" # optional
description: "..." # optional, human-readable description of this policy
network: # optional, network request interception rules
deny: [...] # optional, deny rules (implicit deny-all if omitted with allow present)
allow: [...] # optional, exception rules
actions: # optional, agent action restrictions
deny: [...] # optional, block specific actions
allow: [...] # optional, allow only specific actions
FieldTypeRequiredDescription
versionstringNoPolicy schema version. Currently "1".
descriptionstringNoHuman-readable description of what this policy does.
networkobjectNoNetwork request interception rules.
actionsobjectNoAgent action restrictions.

At least one of network or actions must contain rules. A policy with only metadata is rejected.

FieldTypeRequiredDescription
denylist of rulesNoRules that block matching requests. If omitted but allow is present, all requests are denied by default.
allowlist of rulesNoException rules that override deny matches. At least one of deny or allow is required.

Controls which actions the agent can perform. Deny rules are checked first; allow rules act as exceptions (same evaluation logic as network rules). If allow rules exist but no deny rules, an implicit deny-all (*) is inserted.

FieldTypeRequiredDescription
denylist of stringsNoActions to block. "*" matches all actions.
allowlist of stringsNoException list — actions allowed even if denied.

Validation rules:

  • Action names are case-insensitive (lowercased on load).
  • Unknown action names are rejected at load time.

Valid action names: open, snapshot, click, type, key, back, forward, reload, eval, select, extract, tab, wait, upload, hover, tabs, scroll.

The action policy is not consulted for tabs, tab, and snapshot.

Each rule in deny or allow. All specified fields must match (AND logic). Multiple rules in a list use OR logic — first match wins. If a field is omitted, it matches anything.

FieldSyntaxMatched AgainstDescription
methodRegex (case-insensitive)HTTP method (r.Method)Example: "POST|PUT|DELETE|PATCH"
hostCDP wildcardParsed URL host (r.URL.Host)Includes port if present. Example: "*api.example.com"
pathRegexParsed URL path (r.URL.Path)Example: "/sync", "^/api/", "/(users|accounts)"
queryRegexParsed URL query string (r.URL.RawQuery)Example: "action=delete", "action=(delete|archive)"
headerRegexSerialized request headersHeaders in wire format: "Name: Value\r\n" per header. Header names use Go canonical form (e.g. Content-Type, Authorization). Example: "Authorization:.*Bearer"
bodyRegexRequest bodyExample: "delete|archive"

The host field uses CDP wildcard syntax, not regex:

PatternMeaning
*Matches any sequence of characters (zero or more)
?Matches exactly one character
No wildcardsExact match

All fields except host use Go regexp syntax. method is automatically case-insensitive ((?i) prefix). All other regex fields are case-sensitive — add (?i) to your pattern if needed.

Regex fields use substring matching by default. Use ^ and $ anchors for exact matching:

PatternBehavior
/syncMatches any path containing /sync (e.g. /sync, /sync/data, /old/sync)
^/syncMatches paths starting with /sync
^/sync$Matches exactly /sync

Each field is matched against the parsed URL component, not the raw URL string. The request URL is parsed with Go’s url.Parse(), then:

  • host matches against URL.Host (includes port if present)
  • path matches against URL.Path
  • query matches against URL.RawQuery
  1. If no deny rules are specified but allow rules exist, requests are denied unless they match an allow rule.
  2. Check deny rules. No match → allowed (default pass-through).
  3. Deny matched → check allow rules. Match → allowed (exception overrides deny).
  4. Deny matched, no allow exception → denied.
network:
deny:
- method: "POST|PUT|DELETE|PATCH"
network:
deny:
- host: "*evil.example.com"

Block writes to an API with a login exception

Section titled “Block writes to an API with a login exception”
network:
deny:
- method: "POST"
host: "*api.example.com"
allow:
- method: "POST"
host: "*api.example.com"
path: "/login"
network:
deny:
- host: "*api.example.com"
path: "/sync"
body: "delete|archive"
allow:
- host: "*api.example.com"
path: "/sync"
body: "read"
network:
deny:
- header: "Authorization:.*Bearer"
network:
deny:
- method: "DELETE"
host: "*api.example.com"
path: "^/api/(users|accounts)"
network:
allow:
- host: "*.example.com"
- host: "docs.google.com"
network:
deny:
- host: "*api.example.com"
query: "action=(delete|archive)"
actions:
deny:
- eval

Read-only agent (observe but don’t interact)

Section titled “Read-only agent (observe but don’t interact)”
actions:
deny: ["*"]
allow:
- extract

The deny: ["*"] is optional here — it is inserted implicitly when only allow is specified. snapshot, tabs, and tab do not need to be listed because they bypass the action policy.

network:
allow:
- host: "*.example.com"
actions:
deny:
- eval

When a network request is blocked:

request blocked by policy: POST https://api.example.com/sync (rule: host=*api.example.com path=/sync body=delete|archive)

When an action is blocked:

action "eval" is blocked by policy