Interview Prep/DevSecOps/Supply chain: signing, SBOM and dependencies

pip in CI installed an attacker-controlled `acme-auth` from PyPI despite `--extra-index-url` pointing to your private index

AdvancedTroubleshootingSupply chain: signing, SBOM and dependencies
Answer

Likely causes → --extra-index-url merges both indexes and pip picks the highest version from either; a public package with a bigger version wins.

Diagnose → pip download acme-auth -v 2>&1 | grep -i "found link", and check which index served it.

Fix → Use a single --index-url pointing to a proxy (Artifactory/Nexus/CodeArtifact) that serves internal names only from the internal repo, and hash-pin:

pip install --require-hashes --index-url https://pypi.acme.internal/simple -r requirements.txt

Rotate any secrets the build had access to.

Prevent → Ban --extra-index-url in CI templates; reserve internal names on PyPI.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply chain: signing, SBOM and dependencies