Lint-staged is a handy npm package that automatically lints files staged in git, ensuring code quality before commits. Version 1.0.0 represents a significant upgrade from version 0.2.2, introducing key improvements and a wider scope. The initial version, 0.2.2, primarily focused on linting JavaScript and CSS files, relying solely on the staged-files dependency to identify staged content. In contrast, version 1.0.0 broadens its capabilities to handle various file types, owing to a more robust dependency list.
Developers updating to version 1.0.0 will benefit from a richer feature set and enhanced tooling. Crucially, it replaces staged-files with staged-git-files for identifying staged files and adds dependencies like ora for elegant command-line spinners, which for locating executable commands, npm-run for executing npm scripts. minimatch for more flexible file matching, strip-eof to remove trailing newlines and object-assign for polyfilling. This shift allows for more flexible configuration and integration with linters beyond JavaScript and CSS. The introduction of eslint, npmpub, pre-commit, and eslint-config-es5 as development dependencies highlights a commitment to code quality and streamlined publishing workflow. These changes lead to a more powerful and versatile linting solution, making it an essential tool for maintaining code consistency and preventing errors in git workflows.
All the vulnerabilities related to the version 1.0.0 of the package
Tmp files readable by other users in sync-exec
Affected versions of sync-exec
use files located in /tmp/
to buffer command results before returning values. As /tmp/
is almost always set with world readable permissions, this may allow low privilege users on the system to read the results of commands run via sync-exec
under a higher privilege user.
There is currently no direct patch for sync-exec
, as the child_process.execSync
function provided in Node.js v0.12.0 and later provides the same functionality natively.
The best mitigation currently is to update to Node.js v0.12.0 or later, and migrate all uses of sync-exec
to child_process.execSync()
.