惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
L
LangChain Blog
C
Check Point Blog
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
美团技术团队
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
博客园 - 叶小钗
腾讯CDC
B
Blog
G
Google Developers Blog
The Cloudflare Blog
P
Proofpoint News Feed

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Your AI Agent Can Delete Your DNS Records
PolicyLayer · 2026-06-16 · via DEV Community

PolicyLayer

Your AI agent just deleted the A record for your production domain. It was trying to "clean up stale DNS entries" after you asked it to audit your Cloudflare zone. Thirty seconds later, your site is unreachable. Customers see nothing. Your uptime monitor fires. And the agent has already moved on to the next record.

DNS propagation means even after you recreate the record, some resolvers won't see it for hours. One tool call, minutes of downtime, and there's no undo button.

What the Cloudflare MCP server exposes

Cloudflare's official MCP server gives agents access to 30 tools spanning DNS, Workers, KV, R2, D1, and zone management. The read operations are harmless — listing zones, querying Workers observability, searching documentation. The dangerous ones:

  • dns_records_delete — removes DNS records from a zone
  • dns_records_create and dns_records_update — modify your DNS configuration
  • workers_create_worker and workers_delete_worker — deploy or destroy Workers
  • zones_create and zones_update — create and modify zones
  • kv_namespace_delete, r2_bucket_delete, d1_database_delete — destroy storage

MCP provides no built-in controls. Every tool is available, every call goes straight through.

Block deletions, rate limit everything else

Intercept sits between your agent and the Cloudflare MCP server. Every tools/call is evaluated against a YAML policy before it reaches Cloudflare. Violating calls are blocked and the agent receives a clear denial message — not a silent failure.

The first thing to lock down: DNS deletions. There is almost never a reason for an AI agent to delete a DNS record. Block it outright:

version: "1"
description: "Policy for cloudflare/mcp-server-cloudflare"
default: "allow"
tools:
    dns_records_delete:
        rules:
            - name: "block dns deletion"
              action: "deny"
              on_deny: "DNS record deletion is not permitted via AI agents. Delete records manually in the Cloudflare dashboard."

The action: "deny" rule is unconditional. No rate limit, no conditions — the tool is simply unavailable. The agent gets back the on_deny message and can tell the user to handle it manually.

For tools that agents legitimately need, rate limits prevent runaway loops. DNS creates and updates are capped at 10 per hour. Worker deployments and zone changes get 5 per hour — tight enough to stop a misfiring agent, generous enough for real work:

    dns_records_create:
        rules:
            - name: "rate limit dns creates"
              rate_limit: 10/hour
              on_deny: "DNS record creation rate limit reached (10/hour). Try again later."
    dns_records_update:
        rules:
            - name: "rate limit dns updates"
              rate_limit: 10/hour
              on_deny: "DNS record update rate limit reached (10/hour). Try again later."
    workers_create_worker:
        rules:
            - name: "rate limit worker deploys"
              rate_limit: 5/hour
              on_deny: "Worker deployment rate limit reached (5/hour). Try again later."
    zones_update:
        rules:
            - name: "rate limit zone updates"
              rate_limit: 5/hour
              on_deny: "Zone update rate limit reached (5/hour). Try again later."

A global backstop catches everything — including read tools — at 60 calls per minute:

    "*":
        rules:
            - name: "global rate limit"
              rate_limit: 60/minute
              on_deny: "Global rate limit reached (60/minute). Try again later."

The rate_limit shorthand expands into a stateful counter that tracks calls per window and resets automatically. For more on how this works under the hood, see Rate Limiting MCP Tool Calls.

Getting started

Install Intercept and point it at the Cloudflare MCP server:

npm install -g @policylayer/intercept

Then run it with the Cloudflare policy:

intercept -c cloudflare.yaml -- npx -y @cloudflare/mcp-server-cloudflare

Every tool call now passes through the policy engine. DNS deletions are blocked entirely. The 11th DNS change in an hour gets denied. The 61st call in a minute hits the global limit. Your infrastructure stays intact.

Adjust the limits to match your workflow. A platform team managing dozens of zones might raise DNS limits to 30/hour. A solo developer might drop worker deploys to 2. The point is that the enforcement is deterministic, transport-level, and impossible for the model to override.

Full Cloudflare policy →