Skip to content

av repo

Attach, inspect, rescan, and remove the git repos a project uses as scan sources.

Terminal window
av repo <subcommand> --project <project-id> [flags]

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

av repo manages the git repos attached to a project as scan sources. AlertaVuln scans attached repos and records the last scan time and status per repo.

Every subcommand requires the --project flag and an authenticated session - run av login first. Adding a repo with av repo create queues an initial scan automatically; use av repo rescan to queue another scan on demand.

Flag Default Description
--project - Project ID the repos belong to (required on every subcommand)

List the repos attached to a project as a table with each repo’s ID, provider, URL, branch, last scan time, and last scan status. Repos that track the default branch, or have never been scanned, show - in the respective column.

Terminal window
av repo list --project <project-id>

List every scan source on a project:

Terminal window
av repo list --project 7f3c2a1e

Show the full details of one repo as pretty-printed JSON. The repo is addressed by its source ID, as shown in the ID column of av repo list.

Terminal window
av repo get <source-id> --project <project-id>

Inspect a single repo:

Terminal window
av repo get 4b9d1c22 --project 7f3c2a1e

Add a git repo to a project as a scan source. The command confirms the new source ID and queues the first scan immediately.

Terminal window
av repo create --project <project-id> --url <https-url> [--branch <branch>]
Flag Default Description
--url - Repo HTTPS URL (required)
--branch repo default Branch to scan

Attach a repo and scan its default branch:

Terminal window
av repo create --project 7f3c2a1e --url https://github.com/acme/storefront

Attach the same repo but scan a long-lived release branch instead:

Terminal window
av repo create --project 7f3c2a1e --url https://github.com/acme/storefront --branch release/2.x

Queue a new scan of an already-attached repo. The command returns as soon as the rescan is queued; watch the LAST SCAN and STATUS columns of av repo list for the result.

Terminal window
av repo rescan <source-id> --project <project-id>

Trigger a rescan after force-pushing a fix:

Terminal window
av repo rescan 4b9d1c22 --project 7f3c2a1e

Remove a repo from a project so it is no longer scanned.

Terminal window
av repo delete <source-id> --project <project-id>

Detach a repo you no longer want scanned:

Terminal window
av repo delete 4b9d1c22 --project 7f3c2a1e
Code Meaning
0 Command completed successfully
1 Command failed - not logged in, missing required flag, or the API returned an error
  • av project - create and manage the projects repos attach to
  • av techstack - manage the packages AlertaVuln tracks for a project
  • av sast server-scan - scan a project’s connected repos on AlertaVuln’s infrastructure (Enterprise)