Sign inSign up

reversinglabs/rl-scanner-cloud

Verified Publisher

By ReversingLabs

•Updated 8 days ago

ReversingLabs rl-scanner-cloud Docker image

Image
Security
Integration & delivery
2

10K+

reversinglabs/rl-scanner-cloud repository overview

⁠reversinglabs/rl-scanner-cloud

Header image

reversinglabs/rl-scanner-cloud is the official Docker image created by ReversingLabs for users who want to automate their workflows on the Spectra Assure Portal and integrate it with CI/CD tools.

The rl-scanner-cloud Docker image provides access to commonly used Portal Projects workflows - uploading package versions to a project, scanning them, and generating analysis reports. You can also compare different package versions in a project, perform reproducibility checks for a package version, and save analysis reports to local storage. All successfully analyzed files are visible in the Portal interface, and accessible by you and any other Portal users who can access your projects.

This Docker image is based on Rocky Linux 10.

⁠What is the Spectra Assure Portal?

The Spectra Assure Portal is a SaaS solution that's part of the Spectra Assure platform - a ReversingLabs solution for software supply chain security. More specifically, the Portal is a web-based application for improving and managing the security of your software releases and verifying third-party software used in your organization.

With the Spectra Assure Portal, you can:

  • Scan your software packages to detect potential risks before release.
  • Improve your SDLC by applying actionable advice from security scan reports to all phases of software development.
  • Organize your software projects and automatically compare package versions to detect potentially dangerous behavior changes in the code.
  • Manage software quality policies on the fly to ensure compliance and achieve maturity in your software releases.

⁠Difference between rl-scanner and rl-scanner-cloud

If you're already familiar with the ReversingLabs Spectra Assure platform, you've likely come across another official Docker image: rl-scanner⁠. You may be wondering how that Docker image is different from rl-scanner-cloud.

In short:

  • rl-scanner is primarily intended for Spectra Assure CLI users, as it closely aligns with the CLI workflows and makes it easier to deploy the CLI in various environments.
  • rl-scanner-cloud is mainly for Spectra Assure Portal users who want to build their own integrations on top of the Portal features.

The following table lists more detailed differences between these two Docker images that should help you choose the most appropriate image for your use-case.

rl-scannerrl-scanner-cloud
Endpoint accessConnects to api.reversinglabs.com and data.reversinglabs.comConnects to a user-specified Portal instance (my.secure.software/{server}/api)
ScanningSoftware packages are scanned inside the Docker container, on the local system where the container is running.Software packages are scanned in the cloud, on the Portal instance to which they are uploaded.
Password managementUsers can provide passwords or (Base64-encoded) password list files to allow decrypting password-protected archives during the scan and getting complete analysis reports.Not supported at this time. The analysis reports will indicate that the file content is protected by an unknown password.
Policy controlsIf a permanent package store is used with the Docker image, users can modify policies through local configuration files.Any existing policy configuration for the user's organization and group on the Portal automatically applies.
ReportsUsers can choose the report format(s) they want to generate, and automatically save the reports to local storage or as pipeline artifacts.Users can choose the report format(s) they want to generate and save them to local storage or as pipeline artifacts. The SAFE report⁠ (rl-html format) is always generated, but it's accessible only in the Portal web interface. By default, the direct link to the SAFE report⁠ on a Portal instance is included in the Docker command output.
Accounts and licensingA valid rl-secure license with site key is required to use the Docker image. The size of analyzed files is deducted from the monthly analysis capacity tied to the user's rl-secure account.An active Portal account with a Personal Access Token is required to use the Docker image. The size of analyzed files is deducted from the monthly limit configured for the user's group and designated for projects.

⁠Quick reference

Maintained by:

Where to get help:

Where to file issues:

⁠Versioning and tags

The tag reversinglabs/rl-scanner-cloud:latest always points to the latest published image.

Versioned images are tagged reversinglabs/rl-scanner-cloud:vX.Y.Z, following semantic versioning⁠:

  • X (major) is increased for a breaking change, for example a parameter, environment variable or return code that changes meaning or is removed.
  • Y (minor) is increased for new functionality that keeps existing use working.
  • Z (patch) is increased for bug fixes and small changes.

Using a versioned tag makes it easier for cautious customers to control when they move to a new version. The changes in each version are listed in changes.md⁠.

⁠How to use this image

The most common workflow for this Docker image is to upload a file for analysis to a Spectra Assure Portal instance, where it is added as a package version to a new or an existing project and package. Portal users can then view the analysis report and manage the analyzed file⁠ like any other package version.

The image wraps the functionality of several Portal public API endpoints into a single command with configurable parameters⁠. As a result, users don't have to send multiple separate API requests, because the whole workflow can be completed in a single run.

