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…