Security Operations

A build resolves package names from both private and public registries, taking the highest version, so a public package reusing an internal name with a higher version gets pulled. Which control BEST stops this while keeping other public packages usable?

Show the answer

Correct answerB. Bind internal package names to the private registry and lock hashed versions

AWhy not this: This stops the attack but breaks the requirement to keep using public packages and adds manual work.

BWhy this is right: Pinning internal names to the private source and verifying hashes prevents the higher public version being chosen.

CWhy not this: Composition scans match known vulnerabilities; a brand-new malicious package has no CVE entry.

DWhy not this: Signing happens after the malicious package is included, so it vouches for a tainted build.

This is dependency confusion. Binding internal names to the private registry and locking hashed versions means a higher public version is never selected, while other names still resolve publicly. Code signing only vouches for the artifact after the malicious package was already built in.