Attacks and Exploits

A tester finds that a CI pipeline resolves a private internal package name from the public registry, and that name is not registered publicly. Which action demonstrates the supply chain weakness?

Show the answer

Correct answerC. Publish a public package using the internal name and a higher version

AWhy not this: Tag overwriting tampers with container images and does not use the unregistered package name.

BWhy not this: OAuth grant abuse targets third-party integrations and has no link to package name resolution.

CWhy this is right: Package managers that check public registries can pull the higher-versioned malicious package, which is dependency confusion.

DWhy not this: The metadata service yields instance credentials and does not affect how dependencies are resolved.

Dependency confusion works because the package manager prefers a higher version from the public registry, so a public package with the internal name gets pulled into the build. Overwriting an image tag tampers with a deployed artifact, but it does not exploit how the pipeline resolves package names.