Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
npm-dependency-analyzer
Advanced tools
Readme
Analyze Open Source dependencies in a project developed on a Node.js environment. This plugin analyzes all dependencies of a project to check for vulnerabilities and licenses.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Project Policy",
"description": "A policy with a project related configurations and \tinformation",
"type": "object",
"properties": {
"project_id": {
"description": "Id of the project to present in the report",
"type": "string"
},
"project_name": {
"description": "Name of the project to present in the report",
"type": "string"
},
"project_version": {
"description": "Version of the project to present in the report",
"type": "string"
},
"project_description": {
"description": "Description of the project to present in the report",
"type": "string"
},
"organization": {
"description": "The organization the project belongs to",
"type": "string"
},
"repo": {
"description": "The repository in github the project belongs to",
"type": "string"
},
"repo_owner": {
"description": "The owner of the repository the project belongs to",
"type": "string"
},
"admin": {
"description": "The username of the administrator of the project (Only used in project first report)",
"type": "string"
},
"invalid_licenses": {
"description": "The names of all invalid licenses. Default value is an empty collection",
"type": "array"
},
"fail": {
"description": "Indicates if the build should fail in case a vulnerability is found. Default value is false",
"type": "boolean"
},
"api_cache_time": {
"description": "Indicates, in seconds, the amount of time the cached results should be considered valid. If 0 (which is the default value), there are no restrictions on the lifetime of cached results",
"type": "number"
}
},
"required": ["project_id", "project_name", "admin"]
}
This is a Node.js module available through the npm registry.
Installation is done using the
npm install
command:
$ npm install --save-dev npm-dependency-analyzer
:warning: In order for the plugin to be executed successfully, it needs to have all dependencies installed by the user install all dependencies before using any functionality provided:
$ npm install
This plugin provides an executable that is placed into "node_modules/.bin" folder of any project it is dependent. This executable can be used in the script property. This command is to be used in the build process of a project, as demonstrated in the example below of a package.json:
{
"name":"example-project",
"version":"1.0.0",
"description":"Example of a project package.json",
"main":"index.js",
"bin":{
"example-command":"./bin/example-command.js"
},
"scripts":{
"prebuild":"npm install && rimraf build/",
"build":"npm run lint && npm test && npm-dependency-analyzer | bunyan",
"lint":"eslint .",
"test":"mocha"
},
"engines":{
"node":">=8.0.0",
"npm":">=5.7.0"
},
"keywords":[
"Example",
"Plugin"
],
"dependencies":{
"async":"^2.6.0",
"debug":"^3.1.0",
"executive":"^1.5.13",
"nsp":"3.2.1"
},
"devDependencies":{
"eslint":"^4.19.0",
"eslint-config-standard":"^11.0.0",
"eslint-plugin-import":"^2.10.0",
"eslint-plugin-node":"^6.0.1",
"eslint-plugin-promise":"^3.7.0",
"eslint-plugin-standard":"^3.0.1",
"mocha":"^5.0.4",
"rimraf":"^2.6.2"
}
}
This module uses the logging library bunyan. Every log will be represented as a json object. Bunyan besides providing a Logging API, it provides a CLI tool that parses the json and prettifies it. As shown in the code above the developer can pipe the output of the executable to the cli tool -> "npm-dependency-analyzer | bunyan". After making the necessary adjustments to the package.json, the execution of the build script will have the plugin generate a report based on the findings. This report will then be sent to the central system and stored there. Then the report can be accessed through the following link: http://35.234.147.77/
FAQs
Plugin to validate dependencies, concerning their license and vulnerabities
The npm package npm-dependency-analyzer receives a total of 12 weekly downloads. As such, npm-dependency-analyzer popularity was classified as not popular.
We found that npm-dependency-analyzer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.