mobbdev 1.0.193 → 1.0.194

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.
@@ -659,6 +659,9 @@ var GetAnalysisDocument = `
659
659
  projectId
660
660
  project {
661
661
  organizationId
662
+ organization {
663
+ ghFixerNoFixComments
664
+ }
662
665
  }
663
666
  file {
664
667
  signedFile {
package/dist/index.mjs CHANGED
@@ -2094,6 +2094,9 @@ var GetAnalysisDocument = `
2094
2094
  projectId
2095
2095
  project {
2096
2096
  organizationId
2097
+ organization {
2098
+ ghFixerNoFixComments
2099
+ }
2097
2100
  }
2098
2101
  file {
2099
2102
  signedFile {
@@ -10518,7 +10521,10 @@ async function addFixCommentsForPr({
10518
10521
  const {
10519
10522
  vulnerabilityReport: {
10520
10523
  projectId,
10521
- project: { organizationId }
10524
+ project: {
10525
+ organizationId,
10526
+ organization: { ghFixerNoFixComments }
10527
+ }
10522
10528
  }
10523
10529
  } = getAnalysisRes;
10524
10530
  if (!getAnalysisRes.repo?.commitSha || !getAnalysisRes.repo.pullRequest) {
@@ -10547,74 +10553,76 @@ async function addFixCommentsForPr({
10547
10553
  ...deleteAllPreviousComments({ comments, scm }),
10548
10554
  ...deleteAllPreviousGeneralPrComments({ generalPrComments, scm })
10549
10555
  ]);
10550
- await Promise.all([
10551
- ...prVulenrabilities.vulnerabilityReportIssueCodeNodes.map(
10552
- (vulnerabilityReportIssueCodeNode) => {
10553
- return postFixComment({
10554
- vulnerabilityReportIssueCodeNode,
10555
- projectId,
10556
- analysisId,
10557
- organizationId,
10558
- fixesById,
10559
- scm,
10560
- pullRequest,
10561
- scanner,
10562
- commitSha
10563
- });
10564
- }
10565
- ),
10566
- ...irrelevantVulnerabilityReportIssues.map(
10567
- async (vulnerabilityReportIssue) => {
10568
- let fpDescription = null;
10569
- if (vulnerabilityReportIssue.fpId) {
10570
- const fpRes = await gqlClient.getFalsePositive({
10571
- fpId: vulnerabilityReportIssue.fpId
10556
+ await Promise.all(
10557
+ [
10558
+ ...prVulenrabilities.vulnerabilityReportIssueCodeNodes.map(
10559
+ (vulnerabilityReportIssueCodeNode) => {
10560
+ return postFixComment({
10561
+ vulnerabilityReportIssueCodeNode,
10562
+ projectId,
10563
+ analysisId,
10564
+ organizationId,
10565
+ fixesById,
10566
+ scm,
10567
+ pullRequest,
10568
+ scanner,
10569
+ commitSha
10572
10570
  });
10573
- const parsedFpRes = await FalsePositivePartsZ.parseAsync(
10574
- fpRes?.getFalsePositive
10575
- );
10576
- const { description, contextString } = getParsedFalsePositiveMessage(parsedFpRes);
10577
- fpDescription = contextString ? `${description}
10571
+ }
10572
+ ),
10573
+ ...irrelevantVulnerabilityReportIssues.map(
10574
+ async (vulnerabilityReportIssue) => {
10575
+ let fpDescription = null;
10576
+ if (vulnerabilityReportIssue.fpId) {
10577
+ const fpRes = await gqlClient.getFalsePositive({
10578
+ fpId: vulnerabilityReportIssue.fpId
10579
+ });
10580
+ const parsedFpRes = await FalsePositivePartsZ.parseAsync(
10581
+ fpRes?.getFalsePositive
10582
+ );
10583
+ const { description, contextString } = getParsedFalsePositiveMessage(parsedFpRes);
10584
+ fpDescription = contextString ? `${description}
10578
10585
 
10579
10586
  ${contextString}` : description;
10580
- }
10581
- return await Promise.all(
10582
- vulnerabilityReportIssue.codeNodes.map(
10583
- async (vulnerabilityReportIssueCodeNode) => {
10584
- return await postIssueComment({
10585
- vulnerabilityReportIssueCodeNode: {
10586
- path: vulnerabilityReportIssueCodeNode.path,
10587
- startLine: vulnerabilityReportIssueCodeNode.startLine,
10588
- vulnerabilityReportIssue: {
10589
- fixId: "",
10590
- safeIssueType: vulnerabilityReportIssue.safeIssueType,
10591
- vulnerabilityReportIssueTags: vulnerabilityReportIssue.vulnerabilityReportIssueTags,
10592
- category: vulnerabilityReportIssue.category
10587
+ }
10588
+ return await Promise.all(
10589
+ vulnerabilityReportIssue.codeNodes.map(
10590
+ async (vulnerabilityReportIssueCodeNode) => {
10591
+ return await postIssueComment({
10592
+ vulnerabilityReportIssueCodeNode: {
10593
+ path: vulnerabilityReportIssueCodeNode.path,
10594
+ startLine: vulnerabilityReportIssueCodeNode.startLine,
10595
+ vulnerabilityReportIssue: {
10596
+ fixId: "",
10597
+ safeIssueType: vulnerabilityReportIssue.safeIssueType,
10598
+ vulnerabilityReportIssueTags: vulnerabilityReportIssue.vulnerabilityReportIssueTags,
10599
+ category: vulnerabilityReportIssue.category
10600
+ },
10601
+ vulnerabilityReportIssueId: vulnerabilityReportIssue.id
10593
10602
  },
10594
- vulnerabilityReportIssueId: vulnerabilityReportIssue.id
10595
- },
10596
- projectId,
10597
- analysisId,
10598
- organizationId,
10599
- fixesById,
10600
- scm,
10601
- pullRequest,
10602
- scanner,
10603
- commitSha,
10604
- fpDescription
10605
- });
10606
- }
10607
- )
10608
- );
10609
- }
10610
- ),
10611
- postAnalysisInsightComment({
10612
- prVulenrabilities,
10613
- pullRequest,
10614
- scanner,
10615
- scm
10616
- })
10617
- ]);
10603
+ projectId,
10604
+ analysisId,
10605
+ organizationId,
10606
+ fixesById,
10607
+ scm,
10608
+ pullRequest,
10609
+ scanner,
10610
+ commitSha,
10611
+ fpDescription
10612
+ });
10613
+ }
10614
+ )
10615
+ );
10616
+ }
10617
+ ),
10618
+ !ghFixerNoFixComments && postAnalysisInsightComment({
10619
+ prVulenrabilities,
10620
+ pullRequest,
10621
+ scanner,
10622
+ scm
10623
+ })
10624
+ ].filter(Boolean)
10625
+ );
10618
10626
  }
10619
10627
 
10620
10628
  // src/features/analysis/auto_pr_handler.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.193",
3
+ "version": "1.0.194",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.mjs",