Skip to content

av dast targets

List the scan targets registered for a project - one row per target with its name, environment, when it was last scanned, and the status of that last scan.

Terminal window
av dast targets [flags]

av dast targets lists the DAST scan targets registered for a project. A target is auto-registered the first time you av dast scan its URL, so this command is the roster of every URL AlertaVuln has scanned for the project. You must be logged in (av login), and --project is required.

The table shows TARGET (the base URL), NAME, ENVIRONMENT (staging / production / internal), LAST SCANNED (as YYYY-MM-DD HH:MM), and the STATUS of that most recent scan. A target that has not been scanned yet shows - for its last-scanned time and status.

--json prints the raw JSON payload instead of the table. --export writes the result to disk: a styled, self-contained HTML report, or the raw JSON when combined with --json. Pass a directory to get dast-targets.html (or .json) inside it, or a path with an extension to name the file yourself.

Flag Default Description
--project - Project ID (required)
--json false Output raw JSON instead of a table
--export - Export to a directory or file (HTML; raw JSON with --json)

List a project’s registered targets:

Terminal window
av dast targets --project <projectId>

Get the roster as JSON, for scripting or piping into jq:

Terminal window
av dast targets --project <projectId> --json

Write a shareable HTML report to ./reports/dast-targets.html:

Terminal window
av dast targets --project <projectId> --export ./reports
Code Meaning
0 Targets listed (or exported), even when the list is empty
1 Not logged in, missing --project, or the API request failed