Skip to content
AnswerWell geo Documentation

Research · 8 min read · Answerwell

CASB Posture Findings, Integrations and Rego Custom Detection

How Cloudflare CASB connects to SaaS APIs, what posture and content findings mean, and how to write Rego custom finding types.

This page summarizes Cloudflare documentation on Cloudflare CASB (Cloud Access Security Broker) in Cloudflare One. CASB connects to SaaS and cloud APIs after users sign in, to surface misconfigurations, unauthorized activity, shadow IT, and data-security issues—without requiring inline traffic capture on every endpoint.

CASB posture findings: what gets detected and how it is grouped

Section titled “CASB posture findings: what gets detected and how it is grouped”

Posture findings are configuration and access problems CASB detects through API integrations. Content findings come from Data Loss Prevention (DLP) matches on stored or exposed data.

Cloudflare’s Cloud Access Security Broker ↗︎ (CASB) connects to SaaS application and cloud environment APIs to scan for security issues that can occur after a user has successfully logged in. These include misconfigurations (such as overly permissive sharing settings), unauthorized user activity, shadow IT, and other data security issues.

— Cloudflare, Cloud and SaaS findings

CASB uses three related terms for posture work, defined in Finding terminology:

Term Meaning
Finding type Detection logic plus metadata for one vendor and asset class (for example files or users). One type can apply to many integrations.
Posture finding Summary of one finding type within one integration (one row in Posture Findings).
Finding instance One occurrence affecting a specific asset (for example a single shared file).

Content findings group differently: each row in Content Findings is one asset within an integration, with all matching DLP profiles for that asset. To review and triage results, use Manage findings.

CASB integrations: connect SaaS apps and start periodic scans

Section titled “CASB integrations: connect SaaS apps and start periodic scans”

You add integrations under Cloud & SaaS findings > Integrations (or Integrations > Cloud & SaaS integrations). The full connector list and setup paths are in Cloud and SaaS integrations.

  1. In Cloudflare One, go to Cloud & SaaS findings > Integrations.
  2. Select Connect an integration or Add integration, choose the application, and follow the dashboard instructions.
  3. Select Save integration to run the first scan.

After the first scan, CASB rescans on a schedule that depends on each application—typically between every 1 hour and every 24 hours, per Add an integration. OAuth-based connectors cannot be created with Terraform; non-OAuth integrations can use the cloudflare_zero_trust_casb_integration resource (provider 5.27.0+) as described in Create CASB integrations with Terraform and Cloud and SaaS integrations — Create an integration.

To pause scanning, turn off Scan for findings under Configure and save. Deleting an integration removes keys and OAuth data and cannot be undone—see Delete an integration.

Integration health when scans stall or show no findings

Section titled “Integration health when scans stall or show no findings”

CASB does not provide real-time updates. The initial scan can take several hours (up to about 24 hours for large tenants); later scans are often on a 24–48 hour cadence according to Understand scan frequency.

If nothing appears yet, Troubleshoot CASB — Findings not appearing recommends waiting for the scan, confirming admin permissions on the integrating account, and verifying the integration is enabled. To queue a fresh scan, toggle Scan for findings off, wait a few minutes, turn it on again, then allow several hours—Force a re-scan.

If the app was linked to a different Cloudflare account before, revoke the old Cloudflare app in the SaaS admin console (Microsoft 365, Google Workspace, or GitHub steps in Clear previous installations). Unhealthy API integrations may show status Broken or Upgrade; repair via Reauthorize or Upgrade integration per Troubleshoot integrations.

Custom finding types with Rego: organization-specific posture rules

Section titled “Custom finding types with Rego: organization-specific posture rules”

Standard finding types are predefined by Cloudflare CASB. Custom finding types let you define your own conditions with Rego (Open Policy Agent) against asset data from connected integrations—see Custom finding types and Detect organization-specific risks with CASB custom finding types.

In addition to CASB’s library of standard finding types, you can now write your own detection logic using Rego ↗︎, the open-source policy language from Open Policy Agent (OPA). Use custom finding types to match your organization’s own thresholds and exceptions, such as flagging admin accounts without two-factor authentication, and get higher-confidence findings to act on.

— Cloudflare, Detect organization-specific risks with CASB custom finding types

Custom types apply only to posture findings—not DLP content finding types. You can inspect and duplicate standard types but not edit them; the capability matrix is in Standard and custom finding types.

When custom finding types run (and when they do not)

Section titled “When custom finding types run (and when they do not)”

CASB evaluates a custom finding type when an asset is created or updated within the selected integrations. It does not run retroactively on unchanged assets. The documentation’s timeline example (board group updated before the rule existed, then a new exec group) illustrates this in Finding type fields.

