Urgent.News

What's breaking now, across thousands of outlets.

AI

Building a Read-Only Cloudflare Worker AI Security Console

Why build this Security teams already have WAF events, bot signals, access logs, and SIEM pipelines. The problem is not always data collection. The problem is turning that data into a fast, readable operational view without giving a model unsafe authority. This implementation uses a Cloudflare Worker as the control layer and Workers AI as the summarization layer. The Worker is deliberately…

Security teams already possess various tools such as WAF events, bot signals, access logs, and SIEM pipelines. However, the challenge lies in converting that data into a quick, easily digestible operational view without granting the AI model excessive authority. This solution employs a Cloudflare Worker as the control layer and Workers AI as the summarization layer.

The Worker is designed to be read-only, supporting four workflows: natural language security queries, an approved query catalogue for sanctioned analyst questions, an AI Security Posture Digest, and Ray ID / Request Investigator. For the purpose of demonstration, the example environment will be example.com.dev. Please refrain from considering this a real environment.

The underlying principle is that the model should not act as an administrator. The Worker is responsible for authentication, zone allowlist, fixed GraphQL queries, secret handling, HTML rendering, and audit logging. Workers AI handles intent classification when deterministic matching is insufficient, security posture summarization, and Ray ID explanation. This distinction is crucial as it prevents the model from generating arbitrary queries or performing Cloudflare write actions, thereby making the tool easier to govern.

The high-level architecture flowchart includes a security analyst, Cloudflare Access, a sentinel-cf Worker, scope and input validation, Cloudflare Analytics GraphQL, Workers AI via AI Gateway, normalized metrics, a summary or explanation, and an HTML report. The Worker can perform the following workflows: natural language security queries, querying an approved query catalogue, generating a security digest, investigating a Ray ID, and checking health. These actions are strictly limited to prevent unauthorized actions.

The Worker must not block IPs automatically, create WAF rules, disable managed rules, alter Access policies, query arbitrary zones, store secrets in the source code, or treat AI output as formal incident evidence. The recommended production pattern is to allow the AI to recommend actions, have humans approve, and then apply changes via Terraform or approved change control.

To implement this Security Console, the following components are required: Cloudflare Workers, Cloudflare Access, Workers AI binding named AI, AI Gateway, Cloudflare Analytics GraphQL access, and Workers KV namespace for scheduled digest storage. An optional Cron Trigger can be used for scheduled reports. The deployment of this Worker can be managed through Terraform using cloudflare_worker, cloudflare_worker_version, and cloudflare_workers_deployment modules. Worker code can be stored in a content_file to avoid cluttering the Terraform state.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Best AI Stocks

The post Best AI Stocks by Dan Schmidt appeared first on Benzinga . Visit Benzinga to get more great content like this. Artificial intelligence has been a scorching hot investment trend during this bull market run.

More from Tuesday 25 August →