Test package managers for integrity verification

Information disclosureDiscovery

Written with a model's help from “Package managers have an integrity problem” on Trail of Bits blog. Read the writeup before relying on it.

To test a package manager for integrity verification, try modifying the package repository responses using a tool like mitmproxy to simulate a malicious server. Check if the package manager uses cryptographic hashes or signatures to verify the integrity of downloaded packages. Look for lockfiles that include hashes and verify if the package manager checks these hashes after downloading a package. If the package manager does not verify hashes by default, check if it requires extra configuration to do so. A successful test would show that the package manager detects and prevents the installation of tampered packages.

Follow #integrity-verification, #package-managers or #supply-chain for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.