A financial services company builds a multi-file .NET package in Azure Pipelines and deploys it to production. Auditors set these requirements:
- Each build must produce a package with its own unique version, so that any deployed package can be traced back to the build and source that produced it.
- People must not be able to modify a package after it is published.
- Version numbers must not depend on people entering them manually.
Which approach meets all three requirements?
Why
Unique, immutable package identifiers support traceability from deployed packages to their sources. Automatically generating a distinct version for each build satisfies the uniqueness and automation requirements. Restricting storage write access to the pipeline prevents people from modifying published packages.
- Not correct: The pipeline uses one fixed version for every build and publishes to storage where only the pipeline can write. End-to-end traceability depends on unique, immutable identifiers. A shared fixed version cannot identify which build produced a deployed package.
- Correct: The pipeline automatically generates a unique version for each build and publishes to storage where only the pipeline can write. Generating a unique version for every build provides distinct package identifiers without manual entry. Restricting write access to the pipeline prevents people from modifying published packages.
- Not correct: The pipeline automatically generates a unique version for each build and publishes to storage where release engineers can replace packages. Source integrity requires secure storage with restricted human access, so that people cannot modify packages.
- Not correct: Developers set the version in the project file and the pipeline publishes to storage where only the pipeline can write. Manual versioning is the approach the guidance says to avoid. Build tools should generate version numbers automatically to reduce human error.
Source