snyk 1.1054.0 → 1.1055.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/784.index.js +15 -5
- package/dist/cli/784.index.js.map +1 -1
- package/dist/cli/895.index.js +29 -11
- package/dist/cli/895.index.js.map +1 -1
- package/dist/cli/917.index.js +2 -0
- package/dist/cli/917.index.js.map +1 -1
- package/dist/lib/iac/env-utils.d.ts +2 -0
- package/dist/lib/snyk-test/legacy.d.ts +5 -1
- package/package.json +1 -1
package/dist/cli/784.index.js
CHANGED
|
@@ -1026,7 +1026,7 @@ const common_1 = __webpack_require__(70527);
|
|
|
1026
1026
|
async function resolveAndTestFacts(ecosystem, scans, options) {
|
|
1027
1027
|
const unmanagedDepsOverride = process.env.USE_UNMANAGED_DEPS;
|
|
1028
1028
|
const featureFlagEnabled = await feature_flags_1.hasFeatureFlag('snykNewUnmanagedTest', options);
|
|
1029
|
-
return featureFlagEnabled || unmanagedDepsOverride
|
|
1029
|
+
return featureFlagEnabled || (unmanagedDepsOverride === null || unmanagedDepsOverride === void 0 ? void 0 : unmanagedDepsOverride.toLowerCase()) === 'true'
|
|
1030
1030
|
? resolveAndTestFactsUnmanagedDeps(scans, options)
|
|
1031
1031
|
: resolveAndTestFactsRegistry(ecosystem, scans, options);
|
|
1032
1032
|
}
|
|
@@ -1081,10 +1081,11 @@ async function fetchIssues(start_time, dep_graph_data, component_details, orgId)
|
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
1083
|
async function resolveAndTestFactsUnmanagedDeps(scans, options) {
|
|
1084
|
-
var _a, _b, _c;
|
|
1084
|
+
var _a, _b, _c, _d;
|
|
1085
1085
|
const results = [];
|
|
1086
1086
|
const errors = [];
|
|
1087
1087
|
const packageManager = 'Unmanaged (C/C++)';
|
|
1088
|
+
const displayTargetFile = '';
|
|
1088
1089
|
let orgId = options.org || '';
|
|
1089
1090
|
if (orgId === '') {
|
|
1090
1091
|
const self = await utils_1.getSelf();
|
|
@@ -1108,6 +1109,9 @@ async function resolveAndTestFactsUnmanagedDeps(scans, options) {
|
|
|
1108
1109
|
issueData.from = [pkgCoordinate];
|
|
1109
1110
|
issueData.name = pkgCoordinate;
|
|
1110
1111
|
issueData.packageManager = packageManager;
|
|
1112
|
+
issueData.version = (_d = issuesMap[issuesDataKey]) === null || _d === void 0 ? void 0 : _d.pkgVersion;
|
|
1113
|
+
issueData.upgradePath = [false];
|
|
1114
|
+
issueData.isPatchable = false;
|
|
1111
1115
|
vulnerabilities.push(issueData);
|
|
1112
1116
|
}
|
|
1113
1117
|
const policy = await policy_1.findAndLoadPolicy(path, 'cpp', options);
|
|
@@ -1122,6 +1126,7 @@ async function resolveAndTestFactsUnmanagedDeps(scans, options) {
|
|
|
1122
1126
|
path,
|
|
1123
1127
|
dependencyCount,
|
|
1124
1128
|
packageManager,
|
|
1129
|
+
displayTargetFile,
|
|
1125
1130
|
});
|
|
1126
1131
|
}
|
|
1127
1132
|
catch (error) {
|
|
@@ -1140,10 +1145,11 @@ async function resolveAndTestFactsUnmanagedDeps(scans, options) {
|
|
|
1140
1145
|
}
|
|
1141
1146
|
exports.resolveAndTestFactsUnmanagedDeps = resolveAndTestFactsUnmanagedDeps;
|
|
1142
1147
|
async function resolveAndTestFactsRegistry(ecosystem, scans, options) {
|
|
1143
|
-
var _a, _b, _c, _d, _e;
|
|
1148
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1144
1149
|
const results = [];
|
|
1145
1150
|
const errors = [];
|
|
1146
1151
|
const packageManager = 'Unmanaged (C/C++)';
|
|
1152
|
+
const displayTargetFile = '';
|
|
1147
1153
|
for (const [path, scanResults] of Object.entries(scans)) {
|
|
1148
1154
|
await spinner_1.spinner(`Resolving and Testing fileSignatures in ${path}`);
|
|
1149
1155
|
for (const scanResult of scanResults) {
|
|
@@ -1169,12 +1175,15 @@ async function resolveAndTestFactsRegistry(ecosystem, scans, options) {
|
|
|
1169
1175
|
issueData.from = [pkgCoordinate];
|
|
1170
1176
|
issueData.name = pkgCoordinate;
|
|
1171
1177
|
issueData.packageManager = packageManager;
|
|
1178
|
+
issueData.version = (_a = issuesMap[issuesDataKey]) === null || _a === void 0 ? void 0 : _a.pkgVersion;
|
|
1179
|
+
issueData.upgradePath = [false];
|
|
1180
|
+
issueData.isPatchable = false;
|
|
1172
1181
|
vulnerabilities.push(issueData);
|
|
1173
1182
|
}
|
|
1174
1183
|
}
|
|
1175
|
-
const dependencyCount = (_e = (_d = (_c = (_b =
|
|
1184
|
+
const dependencyCount = (_f = (_e = (_d = (_c = (_b = response === null || response === void 0 ? void 0 : response.depGraphData) === null || _b === void 0 ? void 0 : _b.graph) === null || _c === void 0 ? void 0 : _c.nodes) === null || _d === void 0 ? void 0 : _d.find((graphNode) => {
|
|
1176
1185
|
return graphNode.nodeId === 'root-node';
|
|
1177
|
-
})) === null ||
|
|
1186
|
+
})) === null || _e === void 0 ? void 0 : _e.deps) === null || _f === void 0 ? void 0 : _f.length;
|
|
1178
1187
|
results.push({
|
|
1179
1188
|
issues,
|
|
1180
1189
|
issuesData,
|
|
@@ -1185,6 +1194,7 @@ async function resolveAndTestFactsRegistry(ecosystem, scans, options) {
|
|
|
1185
1194
|
path,
|
|
1186
1195
|
dependencyCount,
|
|
1187
1196
|
packageManager,
|
|
1197
|
+
displayTargetFile,
|
|
1188
1198
|
});
|
|
1189
1199
|
}
|
|
1190
1200
|
catch (error) {
|