Socket
Book a DemoInstallSign in
Socket

npm-viewscripts

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-viewscripts

View which npm dependencies in a project are using npm scripts

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source


npm-viewscripts

Identify potentially malicious npm scripts in a project.

codeship GitHub NPM

Overview

This project is a Node.js CLI tool to identify which of a project's existing dependencies are utilising npm lifecycle scripts, which could be malicious.

The currently configured npm scripts the tool will identify are: preinstall, postintall, preuninstall, postuninstall

Note: This project is to educate, so should not be used as a complete npm security solution.

Installation

# install globally, using npm
$ npm install npm-viewscripts -g

# Run the cli on a project
$ cd my-node-project
$ npm install
$ npm-viewscripts

Usage

$ npm-viewscripts

  Usage
    $ npm-viewscripts [path]

  Options
    path  Modules folder  [Default: node_modules]

Understanding the result

Positive report example:

Potentially unsafe scripts found. These should be reviewed for safety
Module name: monorepo-symlink-test Type: postinstall

The above output informs us that the monorepo-symlink-test is running a postinstall script, so we should review that, and ensure that it is safe.

Negative report example:

No potentially unsafe scripts found.

No modules in the project are currently using scripts which could be used maliciously.

Keywords

npm

FAQs

Package last updated on 27 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.