在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):nodesecurity/gulp-nsp开源软件地址(OpenSource Url):https://github.com/nodesecurity/gulp-nsp开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):gulp-nspInstallationTo install the gulp-nsp module into your project simply run npm install gulp-nsp --save UsageThen in your gulpfile, add the following task. var gulpNSP = require('gulp-nsp');
//To check your project
gulp.task('nsp', function (cb) {
gulpNSP({package: __dirname + '/package.json'}, cb);
}); //If you're using a shrinkwrap file, pass both the shrinkwrap and the package.json
gulp.task('nsp', function (cb) {
gulpNSP({
shrinkwrap: __dirname + '/npm-shrinkwrap.json',
package: __dirname + '/package.json'
}, cb);
}); OptionsstopOnErrorIf you don't want to stop your gulp flow if some vulnerabilities have been found use the stopOnError option: gulp.task('nsp', function (cb) {
gulpNSP({
package: __dirname + '/package.json',
stopOnError: false
}, cb);
}); outputIf you want to use an alternative output reporter provided by nsp use the output option. gulp.task('nsp', function (cb) {
gulpNSP({
package: __dirname + '/package.json',
reporter: 'summary'
}, cb);
}); proxyIf you want to use a proxy you can configure it via this option. gulp.task('nsp', function (cb) {
gulpNSP({
package: __dirname + '/package.json',
proxy: 'http://127.0.0.1:8080'
}, cb);
}); ExceptionsThe Node Security CLI supports adding exceptions. These are advisories that you have evaluated and personally deemed unimportant for your project. Instructions are available on the nsp cli repository. License
Note: the above text describes the license for the code located in this repository only. Usage of this tool or the API this tool accesses implies acceptance of our terms of service. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论