AZ-400: Design & Implement Dependency Management
Design & Implement Dependency Management — MOC
MS Learn path: Design and implement a dependency management strategy · Centralize and version the packages your code depends on.
Planned concepts
dependency-management · Azure Artifacts · package-feed · upstream-sources · semantic-versioning · dependency-graph · packaging in pipelines
Modules in this path
Skills
Feeds, versioning, upstream sources, packaging.
Practice questions
- az400-q-dep-001 — upstream sources in Azure Artifacts
Design and implement a dependency management strategy
Learning objectives: plan a dependency-management strategy that centralizes packages, controls versions, and secures the supply chain — then implement it with Azure Artifacts.
Overview
The strategic layer of packaging: what packages your org consumes and produces, where they live, how they’re versioned and governed, and how they flow through CI/CD. This module sets up everything the rest of the path operationalizes.
Concepts introduced (link to term notes)
- dependency-management
- azure-artifacts
- package-feed
- upstream-sources
- semantic-versioning
- dependency-graph
Units
- Understand dependency-management goals (reproducibility, governance, security)
- Choose a package ecosystem strategy (NuGet/npm/Maven/Python/Cargo/Go/Universal)
- Decide feed topology: project vs. organization scope, upstreams
- Set up versioning and promotion conventions (SemVer, views)
- Plan supply-chain security (vulnerability scanning, dependency vulnerabilities)
Key terms & commands
feed · upstream · SemVer · project vs. org scope · views (@Release) · dependency graph · lock files · retention
Hands-on
Map your app’s dependency graph, choose a feed scope, and enable upstream sources in a new Azure Artifacts feed.
Exam focus
- Azure Artifacts is the canonical answer for centralized package management.
- Org-scoped feeds are shareable across projects; project feeds are isolated.
- Feed package versions are immutable — plan versioning and retention up front.
- Lock files + upstreams + immutable versions = reproducible builds.
Related
Path MOC · azure-artifacts-feeds · upstream-and-versioning · packaging-in-pipelines
Manage package feeds with Azure Artifacts
Learning objectives: create, scope, secure, and maintain feeds in Azure Artifacts, and manage packages, views, and retention across supported ecosystems.
Overview
Hands-on feed administration: creating feeds, choosing project vs. organization scope, setting permissions, managing views and retention, and publishing/consuming NuGet, npm, Maven, Python, Cargo, Go, and Universal packages.
Concepts introduced (link to term notes)
Units
- Create and configure a feed (scope, name, retention)
- Set feed permissions (Owners / Contributors / Readers)
- Publish packages (NuGet, npm, Maven, Python, Cargo, Go, Universal)
- Consume packages from a feed
- Use views for promotion (@Local, @Prerelease, @Release)
- Retention policies and cleaning up old versions
Key terms & commands
az artifacts feed · nuget push · npm publish · twine upload · views · retention · feed scope · contributors/readers
Hands-on
Create an org-scoped feed, publish a sample package with npm publish/nuget push, and consume it from another project with the appropriate service connection.
Exam focus
- Feeds are project- or org-scoped; org feeds are shareable across projects.
- Views are the supported promotion mechanism — e.g. promote a package to
@Release. - Package versions are immutable once published — manage via unlist/deprecate/delete + retention, never overwrite.
- Feed permissions control read vs. publish access per identity.
Related
Path MOC · intro-dependency-management · upstream-and-versioning · packaging-in-pipelines
Configure upstream sources and package versioning
Learning objectives: connect feeds to upstream sources (public registries and other feeds), and define a versioning strategy that keeps packages reproducible and promoteable.
Overview
Two levers that govern where packages come from and how versions are labeled: upstream caching/proxying for external dependencies, and SemVer-based versioning for internal packages across the build pipeline.
Concepts introduced (link to term notes)
Units
- Enable and configure upstream sources (nuget.org, npmjs, PyPI, Maven Central, other feeds)
- Feed-to-feed upstreams (project → org feed hierarchy)
- Define a versioning scheme (SemVer: MAJOR.MINOR.PATCH)
- Use GitVersion/build metadata to version packages in the pipeline
- Choose stable vs. prerelease versions and views
Key terms & commands
upstream · proxy + cache · feed-to-feed · SemVer (MAJOR.MINOR.PATCH) · gitversion · -prerelease · lock files
Hands-on
Add nuget.org as an upstream to a feed, verify a package is cached on first pull, and wire GitVersion into a pipeline to auto-version published packages.
Exam focus
- Upstreams cache external packages, making builds reproducible and reducing direct internet egress.
- Upstreams can point at public registries or other Azure Artifacts feeds.
- Publish with a stable SemVer to your feed; use prerelease versions for work-in-progress.
- Lock files pin transitive versions so resolution is deterministic.
Related
Path MOC · intro-dependency-management · azure-artifacts-feeds · packaging-in-pipelines
Implement a package management strategy in pipelines
Learning objectives: integrate packaging with CI/CD — restore dependencies from feeds, build, and publish packages — using Azure Pipelines tasks and the Azure Artifacts service connection.
Overview
The automation layer of dependency management: wiring packaging into pipelines so every commit flows through restore → build → test → package → publish against your feeds, and downstream release pipelines consume published packages.
Concepts introduced (link to term notes)
Units
- Add the Azure Artifacts service connection for feed auth
- Restore dependencies in CI (NuGet restore /
npm ci/ pip / Maven) - Publish packages from the pipeline to a feed
- Version packages with SemVer/build ID
- Conditional publishing (main/release branches only; prerelease views)
- Consume published packages in release pipelines
Key terms & commands
Azure Artifacts service connection · DotNetCoreCLI@2 (restore/publish) · NuGet@1 · Npm@1 · PublishPipelineArtifact vs. feed publish · pip install · package-lock.json
Hands-on
Add a pipeline that restores from a feed (upstream-supplied), builds, and conditionally publishes a SemVer package to a feed view on the main branch.
Exam focus
- Authenticate via the Azure Artifacts service connection, never checked-in credentials.
- Publish from main/release branches only; feature branches publish to a prerelease view or not at all.
- Feed package versions are immutable — versioning must be unique per publish.
- Distinguish publishing packages to a feed vs. publishing pipeline build artifacts.
Related
Path MOC · intro-dependency-management · azure-artifacts-feeds · upstream-and-versioning
Dependency management
What it is
Dependency management is the practice of centralizing, versioning, securing, and controlling the packages and libraries your applications consume — both the third-party packages you pull in and the internal packages your own teams produce. In Azure DevOps the centerpiece is Azure Artifacts, which hosts feeds of NuGet, npm, Maven, Python, Cargo, Go, and Universal packages.
Why it exists
Applications are composed largely of packages they don’t write. If those packages are pulled ad-hoc from public sources, teams can’t control versions, provenance, licensing, or security, and the build is non-reproducible. Centralized dependency management makes builds reproducible and auditable, enforces a single source of truth, and hardens the supply chain against known vulnerabilities and tampering.
Key ideas
- Feed as single source of truth — a feed is a scoped, permission-controlled repository of packages that the whole org or team consumes.
- Version control for packages — SemVer + immutable package versions mean a build always resolves the same bits.
- Upstream sources — feeds can cache public packages (nuget.org, npmjs) through upstreams so builds don’t depend directly on the internet.
- Governance — permissions (who can read/publish), retention policies, deprecation, and promotion/views control package lifecycles.
- Supply chain security — a dependency management strategy is part of a dependency graph and feeds vulnerability scanning (dependency vulnerabilities).
How it fits
Exam notes
- Azure Artifacts is the AZ-400 answer to “centralized package management” — know it as the alternative to hand-rolling package storage.
- Feeds are project-scoped or org-scoped; org feeds are shareable across projects.
- Package versions are immutable once published — you cannot delete and republish a version, only retire/deprecate it.
- Upstream caching makes builds reproducible even when the public source is down.
Related
azure-artifacts · package-feed · upstream-sources · dependency-graph · pipeline-integration · semantic-versioning · dependency-vulnerabilities · build-artifact
📘 Source: Microsoft Learn — Dependency Management
Azure Artifacts
What it is
Azure Artifacts is the package management service in Azure DevOps. It lets teams create, host, and share packages from public or private feeds — supporting NuGet, npm, Maven, Python (PyPI), Cargo, Go, and Universal packages. It’s the AZ-400 tool for implementing a centralized dependency-management strategy.
Why it exists
Without a private package host, internal libraries have to be copied around or fetched from public registries, leading to version drift, broken builds, and supply-chain risk. Azure Artifacts gives a governed, permission-controlled place to store packages and cache upstream dependencies, so builds are reproducible and consumption is auditable.
Key ideas
- Feeds — the core container. A feed is project- or organization-scoped and holds packages plus their versions, views, and permissions.
- Upstream sources — feeds can proxy public sources (nuget.org, npmjs.com, PyPI, Maven Central) and cache downloaded packages, so pipelines don’t hit the internet directly.
- Permissions — granular controls: readers, contributors (publish), owners; configurable per feed or per identity.
- Views — immutable, filtered views (e.g.
@Release) for promoting packages to consumers. - Package types — NuGet, npm, Maven, Python, Cargo, Go, and Universal packages.
- Retention & cleanup — retention policies and “unlist/delete” rules keep feeds from growing unbounded; versions are immutable once published.
How it fits

Diagrams courtesy of Microsoft Learn / Azure docs: azure/devops/artifacts/start-using-azure-artifacts
Exam notes
- Azure Artifacts supports NuGet, npm, Maven, Python, Cargo, Go, and Universal packages.
- Feeds are scoped to a project or the whole organization; org feeds are shareable across projects.
- Enabling upstream sources is a key governance feature — it caches public packages and keeps builds reproducible.
- The CLI is integrated into pipelines via tasks (
NuGet,npm,pip,Maven) and credentials are supplied by the Azure Artifacts service connection.
Related
dependency-management · package-feed · upstream-sources · dependency-graph · pipeline-integration · build-artifact
📘 Source: Microsoft Learn — Azure Artifacts
Package feed
What it is
A package feed is a container in Azure Artifacts that stores packages and their versions (NuGet, npm, Maven, Python, Cargo, Go, Universal) along with views, retention settings, and access permissions. Feeds are the mechanism teams use to publish, share, and consume internal packages and to cache upstream dependencies.
Why it exists
Feeds give teams a single, versioned, permission-controlled source of truth for packages. They replace copying DLLs/JARs around or each build hitting a public registry — both of which make builds non-reproducible and ungovernable.
Key ideas
- Scope — a feed is scoped to a project or the organization. Organization-scoped feeds can be consumed by any project in the org.
- Views — immutable snapshots (e.g.
@Local,@Prerelease,@Release) used to promote packages and control what consumers see. - Permissions — per-feed roles: Owners, Contributors (can publish), and Readers (can consume).
- Upstream sources — a feed can declare upstreams (public registries or other feeds) so it also serves cached external packages.
- Retention — set retention limits to prune old versions automatically.
- Version immutability — once a package version is published to a feed it cannot be overwritten; it can only be unlisted, deprecated, or deleted (with a newer version).
How it fits
Exam notes
- Choose project vs. organization scope based on sharing needs — org feeds are the default recommendation for org-wide reuse.
- Views are the supported way to do package promotion (e.g. promoting a package to
@Release). - A feed with upstream sources serves both your own packages and cached public ones through one endpoint.
Related
azure-artifacts · upstream-sources · dependency-management · semantic-versioning · pipeline-integration
📘 Source: Microsoft Learn — Package Feed
Upstream sources
What it is
Upstream sources let a feed in Azure Artifacts act as a proxy and cache for packages stored in another location — most commonly public registries such as nuget.org, npmjs.com, PyPI, Maven Central, or another Azure Artifacts feed. When a consumer requests a package the feed doesn’t have, the feed pulls it from the upstream, caches a copy, and serves it from then on.
Why it exists
Without upstreams, every build that needs a public package hits the public registry directly — slow, non-reproducible, and open to the internet. Upstreams give teams a single governed endpoint that transparently supplies external dependencies while caching them, so builds are reproducible and more secure.
Key ideas
- Proxy + cache — first request fetches from upstream and stores a copy; subsequent requests are served from the feed.
- Multiple package types — upstreams can be configured per package protocol (NuGet, npm, Maven, Python, etc.).
- Feed-to-feed upstreams — chain org feeds together; a project feed can upstream an org feed, keeping a hierarchy.
- Single identity — consumers authenticate once to the feed rather than to many public registries.
- Security — limits direct egress to public registries and makes dependency resolution auditable through a central place.
How it fits
Exam notes
- Enabling upstream sources caches external packages so builds don’t depend on the public internet being up.
- Upstreams support public registries and other Azure Artifacts feeds (feed-to-feed).
- A package published to the feed with the same ID/version as an upstream package takes precedence and can “shadow” it.
- Upstreams are a core part of a dependency-management strategy for reproducibility and supply-chain control.
Related
azure-artifacts · package-feed · dependency-management · dependency-graph · pipeline-integration
📘 Source: Microsoft Learn — Upstream Sources
Dependency graph
What it is
A dependency graph is the map of every package and library an application (or repository) depends on, including their transitive (nested) dependencies. Tools that produce a dependency graph inspect manifest/lock files (e.g. package.json+lockfile, *.csproj+packages.lock.json, requirements.txt, pom.xml) and record the full tree of direct and indirect packages and their versions.
Why it exists
A single package you add can pull in dozens of transitive dependencies you never see. To secure the supply chain (know what runs in your app), audit licenses, and detect vulnerable packages, teams need a complete, current map of every dependency and its version. The graph is the foundation for vulnerability scanning and version-pinning decisions.
Key ideas
- Direct vs. transitive — direct deps are declared in your manifest; transitive deps are their dependencies, recursively.
- Lock files —
package-lock.json,yarn.lock,packages.lock.json,poetry.lockpin exact versions so the graph is reproducible. - Dependency graph on GitHub/GitHub Enterprise — GitHub’s dependency graph surfaces dependencies and is tied to Dependabot alerts (dependency vulnerabilities).
- Feed analytics in Azure Artifacts — per-feed package usage/analytics show which packages consumers rely on.
- Vulnerability context — the graph links each package to known CVE databases (e.g. via Dependabot, OSV, or Azure’s dependency scanning).
How it fits
Exam notes
- The dependency graph is what lets you answer “what packages is this app using, and are they safe?”
- Lock files pin transitive versions — committing them makes dependency resolution reproducible.
- GitHub’s Dependabot uses the dependency graph to detect outdated and vulnerable dependencies and open PRs.
- Know that vulnerability fixes require bumping and re-publishing the affected package version.
Related
dependency-management · dependency-vulnerabilities · pipeline-integration · azure-artifacts · package-feed
📘 Source: Microsoft Learn — Dependency Graph
Pipeline integration (packaging in pipelines)
What it is
Pipeline integration is how packaging and dependency consumption plug into Azure Pipelines (and other CI/CD): pipelines restore dependencies from feeds during the build, publish newly built packages to feeds, and consume packages downstream. This is the automation layer that makes a dependency-management strategy actually run continuously.
Why it exists
Dependency management is only useful if the CI/CD pipeline actually uses it. Manually publishing packages or pointing builds at public registries defeats reproducibility. Pipeline integration automates: restore → build → test → package → publish, so every commit can flow through the same governed, versioned feed.
Key ideas
- Restore — pipeline tasks (
NuGet restore,npm install,pip,Maven) authenticate to the feed and pull dependencies; feed upstream sources supply cached external packages. - Publish — build steps produce packages and push them to a feed using the Azure Artifacts task or CLI; versioning often derived from SemVer (GitVersion,
${{ build.buildId }}, etc.). - Service connection / credentials — the Azure Artifacts service connection gives pipeline agents read/write access to feeds without hardcoding tokens.
- Conditional publishing — typically only main/
release/*branches publish to a feed; feature branches may publish to a prerelease view. - Downstream consumption — release pipelines pull the published package from the feed rather than copying build artifacts directly.
How it fits
Exam notes
- Use the Azure Artifacts service connection for feed auth in pipelines, not checked-in credentials.
- Publish from main/release branches only and use views (
@Release) for promotion; feed package versions are immutable. - Lock files (
package-lock.json,packages.lock.json) should be committed so restore is reproducible. - Enabling upstream sources in the feed means the pipeline needs no direct internet for common packages.
Related
dependency-management · azure-artifacts · package-feed · upstream-sources · build-artifact · azure-pipelines · dependency-graph
📘 Source: Microsoft Learn — Pipeline Integration
Semantic versioning
What it is
Semantic versioning (SemVer) is a convention for version numbers of the form MAJOR.MINOR.PATCH (e.g. 2.3.1). Each segment communicates how backward-compatible a change is, so consumers can safely decide when to upgrade.
Why it exists
Without a versioning contract, it’s impossible to tell whether a new release breaks you. SemVer makes compatibility machine-readable — tools and developers can rely on the number to know whether an update is safe (patch), adds features (minor), or may break the API (major).
Key ideas
- MAJOR — incompatible, breaking API change. Bump when consumers must change code.
- MINOR — backward-compatible new functionality. Bump when you add features.
- PATCH — backward-compatible bug fixes. Bump when you only fix issues.
- Pre-release & metadata —
1.0.0-beta.1,2.3.1+build.5for unreleased builds and build metadata. - Common practice — tags map to versions (
v1.2.3), packages use SemVer in Azure Artifacts/NuGet/npm, and dependency ranges express “compatible with” via^/~.
Exam notes
- Memorize: breaking = MAJOR, new feature = MINOR, fix = PATCH.
- SemVer lets dependency management declare compatible ranges and tells CD pipelines when to cut a release.
- Version tags (e.g.
v2.3.1) are used to mark releases in Git history.
Related
git · branching-strategy · azure-artifacts
📘 Source: Microsoft Learn — Semantic Versioning
Dependency vulnerabilities
What it is
Dependency vulnerabilities are security weaknesses found in third-party libraries, packages, and tools that your application pulls in — either directly or transitively (dependencies-of-dependencies). Because modern apps are mostly composed of open-source components, an unpatched dependency can give an attacker the same access as a flaw in your code.
Why it exists
You rarely write the whole stack; you consume packages (NuGet, npm, PyPI, Maven, Go modules) and base images. Each has its own known vulnerabilities (CVEs). Without tracking them, an app can ship with a critical, patched-elsewhere flaw that attackers exploit — the software supply chain is a primary attack surface, which is why scanning dependencies is an AZ-400 security focus.
Key ideas
- Direct vs transitive — you control the direct ones; transitive ones (nested deps) are also scanned by tooling.
- CVE / advisory databases — tools cross-reference package versions against known-issue feeds (e.g. GitHub Advisory Database, OWASP Dependency-Check, NuGet/npm advisories).
- Automated detection & remediation — tools flag the vulnerable package and suggest/auto-raise the fix (e.g. Dependabot opens a PR to bump the version).
- Version pinning / lockfiles — lock files (package-lock.json, packages.lock.json) make the resolved set deterministic and thus scannable.
- Feed a gate — fail the build or block the release when a critical dependency violation exists (a compliance gate).
- Pair with SCA — dependency/vulnerability scanning is the security dimension of supply-chain component analysis; dependency management covers feeds and versioning.
How it fits
One pillar of shift-left security: automation patches risky components at the point of change instead of leaving a “known-unsafe dependency” liability in released builds. Works alongside SAST (your code), DAST (runtime) and SCA (components).
Exam notes
- Distinguish SAST (your code) vs dependency/vuln scanning (third-party components) vs SCA/llicense (component inventory + legal).
- Memorize the tool: Dependabot (GitHub) auto-opens PRs for vulnerable dependencies; Azure DevOps integrates Open Source / vulnerability scanning with Azure Artifacts.
- Watch for transitive dependencies — tooling must scan the full graph, not just directly-referenced packages.
- Vulnerable package found late → prefer update + redeploy via automated PR; the finding should gate the release.
Related
dev-sec-ops · software-composition-analysis · compliance-gate · dependency-management · azure-artifacts
Build artifact
What it is
A build artifact is the packaged output of a pipeline — compiled binaries, packages, or files — published by a build job and consumed by later jobs or a release/deployment.
Why it exists
CI produces things (DLLs, containers, npm/yarn packages) that other jobs or CD stages need. Artifacts hand those outputs between jobs (which may run on different agents) and into releases, decoupling “build” from “consume”.
Key ideas
- Azure Pipelines
- Publish with the
PublishPipelineArtifact/PublishBuildArtifacttask (or- taskYAML) from a job. - Download with
DownloadPipelineArtifactor viadownloadin a later job/release. - The build artifact is a key input to classic release pipelines.
- Publish with the
- GitHub Actions
actions/upload-artifactuploads;actions/download-artifactretrieves in later jobs.
- Artifacts differ from packages (NuGet, npm in Azure Artifacts) — artifacts are raw build output, packages are versioned feeds.
Exam notes
- “Publish artifacts” is required when a later job or a release pipeline needs build output.
- In GitHub Actions use
actions/upload-artifact/download-artifactto share between jobs. - Artifacts are per-run; they persist for the run and into associated releases.
Related
azure-pipelines · github-actions · jobs-steps
📘 Source: Microsoft Learn — Build Artifact