5.3. Updating Scanner definitions in offline mode
Scanner maintains a database of vulnerabilities. When Red Hat Advanced Cluster Security for Kubernetes (RHACS) runs in normal mode, Central retrieves the latest vulnerability data from the internet, and Scanner retrieves vulnerability data from Central.
However, if you are using RHACS in offline mode, you must manually update the vulnerability data. To manually update the vulnerability data, you must upload a definitions file to Central, and Scanner then retrieves the vulnerability data from Central.
In both online and offline mode, Scanner checks for new data from Central every 5 minutes by default. In online mode, Central also checks for new data from the internet approximately every 5-20 minutes.
The offline data source is updated approximately every 3 hours. After the data has been uploaded to Central, Scanner downloads the data and updates its local vulnerability database.
To update the definitions in offline mode, perform the following steps:
- Download the definitions.
- Upload the definitions to Central.
5.3.1. Downloading Scanner definitions 复制链接链接已复制到粘贴板!
If you are running Red Hat Advanced Cluster Security for Kubernetes in offline mode, you can download the vulnerability definitions database that Scanner uses and then upload it to Central.
Prerequisites
- To download Scanner definitions, you need a system with internet access.
Procedure
To download the definitions, perform one of the following actions:
-
Recommended: Beginning with RHACS version 4.4, use the
roxctl scanner download-db --scanner-db-file scanner-vuln-updates.zipcommand to download the definitions. - Go to https://install.stackrox.io/scanner/scanner-vuln-updates.zip to download the definitions.
-
Recommended: Beginning with RHACS version 4.4, use the
5.3.2. Uploading definitions to Central 复制链接链接已复制到粘贴板!
To upload Scanner definitions to Central, you can either use an API token or your administrator password. Red Hat recommends using an authentication token in a production environment because each token is assigned specific access control permissions.
You can upload the vulnerability definitions database that Scanner uses to Central by using an API token.
Prerequisites
- You must have an API token with the administrator role.
-
You must have installed the
roxctlcommand-line interface (CLI).
Procedure
Set the
ROX_API_TOKENand theROX_CENTRAL_ADDRESSenvironment variables:$ export ROX_API_TOKEN=<api_token>$ export ROX_CENTRAL_ADDRESS=<address>:<port_number>Run the following command to upload the definitions file:
$ roxctl scanner upload-db \ -e "$ROX_CENTRAL_ADDRESS" \ --scanner-db-file=<compressed_scanner_definitions.zip>
You can upload the vulnerability definitions database that Scanner uses to Central by using your Red Hat Advanced Cluster Security for Kubernetes administrator password.
Prerequisites
- You must have the administrator password.
-
You must have installed the
roxctlcommand-line interface (CLI).
Procedure
Set the
ROX_CENTRAL_ADDRESSenvironment variable:$ export ROX_CENTRAL_ADDRESS=<address>:<port_number>Run the following command to upload the definitions file:
$ roxctl scanner upload-db \ -p <your_administrator_password> \ -e "$ROX_CENTRAL_ADDRESS" \ --scanner-db-file=<compressed_scanner_definitions.zip>