PIVTR-D
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

LogSearch for
Audit, OCI DevOpsChanges 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 runsRuns 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 detailThe principal, commit and parameters of each suspect run: oci devops build-run get --build-run-id <ocid>
DeploymentsDeployments that no approved change explains, especially to OKE clusters, functions and compute instances: oci devops deployment list -c <compartment-ocid>
Triggers and connectionsNew 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 policiesWide 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 federationToken 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 repositoryCommits, workflow files, branch changes and secret changes on the GitHub or GitLab side, which OCI Audit does not record

Contain

#Item
1Save 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>
2Cancel attacker builds: oci devops build-run cancel --build-run-id <ocid> --reason <reason>
3Cancel running deployments that use attacker builds: oci devops deployment cancel --deployment-id <ocid> --reason <reason>
4Delete attacker triggers after saving them destructive: oci devops trigger delete --trigger-id <ocid>
5Pause 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
6Rotate 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
7Cut 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
8Freeze deployments from the pipeline, and check what it pushed to the container registry and deployed to production

Eradicate and recover

#Item
1Restore 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
2Redeploy the last verified artifacts. Compare artifact digests and image versions with the build records, and roll back deployments that used attacker builds
3Rotate every secret the pipeline could read and every credential its resource principal could obtain, using the scope in Scope
4Split 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
5Tighten 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
6Turn 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
7Add 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.

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.