← PHP / Laravel · Contents

PHP-074 / Advanced

Deploying without a lock file; dependency confusion

A08:2021 Software and Data Integrity Failures · CWE-494 Download of Code Without Integrity Check

Why is this a problem?

Each build can install a different version or a public package with the same name as an internal package.

How to fix it

bash
# Commit composer.lock, prioritize the private repository and run composer audit in CI

Further reading