snyk 1.748.0 → 1.749.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 +8 -7
- package/dist/cli/784.index.js.map +1 -1
- package/dist/cli/917.index.js +42 -23
- package/dist/cli/917.index.js.map +1 -1
- package/dist/cli/commands/test/iac-local-execution/parsers/{k8s-or-cloudformation-parser.d.ts → config-type-detection.d.ts} +1 -0
- package/dist/cli/commands/test/iac-local-execution/types.d.ts +6 -4
- package/dist/cli/index.js +2 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/formatters/iac-output.d.ts +1 -1
- package/dist/lib/iac/constants.d.ts +2 -1
- package/dist/lib/snyk-test/iac-test-result.d.ts +1 -2
- package/help/commands-docs/_EXAMPLES.md +1 -0
- package/help/commands-docs/iac-examples.md +3 -0
- package/help/commands-man/snyk-iac.1 +3 -0
- package/help/commands-man/snyk.1 +1 -0
- package/help/commands-md/snyk-iac.md +3 -0
- package/help/commands-md/snyk.md +1 -0
- package/help/commands-txt/snyk-iac.txt +3 -0
- package/help/commands-txt/snyk.txt +1 -0
- package/package.json +2 -2
package/dist/cli/784.index.js
CHANGED
|
@@ -1473,6 +1473,9 @@ function capitalizePackageManager(type) {
|
|
|
1473
1473
|
case 'cloudformationconfig': {
|
|
1474
1474
|
return 'CloudFormation';
|
|
1475
1475
|
}
|
|
1476
|
+
case 'armconfig': {
|
|
1477
|
+
return 'ARM';
|
|
1478
|
+
}
|
|
1476
1479
|
default: {
|
|
1477
1480
|
return 'Infrastructure as Code';
|
|
1478
1481
|
}
|
|
@@ -1529,10 +1532,6 @@ exports.createSarifOutputForIac = createSarifOutputForIac;
|
|
|
1529
1532
|
function getIssueLevel(severity) {
|
|
1530
1533
|
return severity === legacy_1.SEVERITY.HIGH ? 'error' : 'warning';
|
|
1531
1534
|
}
|
|
1532
|
-
const iacTypeToText = {
|
|
1533
|
-
k8s: 'Kubernetes',
|
|
1534
|
-
terraform: 'Terraform',
|
|
1535
|
-
};
|
|
1536
1535
|
function extractReportingDescriptor(results) {
|
|
1537
1536
|
const tool = {};
|
|
1538
1537
|
results.forEach(({ issue }) => {
|
|
@@ -1545,7 +1544,7 @@ function extractReportingDescriptor(results) {
|
|
|
1545
1544
|
text: `${upperFirst(issue.severity)} severity - ${issue.title}`,
|
|
1546
1545
|
},
|
|
1547
1546
|
fullDescription: {
|
|
1548
|
-
text: `${
|
|
1547
|
+
text: `${upperFirst(issue.severity)} severity - ${issue.subType}`,
|
|
1549
1548
|
},
|
|
1550
1549
|
help: {
|
|
1551
1550
|
text: `The issue is... \n${issue.iacDescription.issue}\n\n The impact of this is... \n ${issue.iacDescription.impact}\n\n You can resolve this by... \n${issue.iacDescription.resolve}`.replace(/^\s+/g, ''),
|
|
@@ -1555,7 +1554,7 @@ function extractReportingDescriptor(results) {
|
|
|
1555
1554
|
level: getIssueLevel(issue.severity),
|
|
1556
1555
|
},
|
|
1557
1556
|
properties: {
|
|
1558
|
-
tags: ['security', `${issue.
|
|
1557
|
+
tags: ['security', `${issue.subType}`],
|
|
1559
1558
|
documentation: issue.documentation,
|
|
1560
1559
|
},
|
|
1561
1560
|
};
|
|
@@ -1567,7 +1566,7 @@ function mapIacTestResponseToSarifResults(issues) {
|
|
|
1567
1566
|
return issues.map(({ targetPath, issue }) => ({
|
|
1568
1567
|
ruleId: issue.id,
|
|
1569
1568
|
message: {
|
|
1570
|
-
text: `This line contains a potential ${issue.severity} severity misconfiguration affecting the ${
|
|
1569
|
+
text: `This line contains a potential ${issue.severity} severity misconfiguration affecting the ${issue.subType}`,
|
|
1571
1570
|
},
|
|
1572
1571
|
locations: [
|
|
1573
1572
|
{
|
|
@@ -2242,6 +2241,7 @@ var IacProjectType;
|
|
|
2242
2241
|
IacProjectType["K8S"] = "k8sconfig";
|
|
2243
2242
|
IacProjectType["TERRAFORM"] = "terraformconfig";
|
|
2244
2243
|
IacProjectType["CLOUDFORMATION"] = "cloudformationconfig";
|
|
2244
|
+
IacProjectType["ARM"] = "armconfig";
|
|
2245
2245
|
IacProjectType["CUSTOM"] = "customconfig";
|
|
2246
2246
|
IacProjectType["MULTI_IAC"] = "multiiacconfig";
|
|
2247
2247
|
})(IacProjectType = exports.IacProjectType || (exports.IacProjectType = {}));
|
|
@@ -2249,6 +2249,7 @@ exports.TEST_SUPPORTED_IAC_PROJECTS = [
|
|
|
2249
2249
|
IacProjectType.K8S,
|
|
2250
2250
|
IacProjectType.TERRAFORM,
|
|
2251
2251
|
IacProjectType.CLOUDFORMATION,
|
|
2252
|
+
IacProjectType.ARM,
|
|
2252
2253
|
IacProjectType.MULTI_IAC,
|
|
2253
2254
|
IacProjectType.CUSTOM,
|
|
2254
2255
|
];
|