Build tools & artifact repositories · Lesson 5 of 9 · 3 min read
Versioning, reproducibility and supply chain
Semantic versioning
MAJOR.MINOR.PATCH — major for breaking changes, minor for backward-compatible features, patch for fixes; pre-release tags like 2.0.0-rc.1. For services deployed continuously, versions often include build metadata (1.4.0+build.512.sha.a1b2c3d) and the image is tagged with the git SHA; libraries consumed by others need strict semver.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
Reproducible builds
- Pin dependency versions (no ranges like
[1.0,)orlatest), use lockfiles (gradle.lockfile,package-lock.json,poetry.lock/hashedrequirements.txt,go.sum). - Pin build tool versions (wrappers) and JDK (toolchains or a pinned builder image).
- Resolve only through your repository manager.
- Same inputs ⇒ same output: avoid embedding timestamps (Maven
project.build.outputTimestamp, GradleisPreserveFileTimestamps = false,isReproducibleFileOrder = true).
Supply chain security
- SBOM generation (CycloneDX Maven/Gradle plugins, Syft) attached to each artifact/image.
- Dependency scanning — OWASP Dependency-Check, Snyk, Trivy, GitHub Dependabot alerts; fail on critical with exceptions tracked.
- Signing and provenance — sign artifacts and images (Sigstore cosign), SLSA provenance from CI.
- Least-privilege publish — only CI can publish releases; developers read-only; separate credentials per pipeline; short-lived tokens.
- Typosquatting / dependency confusion — scoped namespaces (
@acme/in npm), exclusive internal routing, block-lists.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.