ROracle Cloud playbook · Pipelines and supply chain
DevOps pipeline or build credentials abused
The attacker takes control of a build or deployment pipeline, its secrets, or the identity domain trust that lets an external continuous integration (CI) system act in your tenancy. Common routes are a stolen connection token, a changed build specification or trigger, and a dynamic group policy that gives every pipeline resource wide rights. Stop new builds and deployments first, and save the pipeline definitions before anyone edits them.
Look here
Log
Search for
Audit, OCI DevOps
Changes to projects, build pipelines and stages, connections, triggers, repositories and deployments. The events use API operation names such as CreateBuildPipelineStage, UpdateBuildPipelineStage, CreateConnection, UpdateConnection, CreateTrigger, CreateBuildRun and CreateDeployment. Confirm the exact event names in your export: oci audit event list -c <compartment-ocid> --start-time <utc> --end-time <utc> --all
Build runs
Runs started by unexpected principals or at unexpected times. Compare the run times with the repository history: oci devops build-run list --project-id <project-ocid>
Build run detail
The principal, commit and parameters of each suspect run: oci devops build-run get --build-run-id <ocid>
Deployments
Deployments that no approved change explains, especially to OKE clusters, functions and compute instances: oci devops deployment list -c <compartment-ocid>
Triggers and connections
New GitHub or GitLab triggers, changed source repositories, and connections that use a different token secret. List them for the project with oci devops trigger list and oci devops connection list
Dynamic groups and policies
Wide rights for the pipeline's resource principal. A dynamic group matches DevOps resources with rules such as resource.type = 'devopsbuildpipeline' and a compartment. In that group's policies, look for manage devops-family, read secret-family, manage cluster or manage generic-artifacts in a wide compartment. An attacker who edits the pipeline gets those rights
Workload identity federation
Token exchanges by external workloads. They trade a JSON Web Token (JWT) from their identity provider for an OCI User Principal Session Token. OCI IAM checks the token signature, audience, caller authorization and any impersonation rules. Review the trust in the identity domain and the IAM policies for the service user that receives the token. Its sessions appear in Audit under that principal
External repository
Commits, workflow files, branch changes and secret changes on the GitHub or GitLab side, which OCI Audit does not record
Contain
#
Item
1
Save the pipeline definitions, stages, triggers and connections as evidence. See Evidence. List the pipelines, then run get for each: oci devops build-pipeline list --project-id <project-ocid>
Cancel running deployments that use attacker builds: oci devops deployment cancel --deployment-id <ocid> --reason <reason>
4
Delete attacker triggers after saving them destructive: oci devops trigger delete --trigger-id <ocid>
5
Pause deploys until the pipeline is reviewed. Remove or narrow the policy statements for the pipeline's dynamic group: oci iam policy update --policy-id <ocid> --statements file://known-good.json
6
Rotate the token behind each external connection. Create a new Vault secret version for the personal access token, revoke the old token on the GitHub or GitLab side, and remove access the token had
7
Cut the identity domain trust for the external CI system if the attacker used it, and remove the IAM policy for the service user that the trust maps to. See backdoor users, API keys and federation
8
Freeze deployments from the pipeline, and check what it pushed to the container registry and deployed to production
Eradicate and recover
#
Item
1
Restore every build specification, stage, artifact and deployment stage changed in the window from a known-good version, and require review on changes to pipeline files
2
Redeploy the last verified artifacts. Compare artifact digests and image versions with the build records, and roll back deployments that used attacker builds
3
Rotate every secret the pipeline could read and every credential its resource principal could obtain, using the scope in Scope
4
Split the DevOps dynamic group by project and stage. Give each group only the verbs it needs, such as read all-artifacts for deployment and manage generic-artifacts for the build that produces them
5
Tighten the identity domain trust for external CI. Restrict the accepted issuer, audience and subject to the specific repository and branch. Give the resulting service user a policy that names only the compartment and resources it deploys
6
Turn on branch protection for the branches that trigger builds, on the external repository and on DevOps repositories. The command group for DevOps repositories is oci devops protected-branch
7
Add Events rules that notify on changes to policies and dynamic groups, and on new triggers and connections
Watch out
Whoever can edit a build pipeline or its specification runs code with the pipeline's resource principal. Treat edit access to the pipeline as the same access as its policies.
A build stage often reads secrets with read secret-family. A wide compartment in that policy gives the attacker every secret in it. Check the policy before reading the logs.
OCI Audit shows the OCI side of an external CI attack. The workflow files, tokens and runner logs are on the GitHub or GitLab side, so involve that team early.
The documentation reviewed for this page does not describe every setting of the identity domain trust. Read the trust in the Console and list its restrictions before you decide the exchange was properly limited.
Oracle documentation: DevOps IAM policies and dynamic groups; OCI IAM Workload Identity Federation overview; OCI CLI reference for devops subcommand groups, build-run and trigger. Checked September 2026. Rechecked October 2026: every command against OCI CLI 3.94.2, which requires a reason to cancel a build run or a deployment.