---
title: Cloud Security Agentless Scanning
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Cloud Security > Setting up Cloud Security > Cloud
  Security Agentless Scanning
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Cloud Security Agentless Scanning

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Overview{% #overview %}

Agentless Scanning provides visibility into vulnerabilities that exist within your AWS, Azure, and Google Cloud infrastructure, without requiring you to install the Datadog Agent. Datadog recommends enabling Agentless Scanning as a first step to gain complete visibility into your cloud resources, and then installing the Datadog Agent on your core assets over time for deeper security and observability context.

You can run Agentless scanners in one of two ways:

- **Datadog-hosted (SaaS)**: Datadog runs the scanners, and you grant Datadog permissions to scan your account. Supports AWS only.
- **Self-hosted**: Scanners run in your own cloud account.

Both modes use the same scanning engine and produce the same findings.

{% alert level="info" %}
Agentless Scanning skips hosts where the Datadog Agent runs with both Cloud Security Vulnerabilities and Misconfigurations enabled. For other hosts with the Agent, Agentless Scanning only covers the features the Agent does not. See [Troubleshooting](https://docs.datadoghq.com/security/cloud_security_management/troubleshooting/agentless_scanning.md#hosts-with-the-datadog-agent-are-not-scanned).
{% /alert %}

## Choose where scanners run{% #choose-where-scanners-run %}

{% callout %}
##### Datadog-hosted (SaaS) Agentless Scanning is in Preview

Datadog-hosted scanning supports AWS accounts only.

[Request Access](https://www.datadoghq.com/product-preview/agentless-saas-mode/)
{% /callout %}

| Datadog-hosted (SaaS)                | Self-hosted                                                                                                                                                                                                                      |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Where the scanner runs               | In Datadog's infrastructure                                                                                                                                                                                                      | In your cloud account                                                                                                          |
| What you deploy                      | A managed IAM policy and the AWS managed `SecurityAudit` policy, attached to your existing Datadog integration role. The CloudFormation stack also creates a Lambda function that calls the Datadog API during stack deployment. | Scanner instances and their networking; for AWS, this includes EC2 instances in an autoscaling group, a VPC, and a NAT gateway |
| Where disk contents are read         | In a Datadog scanning environment, in the region of your Datadog site (see Datadog-hosted data residency)                                                                                                                        | In your cloud account                                                                                                          |
| Supported cloud providers            | AWS                                                                                                                                                                                                                              | AWS, Azure, Google Cloud                                                                                                       |
| Scanner updates                      | Datadog updates the scanner automatically                                                                                                                                                                                        | You update the scanner                                                                                                         |
| Cloud provider infrastructure cost   | None                                                                                                                                                                                                                             | Compute and networking costs appear on your cloud provider bill                                                                |
| Scanning engine and findings         | Same in both modes                                                                                                                                                                                                               | Same in both modes                                                                                                             |
| Scan frequency                       | Every 12 hours                                                                                                                                                                                                                   | Every 12 hours                                                                                                                 |
| AWS resource coverage                | Same in both modes                                                                                                                                                                                                               | Same in both modes                                                                                                             |
| Sensitive Data Scanner for Amazon S3 | Supported                                                                                                                                                                                                                        | Supported                                                                                                                      |
| On-demand scanning                   | Not supported                                                                                                                                                                                                                    | Supported for AWS                                                                                                              |
| Datadog billing                      | Same in both modes                                                                                                                                                                                                               | Same in both modes                                                                                                             |

### When to use Datadog-hosted (SaaS) Agentless Scanning{% #when-to-use-datadog-hosted-saas-agentless-scanning %}

Use Datadog-hosted scanning if any of the following apply:

- You want to start scanning without deploying compute or networking resources in your account.
- You don't want to maintain, update, or monitor scanner instances.
- You want to avoid the infrastructure cost of running scanners in each region.
- You want new resource types supported automatically, without updating a scanner.

### When to use self-hosted Agentless Scanning{% #when-to-use-self-hosted-agentless-scanning %}

Use self-hosted scanning if any of the following apply:

- You need to scan Azure or Google Cloud resources.
- Your policies require that disk contents stay in your own cloud account.
- Your policies restrict which region or cloud provider can process your data. Datadog-hosted scanning processes data in the region of your Datadog site, which can differ from the region and cloud provider of your resources.
- You want direct control over scanner versions or scan scheduling.

### Use both modes{% #use-both-modes %}

You can choose a mode for each AWS account instead of one mode for your whole organization. For example, you can use Datadog-hosted scanning in most accounts and self-hosted scanners where disk contents must stay in your cloud account.

To switch an account that already uses a self-hosted scanner, see [Move an account from self-hosted to Datadog-hosted (SaaS) Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/deployment_methods.md?agentless_scanner_hosting=datadog_hosted#move-an-account-from-self-hosted-to-datadog-hosted-scanning).

## Datadog-hosted (SaaS) Agentless Scanning{% #datadog-hosted-scanning %}

Datadog runs the scanners in its own infrastructure. This mode is in Preview and supports AWS only. For setup instructions, see [Enabling Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=datadog_hosted).

### How Datadog-hosted scanning works{% #datadog-hosted-how-it-works %}

1. Datadog discovers your resources through cloud provider APIs. This step reads metadata only.
1. In your AWS account, Datadog creates a snapshot of each volume to scan. The snapshot stays in your account. Datadog never shares the snapshot with or copies it into a Datadog AWS account.
1. Datadog reads the snapshot's blocks over HTTPS using the Amazon EBS direct APIs.
1. Datadog presents the blocks to a scanning sandbox as a block device, and the sandbox mounts the partitions as read-only.
1. Scanners analyze the mounted file systems and send findings and SBOMs to Datadog.
1. Datadog deletes the snapshot and destroys the sandbox.

Each scan runs in a new hardware-isolated microVM with its own kernel, which Datadog destroys when the scan ends. Datadog never runs code on your instances.

### What Datadog-hosted scanning sends to Datadog{% #datadog-hosted-what-data-is-sent-to-datadog %}

Datadog reads your disk contents in its scanning environment on demand, and does **not** retain any copy of them. Only findings and SBOMs persist in Datadog.

### Datadog-hosted data residency{% #datadog-hosted-data-residency %}

Scans run in the region of the Datadog site that your organization uses, not in the region where your resources are located. For example, if your organization uses the EU1 site, Datadog scans your resources in the EU, regardless of which AWS region your resources are in.

If your resources are in a different region than your Datadog site, scanning can involve a cross-border data transfer. Review your privacy requirements before you enable scanning for these accounts. If your data must be processed in your own cloud account or region, use self-hosted scanning.

### Datadog-hosted cloud provider cost{% #datadog-hosted-cost %}

There is no scanner infrastructure cost on your cloud provider bill and no additional Datadog cost.

### Datadog-hosted Cloud Storage scanning{% #datadog-hosted-cloud-storage-scanning %}

You can enable [Sensitive Data Scanner](https://docs.datadoghq.com/security/sensitive_data_scanner.md) for Amazon S3 buckets during setup. Sensitive Data Scanner catalogs and classifies sensitive data in your cloud storage.

With Datadog-hosted scanning, Datadog reads the contents of your S3 buckets in its scanning environment, in the same way as disk contents. Datadog does **not** retain your object contents or the matched data. For each match, Datadog stores only the location: the bucket, object path, matching rule, and position in the object. Because buckets often hold more sensitive data than disks, review your data handling requirements before you enable Sensitive Data Scanner.

Sensitive Data Scanner is optional. You can turn it off and still use Datadog-hosted scanning for vulnerabilities. To turn it off after setup:

- **CloudFormation**: Turn off Sensitive Data Scanner in Datadog. For instructions, see [Set up Sensitive Data Scanner](https://docs.datadoghq.com/security/sensitive_data_scanner/setup.md).
- **Terraform**: In the `datadog_agentless_scanning_aws_scan_options` resource, set `sensitive_data` to `false`, then apply the configuration.

### Datadog-hosted on-demand scanning{% #datadog-hosted-on-demand-scanning %}

The [On-Demand Scanning API](https://docs.datadoghq.com/api/latest/agentless-scanning.md#create-aws-on-demand-task) is not available for Datadog-hosted scanning. Datadog scans your resources automatically every 12 hours.

## Self-hosted Agentless Scanning{% #self-hosted-scanning %}

Scanners run in your own cloud account. For setup instructions, see [Enabling Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=self_hosted).

### How self-hosted scanning works{% #how-it-works %}

The following diagram illustrates how self-hosted Agentless Scanning works:

{% image
   source="https://docs.dd-static.net/images/security/agentless_scanning/how_agentless_works.a42b95a0bfbd5a17886fb94d91545964.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/security/agentless_scanning/how_agentless_works.a42b95a0bfbd5a17886fb94d91545964.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Diagram showing how self-hosted Agentless Scanning works" /%}

1. Datadog schedules automated scans in 12-hour intervals and sends the resources to scan through [Remote Configuration](https://docs.datadoghq.com/remote_configuration.md).
   - If you have [Cloud Security Evaluation Filters](https://docs.datadoghq.com/security/cloud_security_management/guide/resource_evaluation_filters.md) configured, Agentless Scanning respects these filters and only scans resources that match the configured criteria.
1. For serverless functions (such as AWS Lambda), the scanners fetch the function's code.
1. The scanner creates snapshots of volumes used in running VM instances. Using the snapshots or the function code, the scanner generates an SBOM (a list of packages and dependencies).
1. The SBOM and host metadata are transmitted to Datadog. All other data—including snapshots, disk contents, and container images—remains in your infrastructure. Snapshots are deleted.
1. Datadog uses the SBOM to identify known vulnerabilities in your resources.

This architecture provides:

- **Data privacy**: Your disk contents, container images, and sensitive data stay within your cloud account. Only package metadata (the SBOM) and host metadata are transmitted to Datadog.
- **Data residency**: Snapshots and disk contents never leave your cloud account, simplifying compliance with data sovereignty requirements.
- **Compliance**: Auditors can verify that scanning data remains within your perimeter.

For more information on data privacy, see What self-hosted scanning sends to Datadog.

{% alert level="info" %}

- The scanner operates as a separate VM within your infrastructure, which minimizes impact on existing systems and resources.
- For AWS, scanner instances automatically scale based on workload. When there are no resources to scan, scanners scale to zero to minimize cloud provider costs.
- The scanner securely collects a list of packages from your hosts without transmitting any confidential or private personal information outside your infrastructure.
- The scanner limits its use of the cloud provider API to prevent reaching any rate limit, and uses exponential backoff if needed.
- Scanner instances are automatically rotated every 24 hours, ensuring they run the latest images.

{% /alert %}

### What self-hosted scanning sends to Datadog{% #what-data-is-sent-to-datadog %}

Rather than copying disk snapshots outside of your environment for analysis, to keep your data private, Datadog deploys lightweight scanning infrastructure **inside your cloud account**. Agentless Scanning creates snapshots of your resources and analyzes them locally, deleting the snapshots after the analyses are complete. It sends to Datadog only host metadata and the resulting software bill of materials (SBOM), which lists packages and dependencies. Your raw data, disk contents, and container images never leave your environment.

The Agentless scanner uses the OWASP [cycloneDX](https://cyclonedx.org/) format to transmit a list of packages to Datadog. No confidential or private personal information is ever transmitted outside of your infrastructure.

The scanner does **not** send:

- System and package configurations
- Encryption keys and certificates
- Logs and Audit Trails
- Sensitive business data

### Self-hosted cloud provider cost{% #cloud-service-provider-cost %}

Self-hosted scanners run inside your cloud account, so the compute and networking costs appear on your cloud provider bill.

To reduce costs:

- Deploy a scanner in each region where you have more than 150 hosts. A regional scanner avoids cross-region data transfer, which is more cost-effective than scanning those hosts from a remote region.
- Use the [recommended configuration](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/deployment_methods.md?agentless_scanner_hosting=self_hosted) with Terraform to deploy one scanner per region.
- For large multi-region deployments, see [Deploying Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/deployment_methods.md?agentless_scanner_hosting=self_hosted) for guidance on choosing a deployment topology.

### Restrict scanner access{% #restrict-scanner-access %}

Scanner instances require [permissions](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/enable.md?agentless_scanner_hosting=self_hosted#prerequisites) to create and copy snapshots and describe volumes. Datadog recommends following the following guidelines to keep your scanners secure:

- Restrict access to scanner instances to administrative users.
- Set scanner permissions to follow the principle of least privilege, limited to the minimum required for scanning.
- Encrypt all data transmission between the scanner and Datadog with HTTPS.
- Enable unattended security updates, and rotate instances automatically every 24 hours.
- Don't allow inbound access to scanner instances (security group restricted).

### Self-hosted Cloud Storage scanning{% #cloud-storage-scanning %}

You can enable [Sensitive Data Scanner](https://docs.datadoghq.com/security/sensitive_data_scanner.md) for your Agentless Scanning resources during deployment or after setup. Sensitive Data Scanner catalogs and classifies sensitive data in your cloud storage (such as Amazon S3 buckets). It only reads data stores and their files in your environment, without sending any sensitive data to Datadog.

### Self-hosted on-demand scanning{% #on-demand-scanning %}

By default, Agentless Scanning automatically scans your resources every 12 hours. For AWS, you can also trigger an immediate scan of a specific resource (host, container, Lambda function, or S3 bucket) using the On-Demand Scanning API. For more information, see the [On-Demand Scanning API](https://docs.datadoghq.com/api/latest/agentless-scanning.md#create-aws-on-demand-task) documentation.

## Further reading{% #further-reading %}

Additional helpful documentation, links, and articles:

- [Read more about Cloud Security Vulnerabilities](https://docs.datadoghq.com/security/vulnerabilities.md)
- [Set up Sensitive Data Scanner for Cloud Storage](https://docs.datadoghq.com/security/sensitive_data_scanner/setup/cloud_storage.md)
- [Updating Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/setup/agentless_scanning/update.md)
- [Troubleshooting Agentless Scanning](https://docs.datadoghq.com/security/cloud_security_management/troubleshooting/agentless_scanning.md)
