> ## Documentation Index
> Fetch the complete documentation index at: https://docs.provenlog.com/llms.txt
> Use this file to discover all available pages before exploring further.

# plog policy

> Run compliance policy checks

`plog policy` runs compliance checks against your audit trail.

## Usage

```bash theme={null}
plog policy check
plog policy check --file policies.yaml
plog policy check --file policies.yaml --policy my-policy
plog policy test --file policies.yaml
```

## Subcommands

### `plog policy check`

Run policy checks against the audit trail:

```bash theme={null}
# Run 5 built-in checks
plog policy check

# Run custom YAML policies
plog policy check --file policies.yaml

# Run one specific policy from a file
plog policy check --file policies.yaml --policy my-policy
```

**Flags:**

| Flag       | Default                  | Description                                         |
| ---------- | ------------------------ | --------------------------------------------------- |
| `--file`   | —                        | Path to custom YAML policy file (omit for builtins) |
| `--policy` | —                        | Run only this named policy from the file            |
| `--db`     | `~/.provenlog/events.db` | Local SQLite database path                          |

### `plog policy test`

Dry-run custom policies against historical events:

```bash theme={null}
plog policy test --file policies.yaml
```

**Flags:**

| Flag     | Default                  | Description                                   |
| -------- | ------------------------ | --------------------------------------------- |
| `--file` | —                        | **Required.** Path to custom YAML policy file |
| `--db`   | `~/.provenlog/events.db` | Local SQLite database path                    |

See [Policy Engine](/features/policy-engine) for details on built-in policies and custom rule types.
