Skip to content

Apply per-path crawler rules from WebDecoy Cloud (#995) - #95

Merged
cport1 merged 1 commit into
mainfrom
feat/995-cloud-policy
Sep 23, 2026
Merged

cport1 merged 1 commit into
mainfrom
feat/995-cloud-policy

Conversation

@cport1

@cport1 cport1 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

WordPress joins the policy loop (WebDecoy/app#995).

  • sdk/src/RouteResolution.php: PHP port of the shared route resolution; tests/RouteResolutionTest.php replays all 57 vectors from pkg/models/testdata/route_resolution_vectors.json (copied verbatim under tests/vectors/), so Go, the Worker, the Lambda and this plugin cannot disagree.
  • BotDetector takes a cloud_policy option and, after the local setting, asks the resolution what the covering paths refuse for the crawler's registry behavior. Enforce: refused (crawler_refused, score 100, denied_by: cloud_policy, pattern/behavior/assurance in metadata). Watched path or monitoring site: crawler_would_be_refused, crawler passes.
  • WebDecoy_Cloud_Policy: fetches in.webdecoy.com/api/v1/clearance/config?aid=<org>&host=<home host> on connect and on the entitlements cron, keeps only the policy fields, refuses to apply a copy older than two days, cleared on disconnect and uninstall. The settings page says what is applied and how fresh it is.
  • Precedence is written once at the top of that class and in the changelog: cloud rules can only refuse; Block AI crawlers is site-wide and unchanged; the custom allowlist does not override a cloud path rule; the plugin's monitor mode still gates every block.
  • Assurance: acts on the User-Agent claim (assurance: claimed), which refuses nobody who is not making the claim.

Not in this PR: the dashboard's outcome ledger still counts edge-reported outcomes only; WordPress refusals arrive as detections carrying the flag and metadata above.

Needs a release after merge (2.9.0).

A connected site now reads its enforcement policy (mode, protected paths,
per-path crawler refusals) from the same public config the edge sensor
reads, keyed by organization and hostname, and applies it with a PHP port
of the shared route resolution that replays all 57 cross-implementation
vectors. A crawler of a refused kind on a covered path is refused in
Enforce and counted on a watched path or a monitoring site; off-path and
excepted requests are untouched.

Precedence: cloud rules can only refuse; Block AI crawlers still refuses
site-wide; the custom allowlist exempts from the local setting only; the
plugin's monitor mode gates every block. Refreshed on the entitlements
cron, shown under the AI Crawlers setting, not applied when older than two
days.
@cport1
cport1 merged commit c32d566 into main Sep 23, 2026
4 checks passed
@cport1 cport1 mentioned this pull request Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant