Interview Prep/CI/CD/Build Tools and Artifact Repositories

What is a proxy (remote) repository and what is dependency confusion?

AdvancedConceptBuild Tools and Artifact Repositories
Answer

A proxy repo caches an upstream registry. Dependency confusion is an attack where someone publishes a public package with the same name as your private internal package and a higher version, tricking resolvers that check public sources into pulling it. Mitigations: use scoped names (@org/pkg), configure the resolver so internal namespaces resolve only from the private repo (Nexus/Artifactory routing rules, npm scope registry mapping, pip --index-url instead of --extra-index-url), and reserve your names on public registries.

# .npmrc
@acme:registry=https://nexus.example.com/repository/npm-private/
All CI/CD questions Roadmap: CI/CD fundamentals

More on Build Tools and Artifact Repositories