Skip to content

VulnScannerTargetEnvironment

Source: src/Cloudflare/VulnerabilityScanner/TargetEnvironment.ts

A Cloudflare Vulnerability Scanner target environment — declares which zone the DAST-style web vulnerability scanner (Security Center, beta) is allowed to scan.

The environment is identified by a server-assigned UUID. name and description are mutable in place; changing the target zoneId triggers a replacement because scan history is tied to the target.

Scan a zone

const zone = yield* Cloudflare.Zone("site", { name: "example.com" });
const target = yield* Cloudflare.VulnScannerTargetEnvironment("site-scans", {
zoneId: zone.zoneId,
});

With an explicit name and description

const target = yield* Cloudflare.VulnScannerTargetEnvironment("site-scans", {
name: "production-site",
zoneId: zone.zoneId,
description: "Weekly DAST scan of the production zone",
});