PIVTR-D
ROracle Cloud playbook · Pipelines and supply chain

Container image tampering in OCIR

The attacker replaces an image in Container Registry (OCIR), pushes a tag that a deployment already references, makes a repository public, or deletes images and signatures. The route in is usually a user's auth token, a continuous integration (CI) pipeline with push rights, or a policy that grants manage repos in a wide compartment. Make the repository private and immutable, and stop workloads from pulling the suspect image, before anything else.

Look here

LogSearch for
Audit, Container Registry control planeRepository, image and signature changes. The events use API operation names such as CreateContainerRepository, UpdateContainerRepository, DeleteContainerRepository, ChangeContainerRepositoryCompartment, UpdateContainerImage, DeleteContainerImage, RestoreContainerImage, RemoveContainerVersion, CreateContainerImageSignature and DeleteContainerImageSignature. Confirm the exact event names in your export: oci audit event list -c <compartment-ocid> --start-time <utc> --end-time <utc> --all
Image pushes and pullsNo Audit record to expect. The Oracle documentation reviewed for this page does not list Audit events for a Docker push or pull, and the Artifact Registry event list covers repositories and generic artifacts only. Use image timestamps and digests in the next rows
Images in the repositoryTags that point to a digest built by no pipeline run. The list gives the digest, versions and time created for each image, so compare each digest with the build record for that tag: oci artifacts container image list -c <compartment-ocid> --repository-name <repo> --all
One imageThe detail of a suspect image: oci artifacts container image get --image-id <image-ocid>
Repository settingsRepositories that are public or mutable. A private repository needs authorization to pull, and a public one lets anyone with the URL pull. List the repositories, then run get for each and read is-public and is-immutable: oci artifacts container repository list -c <compartment-ocid> --all
Image signaturesImages with no signature where the pipeline signs, and deleted signatures: oci artifacts container image-signature list -c <compartment-ocid> --image-id <image-ocid>
Who can pushPolicies that grant push rights. The repos resource type covers repositories, images and signatures. manage repos includes the update, create, delete and manage permissions, and REPOSITORY_UPDATE allows image updates, deletes and signature changes: oci iam policy list -c <compartment-ocid> --all --query "data[?contains(to_string(statements), 'repos')]"
Credentials that could pushNew auth tokens for users with push rights, in CreateAuthToken events. Auth tokens are the password for docker login to OCIR. Follow credential leak for those users
Where the image runsThe digest that each running container uses, in imageID, for deployments that pull the image, such as OKE workloads: kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{" "}{.metadata.name}{" "}{.status.containerStatuses[*].imageID}{"\n"}{end}'

Contain

#Item
1Save the repository settings, the image list with digests and the signature list as evidence. See Evidence
2Make a public repository private. Only a member of the Administrators group or a user with REPOSITORY_MANAGE on the tenancy can change the access level: oci artifacts container repository update --repository-id <repo-ocid> --is-public false
3Block the credentials that pushed the image. Remove the user's auth tokens and key-based credentials as in credential leak, and remove push rights from the policy that names the pipeline or user
4Turn on immutability for the repository so a tag cannot be overwritten. New versions can still be added: oci artifacts container repository update --repository-id <repo-ocid> --is-immutable true
5Stop workloads from pulling the suspect image. In OKE, scale the deployment to zero or change its image to a known-good digest. See compromised OKE cluster
6Restore images the attacker deleted, within 48 hours of the deletion: oci artifacts container image restore --image-id <image-ocid>
7Check pipeline abuse if the push came from a build pipeline, and review the identity that ran it
8Delete the tampered image only after the case owner releases it destructive. It can be restored for up to 48 hours: oci artifacts container image delete --image-id <image-ocid>

Eradicate and recover

#Item
1Find every image that was pushed by the compromised identity in the window, and every running workload that pulled one. Compare digests with the build records, and treat unmatched images as tampered
2Rebuild the images from source in a clean pipeline and push them under new tags. Redeploy by digest, so a later push cannot change what runs
3Assume code in a tampered image ran with the identity of its workload. Rotate the secrets it could read and follow stolen instance principal credentials for the node or workload identity
4Sign images in the pipeline and verify them at deployment. OKE can enforce image verification with --image-policy-config, which uses a Vault key. See compromised OKE cluster for the command
5Set is-immutable on every repository that contains production images, and keep repositories private unless the image is meant for the public
6Give each pipeline its own repos permission on its own repositories. Avoid manage repos on a whole compartment or the tenancy
7Turn off "Create repository on first push in root compartment" if you do not need it, since a push to a new name then creates a repository there. Add Events rules that notify on repository updates and deletes
Watch out
  • Audit records the API calls for repositories and images. Oracle does not document Audit events for a Docker push or a pull, so absence of a push event proves nothing. Use digests and timestamps.
  • A deleted image can be restored for up to 48 hours, after which it is removed permanently. Restore images the attacker deleted inside that window, and defer your own deletions of evidence until you are sure you no longer need them.
  • A tag is a pointer. Deployments that pull by tag get whatever the tag points to now, so pin production workloads to a digest.
  • With immutability on, images cannot be overwritten, so your own pipeline needs a new tag for each build.

Oracle documentation: Container Registry access control details; creating a repository and repository access rules; deleting an image; Artifact Registry events; OCI CLI reference for artifacts container repository, image and image-signature. Checked September 2026. Rechecked October 2026: deleting images (48-hour restore window), and every command against OCI CLI 3.94.2.

Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.