Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nsp-reporter-teamcity

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nsp-reporter-teamcity - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

.babelrc

17

package.json
{
"name": "nsp-reporter-teamcity",
"version": "0.2.0",
"version": "0.3.0",
"description": "nsp (Node Security Project) reporter for TeamCity",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest",
"lint": "eslint .",
"release": "standard-version"
},

@@ -23,3 +25,14 @@ "keywords": [

"teamcity-service-messages": "^0.1.9"
},
"devDependencies": {
"@jetbrains/eslint-config": "4.0.2",
"babel-eslint": "8.2.3",
"babel-preset-env": "1.6.1",
"eslint": "4.19.1",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-prettier": "2.6.0",
"jest": "22.4.3",
"prettier": "1.12.1",
"standard-version": "4.3.0"
}
}

19

README.md

@@ -5,11 +5,14 @@ ## nsp reporter for TeamCity

### Changelog
### Configuration
Put `nsp.conf.json` config file in a project root directory to override any of the dafault values:
#### 0.2.0
Error handler, displays `Error` object and related details.
A bunch of debug information is shown additionally when `--verbose` flag is provided
```json
{
"nspInspectionTypeId": "nsp-security-inspection",
"nspInspectionName": "NSP security inspection",
"nspInspectionCategory": "security",
"npsInspectionSeverity": "WARNING"
}
```
#### 0.1.0
Initial version
[nsp]: https://www.npmjs.com/package/nsp
[nsp]: https://www.npmjs.com/package/nsp

@@ -0,32 +1,12 @@

const process = require('process')
const tsm = require('teamcity-service-messages')
exports.success = () => 'success';
exports.error = (error, args) => console.error(error,
args.verbose && JSON.stringify(args) || '');
const config = require('../lib/config').getConfig(process.cwd())
const {successHandler, errorHandler, createCheckSuccessHandler} = require('../lib/reporter')
exports.check = {};
exports.check.success = (result, args) => {
const nspInspectionTypeId = 'nsp-security-inspection';
exports.success = successHandler
exports.error = errorHandler
if (result.data.length) {
tsm.inspectionType({
id: nspInspectionTypeId,
name: 'NSP security inspection',
category: 'security',
description: 'https://www.npmjs.com/package/nsp'
})
result.data.forEach(elem => {
tsm.inspection({
typeId: nspInspectionTypeId,
message: `${elem.overview}
version: ${elem.version},
vulnerable_versions: ${elem.vulnerable_versions},
patched_versions: ${elem.patched_versions},
recommendation: ${elem.recommendation},
advisory: ${elem.advisory}`,
file: `module: "${elem.module}"`,
SEVERITY: 'WARNING'
})
});
}
}
exports.check = {}
exports.check.success = createCheckSuccessHandler(tsm, config)

@@ -14,2 +14,3 @@ {

"dependencies": {
"moment": "2.19.2",
"nsp": "^3.2.1",

@@ -16,0 +17,0 @@ "nsp-reporter-teamcity": "^0.1.0"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc