All Projects → lirantal → Npq

lirantal / Npq

Licence: apache-2.0
🎖safely* install packages with npm or yarn by auditing them as part of your install process

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Npq

Vuls
Agent-less vulnerability scanner for Linux, FreeBSD, Container, WordPress, Programming language libraries, Network devices
Stars: ✭ 8,844 (+1623.98%)
Mutual labels:  security-tools, security-audit, vulnerabilities
Ossa
Open-Source Security Architecture | 开源安全架构
Stars: ✭ 796 (+55.17%)
Mutual labels:  security-tools, security-audit, vulnerabilities
Brakeman
A static analysis security vulnerability scanner for Ruby on Rails applications
Stars: ✭ 6,281 (+1124.37%)
Mutual labels:  security-tools, security-audit, vulnerabilities
Super
Secure, Unified, Powerful and Extensible Rust Android Analyzer
Stars: ✭ 340 (-33.72%)
Mutual labels:  security-tools, security-audit, vulnerabilities
Npminstall
Make `npm install` fast and easy.
Stars: ✭ 374 (-27.1%)
Mutual labels:  npm, package-manager
Website
Yarn package manager website
Stars: ✭ 374 (-27.1%)
Mutual labels:  npm, package-manager
Fwanalyzer
a tool to analyze filesystem images for security
Stars: ✭ 382 (-25.54%)
Mutual labels:  security-tools, security-audit
Huskyci
Performing security tests inside your CI
Stars: ✭ 398 (-22.42%)
Mutual labels:  security-tools, vulnerabilities
Taipan
Web application vulnerability scanner
Stars: ✭ 359 (-30.02%)
Mutual labels:  security-tools, security-audit
Awesome Npm
Awesome npm resources and tips
Stars: ✭ 3,894 (+659.06%)
Mutual labels:  npm, package-manager
Advisory Db
Security advisory database for Rust crates published through crates.io
Stars: ✭ 396 (-22.81%)
Mutual labels:  security-audit, vulnerabilities
W5
Security Orchestration, Automation and Response (SOAR) Platform. 安全编排与自动化响应平台,无需编写代码的安全自动化,使用 SOAR 可以让团队工作更加高效
Stars: ✭ 367 (-28.46%)
Mutual labels:  security-tools, security-audit
Patrowlmanager
PatrOwl - Open Source, Smart and Scalable Security Operations Orchestration Platform
Stars: ✭ 363 (-29.24%)
Mutual labels:  security-tools, vulnerabilities
Apkanalyser
一键提取安卓应用中可能存在的敏感信息。
Stars: ✭ 378 (-26.32%)
Mutual labels:  security-tools, security-audit
Wssat
WEB SERVICE SECURITY ASSESSMENT TOOL
Stars: ✭ 360 (-29.82%)
Mutual labels:  security-tools, vulnerabilities
Benchmarks Of Javascript Package Managers
Benchmarks of JavaScript Package Managers
Stars: ✭ 388 (-24.37%)
Mutual labels:  npm, package-manager
Pwndoc
Pentest Report Generator
Stars: ✭ 417 (-18.71%)
Mutual labels:  security-audit, vulnerabilities
Otseca
Open source security auditing tool to search and dump system configuration. It allows you to generate reports in HTML or RAW-HTML formats.
Stars: ✭ 416 (-18.91%)
Mutual labels:  security-tools, security-audit
0xsp Mongoose
a unique framework for cybersecurity simulation and red teaming operations, windows auditing for newer vulnerabilities, misconfigurations and privilege escalations attacks, replicate the tactics and techniques of an advanced adversary in a network.
Stars: ✭ 419 (-18.32%)
Mutual labels:  security-tools, security-audit
Ssh Mitm
ssh mitm server for security audits supporting public key authentication, session hijacking and file manipulation
Stars: ✭ 335 (-34.7%)
Mutual labels:  security-tools, security-audit



