fb-instant-articles
fb-instant-articles copied to clipboard
Security vulnerabilities from dev composer dependencies are bundled into production code
Steps required to reproduce the problem
- Install fb-instant-articles from the WordPress.org repo
- The
vendordirectory contains the WPCS and PHP Codesniffer packages - Those packages contain known security vulnerabilities
Expected Result
- Plugin distributed to the WordPress plugin repo doesn't contain development packages.
- The WPCS package is already marked as a
require-devdependency. - The deploy script that packages the code to send to the WordPress Plugin repo needs to include the
--no-devflag in itscomposer install - That script doesn't seem to be versioned in this repo.
Version Info
- Plugin version: 4.2.0
- WordPress version: Any
- PHP version: Any
It's not just the security aspect, but simply the number of redundant files that need to be reviewed before reaching production. The process that creates the .zip file available in Releases on Github also results in PHPCS and WPCS packages being included unnecessarily.