Start a scan, choose what it checks and what fails the build, and know what happens when things take long or go wrong.
Run your first scan
$ valiqai scan? This End-to-End scan reserves 2 credits (you have 140). Start? YesStarted End-to-End scan cmh2x8k1p0003 of https://staging.northstar.appReserved 2 credits; unused credits come back when it finishes.Results: https://www.valiqai.com/runs/cmh2x8k1p0003Scan is running… 4 of 18 tests done · 0 problems so far · 1 min 10s 12 of 18 tests done · 2 problems so far · 3 minfailed: 3 open problems (1 blocker, 2 high) · score 64Found 1 blocker (failing on blocker and above).Without valiqai.json, pass the address (valiqai scan https://staging.example.com), or, in a terminal, pick one of your verified domains when asked.
In a terminal it says what the scan reserves and asks before starting; --yes skips the question, and CI never asks. It prints a link to the results as soon as the scan starts, then a line each time more tests finish. The last line says why it passed or failed, and the exit code follows from it.
Add --open to open the scan in your browser, or --no-wait to start it and get your terminal back: it prints the link and exits 0.
Choose a scan
--type picks one of the two scans you can start in ValiqAI. The default is e2e, or scan.type in valiqai.json.
| Type | What it checks | Reserves | Typically uses |
|---|---|---|---|
e2e | Sign-up, sign-in and the pages around them | 2 credits | 1 credit |
security | Everything e2e does, plus your site's chatbot | 12 credits | 3 to 6 credits |
A scan reserves its credits when it starts and gives back what it didn't use when it finishes. Your first End-to-End scan is free.
A security scan only sends your chatbot attack prompts when you add --chatbot-consent, which says you're allowed to security-test it. Without it, ValiqAI finds the chatbot but leaves it alone. When chatbot scans aren't available yet, a security scan runs as End-to-End, costs what End-to-End costs, and the CLI says so before it starts.
Choose what fails the build
--fail-on sets the lowest severity that fails the build. The default is blocker.
| Value | Fails the build on |
|---|---|
blocker | Blockers |
high (or major) | Blockers and high |
medium (or minor) | Blockers, high and medium |
none | Nothing. The scan runs and reports, and the build passes. |
Only open problems count. A problem someone dismissed in ValiqAI is reported, but doesn't fail the build.
Busy workspaces, retries and timeouts
- One scan at a time per workspace. If another scan is still running (another pull request's pipeline, say),
scanwaits for it, up to--timeout, and says which scan it's waiting for. - No double billing. In CI, each job attempt sends one
Idempotency-Key, so a retried request, or a step retried inside the same job, gets the scan already started instead of a second one. "Re-run job" starts a new scan, as you'd expect. Outside CI you can pass your own with--idempotency-key. - Timeouts stop the scan. A scan still running at
--timeoutis stopped, so it doesn't keep holding the workspace, and its unused credits are released. Add--on-timeout keepto leave it running instead. - Cancelling the job stops the scan. When your CI cancels the job, the CLI stops its scan. In a terminal, Ctrl-C asks first.
Waiting, following and stopping
--no-waitstarts the scan, prints its link and exits0, for a pipeline that shouldn't wait.valiqai scans watch <id>follows a scan that's already running, with the same progress, exit codes and reports asvaliqai scan. At its--timeoutit stops waiting but leaves the scan running.valiqai scans cancel <id>stops one. Its unused credits come back.
Protected staging sites
Before a scan starts, ValiqAI checks whether the address is behind protection: HTTP basic auth, Vercel Deployment Protection, Cloudflare Access or Netlify password protection. A scan of it would only see the login wall, so it's refused with what was found (VQ711), and no credits are held.
Scanning through that protection isn't available yet. Until it is, point the scan at a deployment without it, like a preview with protection turned off for the scan.
Exit codes
| Code | Means |
|---|---|
0 | The scan finished, and nothing open is at or above --fail-on. |
1 | The scan finished with open problems at or above --fail-on. |
2 | The scan couldn't finish: it errored or was stopped, ValiqAI couldn't be reached, --timeout passed, or the workspace stayed busy until then. |
3 | The scan couldn't start: no key, a bad URL or option, or ValiqAI refused it (key, plan, unverified domain, credits). These are never retried. |
Look up results
These read what's already in ValiqAI. Each takes --json, and exits 0 when it works and 1 when it doesn't.
$ valiqai scansID SITE STATUS SCORE OPEN STARTED FROMcmh2x8k1p0 staging.northstar.app Failed 64 3 · 1 blocker 2 h ago GitHub · maincmh2w1a9q4 staging.northstar.app Passed 91 none 1 d ago CLI| Command | What it does |
|---|---|
valiqai scans | Recent scans, newest first. --site, --status and --source github narrow it. -L 50 shows more. |
valiqai scans view <id> | A scan's status, score, where it ran, and its open problems by severity. --web opens it instead. |
valiqai scans watch <id> | Follows a running scan with the same progress, exit codes and reports as valiqai scan. |
valiqai scans cancel <id> | Stops a running scan. Its unused credits come back. |
valiqai problems <id> | A scan's problems with every page each was found on. --severity high,blocker, --category security, --status dismissed. |
valiqai credits | What the workspace has, and what each scan type reserves. |
valiqai open [scan or domain] | Opens a scan, a domain's page, or this folder's site in your browser. --no-browser prints the address. |