Create IAM policies to control who has access to Oracle Cloud Infrastructure Vulnerability Scanning Service resources, and to control the type of access
for each group of users.
By default, only users in the Administrators group have access to all Vulnerability Scanning resources. If you’re new to IAM policies, see Getting Started with Policies.
For a complete list of all policies in Oracle Cloud Infrastructure, see the Policy Reference.
Note
In addition to granting users access to Vulnerability Scanning resources, the Vulnerability Scanning service itself must be granted access to your target resources. See Policy Examples.
Resource Types
The following resource types are related to Vulnerability Scanning.
To assign permissions to all Vulnerability Scanning resources,
use the aggregate type:
vss-family
To assign permissions to individual resource types:
container-scan-recipes
container-scan-results
container-scan-targets
host-agent-scan-results
host-cis-benchmark-scan-results
host-port-scan-results
host-scan-recipes
host-scan-targets
host-vulnerabilities
vss-vulnerabilities
vss-work-requests
In Vulnerability Scanning, an instance (Compute) is also called a host.
A policy that uses <verb> vss-family is equivalent
to writing a policy with a separate <verb><resource-type> statement for each of the individual
resource types.
Supported Variables 🔗
Vulnerability Scanning IAM policies support all the general
policy variables.
Allow users in the group SecurityAdmins to create, update, and delete all Vulnerability Scanning resources in the entire tenancy:
Copy
Allow group SecurityAdmins to manage vss-family in tenancy
Allow users in the group SecurityAdmins to create, update, and delete all Vulnerability Scanning resources in the compartment SalesApps:
Copy
Allow group SecurityAdmins to manage vss-family in compartment SalesApps
Allow users in the group SecurityAuditors to view all Vulnerability Scanning resources
in the compartment SalesApps:
Copy
Allow group SecurityAuditors to read vss-family in compartment SalesApps
Allow users in the group SecurityAuditors to view all Vulnerability Scanning resources in the compartment SalesApps and to export the results:
Copy
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'
Note
The export operation is available for the host-vulnerabilities resource type, not the vss-vulnerabilities resource type.
Allow users in the group SecurityAdmins to create, update, and delete Compute (host) scan recipes in the entire tenancy:
Copy
Allow group SecurityAdmins to manage host-scan-recipes in tenancy
Allow users in the group SecurityAuditors to view all Compute (host) scanning results in the compartment SalesApps:
Copy
Allow group SecurityAuditors to read host-agent-scan-results in compartment SalesApps
Allow group SecurityAuditors to read host-port-scan-results in compartment SalesApps
Allow group SecurityAuditors to read host-cis-benchmark-scan-results in compartment SalesApps
Allow group SecurityAuditors to read container-scan-results in compartment SalesApps
Allow group SecurityAuditors to read vss-vulnerabilities in compartment SalesApps
To use agent-based scanning of Compute instances, then you must also:
Grant the Vulnerability Scanning service permission to deploy the Oracle Cloud Agent to your target Compute instances.
Grant the Vulnerability Scanning service permission to read the VNIC (virtual network interface card) on your target Compute instances.
Examples:
Allow the Vulnerability Scanning service and users in the group SecurityAdmins to perform agent-based scanning in the entire tenancy:
Copy
Allow group SecurityAdmins to manage vss-family in tenancy
Allow service vulnerability-scanning-service to manage instances in tenancy
Allow service vulnerability-scanning-service to read compartments in tenancy
Allow service vulnerability-scanning-service to read vnics in tenancy
Allow service vulnerability-scanning-service to read vnic-attachments in tenancy
Allow the Vulnerability Scanning service and users in the group SecurityAdmins to perform agent-based scanning on instances in the compartment SalesApps:
Copy
Allow group SecurityAdmins to manage vss-family in compartment SalesApps
Allow service vulnerability-scanning-service to manage instances in compartment SalesApps
Allow service vulnerability-scanning-service to read compartments in compartment SalesApps
Allow service vulnerability-scanning-service to read vnics in compartment SalesApps
Allow service vulnerability-scanning-service to read vnic-attachments in compartment SalesApps
Allow the Vulnerability Scanning service and users in the group SecurityAdmins to perform agent-based scanning on instances in the compartment SalesApps. The VNICs of these instances are in the compartment SalesNetwork:
Copy
Allow group SecurityAdmins to manage vss-family in compartment SalesApps
Allow service vulnerability-scanning-service to manage instances in compartment SalesApps
Allow service vulnerability-scanning-service to read compartments in compartment SalesApps
Allow service vulnerability-scanning-service to read vnics in compartment SalesNetwork
Allow service vulnerability-scanning-service to read vnic-attachments in compartment SalesNetwork
To scan images in Container Registry, then you must also grant the Vulnerability Scanning service permission to pull images from Container Registry.
Examples:
Allow the Vulnerability Scanning service and users in the group SecurityAdmins to scan all container images in the entire tenancy:
Copy
Allow group SecurityAdmins to manage vss-family in tenancy
Allow service vulnerability-scanning-service to read repos in tenancy
Allow service vulnerability-scanning-service to read compartments in tenancy
Allow the Vulnerability Scanning service and users in the group SecurityAdmins to scan container images in the compartment SalesApps:
Copy
Allow group SecurityAdmins to manage vss-family in compartment SalesApps
Allow service vulnerability-scanning-service to read repos in compartment SalesApps
Allow service vulnerability-scanning-service to read compartments in compartment SalesApps