Skip to content

av dast server-scan

Ask AlertaVuln to run a dynamic scan of an ownership-verified public target from our infrastructure instead of from your own machine or CI runner. It needs the AV-hosted DAST module and counts against your organisation’s weekly quota.

Terminal window
av dast server-scan --project <projectId> --target <targetId> [flags]

The binary ships as alertavuln; av is the common alias - they are interchangeable in every example.

av dast server-scan enqueues a hosted DAST scan of a target already registered on the project. Unlike av dast scan, which runs the scanners locally for free, this runs them on AlertaVuln’s infrastructure. It exists for targets you cannot reach from a build agent, for teams that would rather not install the scanners, and for the hosted-only capabilities (form login and the authenticated crawl). Results land in the same consolidated finding set as a local upload: av dast findings, av dast jobs and the project’s Dynamic Scan page show them together. You must be logged in (av login).

--target is the target ID, not a URL - take it from the id field of av dast targets --json (the table view does not show it). A target is registered the first time you av dast scan --project its URL, or from the Scan it for me panel on the Dynamic Scan page.

Before anything is enqueued the command checks your entitlement: an organisation without the AV-hosted DAST module gets an error pointing at the local CLI, and an exhausted weekly quota aborts with nothing enqueued. The server then applies the same gates it applies to the web panel, and refuses the job if any of them fails:

  • the target’s registrable domain must be a Verified Domain of your organisation (see Hosted scanning), re-checked live (the DNS record first, then the well-known file) when its last check is older than 7 days;
  • the target must resolve to a public address - a verified domain repointed at a private range is refused;
  • a target registered as internal is never hosted-eligible - scan it with the local CLI from inside your network;
  • --active additionally needs the Attack Scanning module with AV-hosted delivery.

After printing the cost the command asks for a [y/N] confirmation unless you pass --yes. Declining aborts with nothing enqueued and exits 0. The cost warning goes to stderr, so stdout stays clean for scripting.

With --wait, the job is polled about every three seconds until it finishes, then its RED YELLOW GREEN counts are printed. A failed scan makes the command exit non-zero with the server’s reason.

Flag Default Description
--project - Project ID (required)
--target - Target ID to scan, the id field of av dast targets --json (required)
--active false Run an active (attack-payload) scan instead of passive
--yes false Skip the confirmation prompt (the cost warning is still printed)
--wait false Wait for the scan to finish and print its RED/YELLOW/GREEN counts

Queue a passive hosted scan - you are shown the cost and asked to confirm:

Terminal window
av dast server-scan --project <projectId> --target <targetId>

Queue it from automation and block until the counts come back:

Terminal window
av dast server-scan --project <projectId> --target <targetId> --yes --wait

Run an active scan from our infrastructure (the target’s domain must be verified and your organisation must hold the hosted Attack Scanning module):

Terminal window
av dast server-scan --project <projectId> --target <targetId> --active --wait
Code Meaning
0 Scan enqueued (and, with --wait, completed), or you declined at the confirmation prompt
1 Not logged in, missing --project or --target, no hosted entitlement, weekly quota exhausted, the server refused the target, an enqueue failure, or a waited-on scan failed
  • av dast scan - run the scanners locally; it costs nothing and is not metered
  • av dast targets - find the target ID to pass to --target (the id field of --json)
  • av dast jobs - show the project’s scan-run history, hosted runs included
  • av dast targets auth - store a login profile the hosted scan uses to reach pages behind authentication
  • Dynamic scanning (DAST) - hosted vs self-hosted, and how domain verification works