You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3b96502
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/automation/cron-jobs.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -324,6 +324,29 @@ Agent-turn jobs default to the creating conversation when the create request car
324
324
|`webhook`| POST finished event payload to a URL |
325
325
|`none`| No runner fallback delivery |
326
326
327
+
<Warning>
328
+
Every outbound automation webhook uses the strict SSRF guard. Loopback,
329
+
private/internal, link-local, and other special-use targets are refused by
330
+
default for primary delivery, completion and failure destinations, and
331
+
failure-alert webhooks.
332
+
333
+
Allow only the receiver you trust with an exact hostname or IP exemption:
334
+
335
+
```json5
336
+
{
337
+
cron: {
338
+
webhookSsrfPolicy: {
339
+
allowedHostnames: ["127.0.0.1"],
340
+
},
341
+
},
342
+
}
343
+
```
344
+
345
+
Use `dangerouslyAllowPrivateNetwork: true` under `webhookSsrfPolicy` only when
346
+
every configured automation webhook may reach trusted private-network
347
+
services. Leaving the policy unset keeps strict behavior.
348
+
</Warning>
349
+
327
350
Use `--announce --channel telegram --to "-1001234567890"` for channel delivery. For Telegram forum topics, use `-1001234567890:topic:123`; OpenClaw also accepts the Telegram-owned `-1001234567890:123` shorthand. Direct RPC/config callers may pass `delivery.threadId` as a string or number. Slack/Discord/Mattermost targets use explicit prefixes (`channel:<id>`, `user:<id>`). Matrix room IDs are case-sensitive; use the exact room ID or `room:!room:server` form from Matrix.
328
351
329
352
On hosts with multiple configured channels, isolated announce jobs created with `automations add|create` or changed with `automations edit` must set `--channel <id>` unless a provider-prefixed `--to` or a preserved session route selects the channel. Use `--best-effort-deliver` only when unresolved fallback delivery is acceptable; it does not choose a channel, and a delivery failure does not fail the job.
`openclaw automations create` is an alias for `openclaw automations add`. New jobs can use a positional schedule (`"0 9 * * 1"`, `"every 1h"`, `"20m"`, or an ISO timestamp) followed by a positional agent prompt. Use `--webhook <url>` on `automations add|create` or `automations edit` to POST the finished run payload to an HTTP endpoint; webhook delivery cannot combine with chat delivery flags (`--announce`, `--channel`, `--to`, `--thread-id`, `--account`). On `automations edit`, `--clear-channel`, `--clear-to`, `--clear-thread-id`, and `--clear-account` unset those routing fields individually (each rejected alongside its matching set flag) — distinct from `--no-deliver`, which only disables runner fallback delivery.
476
499
500
+
The webhook URL remains subject to the strict outbound policy above; configure `cron.webhookSsrfPolicy` for an intentional local or private receiver.
501
+
477
502
<Note>
478
503
Model override note:
479
504
@@ -747,6 +772,9 @@ Use the latest-generation, best-tier model available from your provider for untr
allowedHostnames: ["127.0.0.1"], // optional exact exception for a trusted receiver
777
+
},
750
778
sessionRetention:"24h",
751
779
},
752
780
}
@@ -755,6 +783,9 @@ Use the latest-generation, best-tier model available from your provider for untr
755
783
`webhookToken` is sent as `Authorization: Bearer <token>` on automation webhook POSTs.
756
784
Webhook URLs must not include embedded username/password credentials; use
757
785
`webhookToken` when the receiver supports bearer authentication.
786
+
`webhookSsrfPolicy` applies to every outbound automation webhook and is strict
787
+
when omitted. Prefer narrow `allowedHostnames` entries over the broad
788
+
`dangerouslyAllowPrivateNetwork` opt-in.
758
789
759
790
Automation jobs, run history, and quarantined malformed jobs live in the shared SQLite state database. Use the CLI or Gateway API to change jobs; `cron.store` is retired.
Copy file name to clipboardExpand all lines: docs/gateway/configuration-reference.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1457,6 +1457,9 @@ Current builds no longer include the TCP bridge. Nodes connect over the Gateway
1457
1457
enabled:true,
1458
1458
},
1459
1459
webhookToken:"replace-with-dedicated-token", // optional bearer token for outbound webhook auth
1460
+
webhookSsrfPolicy: {
1461
+
allowedHostnames: ["127.0.0.1"], // optional exact exception for a trusted receiver
1462
+
},
1460
1463
sessionRetention:"24h", // duration string or false
1461
1464
},
1462
1465
}
@@ -1467,9 +1470,10 @@ Current builds no longer include the TCP bridge. Nodes connect over the Gateway
1467
1470
-`sessionRetention`: how long to keep completed isolated automation run sessions before pruning SQLite session rows. Also controls cleanup of archived deleted automation transcripts. Default: `24h`; set `false` to disable.
1468
1471
- Run history automatically keeps the newest 2000 terminal rows per job. Lost rows retain their 24-hour cleanup window.
1469
1472
-`webhookToken`: bearer token used for automation webhook POST delivery (`delivery.mode = "webhook"`), if omitted no auth header is sent.
1473
+
-`webhookSsrfPolicy`: shared outbound SSRF policy for primary, completion, failure-destination, and failure-alert webhooks. Private/internal targets are blocked when omitted. Prefer exact `allowedHostnames`; use `dangerouslyAllowPrivateNetwork: true` only for trusted private-network receivers. The narrow fake-IP proxy flags are `allowRfc2544BenchmarkRange` and `allowIpv6UniqueLocalRange`.
1470
1474
1471
1475
The `cron` block is strict; `cron.enabled`, `cron.triggers`, `cron.webhookToken`,
1472
-
`cron.sessionRetention`, and `cron.failureAlert` are the only accepted keys. The
1476
+
`cron.webhookSsrfPolicy`, `cron.sessionRetention`, and `cron.failureAlert` are the only accepted keys. The
1473
1477
retired `cron.webhook` fallback URL is gone: runtime delivery uses per-job
1474
1478
`delivery.mode = "webhook"` plus `delivery.to`, or `delivery.completionDestination`
1475
1479
when preserving announce delivery. `openclaw doctor --fix` strips a leftover
@@ -332,6 +333,8 @@ main model can read the screenshot directly.
332
333
- OpenClaw-managed local CDP readiness probes and DevTools WebSocket connections bypass the managed network proxy for the exact launched loopback endpoint, so `openclaw browser start` still works when an operator proxy blocks loopback egress.
333
334
- To proxy the managed browser itself, pass explicit Chrome proxy flags through `browser.extraArgs`, such as `--proxy-server=...` or `--proxy-pac-url=...`. Strict SSRF mode blocks explicit browser proxy routing unless private-network browser access is intentionally enabled.
334
335
-`browser.ssrfPolicy.dangerouslyAllowPrivateNetwork` is off by default; enable only when private-network browser access is intentionally trusted.
336
+
-`browser.ssrfPolicy.allowedHostnames` grants exact hosts while the rest of the private network remains blocked.
337
+
-`browser.ssrfPolicy.allowRfc2544BenchmarkRange` and `browser.ssrfPolicy.allowIpv6UniqueLocalRange` narrowly allow trusted fake-IP proxy ranges.
335
338
-`browser.ssrfPolicy.allowPrivateNetwork` remains supported as a legacy alias.
allowRfc2544BenchmarkRange:true, // opt-in for trusted fake-IP proxies using 198.18.0.0/15
110
112
allowIpv6UniqueLocalRange:true, // opt-in for trusted fake-IP proxies using fc00::/7
111
113
},
@@ -256,6 +258,8 @@ outbound policy after DNS resolution.
256
258
- Response body is capped at `maxResponseBytes` (default `750000`, clamped to
257
259
32000-10000000) before parsing; oversized responses are truncated with a warning
258
260
- Private/internal hostnames are blocked
261
+
-`tools.web.fetch.ssrfPolicy.allowedHostnames` allows exact trusted hosts while leaving other private/internal targets blocked
262
+
-`tools.web.fetch.ssrfPolicy.dangerouslyAllowPrivateNetwork` broadly permits private-network targets; enable it only when model-selected URLs are trusted in this deployment
259
263
-`tools.web.fetch.ssrfPolicy.allowRfc2544BenchmarkRange` and
260
264
`tools.web.fetch.ssrfPolicy.allowIpv6UniqueLocalRange` are narrow opt-ins
261
265
for trusted fake-IP proxy stacks; leave them unset unless your proxy owns
0 commit comments