To use the provided Portal functionality, an active account on a Portal instance is required, together with a Personal Access Token for API authentication. Before you start using the image, make sure all prerequisites⁠ are satisfied.

Access to input data (files you want to scan) and the reports destination directory (to optionally save analysis reports) is provided by using Docker volume mounts⁠.

To prevent issues with file ownership and access, the -u option is used to provide current user identification to the container. The line -u $(id -u):$(id -g) \ can be removed for platforms where docker runs as the current user like on Windows.

When the container starts, it will try to connect to a Spectra Assure Portal instance. Depending on your network settings, it may be required to access the internet through a proxy server. To add proxy configuration to the Docker command, use the environment variables RLSECURE_PROXY_* listed in the Environment variables⁠ section.

The standard proxy environment variables HTTPS_PROXY, HTTP_PROXY and NO_PROXY are also honoured when you pass them to the container (for example -e HTTPS_PROXY=http://proxy:3128). When RLSECURE_PROXY_SERVER is set, it takes precedence for all requests, and NO_PROXY does not apply to it.

⁠Prerequisites

To successfully use this Docker image, you need:

  1. A working Docker installation on the system where you want to use the image. Follow the official Docker installation instructions⁠ for your platform.

  2. An active Spectra Assure Portal account and a Personal Access Token generated for it. If you don't already have a Portal account, you may need to contact the administrator of your Portal organization to invite you⁠. Alternatively, if you're not a Spectra Assure customer yet, you can contact ReversingLabs⁠ to sign up for a Portal account. When you have an account set up, follow the instructions to generate a Personal Access Token⁠.

  3. One or more software packages to analyze. Your packages must be stored in a location that Docker will be able to access.

⁠Environment variables

The following environment variables can be used with this image.

Environment variableRequiredDescription
RLPORTAL_ACCESS_TOKENYesA Personal Access Token for authenticating requests to the Spectra Assure Portal. Before you can use this Docker image, you must create the token⁠ in your Portal settings. Tokens can expire and be revoked, in which case you'll have to update the value of this environment variable. It's strongly recommended to treat this token as a secret and manage it according to your organization's security best practices.
RLSECURE_PROXY_SERVERNoServer name for proxy configuration (IP address or DNS name).
RLSECURE_PROXY_PORTNoNetwork port on the proxy server for proxy configuration. Required if RLSECURE_PROXY_SERVER is used.
RLSECURE_PROXY_USERNoUser name for proxy authentication.
RLSECURE_PROXY_PASSWORDNoPassword for proxy authentication. Required if RLSECURE_PROXY_USER is used.
RLPORTAL_AUTH_USERNorl-scan-url only: user name for downloading the --import-url; can be used instead of --auth-user.
RLPORTAL_AUTH_PASSNorl-scan-url only: password for downloading the --import-url; can be used instead of --auth-pass.
RLPORTAL_BEARER_TOKENNorl-scan-url only: bearer token for downloading the --import-url; can be used instead of --bearer-token.

⁠Commands

The rl-scanner-cloud image supports the following commands:

  • rl-scan: scan a file using --file-path
  • rl-scan-url: scan a url using --import-url
  • rl-scan-filestream: scan a file using --file-path into the Portal File Stream⁠
  • rl-scan-url-filestream: scan a url using --import-url into the Portal File Stream⁠

⁠Configuration parameters rl-scan

The rl-scanner-cloud rl-scan image supports the following parameters.

ParameterRequiredDescription
--rl-portal-hostNoName of the Spectra Assure Portal host to use for the scan. Default: my.secure.software.
Typically, there is no need to specify this unless you have a dedicated host for your company, in which case you don't need to specify the --rl-portal-server parameter.
--rl-portal-serverNoName of the Spectra Assure Portal instance (tenant) to use for the scan.
The Portal instance name usually matches the subdirectory of my.secure.software in your Portal URL. For example, if your portal URL is my.secure.software/demo, the instance name to use with this parameter is demo.
--rl-portal-orgYesName of the Spectra Assure Portal organization to use for the scan. The organization must exist on the Portal instance specified with --rl-portal-server. The user account authenticated with the token must be a member of the specified organization and have the appropriate permissions to upload and scan a file. Organization names are case-sensitive.
--rl-portal-groupYesName of the Spectra Assure Portal group to use for the scan. The group must exist in the Portal organization specified with --rl-portal-org. Group names are case-sensitive.
--purlYesThe package URL (purl) used to associate the file with a project and package on the Portal. Package URLs are unique identifiers in the format [pkg:type/]<project></package><@version>. When scanning a file, you must assign a package URL to it, so that it can be placed into the specified project and package as a version. If the project and package you specified don't exist in the Portal, they will be automatically created. The pkg:type/ part of the package URL can be freely omitted, because the default value pkg:rl/ is always automatically enforced. To analyze a reproducible build artifact of a package version, you must append the ?build=repro parameter to the package URL of the artifact when scanning it, in the format <project></package><@version?build=repro>. The version is required.
--reproNoAlternative to appending ?build=repro to the --purl: marks the uploaded file as a reproducible build artifact of the package version. The version must already exist on the Portal. --force is ignored for reproducible builds.
--file-pathYesPath to the file you want to scan. The specified file must exist in the package source directory mounted to the Docker container. The file must be in any of the formats supported by Spectra Assure⁠. The file size on disk must not exceed 50 GB.
--filenameNoOptional name for the file you want to scan. If omitted, defaults to the file name specified with --file-path. When the file is uploaded and analyzed on the Portal, this file name is visible in the reports.
--replaceNoReplace (overwrite) an already existing package version with the file you're uploading.
--forceNoIn Spectra Assure Portal, a package can only have a limited amount of versions. If a package already has the maximum number of versions, you can use this optional parameter to delete the oldest version of the package and make space for the version you're uploading.
--diff-withNoThis optional parameter lets you specify a previous package version against which you want to compare (diff) the version you're uploading. The specified version must exist in the package. This parameter is ignored when analyzing reproducible build artifacts.
--submit-onlyNoWith this optional parameter, you skip waiting for the analysis result. When this parameter is used, the analysis report URL is not displayed in the output. The text Scan result: NONE will be displayed as there is no scan result.
--timeoutNoThis optional parameter lets you specify how long the container should wait for analysis to complete before exiting (in minutes). The parameter accepts any integer from 10 to 1440. The default timeout is 20 minutes.
--message-reporterNoOptional parameter that changes the format of output messages (STDOUT) for easier integration with CI tools. Supported values: text, teamcity.
--report-pathNoPath to the location where you want to store analysis reports. The specified path must exist in the reports destination directory mounted to the container.
--report-formatNoA comma-separated list of report formats⁠ to generate. Supported values: cyclonedx, sarif, spdx, rl-json, rl-checks, rl-cve, rl-uri, rl-summary-pdf, all. Spaces after the commas are allowed when the value is quoted, e.g. "sarif, spdx".
--pack-safeNoWhen this parameter is used, the RL-SAFE archive is automatically downloaded together with other specified report formats. The RL-SAFE archive⁠ is a convenient way to get the full SAFE report and all other supported report formats for a software package in a single file. The archive can be freely shared and moved between different computers, and viewed without requiring a Spectra Assure product license. To open the archive and work with it, you need the SAFE Viewer⁠ - a free, cross-platform tool developed by ReversingLabs. The RL-SAFE archive is stored in --report-path (required) under the file name provided by the Portal.

⁠Configuration parameters rl-scan-url

The rl-scanner-cloud rl-scan-url image supports the following parameters.

ParameterRequiredDescription
--rl-portal-hostNoName of the Spectra Assure Portal host to use for the scan. Default: my.secure.software.
Typically, there is no need to specify this unless you have a dedicated host for your company, in which case you don't need to specify the --rl-portal-server parameter.
--rl-portal-serverNoName of the Spectra Assure Portal instance (tenant) to use for the scan.
The Portal instance name usually matches the subdirectory of my.secure.software in your Portal URL. For example, if your portal URL is my.secure.software/demo, the instance name to use with this parameter is demo.
--rl-portal-orgYesName of the Spectra Assure Portal organization to use for the scan. The organization must exist on the Portal instance specified with --rl-portal-server. The user account authenticated with the token must be a member of the specified organization and have the appropriate permissions to upload and scan a file. Organization names are case-sensitive.
--rl-portal-groupYesName of the Spectra Assure Portal group to use for the scan. The group must exist in the Portal organization specified with --rl-portal-org. Group names are case-sensitive.
--purlYesThe package URL (purl) used to associate the file with a project and package on the Portal. Package URLs are unique identifiers in the format [pkg:type/]<project></package><@version>. When scanning a url, you must assign a package URL to it, so that it can be placed into the specified project and package as a version. If the project and package you specified don't exist in the Portal, they will be automatically created. The pkg:type/ part of the package URL can be freely omitted, because the default value pkg:rl/ is always automatically added. The version is required.
--reproNoAlternative to appending ?build=repro to the --purl: marks the imported file as a reproducible build artifact of the package version. The version must already exist on the Portal. --force is ignored for reproducible builds.
--replaceNoReplace (overwrite) an already existing package version with the url you're uploading.
--forceNoIn Spectra Assure Portal, a package can only have a limited amount of versions. If a package already has the maximum number of versions, you can use this optional parameter to delete the oldest version of the package and make space for the version you're uploading.
--diff-withNoThis optional parameter lets you specify a previous package version against which you want to compare (diff) the version you're uploading. The specified version must exist in the package.
--submit-onlyNoWith this optional parameter, you skip waiting for the analysis result. When this parameter is used, the analysis report URL is not displayed in the output. The text Scan result: NONE will be displayed as there is no scan result.
--timeoutNoThis optional parameter lets you specify how long the container should wait for analysis to complete before exiting (in minutes). The parameter accepts any integer from 10 to 1440. The default timeout is 20 minutes.
--message-reporterNoOptional parameter that changes the format of output messages (STDOUT) for easier integration with CI tools. Supported values: text, teamcity.
--report-pathNoPath to the location where you want to store analysis reports. The specified path must exist in the reports destination directory mounted to the container.
--report-formatNoA comma-separated list of report formats⁠ to generate. Supported values: cyclonedx, sarif, spdx, rl-json, rl-checks, rl-cve, rl-uri, rl-summary-pdf, all. Spaces after the commas are allowed when the value is quoted, e.g. "sarif, spdx".
--pack-safeNoWhen this parameter is used, the RL-SAFE archive is automatically downloaded together with other specified report formats. The RL-SAFE archive⁠ is a convenient way to get the full SAFE report and all other supported report formats for a software package in a single file. The archive can be freely shared and moved between different computers, and viewed without requiring a Spectra Assure product license. To open the archive and work with it, you need the SAFE Viewer⁠ - a free, cross-platform tool developed by ReversingLabs. The RL-SAFE archive is stored in --report-path (required) under the file name provided by the Portal.
--import-urlYesThe url where the file can be downloaded, when authentication is required use the --auth-user,--auth-pass or --bearer-token parameters
--auth-userNoSpecify when downloading the import-url requires basic authentication. Cannot be combined with --bearer-token
--auth-passNoSpecify when downloading the import-url requires basic authentication. Cannot be combined with --bearer-token
--bearer-tokenNoSpecify when downloading the import-url requires token authentication. Cannot be combined with either --auth-user or --auth-pass

⁠Configuration parameters rl-scan-filestream and rl-scan-url-filestream

These commands scan into the Portal File Stream instead of a project and package; see Scanning into the File Stream⁠.

  • rl-scan-filestream supports the same parameters as rl-scan, and rl-scan-url-filestream the same as rl-scan-url, except for the package version parameters --purl, --replace, --force, --repro and --diff-with, which do not exist in the File Stream.
  • The environment variables and return codes are the same.

⁠Return codes

The Docker container can exit with the following return codes.

CodeDescription
0Returned when:
- The file is successfully analyzed on the Portal with CI status PASS.
- The --submit-only parameter is used. That parameter now outputs: Scan result: NONE.
1Returned when:
- The file is successfully analyzed on the Portal with CI status FAIL.
2Returned when the command line cannot be parsed:
- A required parameter is missing.
- A parameter is unknown or has an invalid value (e.g. an invalid --purl, --report-format or --message-reporter).
101Returned when:
- The default or user-configured timeout expired.
- There is a problem with file scanning on the Portal.
- The wrong entrypoint command is specified.
- A parameter value fails validation after parsing (e.g. --file-path does not exist, --report-path is not an empty directory, an invalid --rl-portal-host or --import-url).
- RLPORTAL_ACCESS_TOKEN is not set or the proxy configuration is invalid.

You may also encounter any of the standard chroot exit codes⁠ in case of Docker-specific problems.

⁠Portal throttling

When the Portal limits the request rate, it answers with HTTP status 429. The container then waits and sends the same request again (uploads included), up to 5 attempts in total.

  • The wait is taken from the Retry-After header, or else from the Portal message (... available in N seconds), or else it is 60 seconds.
  • Waiting never goes past --timeout, counted from the start of the run.
  • Each wait is shown in the output, for example Portal throttle (429) on <url>: attempt 1 of 5, waiting 13s; <Portal message>.
  • If the Portal still answers 429 after the last attempt, or when the timeout is reached, the container exits with code 101.

When a report or the RL-SAFE archive is not ready yet (HTTP 202), the container asks again every 30 seconds, also never past --timeout. If it i

Tag summary

Content type

Image

Digest

sha256:2256387cd…

Size

93.9 MB

Last updated

8 days ago

docker pull reversinglabs/rl-scanner-cloud

This week's pulls

Pulls:

1,094

Last week