Skip to main content
Before you start, install the CLI and log in.

Run a scan

Go to the repository folder, then run:
vidoc without a command does the same as vidoc scan. The CLI scans only the current folder and its subfolders. To scan one part of a repository, go to that folder first.

What the CLI does

1

Find the repository

The CLI reads the origin remote URL and the current branch from Git. It finds the repository in your project by the remote URL. If the project does not have the repository, the CLI adds it. A folder without Git, or without an origin remote, becomes a directory entry with the folder name.
2

Index the files

The CLI lists the files and uploads the new and changed files to Vidoc. It skips files that your .gitignore excludes, and common files that are not source code, for example lock files, images, archives, and .env files.
3

Scan

The CLI starts a scan and waits until it is complete. A scan can take 10 to 15 minutes.
4

Show the results

The CLI shows the validated issues. For how Vidoc validates issues, refer to How it works.
If the current folder has a VIDOC.md file, the CLI also uploads it as context for the repository. Vidoc adds its content to the Memory of the repository. The maximum size is 1 MB.

Interactive and non-interactive mode

The CLI selects the mode from the terminal.
In a terminal, vidoc scan scans the files in the current folder that Vidoc has not scanned before. On the first run, this is all files. On the next runs, it is the new and changed files. If there is nothing new to scan, the CLI does not start a scan and shows the known issues.When the scan is complete, the CLI shows the validated issues in the scanned files. Use these keys:

Options

For the order in which the CLI applies options, environment variables, and the configuration file, refer to Configuration.

Read the results

The CLI shows only validated issues: issues that the Vidoc validation agent confirmed as real (verdict true positive). Each line has the severity, the issue name, and the file and line:
To review, triage, and change the status of the issues, open the Findings page in the web app. The CLI does not change the status of issues.

Export a PDF report

vidoc export makes a PDF report for one repository of your project.
  1. The CLI shows the repositories of the project. Select one.
  2. The CLI gets the validated issues with high or critical severity on the default branch of the repository.
  3. The CLI writes the PDF. The default file is vidoc-report.pdf in the current folder.
If the repository has no such issues, the CLI writes a summary report. The repository must have a default branch.
vidoc export asks you to select a repository. Run it in a terminal.

Exit codes

The exit code does not tell you if the scan found issues. A scan that finds issues is not an error. To fail a pipeline on issues, refer to Fail a pipeline on issues.

Files that the CLI writes

Add vidoc.log to your .gitignore file.

CI/CD pipelines

Scan the changes of a branch in CI.

Configuration

Profiles, environment variables, and precedence.