ankos watch
Continuously re-scan your environment on a schedule and post an alert when PCI posture drifts. A long-running local daemon — the non-CI counterpart to ankos drift.
ankos watch runs continuous PCI monitoring locally. On a schedule, it
re-scans the same scope as a baseline directory, compares the result
against it, and posts an alert whenever posture regresses — a new
degradation or lost coverage. It's the long-running counterpart to
scheduling ankos drift from cron or CI: for
teams that prefer a daemon to a CI scheduler.
Like drift, the provider, region/scope, and collectors are inferred from
the baseline, so it works for AWS, GCP, GitHub, Okta, Entra, and Kubernetes
baselines alike.
Read-only and signal-only. watch only ever reads your infrastructure, and its alerts state evidence-readiness signal ("N items need attention"), never a pass/fail verdict — the determination stays with your QSA.
Synopsis
ankos watch <baseline-dir> [flags]You must give it a cadence: --schedule (cron), --interval (a duration),
or --once (a single cycle).
Quick start
# Re-scan every night at 02:00 and alert Slack on regression
ankos watch ./ankos-evidence-baseline \
--schedule "0 2 * * *" \
--webhook "$SLACK_WEBHOOK_URL"
# Re-scan every 12 hours and refresh the Ledger each run
ankos watch ./ankos-evidence-baseline --interval 12h --upload
# Run a single cycle and exit with a CI-style code (useful for testing)
ankos watch ./ankos-evidence-baseline --once --fail-on anyFlags
| Flag | Default | Description |
|---|---|---|
--schedule | (none) | Cron schedule (standard 5-field), e.g. "0 2 * * *". |
--interval | (none) | Run every interval instead of a cron schedule (a Go duration, e.g. 12h). Minimum 1m. |
--once | false | Run a single cycle and exit instead of looping. |
--region | (from baseline) | Region to scan (AWS baselines). Defaults to the region recorded in the baseline. |
--profile | (none) | AWS profile to use (AWS baselines). |
--upload | false | Upload fresh evidence to the Ankos Ledger each run, so the watcher doubles as continuous evidence collection. |
--fail-on | (none) | In --once mode only, exit non-zero on drift: any, critical, or high. |
--webhook | (none) | Webhook URL to alert on a regression. A Slack incoming-webhook URL is posted as a Slack message; any other URL receives a generic JSON payload. |
--notify | (none) | Alias for --webhook. |
Use exactly one of --schedule or --interval (or --once on its own).
Cadence
--scheduletakes a standard 5-field cron expression and runs at each matching time. Use it for calendar-aligned monitoring ("every night at 02:00", "every Monday at 06:00").--intervaltakes a Go duration (30m,6h,12h) and runs that often from when you start it. The minimum interval is1m.--onceruns a single cycle and exits. Combined with--fail-on, this gives you a CI-style exit code — handy for testing a watch configuration or wiring one cycle into a pipeline.
The daemon prints the next run time before each cycle. Stop it with
Ctrl-C.
Alerting
When posture regresses, watch posts an alert to the configured --webhook
(alias --notify). A Slack incoming-webhook URL (hooks.slack.com/...) is
rendered as a Slack message; any other URL receives the same alert as a
generic JSON payload, so it works with a custom endpoint or a relay.
Nothing is sent unless a webhook is configured, and a delivery failure is
logged but never crashes the daemon.
As a long-running watcher, the daemon keeps running past a regression
rather than exiting on the first one — the alert is the signal. To gate a
build on drift instead, use --once --fail-on … (or schedule
ankos drift from CI).
watch vs. drift
ankos drift | ankos watch | |
|---|---|---|
| Model | One-shot comparison | Long-running daemon |
| Cadence | Your CI/cron scheduler runs it | Built-in --schedule / --interval |
| On regression | Exits (honoring --fail-on) | Alerts and keeps watching |
| Best for | CI pipelines, gated builds | An always-on monitor outside CI |
Both infer the provider and scope from the baseline, both support
--webhook and --upload, and both are read-only. Pick drift when a
scheduler already runs your jobs; pick watch when you want a single
long-running process to own the cadence.
Exit codes
| Code | Meaning |
|---|---|
0 | The watch stopped cleanly (Ctrl-C), or a --once cycle found no regression at the --fail-on threshold |
1 | Setup error — invalid --schedule / --interval, missing baseline, or all collectors failed a cycle |
2 | --once with --fail-on and the regression met the threshold |
ankos drift
Detect PCI posture drift by comparing the current state against a previously collected evidence baseline. Works across every provider, CI/CD-friendly, with severity-based exit codes.
ankos docs
Generate Word policy documents pre-filled with your AWS infrastructure data. All 10 templates are free — encryption, access control, logging, vulnerability management, incident response, and more.

