Zum Hauptinhalt springen

Diese Seite ist nur auf Englisch verfügbar.

Run a scan

Start a repository scan from the web app, the CLI or GraphQL, choose branches and what to scan for, follow its progress and cancel it.

A scan checks a repository's commits and turns what it finds into findings. You start it from the web app, the CLI or the GraphQL API, and follow it live in the tasks bar until it finishes.

What it is for

Run a scan when you connect a repository, before a release, or whenever you want an up-to-date picture of a repository's secrets, personal data and vulnerable dependencies. To run scans on a fixed cadence instead, see Schedule recurring scans. To scan from a pipeline, see GitHub Action.

What a scan covers

  • Every commit on every branch, or only the commits on the branches you choose, or only the latest commit when you choose Latest commit only, leaving out files that match your ignore paths. In the API, scanDepth (FULL_HISTORY or LATEST_COMMIT) on the scan or schedule input chooses it, and leaving it out uses the team default from scanSettings.
  • Each finding gets a severity and a category (see Scan categories), and the repository's security score is updated when the scan finishes.
  • Scanning a repository again only checks the commits that are new since the last scan.
  • Secret and personal-data findings are reported for every commit scanned. Dependency findings are reported for the head of the default branch only, because that is the code you ship.

What you can set

  • Workspace: the workspace the repository belongs to.
  • Repository: the repository to scan.
  • What to scan for: the categories the scan covers. Every category your team may run is selected by default. One category can produce more than one scan in the list.

The rest is under Advanced options at the bottom of the form, because most scans need none of it. The section opens by itself when one of its fields is already set, or when the scan is being re-run after its git token expired.

  • Git Token: optional. Without one, only public repositories can be scanned. The first valid token linked to the workspace is filled in for you. A workspace connected through the Vulnara GitHub App needs no token. A scan uses the token's current value when it starts, so a connection that renewed its token while the scan waited still works. See Connect GitHub through the GitHub App.
  • Branches: leave empty to scan all branches (full history), or add branch names to scan only those. The list offers the repository's branches, and you can also type a name.
  • History: Full history reads every commit on the branch, and also finds secrets that were committed and later removed. Latest commit only reads the code as it is now, which is much faster. The form starts at your team's default, shown as Team default. Admins set that default in Settings > General under Default history; a team that never chose one scans the full history.
  • Create issues: open an issue in the repository for the findings. Needs a git token, or the GitHub App.
  • Auto-remediate: open a pull request that fixes findings. Needs Create issues. See AI remediation.

Do it

  1. In the web app, choose New Scan in the sidebar, then Repository. You can also start a scan from a repository's row on the Repositories screen, or with New scan in a workspace.
  2. Pick the workspace and repository, if they are not filled in already.
  3. Keep or remove categories under What to scan for. Open Advanced options if you want a particular token, branches or history, or to create issues.
  4. Choose Start scan. Vulnara opens Scan History and the scan appears in the tasks bar.
A repository scan in progress, with commits scanned out of the total

If only part of what you asked for could start, the app says so instead of reporting a plain success, and tells you why: either your plan's limit held part of it back, or part of it could not be started.

Run a scan again

Choose Redo Scan on a scan's page, or Run again in Scan History, or Re-run with Auto-Remediation on a finished scan. A re-run repeats the scans you chose, so the form names their categories and offers no category picker. Token, branch and issue options are under Advanced options.

From the CLI or the API

From the CLI, name a category:

sh
vulnara start_repository_category_scan --repositoryId <repository-id> --category SECRETS --branch main

--category takes SAST, SCA, SECRETS or PII. Web applications are not scanned this way; see Scan a web application. vulnara scan_categories lists the categories your team may run.

With GraphQL, use startRepositoryCategoryScan with a category, and scanCategories to list the categories you may run. The answer tells you how many scans started and why any did not.

graphql
mutation StartScan($input: StartRepositoryCategoryScanInput!) {
  startRepositoryCategoryScan(input: $input) {
    requested
    queued
    scanResultIds
    skipped {
      reason
    }
  }
}

The older startRepositoryScan still works. It is what the GitHub Action's scan-tools input and the CLI's start_repository_scan use; list the ids with the scan tools query, from the CLI or the GraphQL API.

See start_repository_category_scan and start_repository_scan for every CLI flag. To follow or stop a scan outside the web app, use tasks, taskEvents and cancelTask, or the CLI commands tasks and cancel_task.

Follow the progress

The tasks bar shows each running scan with the commits scanned out of the total. The total reads as calculating at first, and an estimated time remaining appears once the scan is under way. If some commits fail to scan, the task is shown in a warning state while the rest carry on.

In Scan History, a finished scan always shows how long it took. When the scan reused results from an earlier scan of the same commits, or had nothing to scan, the duration's tooltip says no scanner ran. A successful scan that has no score reads Not scored. When more than one scanner covers the same category, one category can produce several scans; they are told apart by number, for example Secrets (scanner 1) and Secrets (scanner 2).

You can filter the tasks bar by type (network, web, repository, workspace) and sort by newest or by progress. Finished tasks are collapsed into their own section. The tasks bar also shows workspace imports, with the reason under any that failed. See Connect a git provider.

Cancel or dismiss

  • Cancel: stops a scan that has not finished, after you confirm. The scan is marked cancelled.
  • Dismiss: removes a failed task from the tasks bar. A running task cannot be dismissed; cancel it instead.

Good to know

  • A scan is marked failed when none of its commits could be scanned, for example a private repository with no valid token. An empty repository finishes successfully, because there was nothing to scan.
  • When a scan through the GitHub App fails because the app cannot reach the repository, lacks permissions, or was suspended or removed, the scan says so and what to fix on GitHub.
  • If your team has a GitHub Projects board connected, scans do not open repository issues, whatever Create issues and Auto-remediate say. Tickets for findings are kept on the board instead.
  • Disabled repositories cannot be scanned. Enable them on the Repositories screen first.
  • Your plan limits scan time per month and how many scans run at the same time, counting repository, network and web application scans together. When the monthly allowance is used up, new scans are refused until it resets or you upgrade. When too many are running, extra ones are refused; start them again when one finishes. Each category you start counts once against the parallel limit, and if only some of several categories are refused, the others still start. A failed or cancelled scan uses no scan time.
  • Starting a scan needs the Editor role or above. See Teams and roles.
  • Vulnara can notify you when a scan finishes or fails, and a scan that introduces new critical or high findings raises its own alert. The scan-finished notification says how many findings the scan introduced and resolved at each severity, compared with the previous successful scan of the same repository and branches, and a first scan resolves nothing. The scan-failed notification says why it failed. See Notifications and Alerts.
  • Deleting a repository or workspace cancels any scan still running for it.