snyk 1.813.0 → 1.814.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/917.index.js
CHANGED
|
@@ -2813,6 +2813,7 @@ function getDisplayedOutput(res, options, testedInfoText, localPackageTest, proj
|
|
|
2813
2813
|
const fixAdvice = fixTip ? `\n\n${fixTip}` : '';
|
|
2814
2814
|
const dockerfileWarning = getDockerfileWarning(res.scanResult);
|
|
2815
2815
|
const dockerSuggestion = getDockerSuggestionText(options, config_1.default, (_a = res === null || res === void 0 ? void 0 : res.docker) === null || _a === void 0 ? void 0 : _a.baseImage);
|
|
2816
|
+
const dockerDocsLink = getDockerRemediationDocsLink(dockerAdvice, config_1.default);
|
|
2816
2817
|
const vulns = res.vulnerabilities || [];
|
|
2817
2818
|
const groupedVulns = groupVulnerabilities(vulns);
|
|
2818
2819
|
const sortedGroupedVulns = orderBy(groupedVulns, ['metadata.severityValue', 'metadata.name'], ['asc', 'desc']);
|
|
@@ -2850,6 +2851,7 @@ function getDisplayedOutput(res, options, testedInfoText, localPackageTest, proj
|
|
|
2850
2851
|
dockerAdvice +
|
|
2851
2852
|
dockerfileWarning +
|
|
2852
2853
|
dockerSuggestion +
|
|
2854
|
+
dockerDocsLink +
|
|
2853
2855
|
dockerCTA);
|
|
2854
2856
|
}
|
|
2855
2857
|
exports.getDisplayedOutput = getDisplayedOutput;
|
|
@@ -2904,6 +2906,13 @@ function getDockerfileWarning(scanResult) {
|
|
|
2904
2906
|
}
|
|
2905
2907
|
return userMessage;
|
|
2906
2908
|
}
|
|
2909
|
+
function getDockerRemediationDocsLink(dockerAdvice, config) {
|
|
2910
|
+
if (config.disableSuggestions === 'true' || dockerAdvice.length === 0) {
|
|
2911
|
+
return '';
|
|
2912
|
+
}
|
|
2913
|
+
return (chalk_1.default.white('\n\nLearn more: ') +
|
|
2914
|
+
chalk_1.default.white.underline('https://docs.snyk.io/products/snyk-container/getting-around-the-snyk-container-ui/base-image-detection'));
|
|
2915
|
+
}
|
|
2907
2916
|
function groupVulnerabilities(vulns) {
|
|
2908
2917
|
return vulns.reduce((map, curr) => {
|
|
2909
2918
|
if (!map[curr.id]) {
|