av repo
Attach, inspect, rescan, and remove the git repos a project uses as scan sources.
Synopsis
Section titled “Synopsis”av repo <subcommand> --project <project-id> [flags]The binary ships as alertavuln; av is the common alias - they are
interchangeable in every example.
Description
Section titled “Description”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.
Options
Section titled “Options”| Flag | Default | Description |
|---|---|---|
--project |
- | Project ID the repos belong to (required on every subcommand) |
av repo list
Section titled “av repo list”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.
av repo list --project <project-id>List every scan source on a project:
av repo list --project 7f3c2a1eav repo get
Section titled “av repo get”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.
av repo get <source-id> --project <project-id>Inspect a single repo:
av repo get 4b9d1c22 --project 7f3c2a1eav repo create
Section titled “av repo create”Add a git repo to a project as a scan source. The command confirms the new source ID and queues the first scan immediately.
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:
av repo create --project 7f3c2a1e --url https://github.com/acme/storefrontAttach the same repo but scan a long-lived release branch instead:
av repo create --project 7f3c2a1e --url https://github.com/acme/storefront --branch release/2.xav repo rescan
Section titled “av repo rescan”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.
av repo rescan <source-id> --project <project-id>Trigger a rescan after force-pushing a fix:
av repo rescan 4b9d1c22 --project 7f3c2a1eav repo delete
Section titled “av repo delete”Remove a repo from a project so it is no longer scanned.
av repo delete <source-id> --project <project-id>Detach a repo you no longer want scanned:
av repo delete 4b9d1c22 --project 7f3c2a1eExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 |
Command completed successfully |
1 |
Command failed - not logged in, missing required flag, or the API returned an error |
See also
Section titled “See also”av project- create and manage the projects repos attach toav techstack- manage the packages AlertaVuln tracks for a projectav sast server-scan- scan a project’s connected repos on AlertaVuln’s infrastructure (Enterprise)