Skip to content

Commit 4b7c593

Browse files
authored
docs: update README (#287)
1 parent c03409a commit 4b7c593

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

README.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</h1>
44

55
<p align="center">
6-
a Node.js CLI to deeply analyze the dependency tree of a given package / directory
6+
a Node.js CLI to deeply analyze the dependency tree of a given NPM package or Node.js local app
77
</p>
88

99
<p align="center">
@@ -28,24 +28,15 @@
2828
<img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uxkBbhI2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zxtg6o2v2ahmpsjfhs71.PNG">
2929
</p>
3030

31-
## 📢 About
32-
33-
[Node.js](https://nodejs.org/en/) security Command Line Interface. The goal of the project is to a design a CLI/API that will fetch and deeply analyze the dependency tree of a given **npm** package (Or a local project with a **package.json**) and output a **.json file** that will contains all metadata and flags about each packages. All this data will allow to quickly identify different issues across projects and packages (related to security and quality).
34-
35-
The CLI allow to load the JSON into a Webpage with the **open** command. The page will draw a Network of all dependencies with [vis.js](https://visjs.org/) (example in the screenshot above). We also wrote a little Google drive document a while ago that summarizes some of these points:
36-
37-
- [NodeSecure G.Drive Design document](https://docs.google.com/document/d/1853Uwup9mityAYqAOnen1KSqSA6hlBgpKU0u0ygGY4Y/edit?usp=sharing)
38-
3931
## 📜 Features
4032

41-
- Run an AST analysis on each .js/.mjs file in the packages tarball and sort out warnings (unsafe-regex, unsafe-import etc) and the complete list of required expr and statements (files, node.js module, etc.).
33+
- Run a static scan on every JavaScript files and sort out warnings (unsafe-regex, unsafe-import etc) and the complete list of required expr and statements (files, node.js module, etc.).
4234
- Return complete composition for each packages (extensions, files, tarball size, etc).
4335
- Packages metadata from the npm registry API (number of releases, last publish date, maintainers etc).
4436
- Search for licenses files in the tarball and return the [SPDX](https://spdx.org/licenses/) expression conformance of each detected licenses.
45-
- Link vulnerabilities from the [Security-WG repository](https://github.com/nodejs/security-wg/tree/master/vuln/npm) to the package version node.
46-
- Add flags to each packages versions to identify well known patterns and potential security threats easily.
47-
- Analyze npm packages and local Node.js projects.
48-
- Supports [OpenSSF Scorecard](https://github.com/ossf/scorecard).
37+
- Link vulnerabilities from the multiple sources like GitHub Advisory, Sonatype or Snyk using [Vulnera](https://github.com/NodeSecure/vulnera).
38+
- Add flags (emojis) to each packages versions to identify well known patterns and potential security threats easily.
39+
- First-class support of open source security initiatives like [OpenSSF Scorecard](https://github.com/ossf/scorecard).
4940

5041
## 🚧 Requirements
5142

@@ -94,7 +85,7 @@ $ nsecure --help
9485
$ nsecure cwd
9586

9687
# Run an analysis for a given 'npm' package (must be in the npm registry).
97-
$ nsecure from @sindresorhus/is
88+
$ nsecure from mocha
9889
```
9990

10091
Then a `nsecure-result.json` will be writted at the current CLI location. To open it on a web page just run
@@ -136,13 +127,14 @@ Some options are available on both `cwd`, `from` and `auto` commands. The output
136127
$ nsecure from express -d 10 -o express-security-report
137128
```
138129

139-
## Private packages / registry
130+
## Private registry / Verdaccio
140131

141-
Nsecure allow you to fetch stats on private npm packages by setting up a `NODE_SECURE_TOKEN` env variable (which must contains an [npm token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens)).
132+
NodeSecure allow you to fetch stats on private npm packages by setting up a `NODE_SECURE_TOKEN` env variable (which must contains an [npm token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens)).
142133

143-
> 💬 If you link the package by yourself with npm you can create a `.env` file at the root of the project too.
134+
> [!TIP]
135+
> If you `npm link` the package by yourself you can create a `.env` file at the root of the project too.
144136
145-
Nsecure is capable to work behind a custom private npm registry too by searching the default registry URL in your local npm configuration.
137+
NodeSecure is capable to work behind a custom private npm registry too by searching the default registry URL in your local npm configuration.
146138

147139
```bash
148140
$ npm config get registry

0 commit comments

Comments
 (0)