snyk 1.825.0 → 1.826.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/202.index.js +12 -6
- package/dist/cli/202.index.js.map +1 -1
- package/dist/cli/293.index.js +35 -6
- package/dist/cli/293.index.js.map +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/thirdPartyNotice.json +2 -2
- package/dist/lib/ecosystems/common.d.ts +2 -0
- package/dist/lib/feature-flags/index.d.ts +2 -0
- package/dist/lib/types.d.ts +1 -0
- package/help/cli-commands/README.md +18 -10
- package/help/cli-commands/code.md +27 -83
- package/package.json +2 -2
package/dist/cli/202.index.js
CHANGED
|
@@ -166655,12 +166655,16 @@ exports.spawn = spawn;
|
|
|
166655
166655
|
/***/ }),
|
|
166656
166656
|
|
|
166657
166657
|
/***/ 51469:
|
|
166658
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
166658
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
166659
166659
|
|
|
166660
166660
|
"use strict";
|
|
166661
166661
|
|
|
166662
166662
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
166663
|
-
exports.MAX_SUPPORTED_FILE_SIZE = void 0;
|
|
166663
|
+
exports.MAX_SUPPORTED_FILE_SIZE = exports.isWindowsOS = void 0;
|
|
166664
|
+
const osName = __webpack_require__(7719);
|
|
166665
|
+
exports.isWindowsOS = () => osName()
|
|
166666
|
+
.toLowerCase()
|
|
166667
|
+
.indexOf('windows') === 0;
|
|
166664
166668
|
exports.MAX_SUPPORTED_FILE_SIZE = 2 * 1024 * 1024 * 1024 - 1;
|
|
166665
166669
|
//# sourceMappingURL=common.js.map
|
|
166666
166670
|
|
|
@@ -166755,7 +166759,7 @@ function findDependencyLines(depGraph, options, depsFilePaths, fileSignaturesDet
|
|
|
166755
166759
|
function selectDisplayStrategy(options, depGraph, testResult) {
|
|
166756
166760
|
const { depsFilePaths, issues, issuesData, fileSignaturesDetails, } = testResult;
|
|
166757
166761
|
const dependencySection = findDependencyLines(depGraph, options, depsFilePaths, fileSignaturesDetails);
|
|
166758
|
-
const issuesSection = displayIssues(depGraph, issues, issuesData);
|
|
166762
|
+
const issuesSection = displayIssues(depGraph, issues, issuesData, options === null || options === void 0 ? void 0 : options.supportUnmanagedVulnDB);
|
|
166759
166763
|
return [dependencySection, issuesSection];
|
|
166760
166764
|
}
|
|
166761
166765
|
exports.selectDisplayStrategy = selectDisplayStrategy;
|
|
@@ -166799,7 +166803,7 @@ function displayDepsFilePaths(depsFilePaths, dependencyId) {
|
|
|
166799
166803
|
}
|
|
166800
166804
|
return result;
|
|
166801
166805
|
}
|
|
166802
|
-
function displayIssues(depGraph, issues, issuesData) {
|
|
166806
|
+
function displayIssues(depGraph, issues, issuesData, supportUnmanagedVulnDB = false) {
|
|
166803
166807
|
const result = [];
|
|
166804
166808
|
const dependencies = depGraph === null || depGraph === void 0 ? void 0 : depGraph.getDepPkgs();
|
|
166805
166809
|
const dependenciesCountMsg = (dependencies === null || dependencies === void 0 ? void 0 : dependencies.length) == 1
|
|
@@ -166813,9 +166817,11 @@ function displayIssues(depGraph, issues, issuesData) {
|
|
|
166813
166817
|
const { title, severity } = issuesData[vulnId];
|
|
166814
166818
|
const color = common_1.getColorBySeverity(severity);
|
|
166815
166819
|
const severityAndTitle = color(`\n ✗ [${common_1.capitalize(severity)}] ${title}`);
|
|
166816
|
-
const
|
|
166820
|
+
const vulnDetailsUrl = supportUnmanagedVulnDB
|
|
166821
|
+
? `https://security.snyk.io/vuln/${vulnId}`
|
|
166822
|
+
: `https://nvd.nist.gov/vuln/detail/${vulnId}`;
|
|
166817
166823
|
const introducedThrough = common_1.leftPad(`Introduced through: ${name}@${version}`);
|
|
166818
|
-
const urlText = common_1.leftPad(`URL: ${
|
|
166824
|
+
const urlText = common_1.leftPad(`URL: ${vulnDetailsUrl}`);
|
|
166819
166825
|
result.push(severityAndTitle);
|
|
166820
166826
|
result.push(introducedThrough);
|
|
166821
166827
|
result.push(urlText);
|