mobbdev 1.0.26 → 1.0.28

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 +80 -80
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -227,12 +227,12 @@ var Vulnerability_Report_Vendor_Enum = /* @__PURE__ */ ((Vulnerability_Report_Ve
227
227
  Vulnerability_Report_Vendor_Enum3["Sonarqube"] = "sonarqube";
228
228
  return Vulnerability_Report_Vendor_Enum3;
229
229
  })(Vulnerability_Report_Vendor_Enum || {});
230
- var Vulnerability_Severity_Enum = /* @__PURE__ */ ((Vulnerability_Severity_Enum3) => {
231
- Vulnerability_Severity_Enum3["Critical"] = "critical";
232
- Vulnerability_Severity_Enum3["High"] = "high";
233
- Vulnerability_Severity_Enum3["Low"] = "low";
234
- Vulnerability_Severity_Enum3["Medium"] = "medium";
235
- return Vulnerability_Severity_Enum3;
230
+ var Vulnerability_Severity_Enum = /* @__PURE__ */ ((Vulnerability_Severity_Enum2) => {
231
+ Vulnerability_Severity_Enum2["Critical"] = "critical";
232
+ Vulnerability_Severity_Enum2["High"] = "high";
233
+ Vulnerability_Severity_Enum2["Low"] = "low";
234
+ Vulnerability_Severity_Enum2["Medium"] = "medium";
235
+ return Vulnerability_Severity_Enum2;
236
236
  })(Vulnerability_Severity_Enum || {});
237
237
  var MeDocument = `
238
238
  query Me {
@@ -340,9 +340,7 @@ var GetFixesDocument = `
340
340
  fixes: fix(where: $filters) {
341
341
  safeIssueType
342
342
  id
343
- vulnerabilityReportIssues(limit: 1) {
344
- parsedSeverity
345
- }
343
+ severityText
346
344
  safeIssueLanguage
347
345
  patchAndQuestions {
348
346
  __typename
@@ -866,6 +864,9 @@ var AnalysisPageQueryParamsZ = ProjectPageQueryParamsZ.extend({
866
864
  var FixPageQueryParamsZ = AnalysisPageQueryParamsZ.extend({
867
865
  fixId: z3.string().uuid()
868
866
  });
867
+ var IssuePageQueryParamsZ = AnalysisPageQueryParamsZ.extend({
868
+ issueId: z3.string().uuid()
869
+ });
869
870
  var CliLoginPageQueryParamsZ = z3.object({
870
871
  loginId: z3.string().uuid()
871
872
  });
@@ -894,6 +895,7 @@ var AnalysisReportDigestedZ = z3.object({
894
895
  var ReportQueryResultZ = z3.object({
895
896
  fixReport_by_pk: z3.object({
896
897
  id: z3.string().uuid(),
898
+ analysisUrl: z3.string(),
897
899
  fixesCommitted: z3.object({
898
900
  aggregate: z3.object({ count: z3.number() })
899
901
  }),
@@ -932,12 +934,12 @@ var ReportQueryResultZ = z3.object({
932
934
  ),
933
935
  sharedState: FixSharedStateZ,
934
936
  numberOfVulnerabilityIssues: z3.number(),
937
+ severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
935
938
  vulnerabilityReportIssues: z3.array(
936
939
  z3.object({
937
940
  id: z3.string().uuid(),
938
941
  issueType: z3.string(),
939
- issueLanguage: z3.string(),
940
- parsedSeverity: ParsedSeverityZ
942
+ issueLanguage: z3.string()
941
943
  })
942
944
  )
943
945
  // scmSubmitFixRequests: ScmSubmitFixRequestsZ,
@@ -1020,11 +1022,11 @@ var ReportFixesQueryFixZ = z3.object({
1020
1022
  })
1021
1023
  ),
1022
1024
  numberOfVulnerabilityIssues: z3.number(),
1025
+ severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
1023
1026
  vulnerabilityReportIssues: z3.array(
1024
1027
  z3.object({
1025
1028
  issueType: z3.string(),
1026
- issueLanguage: z3.string(),
1027
- parsedSeverity: ParsedSeverityZ
1029
+ issueLanguage: z3.string()
1028
1030
  })
1029
1031
  ).min(1)
1030
1032
  });
@@ -1090,11 +1092,11 @@ var FixQueryZ = z3.object({
1090
1092
  })
1091
1093
  ),
1092
1094
  numberOfVulnerabilityIssues: z3.number(),
1095
+ severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
1093
1096
  vulnerabilityReportIssues: z3.array(
1094
1097
  z3.object({
1095
1098
  vendorIssueId: z3.string(),
1096
- issueLanguage: z3.string(),
1097
- parsedSeverity: ParsedSeverityZ
1099
+ issueLanguage: z3.string()
1098
1100
  })
1099
1101
  ),
1100
1102
  patchAndQuestions: PatchAndQuestionsZ,
@@ -1139,76 +1141,78 @@ var GetReportIssuesQueryZ = z3.object({
1139
1141
  })
1140
1142
  }).array()
1141
1143
  }).nullish();
1142
- var FixScreenQueryResultZ = z3.object({
1143
- fixReport_by_pk: z3.object({
1144
- id: z3.string().uuid(),
1145
- expirationOn: z3.string(),
1146
- createdOn: z3.string(),
1147
- state: z3.nativeEnum(Fix_Report_State_Enum),
1148
- fixes_aggregate: z3.object({
1144
+ var FixPageFixReportZ = z3.object({
1145
+ id: z3.string().uuid(),
1146
+ analysisUrl: z3.string(),
1147
+ expirationOn: z3.string(),
1148
+ createdOn: z3.string(),
1149
+ state: z3.nativeEnum(Fix_Report_State_Enum),
1150
+ fixes_aggregate: z3.object({
1151
+ aggregate: z3.object({
1152
+ count: z3.number()
1153
+ })
1154
+ }),
1155
+ repo: z3.object({
1156
+ name: z3.string().nullable(),
1157
+ originalUrl: z3.string(),
1158
+ reference: z3.string(),
1159
+ commitSha: z3.string()
1160
+ }),
1161
+ vulnerabilityReport: z3.object({
1162
+ vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum),
1163
+ vendorReportId: z3.string().uuid().nullable(),
1164
+ projectId: z3.string().uuid(),
1165
+ project: z3.object({
1166
+ organizationId: z3.string().uuid()
1167
+ }),
1168
+ file: z3.object({
1169
+ id: z3.string().uuid(),
1170
+ path: z3.string()
1171
+ }),
1172
+ pending: z3.object({
1149
1173
  aggregate: z3.object({
1150
1174
  count: z3.number()
1151
1175
  })
1152
1176
  }),
1153
- repo: z3.object({
1154
- name: z3.string().nullable(),
1155
- originalUrl: z3.string(),
1156
- reference: z3.string(),
1157
- commitSha: z3.string()
1177
+ supported: z3.object({
1178
+ aggregate: z3.object({
1179
+ count: z3.number()
1180
+ })
1158
1181
  }),
1159
- vulnerabilityReport: z3.object({
1160
- vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum),
1161
- vendorReportId: z3.string().uuid().nullable(),
1162
- projectId: z3.string().uuid(),
1163
- project: z3.object({
1164
- organizationId: z3.string().uuid()
1165
- }),
1166
- file: z3.object({
1167
- id: z3.string().uuid(),
1168
- path: z3.string()
1169
- }),
1170
- pending: z3.object({
1171
- aggregate: z3.object({
1172
- count: z3.number()
1173
- })
1174
- }),
1175
- supported: z3.object({
1176
- aggregate: z3.object({
1177
- count: z3.number()
1178
- })
1179
- }),
1180
- all: z3.object({
1181
- aggregate: z3.object({
1182
- count: z3.number()
1183
- })
1184
- }),
1185
- fixable: z3.object({
1186
- aggregate: z3.object({
1187
- count: z3.number()
1188
- })
1189
- }),
1190
- errors: z3.object({
1191
- aggregate: z3.object({
1192
- count: z3.number()
1193
- })
1194
- }),
1195
- vulnerabilityReportIssues: z3.object({
1196
- extraData: z3.object({
1197
- missing_files: z3.string().array().nullish(),
1198
- large_files: z3.string().array().nullish(),
1199
- error_files: z3.string().array().nullish()
1200
- })
1201
- }).array()
1202
- })
1203
- }),
1182
+ all: z3.object({
1183
+ aggregate: z3.object({
1184
+ count: z3.number()
1185
+ })
1186
+ }),
1187
+ fixable: z3.object({
1188
+ aggregate: z3.object({
1189
+ count: z3.number()
1190
+ })
1191
+ }),
1192
+ errors: z3.object({
1193
+ aggregate: z3.object({
1194
+ count: z3.number()
1195
+ })
1196
+ }),
1197
+ vulnerabilityReportIssues: z3.object({
1198
+ extraData: z3.object({
1199
+ missing_files: z3.string().array().nullish(),
1200
+ large_files: z3.string().array().nullish(),
1201
+ error_files: z3.string().array().nullish()
1202
+ })
1203
+ }).array()
1204
+ })
1205
+ });
1206
+ var FixScreenQueryResultZ = z3.object({
1207
+ fixReport_by_pk: FixPageFixReportZ,
1204
1208
  fix_by_pk: FixQueryZ.merge(
1205
1209
  z3.object({
1210
+ severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
1206
1211
  vulnerabilityReportIssues: z3.array(
1207
1212
  z3.object({
1208
1213
  vendorIssueId: z3.string(),
1209
1214
  issueType: z3.string(),
1210
- issueLanguage: z3.string(),
1211
- parsedSeverity: ParsedSeverityZ
1215
+ issueLanguage: z3.string()
1212
1216
  })
1213
1217
  )
1214
1218
  })
@@ -6780,12 +6784,8 @@ function buildCommentBody({
6780
6784
  const title = `# ${MobbIconMarkdown} ${issueType} fix is ready`;
6781
6785
  const validFixParseRes = z23.object({
6782
6786
  patchAndQuestions: PatchAndQuestionsZ,
6783
- vulnerabilityReportIssues: z23.array(
6784
- z23.object({
6785
- parsedSeverity: ParsedSeverityZ
6786
- })
6787
- ).min(1),
6788
6787
  safeIssueLanguage: z23.nativeEnum(IssueLanguage_Enum),
6788
+ severityText: z23.nativeEnum(Vulnerability_Severity_Enum),
6789
6789
  safeIssueType: z23.nativeEnum(IssueType_Enum)
6790
6790
  }).safeParse(fix);
6791
6791
  if (!validFixParseRes.success) {
@@ -6797,7 +6797,7 @@ function buildCommentBody({
6797
6797
  const subTitle = validFixParseRes.success ? getCommitDescription({
6798
6798
  issueType: validFixParseRes.data.safeIssueType,
6799
6799
  vendor: scannerToVulnerability_Report_Vendor_Enum[scanner],
6800
- severity: validFixParseRes.data.vulnerabilityReportIssues[0]?.parsedSeverity,
6800
+ severity: validFixParseRes.data.severityText,
6801
6801
  guidances: getGuidances({
6802
6802
  questions: validFixParseRes.data.patchAndQuestions.questions.map(toQuestion),
6803
6803
  issueType: validFixParseRes.data.safeIssueType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
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",