snyk 1.1122.0 → 1.1123.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/95.index.js +27 -13
- package/dist/cli/95.index.js.map +1 -1
- package/dist/cli/thirdPartyNotice.json +2 -2
- package/package.json +1 -1
- package/src/generated/sha256sums.txt +10 -10
- package/src/generated/version +1 -1
- package/wrapper_dist/generated/sha256sums.txt +10 -10
- package/wrapper_dist/generated/version +1 -1
package/dist/cli/95.index.js
CHANGED
|
@@ -132618,6 +132618,7 @@ exports.isSupportedSize = exports.DECOMPRESSING_IGNORE_DIR = exports.DECOMPRESSI
|
|
|
132618
132618
|
const os = __webpack_require__(12087);
|
|
132619
132619
|
const process_1 = __webpack_require__(61765);
|
|
132620
132620
|
exports.isWin = process_1.platform === 'win32';
|
|
132621
|
+
// Current implementation supports up to 2GB per file
|
|
132621
132622
|
exports.MAX_SUPPORTED_FILE_SIZE = 2 * 1024 * 1024 * 1024 - 1;
|
|
132622
132623
|
exports.HASHING_CONCURRENCY_LEVEL = os.cpus().length;
|
|
132623
132624
|
exports.DECOMPRESSING_CONCURRENCY_LEVEL = os.cpus().length * 8;
|
|
@@ -132742,20 +132743,14 @@ function displayIssues(depGraph, issues, issuesData) {
|
|
|
132742
132743
|
const issuesCount = issues.length == 1 ? '1 issue' : `${issues.length} issues`;
|
|
132743
132744
|
const hasIssues = issues.length > 0;
|
|
132744
132745
|
if (hasIssues) {
|
|
132745
|
-
|
|
132746
|
-
|
|
132747
|
-
|
|
132748
|
-
|
|
132749
|
-
|
|
132750
|
-
|
|
132751
|
-
|
|
132752
|
-
const introducedThrough = common_1.leftPad(`Introduced through: ${dependencyName}`);
|
|
132753
|
-
const urlText = common_1.leftPad(`URL: ${vulnDetailsUrl}`);
|
|
132754
|
-
result.push(severityAndTitle);
|
|
132755
|
-
result.push(introducedThrough);
|
|
132756
|
-
result.push(urlText);
|
|
132746
|
+
const vulnerabilityIssues = issues.filter((issue) => issue.type === 'vulnerability');
|
|
132747
|
+
if (vulnerabilityIssues.length > 0) {
|
|
132748
|
+
prepareResults(result, vulnerabilityIssues, issuesData, 'Issues:');
|
|
132749
|
+
}
|
|
132750
|
+
const licenseIssues = issues.filter((issue) => issue.type === 'license');
|
|
132751
|
+
if (licenseIssues.length > 0) {
|
|
132752
|
+
prepareResults(result, licenseIssues, issuesData, 'License issues:');
|
|
132757
132753
|
}
|
|
132758
|
-
result.push('');
|
|
132759
132754
|
}
|
|
132760
132755
|
const issuesFound = hasIssues
|
|
132761
132756
|
? chalk.redBright(issuesCount)
|
|
@@ -132767,6 +132762,22 @@ function displayIssues(depGraph, issues, issuesData) {
|
|
|
132767
132762
|
return result;
|
|
132768
132763
|
}
|
|
132769
132764
|
exports.displayIssues = displayIssues;
|
|
132765
|
+
function prepareResults(result, issues, issuesData, typeTitle) {
|
|
132766
|
+
result.push(chalk.bold(typeTitle));
|
|
132767
|
+
for (const { pkgName: name, pkgVersion: version, issueId: vulnId, } of issues) {
|
|
132768
|
+
const { title, severity } = issuesData[vulnId];
|
|
132769
|
+
const color = common_1.getColorBySeverity(severity);
|
|
132770
|
+
const severityAndTitle = color.bold(`\n ✗ [${common_1.capitalize(severity)}] ${title}`);
|
|
132771
|
+
const dependencyName = computeDependencyName(name, version);
|
|
132772
|
+
const vulnDetailsUrl = `https://security.snyk.io/vuln/${vulnId}`;
|
|
132773
|
+
const introducedThrough = common_1.leftPad(`Introduced through: ${dependencyName}`, 3);
|
|
132774
|
+
const urlText = common_1.leftPad(`URL: ${vulnDetailsUrl}`, 3);
|
|
132775
|
+
result.push(severityAndTitle);
|
|
132776
|
+
result.push(introducedThrough);
|
|
132777
|
+
result.push(urlText);
|
|
132778
|
+
}
|
|
132779
|
+
result.push('');
|
|
132780
|
+
}
|
|
132770
132781
|
function displayErrors(errors) {
|
|
132771
132782
|
const result = [];
|
|
132772
132783
|
if (errors.length) {
|
|
@@ -132813,6 +132824,9 @@ async function display(scanResults, testResults, errors, options) {
|
|
|
132813
132824
|
result = result.concat(display_1.displaySignatures(scanResults));
|
|
132814
132825
|
}
|
|
132815
132826
|
for (const testResult of testResults) {
|
|
132827
|
+
testResult.issues.forEach((issue) => (issue.type = issue.issueId.startsWith('snyk:lic:unmanaged:')
|
|
132828
|
+
? 'license'
|
|
132829
|
+
: 'vulnerability'));
|
|
132816
132830
|
const depGraph = dep_graph_1.createFromJSON(testResult.depGraphData);
|
|
132817
132831
|
const [dependencies, issues] = display_1.selectDisplayStrategy(options, depGraph, testResult);
|
|
132818
132832
|
if (testResult.depGraphData.pkgs.length > 1) {
|