Everyday Guidebooks
Cover of Azure DevOps Pipeline Security

Cybersecurity & IT

Azure DevOps Pipeline Security

An Unofficial Guide to Safer Permissions, Secrets, Dependencies, and Deployment Approvals

by Todd Michael

Available now

A pipeline can build and deploy perfectly while quietly giving attackers a path to your systems. This independent guide helps you examine the security decisions behind azure devops pipelines, from the first code change to the final deployment approval.

Follow a worked example as a team identifies excessive permissions, exposed secrets, unsafe dependencies, and gaps in its release process. Learn how to review service connections, strengthen branch protections, distinguish an approval from an automated check, and ask whether each identity has only the access it needs.

Practical review questions reinforce the reasoning behind each control, making the book useful for IT certification study and real-world pipeline reviews. You will finish with a repeatable method for tracing trust, recognizing risky configurations, and prioritizing improvements.

This is an unofficial learning resource, not an exam guarantee or a substitute for current Microsoft documentation.

Contents
  1. 1. Map the Pipeline and Its Trust Boundaries
  2. 2. Find Excessive Access
  3. 3. Protect Code Before It Enters the Build
  4. The Branch Is a Decision Point
  5. Read Permissions and Policies Together
  6. Design Pull Request Policies for a Decision
  7. Put the Right Expertise on the Change
  8. Understand What Build Validation Proves
  9. Worked Change: A Convenient Shortcut
  10. Make Exceptions Visible and Accountable
  11. Review Questions
  12. 4. Secure Pipeline Definitions and Templates
  13. 5. Constrain Build Identities and Job Tokens
  14. 6. Review Service Connections
  15. 7. Keep Secrets Out of Sight
  16. 8. Control Agents and Execution Environments
  17. 9. Evaluate Dependencies and Build Inputs
  18. 10. Protect Artifacts Between Build and Release
  19. 11. Use Environments, Checks, and Approvals
  20. 12. Observe, Investigate, and Recover
  21. 13. Conduct a Risk-Based Pipeline Review
  22. 14. Practice Security Decisions
  23. Other Books by Todd Michael

Read a sample: 1. Map the Pipeline and Its Trust Boundaries

A pipeline can look deceptively simple: a developer changes code, a build runs, and an application appears in an environment. The security story is larger. Each transition depends on identities, permissions, execution environments, and decisions about which inputs are trustworthy. A reviewer who sees only the YAML file may miss the administrator who can change a service connection, the package feed that supplies build dependencies, or the approval that occurs after a potentially dangerous script has already run.

This chapter builds a map for examining those relationships. The map will not tell you whether a pipeline is secure by itself. It will help you ask a more useful question: what must be trusted for this deployment to be authorized, traceable, and faithful to the reviewed change?

Northstar Outfitters is a fictional retailer with a small team responsible for an internal inventory application. The application reads inventory data and lets authorized staff update stock records. Its delivery team uses Azure DevOps to manage source code and run a pipeline that builds and deploys the application to Azure.

The team includes developers who propose changes, a release engineer who maintains deployment configuration, and an operations group responsible for the Azure resources. A security practitioner, Maya, has been asked to review the pipeline before the team expands access to it.

The team describes its process this way:

1. A developer creates a branch and opens a pull request against the main branch. 2. Reviewers examine the change, and a validation pipeline builds and tests it. 3. After the pull request is completed, a pipeline builds the main branch and publishes an application artifact. 4. A deployment stage uses that artifact and an Azure service connection to deploy to a test environment. 5. A production deployment requires an approval before the stage proceeds.

That description is useful, but it leaves questions unanswered. Who can change the pipeline definition? Can a pull request author influence the validation job? Which identity reads the repository and publishes the artifact? Can the deployment stage retrieve secrets? Who can authorize the service connection for a pipeline, or change the production approval?

Maya begins with a baseline model rather than a verdict. The model describes the team’s intended flow and identifies places where actual settings must be verified.

The following diagram is intentionally simplified. It shows the main path through Northstar’s pipeline and several supporting inputs. It is not a statement that any particular permission or protection is correctly configured.

text Developer | v Feature branch --pull request--> Main branch | | v v Validation pipeline Build pipeline | External packages ------------------> Build agent Pipeline YAML and templates --------> Build agent Job identity and token -------------> Build agent | v Published artifact | v Deployment stage on agent | Service connection and secrets | v Test Azure resources | Production approval | v Production Azure resources

The arrows represent transfers or uses of information and authority. They do not all mean the same thing. A developer supplies a code change; a package feed supplies dependencies; a job identity supplies access to Azure DevOps resources; and a service connection provides a way for a pipeline to authenticate to an external service. The production approval is a decision point in the intended release process, not a substance that travels with the artifact.

The diagram also compresses important detail. Validation and deployment jobs may run on different agents. The deployment stage might obtain secrets from a protected resource or an external store. Test and production may use separate service connections and separate approvals. Those distinctions matter, so Maya will add them when she verifies the actual configuration.

A good baseline is small enough to discuss and precise enough to challenge. If an arrow hides an important permission, split it into two. If a box has multiple owners with different privileges, show the difference.

Start at the feature branch. A developer’s proposed change can affect more than application behavior. If the repository also contains pipeline YAML, build scripts, dependency manifests, or deployment configuration, the same pull request may influence what runs during validation and what is later deployed.

The pull request is therefore a boundary between an author’s proposed input and the team’s accepted code. Reviewers and branch policies can make crossing that boundary more deliberate, but the existence of a pull request does not prove every relevant file was reviewed by someone with the right expertise. Nor does it establish that no one can bypass the policies. Those are settings and practices to inspect.

Next, follow the main branch into the build. The pipeline definition instructs an agent to perform work. The agent may compile source code, run tests, download packages, execute scripts, and publish output. Each operation adds a question to the map:

- Which version of the pipeline definition and templates is used? - Which dependencies and tools can the job retrieve? - What can the job identity access while the steps execute? - Where does the output go, and who can read or replace it?

The resulting artifact is not simply “the application.” It is the output of a particular build process, using particular inputs, under particular permissions. If the build consumes an unexpected dependency or an altered script, the artifact can carry that influence forward. Conversely, even a sound build process is not enough if a deployment later selects an unintended artifact.

Finally, follow the artifact into deployment. The…

More Cybersecurity & IT

Cover of The White Hat Bible, Volume 1The White Hat Bible, Volume 1Available nowCover of The White Hat Bible, Volume 2The White Hat Bible, Volume 2Available nowCover of The White Hat Bible, Volume 3The White Hat Bible, Volume 3Available nowCover of The White Hat Bible, Volume 4The White Hat Bible, Volume 4Available nowThe White Hat Bible, Volume 5Available nowCover of The White Hat Pocket GuideThe White Hat Pocket GuideAvailable now

About Todd Michael

Todd Michael is an American author and the founder of ToddMichael.tv. He writes practical, plain-English books on money, health, preparedness, technology, games, humor and more.

About the author Todd Michael · Todd Michael’s author site

Part of the ToddMichael.tv network.