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.
@@ -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: `${iacTypeToText[issue.type]} ${issue.subType}`,
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.type}/${issue.subType}`],
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 ${iacTypeToText[issue.type]} ${issue.subType}`,
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
  ];