Skip to content

Build1 publisher2 min readPublished

Cloudflare's CASB remediation runs on a queue that can deliver the same finding twice

The September 11 release lets a matching finding fire a remediation action, an outbound webhook, or both. The delivery guarantees underneath it leave the receiving system to decide whether a second attempt does anything.

The Engineer · Build desk

Illustration accompanying Cloudflare's CASB remediation runs on a queue that can deliver the same finding twice

What happened

  • Cloudflare introduced automatic remediation policies for CASB on September 11, letting a matching finding trigger a remediation action, an outbound webhook, or both.
  • The described pipeline passes findings through Queues, checks the configured policy, and runs remediation jobs through Workflows, which preserves progress across interruptions and backs off when another service rate-limits it.
  • Cloudflare's Workflows guidance treats steps as individually retryable, recommends making the calls inside them idempotent, and warns that effects placed outside steps can repeat when execution restarts.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • exposure The duplicate lands on whoever owns the webhook endpoint, where a second delivery becomes a second ticket or a second run of the script waiting at the other end.
  • decision Anyone switching a policy on has to settle the retry boundary first, since the stable identifier must exist before the first attempt.
  • constraint Protection from an idempotency key ends at its documented scope and retention window, so slow retries and replays of older findings sit outside it.

A second attempt can enter this pipeline by two routes. Cloudflare's Queues documentation, as cited in a dev.to walkthrough of the release, says a message can occasionally arrive more than once, and reliable delivery still leaves the application responsible for handling duplicates [4]. Inside a single delivery, Cloudflare's Workflows guidance treats steps as individually retryable and recommends making the calls in those steps idempotent [5]. So the same finding can be handed over twice, and within one hand-over a step can run twice [16].

The two configurable outcomes absorb that unequally. Removing risky file sharing asserts a state, and a second run finds the sharing already removed [18]. Forwarding an event to another system is a call into software Cloudflare does not operate, so the duplicate becomes a second ticket, or a second run of whatever script is listening [18].

Placement decides which of those the retry machinery protects. The Workflows guidance warns that effects placed outside steps can repeat when execution restarts [6]. The account of the release supplied here is that third-party post, and it does not say whether Cloudflare deduplicates a finding before the webhook fires [17].

The post defines idempotency as "repeating an operation has no additional effect beyond the first successful operation" [12]. Its checklist starts by giving the intended action a stable identifier before the first send, saved so a restart reuses the same one [7]. The identifier has to pick out the intended action, because a customer can legitimately book twice [8]. That is the same shape as the AWS Builders' Library account of caller-provided request identifiers, which lets a service tell a repeat attempt from another legitimate request, and which also covers rejecting changed parameters under an already-used identifier [9].

The operational detail people skip is the lifetime of the protection. If the destination supports an idempotency key, the same key goes on every attempt. Its documented scope and retention period matter: retry after that protection expires and an old key may no longer protect you [10]. A local note saying "already sent" is useful. An email service can still accept the same send twice [15].

For records your own app creates, the post's rule is storage rules that stop two concurrent attempts from both creating the same logical result [11]. Disabling the button after the first click helps with accidental taps, and does nothing about a restarted background job or two workers processing the same event [14]. On the CASB path there is no button to grey out. "Check, then insert" needs stronger coordination when both workers can pass the check [11].

What to watch

  • Whether Cloudflare documents deduplication semantics for CASB remediation policies themselves, not only for Queues.
  • Whether the policy payload exposes a stable finding or attempt identifier that a receiver can use as an idempotency key.
  • Whether Workflows gains documented step-level deduplication for outbound calls.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories