Scan command
The agent is launched using the scan command with possible scanning options:
scan dir– scanning a directory;scan file– scanning a file;scan image– scanning a container image;scan bom– scanning a SBOM;scan <technology>- scanning a directory using settings for selected technology;scan build– scanning a build.
TLS certificate verification
When connecting to the CodeScoring server, Johnny verifies its TLS certificate. If the agent's runtime environment does not trust the certificate, the HTTPS connection will fail. For example, if the certificate was issued by an internal certificate authority, add that authority's certificate to the trust store on the machine or in the container where Johnny runs.
The --insecure flag disables certificate and hostname verification. Use it only for temporary troubleshooting in a trusted environment: without verification, the server's identity cannot be confirmed.
This flag does not control connections to container image registries. Registry connections use the separate insecure-skip-tls-verify parameter in the image scanning configuration.
Launch options
Available and required options for launching the agent for scanning can be viewed using the help flag.
The --backend_url parameter must contain the full address of the on-premise platform. The legacy --api_url alias is also supported. The value for --backend_api_token can be taken from the platform user profile; --api_token remains supported as a legacy alias.
The default SCA pipeline is backend. To use the direct Index pipeline, set --sca-analysis-mode index, provide --index_url, and provide --index_token when --index-mode direct is used. With --index-mode proxy, use the backend token for authentication. The optional --judge_url enables dependency policy checks through Judge.
Specifying the --project parameter will allow scanning to apply policies related to the selected project.
To specify the path to a SBOM save file, you must add the --bom-path parameter to the request or assign the bom-path variable in the config file. By default, the SBOM is saved in the startup directory in the file bom.json.
Run results
Depending on the run result and launch parameters, the agent returns the corresponding exit code:
- 0 – successful run, no issues were detected;
- 1 – as a result of the scan, problems were found that correspond to the configured security policies, user action is required;
- 2 – run failure;
- 3 – empty result, no artifacts were found for analysis. Returned only if the
--block-on-empty-resultparameter is set totrue.
Failed resolve
2026.35.0 If the agent failed to resolve dependencies for some manifests, the list of these manifests is printed at the end of the scan results under the Failed resolve heading. Use it to check whether the build environment provides everything required for resolution.
Priority of settings
Since agent startup parameters can be configured in multiple ways, if two or more methods are used at the same time, the agent will accept parameters in the following priority order:
- Value of the scan-technology command (if used);
- Value of the command flag;
- Value of environment variable;
- Value from config file.
Authentication requirements
The selected pipeline requires its corresponding credentials. For the default backend pipeline, specify --backend_url and --backend_api_token. For the direct index pipeline, specify --index_url and --index_token (or, instead of index_token, configure proxy mode with backend credentials: backend_url and backend_api_token).
