snyk 1.1211.0 → 1.1213.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/245.index.js +19 -10
- package/dist/cli/245.index.js.map +1 -1
- package/dist/cli/784.index.js +4 -12
- package/dist/cli/784.index.js.map +1 -1
- package/dist/cli/thirdPartyNotice.json +2 -2
- package/dist/lib/plugins/sast/localCodeEngine.d.ts +0 -1
- package/package.json +1 -1
- package/src/generated/sha256sums.txt +7 -7
- package/src/generated/version +1 -1
- package/wrapper_dist/generated/sha256sums.txt +7 -7
- package/wrapper_dist/generated/version +1 -1
package/dist/cli/245.index.js
CHANGED
|
@@ -179885,7 +179885,7 @@ function computeDependencyId(name, version) {
|
|
|
179885
179885
|
return `${name}@${version || ''}`;
|
|
179886
179886
|
}
|
|
179887
179887
|
function displayDependencies(depGraph, fileSignaturesDetails, depsFilePaths = {}) {
|
|
179888
|
-
var _a;
|
|
179888
|
+
var _a, _b;
|
|
179889
179889
|
let result = [];
|
|
179890
179890
|
const dependencies = depGraph === null || depGraph === void 0 ? void 0 : depGraph.getDepPkgs();
|
|
179891
179891
|
const hasDependencies = (dependencies === null || dependencies === void 0 ? void 0 : dependencies.length) > 0;
|
|
@@ -179897,7 +179897,10 @@ function displayDependencies(depGraph, fileSignaturesDetails, depsFilePaths = {}
|
|
|
179897
179897
|
const dependencyId = computeDependencyId(name, version);
|
|
179898
179898
|
const dependencyName = computeDependencyName(name, version);
|
|
179899
179899
|
result.push(`\n${common_1.leftPad(dependencyName, 2)}`);
|
|
179900
|
-
if (fileSignaturesDetails && ((_a = fileSignaturesDetails[dependencyId]) === null || _a === void 0 ? void 0 : _a.
|
|
179900
|
+
if (fileSignaturesDetails && ((_a = fileSignaturesDetails[dependencyId]) === null || _a === void 0 ? void 0 : _a.purl)) {
|
|
179901
|
+
result.push(common_1.leftPad(`purl: ${fileSignaturesDetails[dependencyId].purl}`, 2));
|
|
179902
|
+
}
|
|
179903
|
+
if (fileSignaturesDetails && ((_b = fileSignaturesDetails[dependencyId]) === null || _b === void 0 ? void 0 : _b.confidence)) {
|
|
179901
179904
|
result.push(common_1.leftPad(`confidence: ${fileSignaturesDetails[dependencyId].confidence.toFixed(3)}`, 2));
|
|
179902
179905
|
}
|
|
179903
179906
|
if (!object_1.isEmpty(depsFilePaths)) {
|
|
@@ -179934,11 +179937,14 @@ function displayIssues(depGraph, issues, issuesData) {
|
|
|
179934
179937
|
const issuesCount = issues.length == 1 ? '1 issue' : `${issues.length} issues`;
|
|
179935
179938
|
const hasIssues = issues.length > 0;
|
|
179936
179939
|
if (hasIssues) {
|
|
179937
|
-
const
|
|
179938
|
-
|
|
179939
|
-
|
|
179940
|
+
const nonLicenseIssues = issues.filter((issue) => {
|
|
179941
|
+
var _a;
|
|
179942
|
+
return ((_a = issuesData[issue.issueId]) === null || _a === void 0 ? void 0 : _a.type) !== 'license';
|
|
179943
|
+
});
|
|
179944
|
+
if (nonLicenseIssues.length > 0) {
|
|
179945
|
+
prepareResults(result, nonLicenseIssues, issuesData, 'Issues:');
|
|
179940
179946
|
}
|
|
179941
|
-
const licenseIssues = issues.filter((issue) => issue.type === 'license');
|
|
179947
|
+
const licenseIssues = issues.filter((issue) => { var _a; return ((_a = issuesData[issue.issueId]) === null || _a === void 0 ? void 0 : _a.type) === 'license'; });
|
|
179942
179948
|
if (licenseIssues.length > 0) {
|
|
179943
179949
|
prepareResults(result, licenseIssues, issuesData, 'License issues:');
|
|
179944
179950
|
}
|
|
@@ -179956,7 +179962,7 @@ exports.displayIssues = displayIssues;
|
|
|
179956
179962
|
function prepareResults(result, issues, issuesData, typeTitle) {
|
|
179957
179963
|
result.push(chalk.bold(typeTitle));
|
|
179958
179964
|
for (const { pkgName: name, pkgVersion: version, issueId: vulnId, } of issues) {
|
|
179959
|
-
const { title, severity } = issuesData[vulnId];
|
|
179965
|
+
const { title, severity, legalInstructionsArray } = issuesData[vulnId];
|
|
179960
179966
|
const color = common_1.getColorBySeverity(severity);
|
|
179961
179967
|
const severityAndTitle = color.bold(`\n ✗ [${common_1.capitalize(severity)}] ${title}`);
|
|
179962
179968
|
const dependencyName = computeDependencyName(name, version);
|
|
@@ -179966,6 +179972,12 @@ function prepareResults(result, issues, issuesData, typeTitle) {
|
|
|
179966
179972
|
result.push(severityAndTitle);
|
|
179967
179973
|
result.push(introducedThrough);
|
|
179968
179974
|
result.push(urlText);
|
|
179975
|
+
if (legalInstructionsArray) {
|
|
179976
|
+
result.push(common_1.leftPad(chalk.bold(`Legal instructions:`), 3));
|
|
179977
|
+
const { licenseName, legalContent } = legalInstructionsArray[0];
|
|
179978
|
+
const legalInstructionsText = common_1.leftPad(`○ for ${licenseName}: ${legalContent}`, 3);
|
|
179979
|
+
result.push(legalInstructionsText);
|
|
179980
|
+
}
|
|
179969
179981
|
}
|
|
179970
179982
|
result.push('');
|
|
179971
179983
|
}
|
|
@@ -180014,9 +180026,6 @@ async function display(scanResults, testResults, errors, options) {
|
|
|
180014
180026
|
result = result.concat(display_1.displaySignatures(scanResults));
|
|
180015
180027
|
}
|
|
180016
180028
|
for (const testResult of testResults) {
|
|
180017
|
-
testResult.issues.forEach((issue) => (issue.type = issue.issueId.startsWith('snyk:lic:unmanaged:')
|
|
180018
|
-
? 'license'
|
|
180019
|
-
: 'vulnerability'));
|
|
180020
180029
|
const depGraph = dep_graph_1.createFromJSON(testResult.depGraphData);
|
|
180021
180030
|
const [dependencies, issues] = display_1.selectDisplayStrategy(options, depGraph, testResult);
|
|
180022
180031
|
if (testResult.issues.length > 0) {
|