Skip to content

Lint an npm or yarn lockfile to analyze and detect security issues

License

Notifications You must be signed in to change notification settings

modulexcite/lockfile-lint

 
 

Repository files navigation

lockfile linting 🌈

lint lockfiles for improved security and trust policies

build codecov license Security Responsible Disclosure npx lockfile-lint

About

Lockfiles are used as trusted whitelist of resources manifest to fetch packages from. However, keeping track of the changes introduced to lockfiles is not an easy task as they are designed to consumed by machines 🤖.

What happens when someone creates a Pull Request and sneaks a malicious resource package that replaces a real library? 😱

Exactly! Lint your lockfiles to ensure they adhere to pre-defined security policies and mitigate this vector of attack.

Usage

Easily invoked with npx on any project and lint it:

npx lockfile-lint --path yarn.lock --allowed-hosts npm yarn --validate-https

If lockfile-lint detects exceptions to the policies it will report them:

carbon

Refer to lockfile-lint for more details on the CLI usage.

You can use lockfile-lint as a standalone CLI tool, or as an API library using the following npm packages:

  • lockfile-lint - a CLI tool that can be easily integrated as a pre-commit hook or part of a CI/build
  • lockfile-lint-api - a library providing a programmatic API

Author

lockfile-lint © Liran Tal, Released under the Apache-2.0 License.

About

Lint an npm or yarn lockfile to analyze and detect security issues

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%