CLI commands

valiqai scans

List scans, view one, follow one, or stop one.

valiqai scans

List scans, view one, follow one, or stop one

Terminal
valiqai scans [options] [command]

Commands: list, view, watch, cancel.

On its own, valiqai scans runs valiqai scans list.

valiqai scans list

Recent scans, newest first

Terminal
valiqai scans list [options]
OptionWhat it does
--site <domain>Only scans of this site (and its subdomains)
--status <status>Only these: pending, running, passed, failed, error, cancelled (comma-separated)
--source <provider>Only scans started from here: github, gitlab, circleci, cli, …
-L, --limit <n>How many (1–100) (default: "20")
--cursor <cursor>The next page, from the last list
--workspace <name>Workspace to use (default: the one in valiqai.json, or the active one)
--api-url <url>ValiqAI address
--jsonPrint JSON on stdout
Terminal
$ valiqai scans$ valiqai scans --site example.com --status failed$ valiqai scans --source github -L 50 --json

valiqai scans view

A scan: its status, score and problems by severity

Terminal
valiqai scans view [options] <id>
ArgumentWhat it is
idScan id
OptionWhat it does
-w, --webOpen it in your browser instead
--workspace <name>Workspace to use (default: the one in valiqai.json, or the active one)
--api-url <url>ValiqAI address
--jsonPrint JSON on stdout
Terminal
$ valiqai scans view cmh2x8k1p0$ valiqai scans view cmh2x8k1p0 --web

valiqai scans watch

Follow a scan until it ends, like valiqai scan does, with the same exit codes

Terminal
valiqai scans watch [options] <id>
ArgumentWhat it is
idScan id
OptionWhat it does
--fail-on <severity>Exit 1 on an open problem at or above this: blocker, major (high), minor (medium) or none (default: "blocker")
--timeout <duration>Stop waiting after this (the scan keeps running) (default: "15m")
--format <format>A report at the end: json, junit, sarif or markdown
--output <file>Write the report to this file; its extension (.json, .xml, .sarif, .md) picks the format when --format doesn't
--workspace <name>Workspace to use (default: the one in valiqai.json, or the active one)
--api-url <url>ValiqAI address
--jsonPrint one JSON result on stdout; the same as --format json
Terminal
$ valiqai scans watch cmh2x8k1p0$ valiqai scans watch cmh2x8k1p0 --fail-on high --output junit.xml

valiqai scans cancel

Stop a scan that is still running (unused credits come back)

Terminal
valiqai scans cancel [options] <id>
ArgumentWhat it is
idScan id
OptionWhat it does
--workspace <name>Workspace to use (default: the one in valiqai.json, or the active one)
--api-url <url>ValiqAI address
--jsonPrint JSON on stdout
Terminal
$ valiqai scans cancel cmh2x8k1p0

Every command also takes the options for every command: --quiet, --debug and --no-color.