safely* install packages with npm/yarn by auditing them as part of your install process

npm npm codecov Build Status Known Vulnerabilities Security Responsible Disclosure

npq

npq-demo-3-final

Media coverage about npq:

About

Once npq is installed, you can safely* install packages:

npq install express

npq will perform the following steps to sanity check that the package is safe by employing syntactic heuristics and querying a CVE database:

  • Consult the snyk.io database of publicly disclosed vulnerabilities to check if a security vulnerability exists for this package and its version.
  • Package age on npm
  • Package download count as a popularity metric
  • Package has a README file
  • Package has a LICENSE file
  • Package has pre/post install scripts

If npq is prompted to continue with the install, it simply hands over the actual package install job to the package manager (npm by default).

safely* - there's no guaranteed safety; a malicious or vulnerable package could still exist that has no security vulnerabilities publicly disclosed and passes npq's checks.

Install

npm install -g npq

Note: we recommend installing with npm rather than yarn. That way, npq can automatically install shell aliases for you.

Usage

Install packages with npq:

npq install express

Embed in your day to day

Since npq is a pre-step to ensure that the npm package you're installing is safe, you can safely embed it in your day-to-day npm usage so there's no need to remember to run npq explicitly.

alias npm='npq-hero'

Offload to package managers

If you're using yarn, or generally want to explicitly tell npq which package manager to use you can specify an environment variable: NPQ_PKG_MGR=yarn

Example: create an alias with yarn as the package manager:

alias yarn="NPQ_PKG_MGR=yarn npq-hero"

Note: npq by default will offload all commands and their arguments to the npm package manager after it finished its due-diligence for the respective packages.

Marshalls

Marshall Name Description Notes
age Will show a warning for a package if its age on npm is less than 22 days Checks a package creation date, not a specific version
downloads Will show a warning for a package if its download count in the last month is less than 20
readme Will show a warning if a package has no README or it has been detected as a security placeholder package by npm staff
scripts Will show a warning if a package has a pre/post install script which could potentially be malicious
snyk Will show a warning if a package has been found with vulnerabilities in snyk's database For snyk to work you need to either have the snyk npm package installed with a valid api token, or make the token available in the SNYK_TOKEN environment variable, and npq will use it
license Will show a warning if a package has been found without a license field Checks the latest version for a license

Disabling Marshalls

To disable a marshall altogether, set an environment variable using with the marshall's shortname.

Example, to disable snyk:

MARSHALL_DISABLE_SNYK=1 npq install express

Using with TravisCI

An example of using lockfile-lint with a .travis.yml configuration as part of your build:

language: node_js
before_script:
  - npx lockfile-lint --path package-lock.json --validate-https --allowed-hosts npm
install:
  - yarn install
script:
  - yarn run test

FAQ

  1. Can I use NPQ without having npm or yarn?
  • NPQ will audit a package for possible security issues, but it isn't a replacement for npm or yarn. When you choose to continue installing the package, it will offload the installation process to your choice of either npm or yarn.
  1. How is NPQ different from npm audit?
  • npm install will install a module even if it has vulnerabilities; NPQ will display the issues detected, and prompt the user for confirmation on whether to proceed installing it.
  • NPQ will run synthethic checks, called marshalls, on the characteristics of a module, such as whether the module you are going to install has a pre-install script which can be potentially harmful for your system and prompt you whether to install it. Whereas npm audit will not perform any such checks, and only consults a vulnerability database for known security issues.
  • npm audit is closer in functionality to what snyk does, rather than what NPQ does.
  1. Do I require a snyk API key in order to use NPQ?
  • It's not required. If NPQ is unable to detect a snyk API key for the user running NPQ, then it will skip the database vulnerabilities check. We do, however, greatly encourage you to use snyk, and connect it with NPQ for broader security.

Contributing

Please consult the CONTRIBUTING for guidelines on contributing to this project

Author

Liran Tal [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].