Troubleshooting the Vulnerability Scanning service
Use troubleshooting information to identify and address common issues that can occur while working with Oracle Cloud Infrastructure Vulnerability Scanning Service.
Can’t Create Scan Recipes or Scan Targets
Fix problems that prevent you from creating scan recipes or scan targets for compute (host) or image scans.
To create a Vulnerability Scanning recipe or Vulnerability Scanning target, you must be given the required type of access in a policy (IAM) written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool.
- Use the following documentation to verify that you have the required policies for creating compute and image scan recipes and targets.
- Add any missing required policies.
No Vulnerability Scanning Results
Fix general problems that prevent you from seeing any type of Vulnerability Scanning report.
Target Was Created Less Than 24 Hours Ago
After you create a target, the Vulnerability Scanning service doesn’t immediately scan the specified target resources.
After creating a target that's associated with your recipe, it can take up to 24 hours for the Vulnerability Scanning service to perform the first scan of the target resources. For Compute targets, this delay occurs if you configured your recipe with a Daily schedule or a Weekly schedule.
Missing IAM Policy
To view any type of Vulnerability Scanning report, you must be given the required type of access in a policy (IAM) written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool.
For example, to allow users in the group SecurityAuditors
to view all Vulnerability Scanning resources in the compartment SalesApps
:
Allow group SecurityAuditors to read vss-family in compartment SalesApps
Verify that you have the required policies to view scanning results. See Vulnerability Scanning IAM Policies.
Wrong Compartment Is Specified
Within the Console, be sure to choose the Compartment that contains the Vulnerability Scanning results for the targets that you want to view.
The Vulnerability Scanning service saves the results for a Compute instance in the same compartment as the instance's Vulnerability Scanning target.
Consider the following example.
- The Compute instance
MyInstance
is inCompartmentA
. MyInstance
is specified inTarget1
.Target1
is inCompartmentB
.- All reports related to
MyInstance
are inCompartmentB
.
The Vulnerability Scanning service saves the results for an image repository in the same compartment as the repository's Vulnerability Scanning target.
Consider the following example.
- The repository
MyRepo
in Container Registry is inCompartmentA
. MyRepo
is specified inTarget1
.Target1
is inCompartmentB
.- All reports related to
MyRepo
are inCompartmentB
.
All Features in the Recipe Are Disabled
If you created a recipe in the Vulnerability Scanning service, but you disabled all scanning options in the recipe, then the Vulnerability Scanning service doesn't scan any targets assigned to this recipe.
In the Console, go to the recipe and enable the necessary scanning options. See:
No Host Scans
Fix problems that prevent you from seeing the results of host scans for Compute targets.
If your issue isn't listed here, see No Vulnerability Scanning Results for other common scanning issues.
Agent-Based Scanning Isn’t Enabled
To create host scans, the Vulnerability Scanning service uses the Oracle Cloud Agent, which runs on the target Compute instances. By default, Agent Based Scanning is enabled in a recipe. If you disabled this option in your recipe, then the Vulnerability Scanning service doesn’t create host scans for the targets that are associated with your recipe.
Scanning Plugin Is Disabled on the Agent
The Oracle Cloud Agent process manages plugins running on the Compute instance. The Vulnerability Scanning plugin is used to detect vulnerabilities and to test CIS benchmarks. By default, the Vulnerability Scanning plugin is enabled on all instances running the agent, but the plugin can be disabled.
If you manually disabled the Vulnerability Scanning plugin on the target Compute instances, you must enable it.
Missing IAM Policy to Deploy the Agent
If the target Compute instances aren’t running the Oracle Cloud Agent, the Vulnerability Scanning service automatically deploys the agent to the instances. However, an administrator must give the Vulnerability Scanning service permission to update your target Compute instances.
Instance Isn’t Running the Latest Agent
If the target Compute instance is running Oracle Cloud Agent version 1.11.0
, it might not automatically update itself to the latest version.
Manually update Oracle Cloud Agent on the instance. See:
Missing Service Gateway for Instances with No Public IP Address
A Compute instance is associated with a virtual cloud network (VCN) and a subnet . If an instance in the target is on a private subnet or has no public IP address, the VCN must include a service gateway and a route rule for the service gateway. See Access to Oracle Services: Service Gateway.
If the VCN or service gateway isn’t configured correctly, the Vulnerability Scanning service isn’t able to communicate with Compute instances on the private subnet and perform a host scan.
The service gateway can't be configured to allow traffic for a single service only, such as Object Storage.
Traffic Forwarding Is Disabled on an Instance with No Public IP Address
A VNIC enables an instance to connect to a VCN and determines how the instance connects with endpoints inside and outside the VCN. Each VNIC resides in a subnet in a VCN. If a Compute instance in your target is on a private subnet or has no public IP address, the instance's VNICs must be able to forward traffic.
If the VNICs aren’t configured correctly, the Vulnerability Scanning service isn’t able to communicate with a Compute instance on a private subnet and perform a host scan.
Edit the instance's VNICs and select the option Skip source/destination check. See Update an Existing VNIC.
No Container Image Scans
Fix problems that prevent you from seeing the results of container image scans.
If your issue isn't listed here, see No Vulnerability Scanning Results for other common scanning issues.
Missing IAM Policy to Access Container Registry
An administrator must give the Vulnerability Scanning service permission to pull images from Container Registry.
The policy must specify the compartments that contain your target image repositories.
Can't Export Scanning Results
Fix problems that prevent you from exporting scan reports or vulnerability reports to your local machine.
Missing IAM Policies
Your administrator might have given you read permissions for scan reports and vulnerability reports, but not export permissions.
Verify that you have the required policies to export Vulnerability Scanning reports. See Vulnerability Scanning IAM Policies.
For example, to allow users in the group SecurityAuditors
to view all Vulnerability Scanning resources in the compartment SalesApps
and to export the results:
Allow group SecurityAuditors to read vss-family in compartment SalesApps
Allow group SecurityAuditors to manage host-agent-scan-results in compartment SalesApps where request.operation = 'ExportHostAgentScanResultCsv'
Allow group SecurityAuditors to manage host-vulnerabilities in compartment SalesApps where request.operation = 'ExportHostVulnerabilityCsv'
The export operation is available for the
host-vulnerabilities
resource type, not the vss-vulnerabilities
resource type.Delete Compartment Failed
Fix problems that prevent you from deleting a compartment that you used for Vulnerability Scanning targets and reports.
Reports Exist in the Compartment
A compartment must be empty before you can delete it, including all scan reports. You can't delete reports using the Console. Use the CLI or API.
There are separate CLI commands and API operations for each report type. For example:
To quickly delete all types of reports from a compartment, you can run a script using Cloud Shell.
Reported CVE is Already Fixed in Host (False Positive)
Fix problems that cause host scans to report vulnerabilities that were already fixed.
Oracle uses common vulnerabilities and exposures (CVE) numbers to identify security vulnerabilities for operating systems and other software, including critical patch updates and security alert advisories. CVE numbers are unique, common identifiers for publicly known information about security vulnerabilities. View Qualys IDs (QIDs) in the Vulnerability Scanning service user interface.
During a host scan, the Vulnerability Scanning service compares the version of OS packages on the host with the fixed version of the packages in the open source CVE database.
If you're using the OS Management service to update the target hosts, then the following scenario often indicates a false positive:
- The Vulnerability Scanning service report says that a specific CVE number isn’t fixed in a target host.
- The OS Management service says that there are no security updates to install on the same target host.
CVE Database Inaccuracies
Oracle Cloud Infrastructure Vulnerability Scanning Service is continually working to improve scan results by using the latest Oracle Linux and open source databases, but there can be inaccuracies in these databases, or in the method used by the service to detect the CVE. For example, the Vulnerability Scanning service can report a security issue in a Linux instance even though:
- The issue was recently fixed in the latest Linux distribution
- The issue was fixed in the latest Linux distribution but recently backported to older versions
If you're concerned that a vulnerability detected by the Vulnerability Scanning service might be a false positive, then you can use a CVE number to verify whether the vulnerability is already fixed in your Compute instance.
For example, to verify a CVE for Oracle Linux:
- From Unbreakable Linux Network CVE Summary, search for the CVE number.
- From the Errata Information in the CVE details, identify the Release Date for the version of Oracle Linux running on the Compute instance.
If the version has a release date, then the CVE is fixed in that version.
- Connect to the Compute instance using SSH.
- Search the package change log for the CVE number.
rpm -q --changelog package | grep <CVE>
CVE Fixed Using Ksplice
Oracle Ksplice allows you to update Oracle Linux hosts with important security patches without needing to reboot.
If you fixed a CVE using Ksplice and didn’t reboot the host, the Vulnerability Scanning service might continue to report it as a vulnerability. You can use the CVE number to verify whether the vulnerability is already fixed in your Compute instance.
Oracle Autonomous Linux is a self-patching operating system image based on Oracle Linux. It automatically applies patches daily using Oracle Ksplice. Because Oracle Autonomous Linux updates the kernel without rebooting the host, the Vulnerability Scanning service might continue to report a vulnerability even though it was fixed.
Old Kernel or Package Files
If old, unused kernel or package files are present on your host's file system, the Vulnerability Scanning service might report these old files as a vulnerability. This scenario can occur if you created backup copies of these files, or the files weren’t cleaned up properly during an update or uninstall.
- Refer to the detected CVE description to identify the list of files associated with the vulnerability.
- Search your target host for any copies of these files and delete them.
No Cloud Guard Results
Fix problems that prevent you from seeing any Vulnerability Scanning problems in Cloud Guard.
Cloud Guard analyzes the results of the Vulnerability Scanning service and reports the following types of problems:
- Scanned container image has vulnerabilities
- Scanned host has vulnerabilities
- Scanned host has open ports
Before troubleshooting Cloud Guard, be sure you're able to view Host Scans, Port Scans, or Container Image Scans in the Vulnerability Scanning service. If not, see No Vulnerability Scanning Results.
For more information about common Cloud Guard problems, see Troubleshooting Cloud Guard.
The Cloud Guard Targets Don’t Include Target Hosts or Containers
Cloud Guard targets are separate resources from Vulnerability Scanning targets. To use Cloud Guard to detect problems in Vulnerability Scanning reports, the Vulnerability Scanning target compartment must be the same as the Cloud Guard target compartment, or be a subcompartment of the Cloud Guard target compartment.
Consider this scenario.
CompartmentA
andCompartmentB
are siblings (one isn’t a subcompartment of the other).- The Compute instance
MyInstance
and the image repositoryMyRepo
are inCompartmentA
. - The Vulnerability Scanning target
ScanTarget1
is set toCompartmentA
. - The Cloud Guard target
CGTarget1
is set toCompartmentB
.
In this example, Cloud Guard doesn’t show problems for vulnerabilities detected in MyInstance
and MyRepo
. Inspect your target settings in Cloud Guard and the Vulnerability Scanning service. If the Cloud Guard target is set to the root compartment for your tenancy, then no change is needed.
Create a Cloud Guard target that includes the compartments in your Vulnerability Scanning targets. See Managing Targets.
The Vulnerability Scanning Rules Are Disabled
In an Oracle-managed detector recipe like OCI Configuration Detector Recipe, all detector rules are enabled. However, if you created a custom detector recipe and didn’t enable the Vulnerability Scanning detector rules, Cloud Guard doesn’t report any Vulnerability Scanning problems.
Enable the Scanning detector rules. See Using the Cloud Guard Vulnerability Scanning Detector Rules.
The Vulnerability Scanning Rule Settings Exclude Your Vulnerabilities
In Cloud Guard detector recipes, the settings for the Vulnerability Scanning detector rules control which vulnerabilities are reported as problems in Cloud Guard.
- Disallowed port numbers that Cloud Guard reports as a problem
- Allowed port numbers that Cloud Guard ignores
- Vulnerability risk levels (Low, Medium, High, Critical) that Cloud Guard reports as a problem
Consider the following examples.
- A port scan in the Vulnerability Scanning service identifies the open ports 111 and 123, but the Vulnerability Scanning detector rules in Cloud Guard are configured to allow ports 111 and 123.
- A host scan in the Vulnerability Scanning service identifies vulnerabilities with the risk level Medium, but the Vulnerability Scanning detector rules in Cloud Guard are configured only to report vulnerabilities that are High or Critical.
Verify the settings for the Vulnerability Scanning detector rules in your configuration detector recipe. See Updating the Vulnerability Scanning Detector Rules.
Qualys Agent Installation Failed
Fix problems that prevent you from installing the Qualys agent.
Missing IAM Policies
To install the Qualys agent, you and the Qualys agent must be given the required type of access in a policy (IAM) written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool.
- Verify that you have the required policies to install the Qualys agent. See Agent-Based Standard Policies and Agent-Based Qualys Policies.
- Add any missing required policies.
Invalid License
The Vulnerability Management application wasn't selected when you generated the Cloud Agent Activation key in the Qualys portal.
- Go to the Qualys portal and select the Vulnerability Management application for the Activation Key. See the Qualys Cloud Platform documentation for instructions.
- Install the Qualys agent.
Can’t See the Qualys Scan Reports in the OCI Console
Fix problems that prevent you from viewing Qualys scan reports in the OCI Console.
If the Qualys scan reports appear only in the Qualys portal but not the OCI Console, open support ticket using the Support Center.
Wrong Compartment Is Specified
Within the Console, be sure to choose the Compartment that contains the Vulnerability Scanning results for the targets that you want to view.
The Vulnerability Scanning service saves the results for a Compute instance in the same compartment as the instance's Vulnerability Scanning target.
Consider the following example.
- The Compute instance
MyInstance
is inCompartmentA
. MyInstance
is specified inTarget1
.Target1
is inCompartmentB
.- All reports related to
MyInstance
are inCompartmentB
.
Recipe Isn’t a Qualys Agent Scan Recipe
The Qualys agent must be specified in the Compute scan recipe.
Qualys License Key Stored in the Wrong Format
The license key used in the Qualys agent scan recipe must be stored in plain text.
Unsuccessful Qualys Agent Install
The Qualys agent might not be installed and provisioned properly.
- Confirm that the Compute instance shows up in the Qualys portal.
- Confirm that there are no errors associated with the Compute instance in the Target Errors page.
Egress Rules Not Set Up Correctly
Ensure that any egress rules set up on your VCN allow the Qualys agent to communicate to servers outside of OCI.
Vulnerability Scanning Oracle Cloud Agent Plugin not Working in a Windows Domain Controller Instance
Fix problems that prevent you from running the Vulnerability Scanning Oracle Cloud Agent Plugin.
Cause
When you use a Windows Server instance as a domain controller, features that depend on Oracle Cloud Agent, such as the Monitoring service and the OS Management service, aren't available.
Remedy
See the following MOS article for the remedy: Doc ID 2919839.1.