What is the single biggest reason a software build that worked yesterday fails today? It is usually not a change in your own code — it is a change in something your code depends on, or a quality gate that caught a hidden problem. For the AZ-400 exam, you need to understand how to automatically verify that every piece of software you produce is reliable, secure, and built from trusted components, before it ever reaches a user.
Jump to a section
A simple way to picture Managing Build Quality and Package Dependencies
A professional kitchen's prep station is the heart of a successful dinner service. Every ingredient has its designated spot: spices in order of use, pre-chopped vegetables in labelled bins, and proteins thawed and portioned in the fridge. The head chef depends on this station to be perfectly organised before the evening rush begins.
In software development, managing build quality is like that prep station. You do not start cooking (compiling code) without checking that every ingredient (dependency) is fresh, correctly measured (versioned), and free from contamination (security vulnerabilities). A prep cook who grabs a jar labelled 'cumin' but finds coriander inside is like a build that pulls the wrong library version — the whole dish (application) will taste wrong or fail entirely.
The kitchen also has a quality check: the chef tastes the sauce before it goes out. That is your automated test suite. If the sauce is too salty (a bug in the code), the chef sends it back to be fixed, not out to the customer. Package dependencies are the suppliers who deliver your ingredients. You must trust them, but also verify their quality and ensure they have not changed their recipe (updated their package) in a way that breaks your dish. The prep station is only as good as its organisation, its ingredient quality checks, and its dependency on trusted suppliers — exactly like a modern build pipeline.
Managing build quality and package dependencies is about making sure the software you produce is trustworthy and that the pieces it relies on are also trustworthy. Think of it as a quality control system for a factory that builds software.
A 'build' is the process of turning human-readable source code into a finished, runnable program. For example, a developer writes C# code in a text editor, but before a user can run it, that code must be 'compiled' (translated) into machine language. That compilation is part of the build. The build also packages everything together — the compiled code, images, configuration files — into a single unit (like a .zip file or a container).
'Build quality' refers to how good that finished unit is. It is not just about whether it compiles without errors. Quality includes: Does it pass all the automated tests? Does it meet security scanning standards? Does it comply with company policies? Managing build quality means setting up automated checks (quality gates) that must pass before the build is considered 'good'.
Now, what is a 'dependency'? Very few software projects are written entirely from scratch. A typical application uses hundreds of pre-built pieces of code called libraries or packages. For instance, if you want to add login functionality to your app, you might use a package called 'IdentityServer' instead of writing your own login system from scratch. These packages are dependencies — your code depends on them to work.
Package dependencies can be a huge source of problems. If a package you rely on releases a new version (an 'update') that changes how it works, your code might break. This is called a 'breaking change'. Alternatively, a package might have a security flaw (a 'vulnerability') that an attacker can exploit. Managing package dependencies means tracking exactly which version of each package you use, scanning them for known vulnerabilities, and controlling when you upgrade.
Azure DevOps provides tools to manage both. For build quality, you use 'Azure Pipelines' to define automated builds. Within your pipeline, you can add steps (called 'tasks') that run tests or perform security scans. If any of those steps fail, the build is marked as failed and is not released. For package dependencies, Azure DevOps provides 'Azure Artifacts'. This is a private storage system for packages. Your team can store approved versions of packages there, ensuring everyone on the team uses the same, vetted versions. It also integrates with public package repositories like 'NuGet' (for .NET) or 'npm' (for JavaScript), allowing you to scan those packages for vulnerabilities automatically.
Why does this replace older methods? Before these tools existed, teams managed dependencies by manually downloading files and storing them in a shared folder. This was error-prone — someone might accidentally use an old or wrong version. Build quality was often checked manually by a tester after the build was complete, which was slow. Azure DevOps automates both, making the process fast, consistent, and auditable. For the AZ-400 exam, you must know how to configure 'pipeline quality gates' (like running tests and security scans) and how to set up 'package feeds' in Azure Artifacts to control which packages your builds can use.
Define the Build Pipeline
Create a YAML file in your repository that defines the stages of your build. This is the automation blueprint. Stages typically include: restore packages, compile code, run unit tests, run security scans, and publish build artifacts.
Set Up a Package Feed in Azure Artifacts
Create a feed (e.g., 'MyProject-Approved') that will store all packages your project uses. Configure upstream sources to connect to public repositories like NuGet or npm, so packages are cached and controlled.
Add a Vulnerability Scanning Task to the Pipeline
Add a task like 'WhiteSource' or 'Dependency Check' to your pipeline YAML. This task scans every package (direct and transitive) against known vulnerability databases. If a vulnerability is found above a severity threshold, the task fails.
Configure Quality Gates in the Pipeline
Add conditions that must be met for the pipeline to proceed. For example, set a gate requiring unit test pass percentage to be at least 80%, or code coverage to exceed 70%. These gates are defined as conditions in the YAML or in the release pipeline configuration.
Promote the Package Through Feed Views
After a package passes all quality gates and testing, promote it from the 'Prerelease' view to the 'Release' view. This process ensures only validated packages are used in production builds. You can configure the pipeline to only pull from the 'Release' view for production deployments.
Meet Priya, a DevOps engineer at a medium-sized e-commerce company. Her team builds a shopping cart application that runs on Azure. Every morning, another developer makes a change to the code. Priya's job is to ensure that every change is built and tested automatically, and that the application never includes a package with a known vulnerability.
Here is what her daily workflow looks like.
First, she navigates to the Azure DevOps portal. She opens the project for the shopping cart app. She sees a list of 'pipelines' — these are the automated build processes. She checks the status of the latest run. There is a red X next to it — it failed. She clicks it to investigate.
The pipeline is defined as a YAML file (a human-readable configuration file). It has several stages: Build, Unit Tests, Security Scan, and Package Check. The pipeline failed at the 'Security Scan' stage. Priya opens the log output. The scan tool, called 'WhiteSource' (which is built into Azure DevOps), found a high severity vulnerability in a package named 'Newtonsoft.Json' version 12.0.3. The vulnerability allows remote code execution — an attacker could take over the server.
Now Priya must manage this dependency. She checks the package feed (a private repository of approved packages) in Azure Artifacts. The project uses a feed called 'ShoppingCart-Approved'. She sees that the team is using version 12.0.3 of Newtonsoft.Json, but version 13.0.1 is available in the public NuGet repository and does not have the vulnerability.
She updates the pipeline to use the new version. But she does not just change the number. She also adds a 'package promotion' step. In Azure Artifacts, you can promote packages through views: from 'Prerelease' to 'Release' to 'Critical'. She downloads the new version, scans it with the same security tool to confirm it is clean, then promotes it to the 'Release' view. Now the pipeline will automatically pull version 13.0.1 for all future builds.
Next, she restarts the failed pipeline. It passes the security scan this time. However, it now fails at the 'Unit Tests' stage. The new version of Newtonsoft.Json changed a behaviour that the shopping cart's code relied on. Priya must fix the code. She writes a small patch, commits it, and re-runs the pipeline. This time, all stages pass. The build is 'signed' (digitally signed to prove it came from her team) and published to a staging environment for final manual testing.
This scenario happens daily. The key tools Priya uses are:
Azure Pipelines for the build automation.
Azure Artifacts for managing package versions.
Dependency scanning tools (like WhiteSource or GitHub Dependabot) for vulnerability detection.
Quality gates (like test passing thresholds) within the pipeline.
The exam expects you to know how to configure these tools and understand the order of operations: scan dependencies first, then build, then test, then release. If a scan fails, the build should stop immediately.
The AZ-400 exam tests 'Managing Build Quality and Package Dependencies' in several specific ways. You will see questions about configuring Azure Pipelines to include quality gates, managing package feeds in Azure Artifacts, and understanding dependency scanning tools.
Expected question types:
Scenario-based questions: You are given a story (like Priya's above) and asked what tool or setting to use. Example: 'Your build fails because of a vulnerable package. Which Azure DevOps feature should you configure to prevent this in the future?' Answer: 'Configure a package feed in Azure Artifacts with a vulnerability scan policy.'
Configuration questions: You are shown a YAML pipeline snippet and asked what it does. Example: A snippet with a 'task: DotNetCoreCLI@2' and a 'testRunTitle' parameter. They ask: 'What does this task do?' Answer: 'It runs unit tests and publishes the results.'
Definition questions: You must know terms like 'dependency graph', 'vulnerability', 'package promoter', 'feed view', 'quality gate', and 'build artifact'.
Common traps the exam sets:
Trap 1: They ask about 'Azure Artifacts' but describe a feature of 'Azure Pipelines'. For example, 'Which tool stores compiled packages for sharing across teams?' The correct answer is Azure Artifacts, not Pipelines.
Trap 2: They ask about 'security scanning' and offer options that include 'Azure Policy' or 'Microsoft Entra ID'. Those are for identity, not package scanning. The correct scanning tools are 'Dependency Check' or 'WhiteSource' (now called 'Mend' but exam still uses WhiteSource).
Trap 3: They ask about 'package updates' and suggest manually updating all packages. The correct answer always involves 'automated vulnerability scanning in the pipeline' or 'using a private feed with curated versions'.
Concepts the exam loves to test:
Feed views: 'Prerelease', 'Release', 'Local', 'Upstream'. You must know that 'upstream sources' in a feed allow you to cache packages from public repositories (like NuGet or npm) and control which versions flow into your build.
Quality gates: They are conditions in the pipeline that block progression if a threshold is not met (e.g., 'code coverage must be at least 80%').
Build retention policies: How long to keep old builds. This is a quality management concern because old builds may have vulnerabilities.
Dependency graph: Azure DevOps can generate a graph showing which packages your code depends on. The exam tests that you can use it to identify transitive dependencies (dependencies of your dependencies).
Scanning tools: You must know the difference between 'static analysis' (scanning source code for patterns) and 'dependency scanning' (checking package versions against a database of known vulnerabilities).
Key definitions to memorise:
Build artifact: The output of a build (compiled code, scripts, etc.).
Package: A bundled piece of reusable code (e.g., NuGet, npm, Maven).
Feed: A place to store packages (Azure Artifacts).
Upstream source: A link to an external package repository (e.g., NuGet Gallery).
Quality gate: A rule in the pipeline that must pass for the build to succeed.
Vulnerability: A known security weakness in a package.
If you see a question about 'release gates' versus 'quality gates', remember: release gates run after the build is done, before deployment. Quality gates run during the build. The exam is precise about this distinction.
Azure Artifacts package feeds allow you to control which package versions your builds can use, preventing unexpected breaking changes from upstream updates.
A quality gate is an automated condition in a pipeline that must be met (e.g., tests pass, vulnerability count is zero) for the build or release to proceed.
Dependency scanning tools automatically check every package (including transitive dependencies) against a database of known security vulnerabilities during the build.
Build quality is not just about compilation — it includes test results, code coverage thresholds, security scans, and compliance checks defined in the pipeline.
Upstream sources in a feed allow you to cache packages from public repositories like NuGet or npm, giving you control over which versions enter your environment.
Promoting a package through feed views (Prerelease to Release to Critical) is how you progressively validate a package before allowing it into production builds.
These come up on the exam all the time. Here's how to tell them apart.
Build Quality
Focuses on the output (build artifact) being reliable and passing automated checks
Measured by test pass rates, vulnerability scans, and compliance gates
Managed within the CI/CD pipeline using quality gates and automated tasks
Code Quality
Focuses on the source code being readable, maintainable, and free of logical errors
Measured by code reviews, static analysis, and code coverage metrics
Managed through coding standards and peer review processes
Azure Artifacts Feed
Stores small reusable code packages (NuGet, npm, Maven)
Supports feed views for promoting packages through lifecycle stages
Integrates with upstream sources from public package repositories
Azure Container Registry
Stores container images (Docker, Open Container Initiative)
Supports image tags for versioning, but not formal package promotion views
Integrates with Docker Hub or other container registries as sources
Dependency Scanning (WhiteSource)
Checks package versions against a database of known security vulnerabilities
Focuses on external dependencies, not your own code
Runs during the restore or after restore step in the pipeline
Static Code Analysis (SonarQube)
Analyses your source code for bugs, code smells, and security flaws
Focuses on the code you wrote, not external packages
Runs after compilation or test stages in the pipeline
Upstream Source (Feed)
A connection from your feed to an external repository (e.g., NuGet Gallery)
Caches packages from the external source for faster, controlled access
Defined in the feed settings and applies to all feed users
Downstream Consumer
A project or pipeline that consumes packages from your feed
Receives packages that have been promoted through feed views
Configured in the build pipeline or in developer tools (e.g., Visual Studio)
Mistake
Build quality is just about whether the code compiles without errors.
Correct
Build quality includes passing automated tests, meeting security scan thresholds, adhering to code coverage minimums, and following compliance policies — not just compilation.
Beginners often think 'compile success = build success', but real-world software must be tested and secure, not just syntactically correct.
Mistake
All package updates are safe and should be applied immediately to stay current.
Correct
Package updates can introduce breaking changes or new vulnerabilities. You should scan updates in a controlled feed before promoting them to production builds.
It feels logical to update everything to the 'latest version', but in practice, updates can break code or introduce bugs. The exam emphasises controlled, scanned updates.
Mistake
You only need to manage direct dependencies, not the dependencies of your dependencies (transitive dependencies).
Correct
Transitive dependencies (packages that your packages use) also carry vulnerabilities and must be scanned and managed. A vulnerability in a transitive dependency is just as exploitable.
Beginners focus only on the packages they explicitly add, forgetting that those packages themselves rely on others — creating a chain of risk.
Mistake
Package feeds in Azure Artifacts are just for storing large files like Docker images.
Correct
Package feeds are primarily for storing small, reusable code packages (like NuGet or npm), not Docker images. Docker images are stored in Azure Container Registry.
The term 'package' is ambiguous. Beginners confuse 'software packages' (libraries) with 'container images'. The exam tests understanding of what belongs where.
Mistake
Quality gates are only set manually by a manager after the build finishes.
Correct
Quality gates are automated checks defined in the pipeline YAML or release pipeline that run during the build or prior to release, blocking progress automatically if conditions are not met.
People associate 'quality' with human review, but modern DevOps relies on automated gates for speed and consistency. The exam stresses automation.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Azure Artifacts is a package management service for storing and sharing packages (like NuGet or npm). Azure Pipelines is a CI/CD service for building and deploying code. They work together: Pipelines uses Artifacts to fetch packages during the build.
A transitive dependency is a package that your direct dependency uses. For example, if your app uses package A, and package A uses package B, then B is a transitive dependency. You must scan them because a vulnerability in B is a vulnerability in your app.
Configure a vulnerability scanning task (like WhiteSource) in your pipeline and set it to fail the build if any package has a vulnerability above a certain severity level. Additionally, use a private feed with curated, scanned packages.
A quality gate is an automated condition that blocks a pipeline or release from proceeding unless specific criteria are met, such as successful test results, minimum code coverage, or zero high-severity vulnerabilities.
Yes, Azure Artifacts supports many package types including npm, NuGet, Maven, Python (PyPI), and Universal Packages. You can create a feed with npm upstream source to cache and control npm packages.
A feed view is a logical grouping of package versions (like 'Prerelease', 'Release', 'Critical'). You promote packages between views to control their lifecycle, ensuring that only tested and approved versions are used in production builds.
You've finished Managing Build Quality and Package Dependencies. Continue through the AZ-400 study guide to build a complete picture of the exam.
Done with this chapter?