mobbdev 1.0.193 → 1.0.195

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 {
@@ -4611,8 +4614,8 @@ var Logger = class {
4611
4614
  * Migrates logs from unknown path to known workspace path
4612
4615
  */
4613
4616
  migrateLogs(fromPath, toPath) {
4614
- const existingLogs = this.mobbConfigStore.get(fromPath) || [];
4615
- const targetLogs = this.mobbConfigStore.get(toPath) || [];
4617
+ const existingLogs = this.mobbConfigStore.get(fromPath) ?? [];
4618
+ const targetLogs = this.mobbConfigStore.get(toPath) ?? [];
4616
4619
  if (existingLogs.length > 0) {
4617
4620
  const combinedLogs = [...targetLogs, ...existingLogs];
4618
4621
  const finalLogs = combinedLogs.slice(-MAX_LOGS_SIZE);
@@ -4643,7 +4646,7 @@ var Logger = class {
4643
4646
  message,
4644
4647
  data
4645
4648
  };
4646
- const logs = this.mobbConfigStore.get(currentPath) || [];
4649
+ const logs = this.mobbConfigStore.get(currentPath) ?? [];
4647
4650
  if (logs.length >= MAX_LOGS_SIZE) {
4648
4651
  logs.shift();
4649
4652
  }
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
@@ -11918,7 +11926,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
11918
11926
  const { createSpinner: createSpinner5 } = Spinner2({ ci });
11919
11927
  skipPrompts = skipPrompts || ci;
11920
11928
  let gqlClient = new GQLClient({
11921
- apiKey: apiKey || config2.get("apiToken"),
11929
+ apiKey: apiKey ?? config2.get("apiToken") ?? "",
11922
11930
  type: "apiKey"
11923
11931
  });
11924
11932
  gqlClient = await handleMobbLogin({
@@ -12444,7 +12452,7 @@ var config3 = new Configstore2(packageJson.name, { apiToken: "" });
12444
12452
  async function addScmToken(addScmTokenOptions) {
12445
12453
  const { apiKey, token, organization, scmType, url, refreshToken, ci } = addScmTokenOptions;
12446
12454
  let gqlClient = new GQLClient({
12447
- apiKey: apiKey || config3.get("apiToken"),
12455
+ apiKey: apiKey ?? config3.get("apiToken") ?? "",
12448
12456
  type: "apiKey"
12449
12457
  });
12450
12458
  gqlClient = await handleMobbLogin({
@@ -12838,8 +12846,8 @@ var Logger = class {
12838
12846
  * Migrates logs from unknown path to known workspace path
12839
12847
  */
12840
12848
  migrateLogs(fromPath, toPath) {
12841
- const existingLogs = this.mobbConfigStore.get(fromPath) || [];
12842
- const targetLogs = this.mobbConfigStore.get(toPath) || [];
12849
+ const existingLogs = this.mobbConfigStore.get(fromPath) ?? [];
12850
+ const targetLogs = this.mobbConfigStore.get(toPath) ?? [];
12843
12851
  if (existingLogs.length > 0) {
12844
12852
  const combinedLogs = [...targetLogs, ...existingLogs];
12845
12853
  const finalLogs = combinedLogs.slice(-MAX_LOGS_SIZE);
@@ -12870,7 +12878,7 @@ var Logger = class {
12870
12878
  message,
12871
12879
  data
12872
12880
  };
12873
- const logs = this.mobbConfigStore.get(currentPath) || [];
12881
+ const logs = this.mobbConfigStore.get(currentPath) ?? [];
12874
12882
  if (logs.length >= MAX_LOGS_SIZE) {
12875
12883
  logs.shift();
12876
12884
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.193",
3
+ "version": "1.0.195",
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",
@@ -53,18 +53,18 @@
53
53
  "dependencies": {
54
54
  "@gitbeaker/requester-utils": "43.5.0",
55
55
  "@gitbeaker/rest": "43.5.0",
56
- "@modelcontextprotocol/sdk": "1.17.5",
56
+ "@modelcontextprotocol/sdk": "1.20.1",
57
57
  "@octokit/core": "5.2.0",
58
58
  "@octokit/request-error": "5.1.1",
59
59
  "adm-zip": "0.5.16",
60
- "axios": "1.11.0",
60
+ "axios": "1.12.2",
61
61
  "azure-devops-node-api": "15.1.1",
62
62
  "bitbucket": "2.11.0",
63
63
  "chalk": "5.6.2",
64
64
  "chalk-animation": "2.0.3",
65
- "configstore": "7.0.0",
65
+ "configstore": "7.1.0",
66
66
  "cross-fetch": "4.1.0",
67
- "debug": "4.4.1",
67
+ "debug": "4.4.3",
68
68
  "dotenv": "16.6.1",
69
69
  "extract-zip": "2.0.1",
70
70
  "globby": "14.1.0",
@@ -86,9 +86,9 @@
86
86
  "open": "8.4.2",
87
87
  "parse-diff": "0.11.1",
88
88
  "sax": "1.4.1",
89
- "semver": "7.7.2",
89
+ "semver": "7.7.3",
90
90
  "simple-git": "3.28.0",
91
- "snyk": "1.1299.0",
91
+ "snyk": "1.1300.0",
92
92
  "tar": "6.2.1",
93
93
  "tmp": "0.2.5",
94
94
  "undici": "6.21.3",
@@ -132,7 +132,7 @@
132
132
  "nock": "14.0.10",
133
133
  "prettier": "3.6.2",
134
134
  "tsup": "8.5.0",
135
- "typescript": "5.9.2",
135
+ "typescript": "5.9.3",
136
136
  "vitest": "3.2.4"
137
137
  },
138
138
  "engines": {