Skip to content

Commit

Permalink
feat: allow license issues to be ignored via snyk wizard
Browse files Browse the repository at this point in the history
Previously the wizard command would filter out any license issues,
but we want to reverse that decision and allow people to ignore
license issues.
  • Loading branch information
joshje committed Oct 17, 2017
1 parent 9106c02 commit 46dc5a4
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions cli/commands/protect/wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,28 +135,15 @@ function processWizardFlow(options) {
return;
}
var packageFile = path.resolve(cwd, 'package.json');
var licenseIssues = res.vulnerabilities.filter(function (issue) {
return issue.type === 'license';
});
if (licenseIssues) {
console.log('\nLicense issues are not supported by the wizard, ' +
'use `snyk ignore`\n');
}
res.vulnerabilities = res.vulnerabilities.filter(function (vuln) {
return vuln.type !== 'license';
});
if (!res.ok) {
var vulns = res.vulnerabilities;
var paths = vulns.length === 1 ? 'path' : 'paths';
var ies = vulns.length === 1 ? 'y' : 'ies';
var uniqueCount = _.uniq(vulns.map(function (vuln) {
return vuln.id;
})).length;
// echo out the deps + vulns found
console.log('Tested %s dependencies for known vulnerabilities, %s',
res.dependencyCount,
chalk.bold.red('found ' +
uniqueCount +
res.uniqueCount +
' vulnerabilit' + ies +
', ' + vulns.length +
' vulnerable ' +
Expand Down

0 comments on commit 46dc5a4

Please sign in to comment.