Command activity tracking
Command activity is local evidence that Guard checked a command. It records the decision, the rule that drove it, and whether the harness later confirmed the command ran. It is not a threat feed. A rule match, a policy decision, and proof of execution are three separate facts, and Guard keeps them separate.
Activity is stored on your machine. Nothing leaves it unless you opt in to daily aggregate counts, described under Privacy model.
What one activity row meansDirect link to What one activity row means
Each command evaluation produces one activity row. The row starts as an attempt before the command runs, then ends in one of these states:
| Run result | Dashboard label | Meaning |
|---|---|---|
prevented | Prevented before execution | Guard stopped the command. This state is final. |
allowed_unconfirmed | Result not recorded | Guard allowed the command. The harness gave no matching post-execution evidence, so Guard cannot tell whether it ran or finished. |
confirmed_success | Execution confirmed successful | The harness reported a matching post-execution result and it succeeded. |
confirmed_failure | Execution confirmed failed | The harness reported a matching post-execution result and it failed. |
unpaired_post | Execution observed; initial decision unavailable | A post-execution event arrived with no matching request. Guard does not invent a decision for it. |
A row can only move from allowed_unconfirmed to a confirmed state when the harness supplies a native, unpredictable request identifier that ties the post-execution event to the original check. Harnesses without strong post-execution evidence stay allowed_unconfirmed. Conflicting or out-of-order updates are rejected rather than merged.
Operations that only inspect, such as hol-guard command test, do not create activity.
A command that matches several rules still produces one row, with an ordered list of rule matches attached. An ordinary command that matches no rule has no matches and names no controlling rule.
Privacy modelDirect link to Privacy model
The core activity record stores bounded, typed facts: canonical harness name, phase, status, action, bounded reason code, parse confidence, prompt and approval-reuse state, latency buckets, and the identity and version of the built-in extension and rule that matched. It does not store:
- Raw or normalized command text, arguments, redirects, or heredocs.
- Paths, working directories, repository names, remotes, hosts, or URLs.
- Package names, environment variable names or values, credentials, or tokens.
- Raw harness request or session identifiers, installation identifiers, or device identifiers.
Two things sit beside the core row and stay local:
- Redacted invocation preview. The dashboard shows a redacted form of the command so you can see what Guard checked. Secrets, tokens, private paths, URLs, emails, secret-bearing environment assignments, and heredoc bodies are removed. The preview is not part of cloud aggregates, analytics, or hook journals. When no preview exists, the dashboard shows "Command not recorded".
- Correlation handles. To pair a post-execution event with its request, Guard keeps a keyed hash of the harness-supplied identifier, using a per-installation random key. The raw identifier is not stored. Handles are pseudonymous and never leave the machine.
The default egress mode is local_only. A separate aggregate_only mode, which you must opt in to, allows Guard Cloud to receive daily counts. Each record holds a UTC day, one dimension, one value, and a count. The dimensions are total, harness, built-in extension, built-in rule, disposition, execution status, prompt status, proof level, and latency bucket. Counts below a fixed threshold are not sent. Cloud payloads carry no per-command rows, activity or receipt identifiers, exact timestamps, or free text.
A failure to record or aggregate activity never changes what Guard enforces. If the evidence store has trouble, the dashboard reports degraded evidence health and counts may be incomplete, but the command is still allowed or blocked by policy as usual.
Where to read it in the dashboardDirect link to Where to read it in the dashboard
Command activity appears in three places in the local dashboard:
- Evidence, Commands. Open Evidence and choose the Commands tab (
/evidence?view=commands). It shows a summary, a filterable list, and a detail panel. It stays available even when you have no receipts, because activity and receipts are recorded independently. - Per-app activity. Open an app, choose the Activity tab, then Command protection (
/apps/<harness>?tab=activity&activity=commands). The list is filtered to that app. The other two modes on that tab are Recorded actions and Pending reviews. - Home. A Commands checked card shows the count for the current window, review prompts, and post-execution proof. It appears only when the count is above zero, and it never reports zero checks while data is loading or unavailable.
The summary shows these metrics, all scoped to the selected window:
| Metric | What it counts |
|---|---|
| Commands checked | One per recorded activity row. |
| Review prompts | Rows where Guard asked for a decision. |
| Run results recorded | Rows with matching post-execution evidence, and the share of all checks that is. |
| Result not recorded | Allowed rows with no matching result. |
It also ranks top extensions and top rules by frequency. These are counts, not danger scores. When a filter narrows the list, metrics that cannot be filtered show "Global only" instead of a misleading number.
Filters are App, Extension, Rule, Run result, Proof source, Interaction, and Authorization reuse. Filter and selection state lives in the URL, so a filtered view can be reopened or shared as a link on the same machine.
The detail panel shows the decision and the run result as separate fields. It also shows the proof source, whether Guard asked for review, the decision reason, how confidently the command was parsed, whether an earlier approval was evaluated for reuse, and each rule that matched with its policy floor and effect classes (for example sensitive read, network write, or package installation).
The detail panel also has two feedback buttons, Should not have interrupted and Expected Guard to stop this. Feedback is saved to local evidence next to that row. It does not change policy. To change behavior, adjust a preset, a rule, or a saved approval.
If the evidence store is damaged, the Commands tab offers Repair evidence. Clearing command evidence uses the same confirmation flow as other high-risk actions.
CLI inspectionDirect link to CLI inspection
The command subcommands inspect how Guard classifies a command without running it.
hol-guard command test 'git push --force'
hol-guard command explain 'grep "rm -rf" README.md'
Both print the result for one command: the action class, the matching extension and rule, the risk classes, why it was classified that way, and safer alternatives where a rule offers them. explain adds an evaluation trace that lists each step and its result. The command is parsed and never executed. Quote the command so your shell passes it as one argument. Add --json for scripts.
Guard asks its local daemon to do the inspection and starts the daemon if it is not running. If the daemon cannot be reached, the output says native inspection is unavailable and the exit code is 2. The output states that policy was not evaluated: it shows what the built-in rules found, not the decision your presets and saved approvals would produce, and it creates no approvals or receipts.
hol-guard command extensions
hol-guard command extensions <extension-id>
hol-guard command setup --detect --workspace .
extensions lists the built-in command safety extensions with their version and rule count, or details one. setup --detect looks at the workspace for command ecosystems and marks each as recommended, available, or not detected. --workspace defaults to the current directory. Detection is read-only and changes no settings.
hol-guard command controls manages extension permissions and local authority. See Managed controls and extensions.
How compound commands are checkedDirect link to How compound commands are checked
Guard parses chains (&&, ;), pipes, wrappers, and redirects, and evaluates the whole command. Every segment's evidence is kept, and the strongest minimum action controls the result. A safe first segment does not hide a destructive later one.
When Guard cannot fully parse a command and sees sensitive or destructive evidence in it, the minimum action is review.
How extension rules set a floorDirect link to How extension rules set a floor
Built-in command extensions contribute evidence and a minimum action. They never grant an allow and never override your policy.
| Rule type | Rule mode | Minimum action |
|---|---|---|
| Optional | disabled | allow |
| Optional | monitor | monitor (record only) |
| Optional | review | review |
| Optional | enforce | block |
| Required, any of low, medium, high | any | at least review |
| Required, critical | any | block |
Required rules ship with Guard. Local and managed configuration cannot mark a rule as required, and cannot add a safe variant to one. A saved approval is evaluated after extension evidence and cannot weaken a required floor. Workspace and managed policy can keep or raise the floor.