snyk 1.1073.0 → 1.1074.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 +18 -1
- package/dist/cli/784.index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/784.index.js
CHANGED
|
@@ -1098,7 +1098,7 @@ async function fetchIssues(start_time, dep_graph_data, component_details, target
|
|
|
1098
1098
|
};
|
|
1099
1099
|
}
|
|
1100
1100
|
async function resolveAndTestFactsUnmanagedDeps(scans, options) {
|
|
1101
|
-
var _a, _b, _c, _d;
|
|
1101
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1102
1102
|
const results = [];
|
|
1103
1103
|
const errors = [];
|
|
1104
1104
|
const packageManager = 'Unmanaged (C/C++)';
|
|
@@ -1114,6 +1114,9 @@ async function resolveAndTestFactsUnmanagedDeps(scans, options) {
|
|
|
1114
1114
|
for (const scanResult of scanResults) {
|
|
1115
1115
|
try {
|
|
1116
1116
|
const id = await submitHashes({ hashes: (_a = scanResult === null || scanResult === void 0 ? void 0 : scanResult.facts[0]) === null || _a === void 0 ? void 0 : _a.data }, orgId);
|
|
1117
|
+
if (scanResult.analytics) {
|
|
1118
|
+
plugin_analytics_1.extractAndApplyPluginAnalytics(scanResult.analytics, id);
|
|
1119
|
+
}
|
|
1117
1120
|
const { start_time, dep_graph_data, component_details, } = await pollDepGraphAttributes(id, orgId);
|
|
1118
1121
|
const { issues, issuesData, depGraphData, dependencyCount, depsFilePaths, fileSignaturesDetails, } = await fetchIssues(start_time, dep_graph_data, component_details, target_severity, orgId);
|
|
1119
1122
|
const issuesMap = new Map();
|
|
@@ -1134,6 +1137,20 @@ async function resolveAndTestFactsUnmanagedDeps(scans, options) {
|
|
|
1134
1137
|
}
|
|
1135
1138
|
const policy = await policy_1.findAndLoadPolicy(path, 'cpp', options);
|
|
1136
1139
|
const [issuesFiltered, issuesDataFiltered] = policy_2.filterIgnoredIssues(issues, issuesData, policy);
|
|
1140
|
+
plugin_analytics_1.extractAndApplyPluginAnalytics([
|
|
1141
|
+
{
|
|
1142
|
+
name: 'packageManager',
|
|
1143
|
+
data: (_f = (_e = depGraphData === null || depGraphData === void 0 ? void 0 : depGraphData.pkgManager) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : '',
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
name: 'unmanagedDependencyCount',
|
|
1147
|
+
data: (_g = depGraphData === null || depGraphData === void 0 ? void 0 : depGraphData.pkgs.length) !== null && _g !== void 0 ? _g : 0,
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
name: 'unmanagedIssuesCount',
|
|
1151
|
+
data: (_h = issues.length) !== null && _h !== void 0 ? _h : 0,
|
|
1152
|
+
},
|
|
1153
|
+
]);
|
|
1137
1154
|
results.push({
|
|
1138
1155
|
issues: issuesFiltered,
|
|
1139
1156
|
issuesData: issuesDataFiltered,
|