Limits from Custom finding types restrictions and limits:

  • Up to 250 custom finding types per account
  • Up to 25 per integration
  • Full Rego policy (including Cloudflare-added declarations) up to 4 KiB
  • No network access during evaluation; no package or import in the editor (CASB adds these)

Write Rego detection logic that returns pass or fail

Section titled “Write Rego detection logic that returns pass or fail”

Expressions must set result to "pass" or "fail"; "fail" creates a finding instance. Start with default result := "pass". Read fields from input.asset (and input.associated when present). Validate in the builder compiles against the schema but does not run on live data—Rego validation.

Only built-ins listed in Supported Rego built-ins are supported; the OPA Playground may accept more than CASB does.

  1. Go to Cloud & SaaS findings > Finding types library (Create a custom finding type).
  2. Enter name, description, severity, provider, asset class, and integration scope.
  3. Write the Rego expression, Validate, then Create finding type.

To change provider, asset class, severity, or Rego after creation, duplicate the finding type instead of editing—only name, description, and integration scope are editable later. Custom finding types cannot be disabled; delete them to stop evaluation (or turn off a CASB policy that uses them).

If evaluation is unsafe or times out (for example nested loops over large arrays), CASB quarantines the type: existing instances stay visible, but no new ones are created until you duplicate, simplify the expression, update policies, and delete the quarantined type—Resolve a quarantined custom finding. Validation can pass and quarantine can still happen later on real assets.

Posture findings management: severity, ignore, hide, and Cloudy Summaries

Section titled “Posture findings management: severity, ignore, hide, and Cloudy Summaries”

In Posture Findings, each row is one finding type in one integration. Open Manage to see instances, change severity for that integration only, ignore the whole finding, or hide individual instances—Posture findings and Hide findings. Ignored or hidden items still scan; new matches follow the ignore/hide rules described there.

For faster triage, Cloudy Summaries in Posture Findings add plain-language context, impact, and remediation hints:

This allows security teams and IT administrators to drastically reduce triage time by immediately understanding the context, potential impact, and necessary remediation steps for any given finding—without needing to be an expert in every connected SaaS application.

— Cloudflare, Understand CASB findings instantly with Cloudy Summaries

Optional weekly email: CASB Weekly Digest under Manage Account > Notifications—New SaaS Security weekly digests with API CASB.

CASB metrics and charts (findings over time, severity breakdown, DLP in HTTP) live under Data security analytics and Analytics overview — CASB metrics.

DLP content findings and cloud object scans (AWS S3, GCP)

Section titled “DLP content findings and cloud object scans (AWS S3, GCP)”

DLP-backed content findings target sensitive data in files. Supported integrations are listed in Scan for sensitive data — Supported integrations (including AWS S3, Google Drive, Microsoft OneDrive/SharePoint, OpenAI, Anthropic, and others).

For AWS S3 (and similarly GCP Cloud Storage), you can attach a compute account so CASB scans bucket objects with DLP while avoiding data egress fees—objects present at configuration time are in scope:

You can connect an AWS compute account to your CASB integration to perform Data Loss Prevention scans within your S3 bucket and avoid data egress. CASB will scan any objects that exist in the bucket at the time of configuration.

— Cloudflare, Amazon Web Services (AWS) S3

Configure buckets, file types, sampling, and DLP profiles via Create new configuration; scans can take up to about an hour to start. Unhealthy compute accounts appear under Manage compute accounts—Troubleshoot compute accounts.

GenAI posture integrations (ChatGPT, Claude, Gemini) use API-based, agentless connections for settings and attachment DLP—New CASB integrations for ChatGPT, Claude, and Gemini. OpenAI requires Compliance API access before CASB setup—OpenAI — Enable Compliance API access.

  • Expecting immediate or real-time findings after connect (initial and forced rescans take hours).
  • Creating custom finding types and assuming they flag existing unchanged assets (only create/update events trigger evaluation).
  • Adding DLP profiles late and missing older publicly shared files.
  • Leaving a previous Cloudflare account’s OAuth app authorized in the SaaS tenant, blocking a clean reconnect.
  • Using unsupported Rego built-ins or heavy loops that lead to quarantine after deployment.
  • Deleting an integration when you only meant to pause scanning (data and credentials are wiped).
  1. Confirm each connector is enabled and Scan for findings is on under Cloud & SaaS integrations.
  2. After the documented wait window, open Posture Findings and Content Findings for new rows and instances.
  3. For a custom Rego rule, trigger a scoped asset change, then check Instances for that finding type in Posture Findings—Verify custom finding type behavior.
  4. Review integration status (Healthy, Broken, Upgrade, Paused) and optional CASB Weekly Digest or Data security analytics for trends.
  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about.