﻿# Sending analysis results to the server

## Atlas Scanner Utility

The Atlas Scanner utility is used to send the analysis results to the server\. It is distributed as a ready\-to\-use Docker image:

```cpp
pull viva64/atlas-scanner
```

By default, this downloads the latest stable version of the utility\. To download a specific version, use the Docker tagging system:

```cpp
pull viva64/atlas-scanner:8.0
```

It is recommended that all PVS\-Studio Atlas services be kept on the same version\.

## Quick start

Before running the scanner, enter the PVS\-Studio license on the [server](https://pvs-studio.com/en/docs/manual/7200/) and obtain the following two values, which can be found in the server settings:

* API key for accessing the server;
* the ID of the project branch where the results will be uploaded\.

For more information on these settings, see the [Project and branch management](https://pvs-studio.com/en/docs/manual/7207/) documentation page\.

To obtain the values, enter the following command:

```cpp
docker run --rm viva64/atlas-scanner --help
```

The minimal command to run the scanner might look like this:

_docker run \-\-rm \-v **"/Users/nickname/Downloads/BotSharp**":"/mnt/project" viva64/atlas\-scanner \-\-reportPaths /mnt/project/**BotSharp\.json** \-\-sourceTreeRoot /mnt/project/ \-\-serverUrl **http://atlas\-server:8080** \-\-apiKey **49931204\-56e0\-4cbf\-b87a\-29c94735cc9e** \-\-branchId **85c6129f\-0097\-466a\-9e48\-466a7b74d75f** \-\-logDir /mnt/project/scanner\_logs_

To get started quickly, replace the text in bold with your own values\.

If Atlas Server and Atlas Scanner are running on the same machine, the analysis results must be sent to `http://host.docker.internal:8080`\.

## Command\-line arguments

Docker command\-line arguments used:

* `run` \(**required**\) — creates and starts a new container based on the specified image\.
* `-v` \(**required**\) — mounts the project directory to the Docker container so that Atlas Scanner inside the container can process the scanner report and the source files\.
* `--rm` — instructs Docker to remove the container after it has finished running\.

Key command\-line arguments for Atlas Scanner:

* `--version` — displays information about the current version\.  
* `--help` — displays help information with all command\-line arguments in the console\.
* `--reportPaths` \(**required**\) — paths to analyzer reports in `.plog`, `.json`, and `.sarif` \(in further updates\) formats\. Multiple paths can be listed if reports from different code analyzers need to be uploaded to a single project branch\.
* `--sourceTreeRoot` \(**required**\) — the path to the project directory containing the source code files\.
* `--serverUrl` \(**required**\) — the address where the Atlas Server receiving the results is deployed\.
* `--apiKey` \(**required**\) — an authorization key that allows Atlas Scanner to connect\. API keys are created in the Atlas Server settings by users with **Project management** access\.
* `--branchId` \(**required**\) — the branch ID in the project where the analysis results should be uploaded\.
* `--gitBlame` — the argument enables collecting info about committers and merging it with the analysis results\.
* `--logDir` — the directory containing Atlas Scanner logs\. Analyzer logs and reports are not included in the stored data\.
* `--sourceMask` — the mask used to package source code files and send them to the server\. Default value: `.c.cpp.hpp.h.cc.cxx.cs.csx.razor.java.ts.js.go`\.
* `--uploadMode` — specifies the mode for handling source code files:  
  * `ReportSources` \(by default\) packages only those source code files specified in the analyzer report\. Ignores the `sourceMask` argument\.  
  * `MaskSources` — packages all source files matching the mask specified in the `sourceMask` argument, as well as the files specified in the analyzer report\.
  * `WithoutSources` — source code files are not sent to the server\.
* `--quietMode` — a mode that suppresses console output\. When used with the `logDir` argument, all output is saved to a separate file instead\.

## Atlas Scanner exit codes  

Description of the exit codes for the utility:

* 0 — the scanner completed successfully;  
* 1 — an internal error occurred while the scanner was running; report this to the developers using the [feedback](https://pvs-studio.com/en/about-feedback/) form;
* 2 — the scanner was run with an incorrect argument;
* 3 — error loading a PVS\-Studio report in `.plog` format;
* 4 — error loading a PVS\-Studio report in `.json` format;
* 5 — error loading a PVS\-Studio report in `.sarif` format;
* 6 — error packaging the `.pvsmap` report before sending it;
* 7 — unable to connect to the server due to network issues;
* 8 — the server is unavailable to receive the analyzer report;
* 9 — a problem with the PVS\-Studio license entered on the server;
* 10 — the specified project branch was not found on the server;
* 11 — the specified project branch is archived and does not accept analysis results;
* 12 — a problem uploading the `.pvsmap` report to the server\.

## Possible issues & their troubleshooting

### "The SSL connection could not be established" error

The error can occur for various reasons\. Most of them are related to server administration rather than the software itself\.

If your company uses a self\-signed certificate for internal services, please pass it into the Atlas Scanner container with the `-v` parameter:

```cpp
-v "/path/to/rootCA.crt":"/etc/ssl/certs/my-server-cert.pem:ro"
```

### "Connection refused" error on macOS

If your Atlas Server is deployed on a local network, you may run into trouble uploading analysis results on macOS\. One version of Docker Desktop introduced a regression bug \(officially confirmed\) that breaks container access to local IPs\.

As of spring 2026, it's still reproducible on macOS Tahoe\. It's recommended to use alternatives to Docker Desktop, like [OrbStack](https://orbstack.dev/)\.

After installing OrbStack, check which Docker engine is enabled:

```cpp
docker context ls
```

If it is not OrbStack, mark it as active with:

```cpp
docker context use orbstack
```