mobbdev 1.0.109 → 1.0.110

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.
Files changed (2) hide show
  1. package/dist/index.mjs +34 -27
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1609,9 +1609,9 @@ function getParsedFalsePositiveMessage(data) {
1609
1609
  const containsTemplate = extraContext.some(
1610
1610
  (context) => fixDescription.includes(`\${${context.key}}`)
1611
1611
  );
1612
- const description2 = containsTemplate ? replaceKeysWithValues(fixDescription, extraContext) : fixDescription;
1612
+ const description = containsTemplate ? replaceKeysWithValues(fixDescription, extraContext) : fixDescription;
1613
1613
  const contextString = containsTemplate ? null : `\`\`\`${extraContext.map(({ value }) => value).join(" ")} \`\`\``;
1614
- return { description: description2, contextString };
1614
+ return { description, contextString };
1615
1615
  }
1616
1616
 
1617
1617
  // src/features/analysis/scm/shared/src/commitDescriptionMarkup.ts
@@ -1637,7 +1637,7 @@ var getCommitDescription = ({
1637
1637
  irrelevantIssueWithTags
1638
1638
  }) => {
1639
1639
  const issueTypeString = getIssueTypeFriendlyString(issueType);
1640
- let description2 = `This change fixes a **${severity} severity** (${severityToEmoji[severity]}) **${issueTypeString}** issue reported by **${capitalizeFirstLetter(
1640
+ let description = `This change fixes a **${severity} severity** (${severityToEmoji[severity]}) **${issueTypeString}** issue reported by **${capitalizeFirstLetter(
1641
1641
  vendor
1642
1642
  )}**.
1643
1643
 
@@ -1645,7 +1645,7 @@ var getCommitDescription = ({
1645
1645
  const parseIssueTypeRes = z2.nativeEnum(IssueType_Enum).safeParse(issueType);
1646
1646
  if (issueType && parseIssueTypeRes.success) {
1647
1647
  if (irrelevantIssueWithTags?.[0]?.tag) {
1648
- description2 += `
1648
+ description += `
1649
1649
  > [!tip]
1650
1650
  > This issue was found to be irrelevant to your project - ${lowercaseFirstLetter(getTagTooltip(irrelevantIssueWithTags[0].tag))}.
1651
1651
  > Mobb recommends to ignore this issue, however fix is available if you think differently.
@@ -1657,7 +1657,7 @@ ${issueDescription[irrelevantIssueWithTags[0].tag]}
1657
1657
  }
1658
1658
  const staticData = fixDetailsData[parseIssueTypeRes.data];
1659
1659
  if (staticData) {
1660
- description2 += `## Issue description
1660
+ description += `## Issue description
1661
1661
  ${staticData.issueDescription}
1662
1662
 
1663
1663
  ## Fix instructions
@@ -1665,16 +1665,16 @@ ${staticData.fixInstructions}
1665
1665
  `;
1666
1666
  }
1667
1667
  }
1668
- description2 += `
1668
+ description += `
1669
1669
  ${guidances.map(({ guidance }) => `## Additional actions required
1670
1670
  ${guidance}
1671
1671
  `).join("")}
1672
1672
  `;
1673
1673
  if (fixUrl) {
1674
- description2 += `
1674
+ description += `
1675
1675
  [More info and fix customization are available in the Mobb platform](${fixUrl})`;
1676
1676
  }
1677
- return description2;
1677
+ return description;
1678
1678
  };
1679
1679
  var getCommitIssueDescription = ({
1680
1680
  vendor,
@@ -1683,12 +1683,12 @@ var getCommitIssueDescription = ({
1683
1683
  fpDescription
1684
1684
  }) => {
1685
1685
  const issueTypeString = getIssueTypeFriendlyString(issueType);
1686
- let description2 = `The following issues reported by ${capitalizeFirstLetter(vendor)} on this PR were found to be irrelevant to your project:
1686
+ let description = `The following issues reported by ${capitalizeFirstLetter(vendor)} on this PR were found to be irrelevant to your project:
1687
1687
  `;
1688
1688
  const parseIssueTypeRes = z2.nativeEnum(IssueType_Enum).safeParse(issueType);
1689
1689
  if (issueType && parseIssueTypeRes.success) {
1690
1690
  if (irrelevantIssueWithTags?.[0]?.tag) {
1691
- description2 = `
1691
+ description = `
1692
1692
  > [!tip]
1693
1693
  > The following issues reported by ${capitalizeFirstLetter(vendor)} on this PR were found to be irrelevant to your project:
1694
1694
  > ${issueTypeString} - ${lowercaseFirstLetter(getTagTooltip(irrelevantIssueWithTags[0].tag))}.
@@ -1701,12 +1701,12 @@ ${fpDescription ?? issueDescription[irrelevantIssueWithTags[0].tag]}
1701
1701
  }
1702
1702
  const staticData = fixDetailsData[parseIssueTypeRes.data];
1703
1703
  if (staticData) {
1704
- description2 += `## Issue description
1704
+ description += `## Issue description
1705
1705
  ${staticData.issueDescription}
1706
1706
  `;
1707
1707
  }
1708
1708
  }
1709
- return description2;
1709
+ return description;
1710
1710
  };
1711
1711
 
1712
1712
  // src/features/analysis/scm/shared/src/guidances.ts
@@ -2929,15 +2929,22 @@ var openRedirect2 = {
2929
2929
  description: () => "",
2930
2930
  guidance: () => ""
2931
2931
  },
2932
- allowlist: {
2933
- content: () => "Allowed domains/paths",
2934
- description: () => description,
2932
+ domainAllowlist: {
2933
+ content: () => "Allowed domains names",
2934
+ description: () => "please provide a coma separated list of allowed domains names (example.com, example.org, etc.)",
2935
+ guidance: () => ""
2936
+ },
2937
+ pathAllowlist: {
2938
+ content: () => "Allowed paths (URIs)",
2939
+ description: () => "please provide a coma separated list of allowed path (/health, /api/v1/health, etc.)",
2940
+ guidance: () => ""
2941
+ },
2942
+ includeProtocolValidation: {
2943
+ content: () => "Should HTTP or HTTPS protocol be enforced?",
2944
+ description: () => "please indicate if the protocol should be enforced",
2935
2945
  guidance: () => ""
2936
2946
  }
2937
2947
  };
2938
- var description = `- *If external*, provide a coma separated list of allowed domains.
2939
-  
2940
- - *If internal*, provide a coma seperated list of allowed paths`;
2941
2948
 
2942
2949
  // src/features/analysis/scm/shared/src/storedQuestionData/js/pt.ts
2943
2950
  var pt3 = {
@@ -4696,11 +4703,11 @@ async function adoValidateParams({
4696
4703
  console.log("adoValidateParams error", e);
4697
4704
  const error = e;
4698
4705
  const code = error.code || error.status || error.statusCode || error.response?.status || error.response?.statusCode || error.response?.code;
4699
- const description2 = error.description || `${e}`;
4700
- if (code === 401 || code === 403 || description2.includes("401") || description2.includes("403")) {
4706
+ const description = error.description || `${e}`;
4707
+ if (code === 401 || code === 403 || description.includes("401") || description.includes("403")) {
4701
4708
  throw new InvalidAccessTokenError(`invalid ADO access token`);
4702
4709
  }
4703
- if (code === 404 || description2.includes("404") || description2.includes("Not Found")) {
4710
+ if (code === 404 || description.includes("404") || description.includes("Not Found")) {
4704
4711
  throw new InvalidRepoUrlError(`invalid ADO repo URL ${url}`);
4705
4712
  }
4706
4713
  console.log("adoValidateParams error", e);
@@ -7424,11 +7431,11 @@ async function gitlabValidateParams({
7424
7431
  } catch (e) {
7425
7432
  const error = e;
7426
7433
  const code = error.code || error.status || error.statusCode || error.response?.status || error.response?.statusCode || error.response?.code;
7427
- const description2 = error.description || `${e}`;
7428
- if (code === 401 || code === 403 || description2.includes("401") || description2.includes("403")) {
7434
+ const description = error.description || `${e}`;
7435
+ if (code === 401 || code === 403 || description.includes("401") || description.includes("403")) {
7429
7436
  throw new InvalidAccessTokenError(`invalid gitlab access token`);
7430
7437
  }
7431
- if (code === 404 || description2.includes("404") || description2.includes("Not Found")) {
7438
+ if (code === 404 || description.includes("404") || description.includes("Not Found")) {
7432
7439
  throw new InvalidRepoUrlError(`invalid gitlab repo URL: ${url}`);
7433
7440
  }
7434
7441
  console.log("gitlabValidateParams error", e);
@@ -9183,10 +9190,10 @@ async function addFixCommentsForPr({
9183
9190
  const parsedFpRes = await FalsePositivePartsZ.parseAsync(
9184
9191
  fpRes?.getFalsePositive
9185
9192
  );
9186
- const { description: description2, contextString } = getParsedFalsePositiveMessage(parsedFpRes);
9187
- fpDescription = contextString ? `${description2}
9193
+ const { description, contextString } = getParsedFalsePositiveMessage(parsedFpRes);
9194
+ fpDescription = contextString ? `${description}
9188
9195
 
9189
- ${contextString}` : description2;
9196
+ ${contextString}` : description;
9190
9197
  }
9191
9198
  return await Promise.all(
9192
9199
  vulnerabilityReportIssue.codeNodes.map(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.109",
3
+ "version": "1.0.110",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.js",