How-to guide

Scan Oracle Cloud workloads for vulnerabilities

Learn how to scan Oracle Cloud compute and container workloads with the Vulnerability Scanning service, schedule scans, and fix findings in order.

By the Cloudverg engineering team · · 5 min read

Why this matters

A vulnerability scan on Oracle Cloud Infrastructure tells you which installed packages and container layers have known issues. That matters because most workloads you run there are Linux or Windows hosts plus images pulled from Oracle Cloud Infrastructure Registry. A scan gives you a list you can act on, not a feeling.

Oracle Cloud changes the shape of the job. Instances live in compartments, boot volumes get rebuilt, and container images move through OCIR. A scan that covers one compartment or one host misses the image that gets deployed next week. You want coverage tied to how you build and deploy, not a one-time sweep.

Scan results also help during an incident. If a host is suspected, a recent scan shows which packages were exposed before the event. Keep that context short and current. A clean scan is a snapshot, not a permanent state.

Before you start

Decide the scope by compartment and tag. Write down which compartments hold production, staging and shared services, then pick tags such as owner and environment. The scan target needs a clear boundary, or the findings list becomes a pile without owners.

Check the Oracle Cloud Agent on your compute instances. Host scans use the Vulnerability Scanning plugin in the agent. If the plugin is disabled, the instance can look healthy in the console and still produce no host findings. Confirm the agent is running and the plugin is enabled on a sample instance before you build recipes.

Confirm permissions. Your security team needs to create scan recipes and scan targets and read results. Application teams need read access to findings for their compartments. Container image scans need access to the OCIR repositories you intend to scan. Also decide where events go: an OCI Notifications topic with a subscription your team reads is enough to start.

How to do it

The service has two useful paths: host scans and container image scans. Host scans look at packages on running instances through the agent. Container image scans look at image layers in OCIR, even before an image runs. Use both if you build images and run them on compute or OKE.

Start with a narrow target, prove the workflow, then widen. A first target on one production compartment and one image repository will show you the noise level. If every finding goes to one team, the queue will stall. Assign owners by tag and route findings to the team that can patch or rebuild.

Schedule scans to match your change rate. Weekly host scans catch drift on long-lived instances. Image scans should run on every build or on a short schedule for base images you reuse. After a patch cycle, run a fresh scan and compare. Judge remediation by the next scan result, not by the patch ticket.

  1. Map compartments and tags. List the compartments that hold production, staging and shared services. Add owner and environment tags to the instances and image repositories you plan to scan. This keeps findings tied to a team.
  2. Enable the Oracle Cloud Agent plugin. Open a sample compute instance and check the Oracle Cloud Agent plugins. Enable the Vulnerability Scanning plugin and confirm the agent is running. Repeat for any instance group you cannot rebuild from a standard image.
  3. Create a host scan recipe. Create a host scan recipe in the Vulnerability Scanning service. Choose the scan level and schedule that fit the host role. Keep a stricter recipe for internet-facing hosts and a lighter one for internal build agents.
  4. Create a container image scan recipe. Create a container image scan recipe for the OCIR repositories you deploy from. Set a schedule that matches your build rate or scan on each push. Keep the recipe focused so a rebuild does not wait on a long queue.
  5. Create scan targets. Create a scan target for each compartment or repository boundary you defined. Attach the correct recipe and confirm the target shows the resources you expect. Start with one target, then add the rest.
  6. Run and triage the first scan. Run the first scan and open the findings list. Sort by severity and by owner tag, then pick one finding to fix end to end. Use that fix to test your patch or rebuild path.
  7. Wire events to Notifications. Create an Events rule for Vulnerability Scanning findings and send it to an OCI Notifications topic. Add an email, chat or ticket subscription your team checks. Test it with a finding you can close quickly.
  8. Patch, rebuild and rescan. Fix the selected finding by patching the host or rebuilding the image. Run a fresh scan and confirm the finding is gone. If it remains, check the agent, the image digest and the scan target scope.

How to check it worked

Open the scan target and check the last scan time, status and agent state. A completed scan with a recent timestamp is the first sign. Then open the findings list and confirm it includes a package you know is behind, or an image you left on an old base. If the list is empty on a host you know is stale, check the agent plugin first.

For container images, compare the scanned image digest to the digest you deploy. A scan of a rebuilt image with the same tag can hide a new layer if the tag moved. Use immutable tags or record the digest in your release notes.

Test the notification path. Trigger a scan that produces findings and confirm the event lands in the Notifications topic and reaches the subscription. Check that the finding owner can open the result without asking for extra permissions.

Mistakes to avoid

Scanning only public-facing instances. Internal hosts and build agents often carry older packages. A scan scope based on network exposure misses the jump host or CI runner that has broad access.

Treating the scan as a patch tool. The scan reports package versions. It does not install updates. Pair it with your patching or image rebuild process, and rescan after the change.

Ignoring image drift. Base images age in OCIR. If you scan only running containers, an image staged for next week gets no review.

Letting findings pile up without owners. Use tags and compartments to route each finding. Review the oldest open items on a schedule, not only the new ones. If you want an outside read, the Cloudverg Cloud security review is $6,500/month and covers a read-only review of identity, network exposure, encryption and logging across up to five cloud accounts, with findings ranked by risk. It can sit beside your own scan program or a focused penetration test.

Frequently asked questions

Does Oracle Cloud vulnerability scanning need an agent?

Host scans use the Oracle Cloud Agent with the Vulnerability Scanning plugin enabled. Container image scans read images from OCIR and do not need an agent on a running host. If host findings are missing, check the agent and plugin first.

Can I scan container images before they run?

Yes. Create a container image scan recipe and a scan target for the OCIR repository. The scan reviews image layers, so you can catch issues before deployment. Use immutable tags or track the image digest.

How often should I run scans?

Match the schedule to your change rate. Weekly host scans catch drift on long-lived instances. Scan images on build or on a short schedule for shared base images, and rescan after patching.

Monthly plan

Want help with this? Cloud security review

$6,500/month

2 to 3 weeks · Starts within 10 business days

A read-only review of identity, network exposure, encryption and logging across your cloud accounts, with a prioritized fix list.

Renews monthly. Cancel any time.
What is included

Related guides

More cloud security guides   Security and compliance

Smallest way to start

Get a senior architect on your problem this week

Ninety minutes a month on the cloud, AI or security question that is blocking you, a pre-read of your material and a written summary within two business days.

$450/month

Renews monthly. Cancel any time.