Closed glensc closed 6 years ago
Thank you @glensc!
This is incorrect, as composer installation may run with --no-dev
. Reverted in 382e703bda76c761d8f71b38e403a027eec9d5f0
care to explain what is incorrect? installation of this package directly or this package installed as dependency?
have you read this project readme? the security checks are performed only when resolving composer dependencies, so if you install via lock file it does not apply. also the dependencies for "require-dev" are still resolved regardless if the "dev" dependencies get installed. this is to ensure consistent .lock file, because lock file should work for both "dev" and "no-dev" installation.
ps: your commit link 382e703 to "revert" is incorrect.
@glensc dang, indeed, double-error:
composer install --no-dev
would exclude require-dev
during SAT process (when not having a composer.lock
). Sorry, my mistake! Will re-revert :-)Fixed in https://github.com/Roave/SecurityAdvisories/commit/3df94834c80037130b533703df4672785b6ea112
Sorry again for the hasty revert.
To verify that composer install
SAT also works with require-dev
also when --no-dev
is provided as flag:
mkdir foo
cd foo
echo '{"require":{"zendframework/zendxml":"1.0.0"},"require-dev":{"roave/security-advisories":"dev-master"}}' > composer.json
composer install --no-dev -vvv # should exit with `1`
having second look, made followup: #43
Quoting readme:
therefore move the dependency to
require-dev
section.