mobbdev 1.0.32 → 1.0.34

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 +766 -649
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -37,7 +37,7 @@ import { fileURLToPath } from "node:url";
37
37
  import chalk from "chalk";
38
38
  import Debug from "debug";
39
39
  import * as dotenv from "dotenv";
40
- import { z as z4 } from "zod";
40
+ import { z as z8 } from "zod";
41
41
 
42
42
  // src/features/analysis/scm/generates/client_generates.ts
43
43
  var FixQuestionInputType = /* @__PURE__ */ ((FixQuestionInputType2) => {
@@ -218,6 +218,14 @@ var Vulnerability_Report_Issue_State_Enum = /* @__PURE__ */ ((Vulnerability_Repo
218
218
  Vulnerability_Report_Issue_State_Enum2["Unsupported"] = "Unsupported";
219
219
  return Vulnerability_Report_Issue_State_Enum2;
220
220
  })(Vulnerability_Report_Issue_State_Enum || {});
221
+ var Vulnerability_Report_Issue_Tag_Enum = /* @__PURE__ */ ((Vulnerability_Report_Issue_Tag_Enum2) => {
222
+ Vulnerability_Report_Issue_Tag_Enum2["AutogeneratedCode"] = "AUTOGENERATED_CODE";
223
+ Vulnerability_Report_Issue_Tag_Enum2["AuxiliaryCode"] = "AUXILIARY_CODE";
224
+ Vulnerability_Report_Issue_Tag_Enum2["FalsePositive"] = "FALSE_POSITIVE";
225
+ Vulnerability_Report_Issue_Tag_Enum2["TestCode"] = "TEST_CODE";
226
+ Vulnerability_Report_Issue_Tag_Enum2["VendorCode"] = "VENDOR_CODE";
227
+ return Vulnerability_Report_Issue_Tag_Enum2;
228
+ })(Vulnerability_Report_Issue_Tag_Enum || {});
221
229
  var Vulnerability_Report_Vendor_Enum = /* @__PURE__ */ ((Vulnerability_Report_Vendor_Enum3) => {
222
230
  Vulnerability_Report_Vendor_Enum3["Checkmarx"] = "checkmarx";
223
231
  Vulnerability_Report_Vendor_Enum3["CheckmarxXml"] = "checkmarxXml";
@@ -685,14 +693,298 @@ function getSdk(client, withWrapper = defaultWrapper) {
685
693
  };
686
694
  }
687
695
 
688
- // src/features/analysis/scm/shared/src/types.ts
696
+ // src/features/analysis/scm/shared/src/types/fix.ts
697
+ import { z as z2 } from "zod";
698
+
699
+ // src/features/analysis/scm/shared/src/types/shared.ts
700
+ import { z } from "zod";
701
+ var ParsedSeverityZ = z.nativeEnum(Vulnerability_Severity_Enum).nullish().transform((i) => i ?? "low" /* Low */);
702
+ var ScmSubmitFixRequestsZ = z.array(
703
+ z.object({
704
+ scmSubmitFixRequest: z.object({
705
+ submitFixRequest: z.object({
706
+ createdByUser: z.object({
707
+ email: z.string()
708
+ }),
709
+ targetBranchName: z.string().default("")
710
+ }),
711
+ prUrl: z.string().nullable(),
712
+ prStatus: z.nativeEnum(Pr_Status_Enum).nullable(),
713
+ commitUrl: z.string().nullable(),
714
+ scmId: z.string()
715
+ })
716
+ })
717
+ );
718
+
719
+ // src/features/analysis/scm/shared/src/types/fix.ts
720
+ var PackageInfoZ = z2.object({
721
+ name: z2.string(),
722
+ version: z2.string(),
723
+ envName: z2.string().nullable()
724
+ });
725
+ var ManifestActionRequiredZ = z2.object({
726
+ action: z2.nativeEnum(ManifestAction),
727
+ language: z2.nativeEnum(Language),
728
+ lib: PackageInfoZ,
729
+ typesLib: PackageInfoZ.nullable()
730
+ });
731
+ var ExtraContextInternalZ = z2.object({
732
+ key: z2.string(),
733
+ value: z2.string().or(z2.boolean()).or(
734
+ z2.object({
735
+ int: z2.boolean(),
736
+ integer: z2.boolean(),
737
+ string: z2.boolean(),
738
+ date: z2.boolean()
739
+ })
740
+ )
741
+ });
742
+ var FixExtraContextZ = z2.object({
743
+ fixDescription: z2.string(),
744
+ manifestActionsRequired: z2.array(ManifestActionRequiredZ),
745
+ extraContext: z2.array(ExtraContextInternalZ)
746
+ });
747
+ var PatchAndQuestionsZ = z2.object({
748
+ __typename: z2.literal("FixData"),
749
+ patch: z2.string(),
750
+ patchOriginalEncodingBase64: z2.string(),
751
+ questions: z2.array(
752
+ z2.object({
753
+ name: z2.string(),
754
+ key: z2.string(),
755
+ index: z2.number(),
756
+ defaultValue: z2.string(),
757
+ value: z2.string().nullable(),
758
+ extraContext: z2.array(ExtraContextInternalZ),
759
+ inputType: z2.nativeEnum(FixQuestionInputType),
760
+ options: z2.array(z2.string())
761
+ })
762
+ ),
763
+ extraContext: FixExtraContextZ
764
+ });
765
+ var FixRatingZ = z2.object({
766
+ voteScore: z2.number(),
767
+ fixRatingTag: z2.nativeEnum(Fix_Rating_Tag_Enum).nullable().default(null),
768
+ comment: z2.string().nullable().default(null),
769
+ updatedDate: z2.string().nullable(),
770
+ user: z2.object({
771
+ email: z2.string(),
772
+ name: z2.string()
773
+ })
774
+ });
775
+ var FixSharedStateZ = z2.object({
776
+ state: z2.nativeEnum(Fix_State_Enum),
777
+ isArchived: z2.boolean(),
778
+ scmSubmitFixRequests: ScmSubmitFixRequestsZ,
779
+ fixRatings: z2.array(FixRatingZ).default([])
780
+ }).nullish().transform(
781
+ (data) => data ? data : {
782
+ state: "Ready" /* Ready */,
783
+ isArchived: false,
784
+ scmSubmitFixRequests: [],
785
+ fixRatings: []
786
+ }
787
+ );
788
+ var FixQueryZ = z2.object({
789
+ __typename: z2.literal("fix").optional(),
790
+ id: z2.string().uuid(),
791
+ sharedState: FixSharedStateZ,
792
+ modifiedBy: z2.string().nullable(),
793
+ gitBlameLogin: z2.string().nullable(),
794
+ safeIssueLanguage: z2.string(),
795
+ safeIssueType: z2.string(),
796
+ confidence: z2.number(),
797
+ fixReportId: z2.string().uuid(),
798
+ isExpired: z2.boolean().default(false),
799
+ fixFiles: z2.array(
800
+ z2.object({
801
+ fileRepoRelativePath: z2.string()
802
+ })
803
+ ),
804
+ numberOfVulnerabilityIssues: z2.number(),
805
+ severityText: z2.nativeEnum(Vulnerability_Severity_Enum),
806
+ vulnerabilityReportIssues: z2.array(
807
+ z2.object({
808
+ vendorIssueId: z2.string(),
809
+ issueLanguage: z2.string(),
810
+ parsedSeverity: ParsedSeverityZ
811
+ })
812
+ ),
813
+ patchAndQuestions: PatchAndQuestionsZ,
814
+ effortToApplyFix: z2.nativeEnum(Effort_To_Apply_Fix_Enum).nullable()
815
+ });
816
+ var FixPartsForFixScreenZ = FixQueryZ.merge(
817
+ z2.object({
818
+ vulnerabilityReportIssues: z2.array(
819
+ z2.object({
820
+ vendorIssueId: z2.string(),
821
+ issueType: z2.string(),
822
+ issueLanguage: z2.string()
823
+ })
824
+ )
825
+ })
826
+ );
827
+
828
+ // src/features/analysis/scm/shared/src/types/issue.ts
829
+ import { z as z4 } from "zod";
830
+
831
+ // src/features/analysis/scm/shared/src/types/analysis.ts
689
832
  import { z as z3 } from "zod";
833
+ var FixPageFixReportZ = z3.object({
834
+ id: z3.string().uuid(),
835
+ analysisUrl: z3.string(),
836
+ expirationOn: z3.string(),
837
+ createdOn: z3.string(),
838
+ state: z3.nativeEnum(Fix_Report_State_Enum),
839
+ fixes_aggregate: z3.object({
840
+ aggregate: z3.object({
841
+ count: z3.number()
842
+ })
843
+ }),
844
+ repo: z3.object({
845
+ name: z3.string().nullable(),
846
+ originalUrl: z3.string(),
847
+ reference: z3.string(),
848
+ commitSha: z3.string()
849
+ }),
850
+ vulnerabilityReport: z3.object({
851
+ vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum),
852
+ vendorReportId: z3.string().uuid().nullable(),
853
+ projectId: z3.string().uuid(),
854
+ project: z3.object({
855
+ organizationId: z3.string().uuid()
856
+ }),
857
+ file: z3.object({
858
+ id: z3.string().uuid(),
859
+ path: z3.string()
860
+ }),
861
+ pending: z3.object({
862
+ aggregate: z3.object({
863
+ count: z3.number()
864
+ })
865
+ }),
866
+ supported: z3.object({
867
+ aggregate: z3.object({
868
+ count: z3.number()
869
+ })
870
+ }),
871
+ all: z3.object({
872
+ aggregate: z3.object({
873
+ count: z3.number()
874
+ })
875
+ }),
876
+ fixable: z3.object({
877
+ aggregate: z3.object({
878
+ count: z3.number()
879
+ })
880
+ }),
881
+ errors: z3.object({
882
+ aggregate: z3.object({
883
+ count: z3.number()
884
+ })
885
+ }),
886
+ vulnerabilityReportIssues: z3.object({
887
+ extraData: z3.object({
888
+ missing_files: z3.string().array().nullish(),
889
+ large_files: z3.string().array().nullish(),
890
+ error_files: z3.string().array().nullish()
891
+ })
892
+ }).array()
893
+ })
894
+ });
895
+
896
+ // src/features/analysis/scm/shared/src/types/issue.ts
897
+ var category = {
898
+ NoFix: "NoFix",
899
+ Unsupported: "Unsupported",
900
+ Irrelevant: "Irrelevant",
901
+ FalsePositive: "FalsePositive",
902
+ Fixable: "Fixable"
903
+ };
904
+ var ValidCategoriesZ = z4.union([
905
+ z4.literal(category.NoFix),
906
+ z4.literal(category.Unsupported),
907
+ z4.literal(category.Irrelevant),
908
+ z4.literal(category.FalsePositive),
909
+ z4.literal(category.Fixable)
910
+ ]);
911
+ var BaseIssuePartsZ = z4.object({
912
+ id: z4.string().uuid(),
913
+ safeIssueType: z4.string(),
914
+ safeIssueLanguage: z4.string(),
915
+ createdAt: z4.string(),
916
+ parsedSeverity: ParsedSeverityZ,
917
+ category: ValidCategoriesZ,
918
+ vulnerabilityReportIssueTags: z4.array(
919
+ z4.object({
920
+ tag: z4.nativeEnum(Vulnerability_Report_Issue_Tag_Enum)
921
+ })
922
+ ),
923
+ codeNodes: z4.array(
924
+ z4.object({
925
+ path: z4.string(),
926
+ line: z4.number(),
927
+ index: z4.number()
928
+ })
929
+ ).transform((nodes) => nodes.sort((a, b) => b.index - a.index)),
930
+ fix: FixPartsForFixScreenZ.nullish()
931
+ });
932
+ var FalsePositivePartsZ = z4.object({
933
+ extraContext: z4.array(z4.object({ key: z4.string(), value: z4.string() })),
934
+ fixDescription: z4.string()
935
+ });
936
+ var IssuePartsWithFixZ = BaseIssuePartsZ.merge(
937
+ z4.object({
938
+ category: z4.literal(category.Irrelevant),
939
+ fix: FixPartsForFixScreenZ.nullish()
940
+ })
941
+ );
942
+ var IssuePartsFpZ = BaseIssuePartsZ.merge(
943
+ z4.object({
944
+ category: z4.literal(category.FalsePositive),
945
+ fpId: z4.string().uuid(),
946
+ getFalsePositive: FalsePositivePartsZ
947
+ })
948
+ );
949
+ var GeneralIssueZ = BaseIssuePartsZ.merge(
950
+ z4.object({
951
+ category: z4.union([
952
+ z4.literal(category.NoFix),
953
+ z4.literal(category.Unsupported),
954
+ z4.literal(category.Fixable)
955
+ ])
956
+ })
957
+ );
958
+ var IssuePartsZ = z4.union([
959
+ IssuePartsFpZ,
960
+ IssuePartsWithFixZ,
961
+ GeneralIssueZ
962
+ ]);
963
+ var GetIssueIndexesZ = z4.object({
964
+ currentIndex: z4.number(),
965
+ totalIssues: z4.number(),
966
+ nextIssue: z4.object({
967
+ id: z4.string().uuid()
968
+ }).nullish(),
969
+ prevIssue: z4.object({
970
+ id: z4.string().uuid()
971
+ }).nullish()
972
+ });
973
+ var GetIssueScreenDataZ = z4.object({
974
+ fixReport_by_pk: FixPageFixReportZ,
975
+ vulnerability_report_issue_by_pk: IssuePartsZ,
976
+ issueIndexes: GetIssueIndexesZ
977
+ });
978
+ var IssueBucketZ = z4.enum(["fixable", "irrelevant", "remaining"]);
979
+
980
+ // src/features/analysis/scm/shared/src/types/types.ts
981
+ import { z as z7 } from "zod";
690
982
 
691
983
  // src/features/analysis/scm/shared/src/validations.ts
692
- import { z as z2 } from "zod";
984
+ import { z as z6 } from "zod";
693
985
 
694
986
  // src/features/analysis/scm/shared/src/getIssueType.ts
695
- import { z } from "zod";
987
+ import { z as z5 } from "zod";
696
988
  var issueTypeMap = {
697
989
  ["NO_LIMITS_OR_THROTTLING" /* NoLimitsOrThrottling */]: "Missing Rate Limiting",
698
990
  ["SQL_Injection" /* SqlInjection */]: "SQL Injection",
@@ -777,7 +1069,7 @@ var issueTypeMap = {
777
1069
  ["REGEX_MISSING_TIMEOUT" /* RegexMissingTimeout */]: "Regex Missing Timeout",
778
1070
  ["FRAMEABLE_LOGIN_PAGE" /* FrameableLoginPage */]: "Frameable Login Page"
779
1071
  };
780
- var issueTypeZ = z.nativeEnum(IssueType_Enum);
1072
+ var issueTypeZ = z5.nativeEnum(IssueType_Enum);
781
1073
  var getIssueTypeFriendlyString = (issueType) => {
782
1074
  const issueTypeZParseRes = issueTypeZ.safeParse(issueType);
783
1075
  if (!issueTypeZParseRes.success) {
@@ -787,12 +1079,12 @@ var getIssueTypeFriendlyString = (issueType) => {
787
1079
  };
788
1080
 
789
1081
  // src/features/analysis/scm/shared/src/validations.ts
790
- var IssueTypeSettingZ = z2.object({
791
- autoPrEnabled: z2.boolean(),
792
- enabled: z2.boolean(),
793
- issueType: z2.nativeEnum(IssueType_Enum)
1082
+ var IssueTypeSettingZ = z6.object({
1083
+ autoPrEnabled: z6.boolean(),
1084
+ enabled: z6.boolean(),
1085
+ issueType: z6.nativeEnum(IssueType_Enum)
794
1086
  });
795
- var IssueTypeSettingsZ = z2.array(IssueTypeSettingZ).transform((issueTypeSettings) => {
1087
+ var IssueTypeSettingsZ = z6.array(IssueTypeSettingZ).transform((issueTypeSettings) => {
796
1088
  return Object.values(IssueType_Enum).map((issueTypeEnum) => {
797
1089
  const existingIssueTypeSetting = issueTypeSettings.find(
798
1090
  ({ issueType: dbIssueType }) => dbIssueType === issueTypeEnum
@@ -812,550 +1104,375 @@ var IssueTypeSettingsZ = z2.array(IssueTypeSettingZ).transform((issueTypeSetting
812
1104
  });
813
1105
  });
814
1106
 
815
- // src/features/analysis/scm/shared/src/types.ts
816
- var ScmSubmitFixRequestsZ = z3.array(
817
- z3.object({
818
- scmSubmitFixRequest: z3.object({
819
- submitFixRequest: z3.object({
820
- createdByUser: z3.object({
821
- email: z3.string()
822
- }),
823
- targetBranchName: z3.string().default("")
824
- }),
825
- prUrl: z3.string().nullable(),
826
- prStatus: z3.nativeEnum(Pr_Status_Enum).nullable(),
827
- commitUrl: z3.string().nullable(),
828
- scmId: z3.string()
829
- })
830
- })
831
- );
832
- var FixRatingZ = z3.object({
833
- voteScore: z3.number(),
834
- fixRatingTag: z3.nativeEnum(Fix_Rating_Tag_Enum).nullable().default(null),
835
- comment: z3.string().nullable().default(null),
836
- updatedDate: z3.string().nullable(),
837
- user: z3.object({
838
- email: z3.string(),
839
- name: z3.string()
840
- })
1107
+ // src/features/analysis/scm/shared/src/types/types.ts
1108
+ var OrganizationScreenQueryParamsZ = z7.object({
1109
+ organizationId: z7.string().uuid()
841
1110
  });
842
- var FixSharedStateZ = z3.object({
843
- state: z3.nativeEnum(Fix_State_Enum),
844
- isArchived: z3.boolean(),
845
- scmSubmitFixRequests: ScmSubmitFixRequestsZ,
846
- fixRatings: z3.array(FixRatingZ).default([])
847
- }).nullish().transform(
848
- (data) => data ? data : {
849
- state: "Ready" /* Ready */,
850
- isArchived: false,
851
- scmSubmitFixRequests: [],
852
- fixRatings: []
853
- }
854
- );
855
- var OrganizationScreenQueryParamsZ = z3.object({
856
- organizationId: z3.string().uuid()
857
- });
858
- var ParsedSeverityZ = z3.nativeEnum(Vulnerability_Severity_Enum).nullish().transform((i) => i ?? "low" /* Low */);
859
- var ProjectPageQueryParamsZ = z3.object({
860
- organizationId: z3.string().uuid(),
861
- projectId: z3.string().uuid()
1111
+ var ProjectPageQueryParamsZ = z7.object({
1112
+ organizationId: z7.string().uuid(),
1113
+ projectId: z7.string().uuid()
862
1114
  });
863
1115
  var AnalysisPageQueryParamsZ = ProjectPageQueryParamsZ.extend({
864
- reportId: z3.string().uuid()
1116
+ reportId: z7.string().uuid()
865
1117
  });
866
1118
  var FixPageQueryParamsZ = AnalysisPageQueryParamsZ.extend({
867
- fixId: z3.string().uuid()
1119
+ fixId: z7.string().uuid()
868
1120
  });
869
1121
  var IssuePageQueryParamsZ = AnalysisPageQueryParamsZ.extend({
870
- issueId: z3.string().uuid()
1122
+ issueId: z7.string().uuid()
871
1123
  });
872
- var CliLoginPageQueryParamsZ = z3.object({
873
- loginId: z3.string().uuid()
1124
+ var CliLoginPageQueryParamsZ = z7.object({
1125
+ loginId: z7.string().uuid()
874
1126
  });
875
- var AnalysisReportDigestedZ = z3.object({
876
- id: z3.string().uuid(),
877
- state: z3.nativeEnum(Fix_Report_State_Enum),
878
- vulnerabilityReport: z3.object({
879
- reportSummaryUrl: z3.string().url().nullish(),
880
- scanDate: z3.string().nullable(),
881
- supported: z3.object({
882
- aggregate: z3.object({
883
- count: z3.number()
1127
+ var AnalysisReportDigestedZ = z7.object({
1128
+ id: z7.string().uuid(),
1129
+ state: z7.nativeEnum(Fix_Report_State_Enum),
1130
+ vulnerabilityReport: z7.object({
1131
+ reportSummaryUrl: z7.string().url().nullish(),
1132
+ scanDate: z7.string().nullable(),
1133
+ supported: z7.object({
1134
+ aggregate: z7.object({
1135
+ count: z7.number()
884
1136
  })
885
1137
  }),
886
- all: z3.object({
887
- aggregate: z3.object({
888
- count: z3.number()
1138
+ all: z7.object({
1139
+ aggregate: z7.object({
1140
+ count: z7.number()
889
1141
  })
890
1142
  }),
891
- vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum),
892
- project: z3.object({
893
- organizationId: z3.string().uuid()
1143
+ vendor: z7.nativeEnum(Vulnerability_Report_Vendor_Enum),
1144
+ project: z7.object({
1145
+ organizationId: z7.string().uuid()
894
1146
  })
895
1147
  })
896
1148
  });
897
- var ReportQueryResultZ = z3.object({
898
- fixReport_by_pk: z3.object({
899
- id: z3.string().uuid(),
900
- analysisUrl: z3.string(),
901
- fixesCommitted: z3.object({
902
- aggregate: z3.object({ count: z3.number() })
1149
+ var ReportQueryResultZ = z7.object({
1150
+ fixReport_by_pk: z7.object({
1151
+ id: z7.string().uuid(),
1152
+ analysisUrl: z7.string(),
1153
+ fixesCommitted: z7.object({
1154
+ aggregate: z7.object({ count: z7.number() })
903
1155
  }),
904
- fixesDownloaded: z3.object({
905
- aggregate: z3.object({ count: z3.number() })
1156
+ fixesDownloaded: z7.object({
1157
+ aggregate: z7.object({ count: z7.number() })
906
1158
  }),
907
- fixesDoneCount: z3.number(),
908
- fixesInprogressCount: z3.number(),
909
- fixesReadyCount: z3.number(),
910
- issueTypes: z3.record(z3.string(), z3.number()).nullable(),
911
- issueLanguages: z3.record(z3.string(), z3.number()).nullable(),
912
- fixesCountByEffort: z3.record(z3.string(), z3.number()).nullable(),
913
- vulnerabilitySeverities: z3.record(z3.string(), z3.number()).nullable(),
914
- createdOn: z3.string(),
915
- expirationOn: z3.string().nullable(),
916
- state: z3.nativeEnum(Fix_Report_State_Enum),
917
- fixes_aggregate: z3.object({
918
- aggregate: z3.object({
919
- count: z3.number()
1159
+ fixesDoneCount: z7.number(),
1160
+ fixesInprogressCount: z7.number(),
1161
+ fixesReadyCount: z7.number(),
1162
+ issueTypes: z7.record(z7.string(), z7.number()).nullable(),
1163
+ issueLanguages: z7.record(z7.string(), z7.number()).nullable(),
1164
+ fixesCountByEffort: z7.record(z7.string(), z7.number()).nullable(),
1165
+ vulnerabilitySeverities: z7.record(z7.string(), z7.number()).nullable(),
1166
+ createdOn: z7.string(),
1167
+ expirationOn: z7.string().nullable(),
1168
+ state: z7.nativeEnum(Fix_Report_State_Enum),
1169
+ fixes_aggregate: z7.object({
1170
+ aggregate: z7.object({
1171
+ count: z7.number()
920
1172
  })
921
1173
  }),
922
- fixes: z3.array(
923
- z3.object({
924
- id: z3.string().uuid(),
925
- safeIssueLanguage: z3.string(),
926
- safeIssueType: z3.string(),
927
- confidence: z3.number(),
928
- effortToApplyFix: z3.nativeEnum(Effort_To_Apply_Fix_Enum).nullable(),
929
- modifiedBy: z3.string().nullable(),
930
- gitBlameLogin: z3.string().nullable(),
931
- fixReportId: z3.string().uuid(),
932
- filePaths: z3.array(
933
- z3.object({
934
- fileRepoRelativePath: z3.string()
1174
+ fixes: z7.array(
1175
+ z7.object({
1176
+ id: z7.string().uuid(),
1177
+ safeIssueLanguage: z7.string(),
1178
+ safeIssueType: z7.string(),
1179
+ confidence: z7.number(),
1180
+ effortToApplyFix: z7.nativeEnum(Effort_To_Apply_Fix_Enum).nullable(),
1181
+ modifiedBy: z7.string().nullable(),
1182
+ gitBlameLogin: z7.string().nullable(),
1183
+ fixReportId: z7.string().uuid(),
1184
+ filePaths: z7.array(
1185
+ z7.object({
1186
+ fileRepoRelativePath: z7.string()
935
1187
  })
936
1188
  ),
937
1189
  sharedState: FixSharedStateZ,
938
- numberOfVulnerabilityIssues: z3.number(),
939
- severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
940
- vulnerabilityReportIssues: z3.array(
941
- z3.object({
942
- id: z3.string().uuid(),
943
- issueType: z3.string(),
944
- issueLanguage: z3.string()
1190
+ numberOfVulnerabilityIssues: z7.number(),
1191
+ severityText: z7.nativeEnum(Vulnerability_Severity_Enum),
1192
+ vulnerabilityReportIssues: z7.array(
1193
+ z7.object({
1194
+ id: z7.string().uuid(),
1195
+ issueType: z7.string(),
1196
+ issueLanguage: z7.string()
945
1197
  })
946
1198
  )
947
1199
  // scmSubmitFixRequests: ScmSubmitFixRequestsZ,
948
1200
  })
949
1201
  ),
950
- repo: z3.object({
951
- name: z3.string().nullable(),
952
- originalUrl: z3.string(),
953
- reference: z3.string(),
954
- commitSha: z3.string(),
955
- isKnownBranch: z3.boolean().nullish().default(true)
1202
+ repo: z7.object({
1203
+ name: z7.string().nullable(),
1204
+ originalUrl: z7.string(),
1205
+ reference: z7.string(),
1206
+ commitSha: z7.string(),
1207
+ isKnownBranch: z7.boolean().nullish().default(true)
956
1208
  }),
957
- vulnerabilityReport: z3.object({
958
- reportSummaryUrl: z3.string().url().nullish(),
959
- vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
960
- issuesWithKnownLanguage: z3.number().nullable(),
961
- scanDate: z3.string().nullable(),
962
- vendorReportId: z3.string().uuid().nullable(),
963
- projectId: z3.string().uuid(),
964
- project: z3.object({
965
- organizationId: z3.string().uuid()
1209
+ vulnerabilityReport: z7.object({
1210
+ id: z7.string().uuid(),
1211
+ reportSummaryUrl: z7.string().url().nullish(),
1212
+ vendor: z7.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
1213
+ issuesWithKnownLanguage: z7.number().nullable(),
1214
+ scanDate: z7.string().nullable(),
1215
+ vendorReportId: z7.string().uuid().nullable(),
1216
+ projectId: z7.string().uuid(),
1217
+ project: z7.object({
1218
+ organizationId: z7.string().uuid()
1219
+ }),
1220
+ file: z7.object({
1221
+ id: z7.string().uuid(),
1222
+ path: z7.string()
1223
+ }),
1224
+ pending: z7.object({
1225
+ aggregate: z7.object({
1226
+ count: z7.number()
1227
+ })
966
1228
  }),
967
- file: z3.object({
968
- id: z3.string().uuid(),
969
- path: z3.string()
1229
+ irrelevant: z7.object({
1230
+ aggregate: z7.object({
1231
+ count: z7.number()
1232
+ })
970
1233
  }),
971
- pending: z3.object({
972
- aggregate: z3.object({
973
- count: z3.number()
1234
+ remaining: z7.object({
1235
+ aggregate: z7.object({
1236
+ count: z7.number()
974
1237
  })
975
1238
  }),
976
- supported: z3.object({
977
- aggregate: z3.object({
978
- count: z3.number()
1239
+ digested: z7.object({
1240
+ aggregate: z7.object({
1241
+ count: z7.number()
979
1242
  })
980
1243
  }),
981
- digested: z3.object({
982
- aggregate: z3.object({
983
- count: z3.number()
1244
+ supported: z7.object({
1245
+ aggregate: z7.object({
1246
+ count: z7.number()
984
1247
  })
985
1248
  }),
986
- all: z3.object({
987
- aggregate: z3.object({
988
- count: z3.number()
1249
+ all: z7.object({
1250
+ aggregate: z7.object({
1251
+ count: z7.number()
989
1252
  })
990
1253
  }),
991
- fixable: z3.object({
992
- aggregate: z3.object({
993
- count: z3.number()
1254
+ fixable: z7.object({
1255
+ aggregate: z7.object({
1256
+ count: z7.number()
994
1257
  })
995
1258
  }),
996
- errors: z3.object({
997
- aggregate: z3.object({
998
- count: z3.number()
1259
+ errors: z7.object({
1260
+ aggregate: z7.object({
1261
+ count: z7.number()
999
1262
  })
1000
1263
  }),
1001
- vulnerabilityReportIssues: z3.object({
1002
- id: z3.string().uuid(),
1003
- extraData: z3.object({
1004
- missing_files: z3.string().array().nullish(),
1005
- large_files: z3.string().array().nullish(),
1006
- error_files: z3.string().array().nullish()
1264
+ vulnerabilityReportIssues: z7.object({
1265
+ id: z7.string().uuid(),
1266
+ extraData: z7.object({
1267
+ missing_files: z7.string().array().nullish(),
1268
+ large_files: z7.string().array().nullish(),
1269
+ error_files: z7.string().array().nullish()
1007
1270
  })
1008
1271
  }).array()
1009
1272
  })
1010
1273
  })
1011
1274
  });
1012
- var ReportFixesQueryFixZ = z3.object({
1013
- id: z3.string().uuid(),
1275
+ var ReportFixesQueryFixZ = z7.object({
1276
+ id: z7.string().uuid(),
1014
1277
  sharedState: FixSharedStateZ,
1015
- confidence: z3.number(),
1016
- gitBlameLogin: z3.string().nullable(),
1017
- effortToApplyFix: z3.nativeEnum(Effort_To_Apply_Fix_Enum).nullable(),
1018
- safeIssueLanguage: z3.string(),
1019
- safeIssueType: z3.string(),
1020
- fixReportId: z3.string().uuid(),
1021
- filePaths: z3.array(
1022
- z3.object({
1023
- fileRepoRelativePath: z3.string()
1278
+ confidence: z7.number(),
1279
+ gitBlameLogin: z7.string().nullable(),
1280
+ effortToApplyFix: z7.nativeEnum(Effort_To_Apply_Fix_Enum).nullable(),
1281
+ safeIssueLanguage: z7.string(),
1282
+ safeIssueType: z7.string(),
1283
+ fixReportId: z7.string().uuid(),
1284
+ filePaths: z7.array(
1285
+ z7.object({
1286
+ fileRepoRelativePath: z7.string()
1024
1287
  })
1025
1288
  ),
1026
- numberOfVulnerabilityIssues: z3.number(),
1027
- severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
1028
- vulnerabilityReportIssues: z3.array(
1029
- z3.object({
1030
- issueType: z3.string(),
1031
- issueLanguage: z3.string()
1289
+ numberOfVulnerabilityIssues: z7.number(),
1290
+ severityText: z7.nativeEnum(Vulnerability_Severity_Enum),
1291
+ vulnerabilityReportIssues: z7.array(
1292
+ z7.object({
1293
+ issueType: z7.string(),
1294
+ issueLanguage: z7.string()
1032
1295
  })
1033
1296
  ).min(1)
1034
1297
  });
1035
- var ExtraContextInternalZ = z3.object({
1036
- key: z3.string(),
1037
- value: z3.string().or(z3.boolean()).or(
1038
- z3.object({
1039
- int: z3.boolean(),
1040
- integer: z3.boolean(),
1041
- string: z3.boolean(),
1042
- date: z3.boolean()
1298
+ var VulnerabilityReportIssueZ = z7.object({
1299
+ id: z7.string().uuid(),
1300
+ createdAt: z7.string(),
1301
+ state: z7.nativeEnum(Vulnerability_Report_Issue_State_Enum),
1302
+ safeIssueType: z7.string(),
1303
+ safeIssueLanguage: z7.string(),
1304
+ extraData: z7.object({
1305
+ missing_files: z7.string().array().nullish(),
1306
+ large_files: z7.string().array().nullish(),
1307
+ error_files: z7.string().array().nullish()
1308
+ }),
1309
+ fix: ReportFixesQueryFixZ.nullable(),
1310
+ falsePositive: z7.object({
1311
+ id: z7.string().uuid()
1312
+ }).nullable(),
1313
+ parsedSeverity: ParsedSeverityZ,
1314
+ severity: z7.string(),
1315
+ severityValue: z7.number(),
1316
+ codeNodes: z7.array(z7.object({ path: z7.string() })),
1317
+ vulnerabilityReportIssueTags: z7.array(
1318
+ z7.object({
1319
+ vulnerability_report_issue_tag_value: z7.string()
1043
1320
  })
1044
1321
  )
1045
1322
  });
1046
- var PackageInfoZ = z3.object({
1047
- name: z3.string(),
1048
- version: z3.string(),
1049
- envName: z3.string().nullable()
1050
- });
1051
- var ManifestActionRequiredZ = z3.object({
1052
- action: z3.nativeEnum(ManifestAction),
1053
- language: z3.nativeEnum(Language),
1054
- lib: PackageInfoZ,
1055
- typesLib: PackageInfoZ.nullable()
1056
- });
1057
- var FixExtraContextZ = z3.object({
1058
- fixDescription: z3.string(),
1059
- manifestActionsRequired: z3.array(ManifestActionRequiredZ),
1060
- extraContext: z3.array(ExtraContextInternalZ)
1061
- });
1062
- var PatchAndQuestionsZ = z3.object({
1063
- __typename: z3.literal("FixData"),
1064
- patch: z3.string(),
1065
- patchOriginalEncodingBase64: z3.string(),
1066
- questions: z3.array(
1067
- z3.object({
1068
- name: z3.string(),
1069
- key: z3.string(),
1070
- index: z3.number(),
1071
- defaultValue: z3.string(),
1072
- value: z3.string().nullable(),
1073
- extraContext: z3.array(ExtraContextInternalZ),
1074
- inputType: z3.nativeEnum(FixQuestionInputType),
1075
- options: z3.array(z3.string())
1076
- })
1077
- ),
1078
- extraContext: FixExtraContextZ
1079
- });
1080
- var FixQueryZ = z3.object({
1081
- __typename: z3.literal("fix").optional(),
1082
- id: z3.string().uuid(),
1083
- sharedState: FixSharedStateZ,
1084
- modifiedBy: z3.string().nullable(),
1085
- gitBlameLogin: z3.string().nullable(),
1086
- safeIssueLanguage: z3.string(),
1087
- safeIssueType: z3.string(),
1088
- confidence: z3.number(),
1089
- fixReportId: z3.string().uuid(),
1090
- isExpired: z3.boolean().default(false),
1091
- fixFiles: z3.array(
1092
- z3.object({
1093
- fileRepoRelativePath: z3.string()
1094
- })
1095
- ),
1096
- numberOfVulnerabilityIssues: z3.number(),
1097
- severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
1098
- vulnerabilityReportIssues: z3.array(
1099
- z3.object({
1100
- vendorIssueId: z3.string(),
1101
- issueLanguage: z3.string()
1102
- })
1103
- ),
1104
- patchAndQuestions: PatchAndQuestionsZ,
1105
- effortToApplyFix: z3.nativeEnum(Effort_To_Apply_Fix_Enum).nullable()
1106
- });
1107
- var GetReportIssuesQueryZ = z3.object({
1108
- fixReport: z3.object({
1109
- vulnerabilityReport: z3.object({
1110
- id: z3.string().uuid(),
1111
- lastIssueUpdatedAt: z3.string(),
1112
- vulnerabilityReportIssues_aggregate: z3.object({
1113
- aggregate: z3.object({ count: z3.number() })
1323
+ var GetReportIssuesQueryZ = z7.object({
1324
+ fixReport: z7.object({
1325
+ vulnerabilityReport: z7.object({
1326
+ id: z7.string().uuid(),
1327
+ lastIssueUpdatedAt: z7.string(),
1328
+ vulnerabilityReportIssues_aggregate: z7.object({
1329
+ aggregate: z7.object({ count: z7.number() })
1114
1330
  }),
1115
- vulnerabilityReportIssues: z3.array(
1116
- z3.object({
1117
- id: z3.string().uuid(),
1118
- createdAt: z3.string(),
1119
- issueType: z3.string(),
1120
- issueLanguage: z3.string(),
1121
- state: z3.nativeEnum(Vulnerability_Report_Issue_State_Enum),
1122
- extraData: z3.object({
1123
- missing_files: z3.string().array().nullish(),
1124
- large_files: z3.string().array().nullish(),
1125
- error_files: z3.string().array().nullish()
1126
- }),
1127
- fix: ReportFixesQueryFixZ.nullable(),
1128
- falsePositive: z3.object({
1129
- id: z3.string().uuid()
1130
- }).nullable(),
1131
- parsedIssueType: z3.nativeEnum(IssueType_Enum),
1132
- parsedIssueLanguage: z3.nativeEnum(IssueLanguage_Enum),
1133
- parsedSeverity: z3.nativeEnum(Vulnerability_Severity_Enum),
1134
- severity: z3.string(),
1135
- severityValue: z3.number(),
1136
- vulnerabilityReportIssueTags: z3.array(
1137
- z3.object({
1138
- vulnerability_report_issue_tag_value: z3.string()
1139
- })
1140
- )
1141
- })
1142
- )
1331
+ vulnerabilityReportIssues: z7.array(VulnerabilityReportIssueZ)
1143
1332
  })
1144
1333
  }).array()
1145
1334
  }).nullish();
1146
- var FixPageFixReportZ = z3.object({
1147
- id: z3.string().uuid(),
1148
- analysisUrl: z3.string(),
1149
- expirationOn: z3.string(),
1150
- createdOn: z3.string(),
1151
- state: z3.nativeEnum(Fix_Report_State_Enum),
1152
- fixes_aggregate: z3.object({
1153
- aggregate: z3.object({
1154
- count: z3.number()
1155
- })
1156
- }),
1157
- repo: z3.object({
1158
- name: z3.string().nullable(),
1159
- originalUrl: z3.string(),
1160
- reference: z3.string(),
1161
- commitSha: z3.string()
1162
- }),
1163
- vulnerabilityReport: z3.object({
1164
- vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum),
1165
- vendorReportId: z3.string().uuid().nullable(),
1166
- projectId: z3.string().uuid(),
1167
- project: z3.object({
1168
- organizationId: z3.string().uuid()
1169
- }),
1170
- file: z3.object({
1171
- id: z3.string().uuid(),
1172
- path: z3.string()
1173
- }),
1174
- pending: z3.object({
1175
- aggregate: z3.object({
1176
- count: z3.number()
1177
- })
1178
- }),
1179
- supported: z3.object({
1180
- aggregate: z3.object({
1181
- count: z3.number()
1182
- })
1183
- }),
1184
- all: z3.object({
1185
- aggregate: z3.object({
1186
- count: z3.number()
1187
- })
1188
- }),
1189
- fixable: z3.object({
1190
- aggregate: z3.object({
1191
- count: z3.number()
1192
- })
1193
- }),
1194
- errors: z3.object({
1195
- aggregate: z3.object({
1196
- count: z3.number()
1197
- })
1198
- }),
1199
- vulnerabilityReportIssues: z3.object({
1200
- extraData: z3.object({
1201
- missing_files: z3.string().array().nullish(),
1202
- large_files: z3.string().array().nullish(),
1203
- error_files: z3.string().array().nullish()
1335
+ var FixReportByProjectZ = z7.object({
1336
+ project_by_pk: z7.object({
1337
+ vulnerabilityReports: z7.array(
1338
+ z7.object({
1339
+ fixReport: z7.object({ id: z7.string().uuid() }).nullable()
1204
1340
  })
1205
- }).array()
1341
+ )
1206
1342
  })
1207
1343
  });
1208
- var FixScreenQueryResultZ = z3.object({
1344
+ var FixScreenQueryResultZ = z7.object({
1209
1345
  fixReport_by_pk: FixPageFixReportZ,
1210
- fix_by_pk: FixQueryZ.merge(
1211
- z3.object({
1212
- severityText: z3.nativeEnum(Vulnerability_Severity_Enum),
1213
- vulnerabilityReportIssues: z3.array(
1214
- z3.object({
1215
- vendorIssueId: z3.string(),
1216
- issueType: z3.string(),
1217
- issueLanguage: z3.string()
1218
- })
1219
- )
1346
+ fix_by_pk: FixPartsForFixScreenZ,
1347
+ fixesWithSameIssueType: z7.array(
1348
+ z7.object({
1349
+ id: z7.string().uuid(),
1350
+ sharedState: z7.object({ state: z7.nativeEnum(Fix_State_Enum) }).nullable().default({ state: "Ready" /* Ready */ })
1220
1351
  })
1221
1352
  ),
1222
- fixesWithSameIssueType: z3.array(
1223
- z3.object({
1224
- id: z3.string().uuid(),
1225
- sharedState: z3.object({ state: z3.nativeEnum(Fix_State_Enum) }).nullable().default({ state: "Ready" /* Ready */ })
1226
- })
1227
- )
1228
- });
1229
- var FixReportByProjectZ = z3.object({
1230
- project_by_pk: z3.object({
1231
- vulnerabilityReports: z3.array(
1232
- z3.object({
1233
- fixReport: z3.object({ id: z3.string().uuid() }).nullable()
1234
- })
1235
- )
1236
- })
1353
+ relevantIssue: IssuePartsZ.nullish()
1237
1354
  });
1238
- var FixPageQueryZ = z3.object({
1355
+ var FixPageQueryZ = z7.object({
1239
1356
  data: FixScreenQueryResultZ
1240
1357
  });
1241
- var GetReportFixesQueryZ = z3.object({
1242
- fixReport: z3.array(
1243
- z3.object({
1244
- fixes: z3.array(ReportFixesQueryFixZ),
1245
- fixes_aggregate: z3.object({
1246
- aggregate: z3.object({ count: z3.number() })
1358
+ var GetReportFixesQueryZ = z7.object({
1359
+ fixReport: z7.array(
1360
+ z7.object({
1361
+ fixes: z7.array(ReportFixesQueryFixZ),
1362
+ fixes_aggregate: z7.object({
1363
+ aggregate: z7.object({ count: z7.number() })
1247
1364
  }),
1248
- vulnerabilityReportIssuesTotalCount: z3.object({
1249
- vulnerabilityReportIssues_aggregate: z3.object({
1250
- aggregate: z3.object({ count: z3.number() })
1365
+ vulnerabilityReportIssuesTotalCount: z7.object({
1366
+ vulnerabilityReportIssues_aggregate: z7.object({
1367
+ aggregate: z7.object({ count: z7.number() })
1251
1368
  })
1252
1369
  }),
1253
- vulnerabilityReportIssuesFixedCount: z3.object({
1254
- vulnerabilityReportIssues_aggregate: z3.object({
1255
- aggregate: z3.object({ count: z3.number() })
1370
+ vulnerabilityReportIssuesFixedCount: z7.object({
1371
+ vulnerabilityReportIssues_aggregate: z7.object({
1372
+ aggregate: z7.object({ count: z7.number() })
1256
1373
  })
1257
1374
  }),
1258
- vulnerabilityReportIssuesIrrelevantCount: z3.object({
1259
- vulnerabilityReportIssues_aggregate: z3.object({
1260
- aggregate: z3.object({ count: z3.number() })
1375
+ vulnerabilityReportIssuesIrrelevantCount: z7.object({
1376
+ vulnerabilityReportIssues_aggregate: z7.object({
1377
+ aggregate: z7.object({ count: z7.number() })
1261
1378
  })
1262
1379
  }),
1263
- vulnerabilityReportIssuesRemainingCount: z3.object({
1264
- vulnerabilityReportIssues_aggregate: z3.object({
1265
- aggregate: z3.object({ count: z3.number() })
1380
+ vulnerabilityReportIssuesRemainingCount: z7.object({
1381
+ vulnerabilityReportIssues_aggregate: z7.object({
1382
+ aggregate: z7.object({ count: z7.number() })
1266
1383
  })
1267
1384
  })
1268
1385
  })
1269
1386
  )
1270
1387
  }).nullish();
1271
- var ProjectVulnerabilityReport = z3.object({
1272
- id: z3.string().uuid(),
1273
- name: z3.string().nullable(),
1274
- vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
1275
- fixReport: z3.object({
1276
- id: z3.string().uuid(),
1277
- createdOn: z3.string(),
1278
- fixes_aggregate: z3.object({
1279
- aggregate: z3.object({
1280
- count: z3.number()
1388
+ var ProjectVulnerabilityReport = z7.object({
1389
+ id: z7.string().uuid(),
1390
+ name: z7.string().nullable(),
1391
+ vendor: z7.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
1392
+ fixReport: z7.object({
1393
+ id: z7.string().uuid(),
1394
+ createdOn: z7.string(),
1395
+ fixes_aggregate: z7.object({
1396
+ aggregate: z7.object({
1397
+ count: z7.number()
1281
1398
  })
1282
1399
  }),
1283
- issueTypes: z3.record(z3.string(), z3.number()).nullable(),
1284
- issueLanguages: z3.record(z3.nativeEnum(IssueLanguage_Enum), z3.number()).nullable(),
1285
- fixesCountByEffort: z3.record(z3.nativeEnum(Effort_To_Apply_Fix_Enum), z3.number()).nullable(),
1286
- vulnerabilitySeverities: z3.record(z3.nativeEnum(Vulnerability_Severity_Enum), z3.number()).nullable(),
1287
- fixesDoneCount: z3.number(),
1288
- fixesInprogressCount: z3.number(),
1289
- fixesReadyCount: z3.number(),
1290
- repo: z3.object({
1291
- originalUrl: z3.string(),
1292
- reference: z3.string(),
1293
- name: z3.string()
1400
+ issueTypes: z7.record(z7.string(), z7.number()).nullable(),
1401
+ issueLanguages: z7.record(z7.nativeEnum(IssueLanguage_Enum), z7.number()).nullable(),
1402
+ fixesCountByEffort: z7.record(z7.nativeEnum(Effort_To_Apply_Fix_Enum), z7.number()).nullable(),
1403
+ vulnerabilitySeverities: z7.record(z7.nativeEnum(Vulnerability_Severity_Enum), z7.number()).nullable(),
1404
+ fixesDoneCount: z7.number(),
1405
+ fixesInprogressCount: z7.number(),
1406
+ fixesReadyCount: z7.number(),
1407
+ repo: z7.object({
1408
+ originalUrl: z7.string(),
1409
+ reference: z7.string(),
1410
+ name: z7.string()
1294
1411
  }),
1295
- createdByUser: z3.object({
1296
- email: z3.string()
1412
+ createdByUser: z7.object({
1413
+ email: z7.string()
1297
1414
  }).nullable(),
1298
- state: z3.nativeEnum(Fix_Report_State_Enum),
1299
- expirationOn: z3.string()
1415
+ state: z7.nativeEnum(Fix_Report_State_Enum),
1416
+ expirationOn: z7.string()
1300
1417
  })
1301
1418
  });
1302
- var ProjectGetProjectZ = z3.object({
1303
- id: z3.string().uuid(),
1304
- name: z3.string(),
1305
- vulnerabilityReports: z3.object({
1306
- vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
1307
- fixReport: z3.object({
1308
- issueLanguages: z3.record(z3.nativeEnum(IssueLanguage_Enum), z3.number()).nullable(),
1309
- state: z3.nativeEnum(Fix_Report_State_Enum),
1310
- fixes_aggregate: z3.object({
1311
- aggregate: z3.object({
1312
- count: z3.number()
1419
+ var ProjectGetProjectZ = z7.object({
1420
+ id: z7.string().uuid(),
1421
+ name: z7.string(),
1422
+ vulnerabilityReports: z7.object({
1423
+ vendor: z7.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
1424
+ fixReport: z7.object({
1425
+ issueLanguages: z7.record(z7.nativeEnum(IssueLanguage_Enum), z7.number()).nullable(),
1426
+ state: z7.nativeEnum(Fix_Report_State_Enum),
1427
+ fixes_aggregate: z7.object({
1428
+ aggregate: z7.object({
1429
+ count: z7.number()
1313
1430
  })
1314
1431
  }),
1315
- repo: z3.object({
1316
- originalUrl: z3.string(),
1317
- reference: z3.string()
1432
+ repo: z7.object({
1433
+ originalUrl: z7.string(),
1434
+ reference: z7.string()
1318
1435
  }),
1319
- expirationOn: z3.string()
1436
+ expirationOn: z7.string()
1320
1437
  })
1321
1438
  }).array()
1322
1439
  });
1323
- var GetProjectsQueryZ = z3.array(ProjectGetProjectZ);
1324
- var ProjectPageQueryResultZ = z3.object({
1325
- name: z3.string(),
1326
- id: z3.string().uuid(),
1327
- isDefault: z3.boolean().default(false),
1328
- organizationId: z3.string().uuid(),
1329
- vulnerabilityReports: z3.array(ProjectVulnerabilityReport),
1330
- projectIssueTypeSettings: z3.array(
1331
- IssueTypeSettingZ.merge(z3.object({ id: z3.string() }))
1440
+ var GetProjectsQueryZ = z7.array(ProjectGetProjectZ);
1441
+ var ProjectPageQueryResultZ = z7.object({
1442
+ name: z7.string(),
1443
+ id: z7.string().uuid(),
1444
+ isDefault: z7.boolean().default(false),
1445
+ organizationId: z7.string().uuid(),
1446
+ vulnerabilityReports: z7.array(ProjectVulnerabilityReport),
1447
+ projectIssueTypeSettings: z7.array(
1448
+ IssueTypeSettingZ.merge(z7.object({ id: z7.string() }))
1332
1449
  )
1333
1450
  });
1334
- var GetProjectMembersDataZ = z3.object({
1335
- project_by_pk: z3.object({
1336
- name: z3.string(),
1337
- id: z3.string(),
1338
- projectUsers: z3.array(
1339
- z3.object({
1340
- projectToRole: z3.object({
1341
- projectRole: z3.object({
1342
- type: z3.nativeEnum(Project_Role_Type_Enum)
1451
+ var GetProjectMembersDataZ = z7.object({
1452
+ project_by_pk: z7.object({
1453
+ name: z7.string(),
1454
+ id: z7.string(),
1455
+ projectUsers: z7.array(
1456
+ z7.object({
1457
+ projectToRole: z7.object({
1458
+ projectRole: z7.object({
1459
+ type: z7.nativeEnum(Project_Role_Type_Enum)
1343
1460
  })
1344
1461
  }),
1345
- user: z3.object({
1346
- id: z3.string().uuid(),
1347
- picture: z3.string().optional(),
1348
- name: z3.string().nullish(),
1349
- email: z3.string().email()
1462
+ user: z7.object({
1463
+ id: z7.string().uuid(),
1464
+ picture: z7.string().optional(),
1465
+ name: z7.string().nullish(),
1466
+ email: z7.string().email()
1350
1467
  })
1351
1468
  })
1352
1469
  )
1353
1470
  })
1354
1471
  });
1355
- var RepoArgsZ = z3.object({
1356
- originalUrl: z3.string().url(),
1357
- branch: z3.string(),
1358
- commitSha: z3.string()
1472
+ var RepoArgsZ = z7.object({
1473
+ originalUrl: z7.string().url(),
1474
+ branch: z7.string(),
1475
+ commitSha: z7.string()
1359
1476
  });
1360
1477
  var scmCloudUrl = {
1361
1478
  GitLab: "https://gitlab.com",
@@ -1397,12 +1514,12 @@ var scannerToVulnerability_Report_Vendor_Enum = {
1397
1514
  [SCANNERS.Fortify]: "fortify" /* Fortify */,
1398
1515
  [SCANNERS.Semgrep]: "semgrep" /* Semgrep */
1399
1516
  };
1400
- var SupportedScannersZ = z4.enum([SCANNERS.Checkmarx, SCANNERS.Snyk]);
1401
- var envVariablesSchema = z4.object({
1402
- WEB_APP_URL: z4.string(),
1403
- API_URL: z4.string(),
1404
- HASURA_ACCESS_KEY: z4.string(),
1405
- LOCAL_GRAPHQL_ENDPOINT: z4.string()
1517
+ var SupportedScannersZ = z8.enum([SCANNERS.Checkmarx, SCANNERS.Snyk]);
1518
+ var envVariablesSchema = z8.object({
1519
+ WEB_APP_URL: z8.string(),
1520
+ API_URL: z8.string(),
1521
+ HASURA_ACCESS_KEY: z8.string(),
1522
+ LOCAL_GRAPHQL_ENDPOINT: z8.string()
1406
1523
  }).required();
1407
1524
  var envVariables = envVariablesSchema.parse(process.env);
1408
1525
  debug("config %o", envVariables);
@@ -1554,7 +1671,7 @@ import { createSpinner as createSpinner4 } from "nanospinner";
1554
1671
  import fetch4 from "node-fetch";
1555
1672
  import open2 from "open";
1556
1673
  import tmp2 from "tmp";
1557
- import { z as z26 } from "zod";
1674
+ import { z as z30 } from "zod";
1558
1675
 
1559
1676
  // src/features/analysis/add_fix_comments_for_pr/add_fix_comments_for_pr.ts
1560
1677
  import Debug8 from "debug";
@@ -1595,10 +1712,10 @@ var RepoNoTokenAccessError = class extends Error {
1595
1712
  };
1596
1713
 
1597
1714
  // src/features/analysis/scm/types.ts
1598
- import { z as z10 } from "zod";
1715
+ import { z as z14 } from "zod";
1599
1716
 
1600
1717
  // src/features/analysis/scm/shared/src/commitDescriptionMarkup.ts
1601
- import { z as z5 } from "zod";
1718
+ import { z as z9 } from "zod";
1602
1719
 
1603
1720
  // src/features/analysis/scm/shared/src/fixDetailsData.ts
1604
1721
  var fixDetailsData = {
@@ -1862,7 +1979,7 @@ var getCommitDescription = ({
1862
1979
  )}**.
1863
1980
 
1864
1981
  `;
1865
- const parseIssueTypeRes = z5.nativeEnum(IssueType_Enum).safeParse(issueType);
1982
+ const parseIssueTypeRes = z9.nativeEnum(IssueType_Enum).safeParse(issueType);
1866
1983
  if (issueType && parseIssueTypeRes.success) {
1867
1984
  const staticData = fixDetailsData[parseIssueTypeRes.data];
1868
1985
  if (staticData) {
@@ -1887,10 +2004,10 @@ ${guidances.map(({ guidance }) => `## Additional actions required
1887
2004
  };
1888
2005
 
1889
2006
  // src/features/analysis/scm/shared/src/guidances.ts
1890
- import { z as z8 } from "zod";
2007
+ import { z as z12 } from "zod";
1891
2008
 
1892
2009
  // src/features/analysis/scm/shared/src/storedFixData/index.ts
1893
- import { z as z6 } from "zod";
2010
+ import { z as z10 } from "zod";
1894
2011
 
1895
2012
  // src/features/analysis/scm/shared/src/storedFixData/passwordInComment.ts
1896
2013
  var passwordInComment = {
@@ -2066,8 +2183,8 @@ var vulnerabilities8 = {
2066
2183
  var xml_default = vulnerabilities8;
2067
2184
 
2068
2185
  // src/features/analysis/scm/shared/src/storedFixData/index.ts
2069
- var StoredFixDataItemZ = z6.object({
2070
- guidance: z6.function().returns(z6.string())
2186
+ var StoredFixDataItemZ = z10.object({
2187
+ guidance: z10.function().returns(z10.string())
2071
2188
  });
2072
2189
  var languages = {
2073
2190
  ["Java" /* Java */]: java_default,
@@ -2081,7 +2198,7 @@ var languages = {
2081
2198
  };
2082
2199
 
2083
2200
  // src/features/analysis/scm/shared/src/storedQuestionData/index.ts
2084
- import { z as z7 } from "zod";
2201
+ import { z as z11 } from "zod";
2085
2202
 
2086
2203
  // src/features/analysis/scm/shared/src/storedQuestionData/csharp/httpOnlyCookie.ts
2087
2204
  var httpOnlyCookie = {
@@ -3250,10 +3367,10 @@ var vulnerabilities14 = {
3250
3367
  var xml_default2 = vulnerabilities14;
3251
3368
 
3252
3369
  // src/features/analysis/scm/shared/src/storedQuestionData/index.ts
3253
- var StoredQuestionDataItemZ = z7.object({
3254
- content: z7.function().args(z7.any()).returns(z7.string()),
3255
- description: z7.function().args(z7.any()).returns(z7.string()),
3256
- guidance: z7.function().args(z7.any()).returns(z7.string())
3370
+ var StoredQuestionDataItemZ = z11.object({
3371
+ content: z11.function().args(z11.any()).returns(z11.string()),
3372
+ description: z11.function().args(z11.any()).returns(z11.string()),
3373
+ guidance: z11.function().args(z11.any()).returns(z11.string())
3257
3374
  });
3258
3375
  var languages2 = {
3259
3376
  ["Java" /* Java */]: java_default2,
@@ -3348,9 +3465,9 @@ function getFixGuidances({
3348
3465
  const fixGuidance = storeFixResult.success ? [storeFixResult.data.guidance({ questions, ...extraContext })] : [];
3349
3466
  return libGuidances.concat(fixGuidance).filter((guidance) => !!guidance);
3350
3467
  }
3351
- var IssueTypeAndLanguageZ = z8.object({
3352
- issueType: z8.nativeEnum(IssueType_Enum),
3353
- issueLanguage: z8.nativeEnum(IssueLanguage_Enum)
3468
+ var IssueTypeAndLanguageZ = z12.object({
3469
+ issueType: z12.nativeEnum(IssueType_Enum),
3470
+ issueLanguage: z12.nativeEnum(IssueLanguage_Enum)
3354
3471
  });
3355
3472
  function getGuidances(args) {
3356
3473
  const safeIssueTypeAndLanguage = IssueTypeAndLanguageZ.safeParse({
@@ -3388,7 +3505,7 @@ function getGuidances(args) {
3388
3505
  }
3389
3506
 
3390
3507
  // src/features/analysis/scm/shared/src/urlParser/urlParser.ts
3391
- import { z as z9 } from "zod";
3508
+ import { z as z13 } from "zod";
3392
3509
  var ADO_PREFIX_PATH = "tfs";
3393
3510
  var NAME_REGEX = /[a-z0-9\-_.+]+/i;
3394
3511
  function detectAdoUrl(args) {
@@ -3405,7 +3522,7 @@ function detectAdoUrl(args) {
3405
3522
  scmType: "Ado" /* Ado */,
3406
3523
  organization,
3407
3524
  // project has single repo - repoName === projectName
3408
- projectName: z9.string().parse(projectName),
3525
+ projectName: z13.string().parse(projectName),
3409
3526
  repoName: projectName,
3410
3527
  prefixPath
3411
3528
  };
@@ -3416,7 +3533,7 @@ function detectAdoUrl(args) {
3416
3533
  return {
3417
3534
  scmType: "Ado" /* Ado */,
3418
3535
  organization,
3419
- projectName: z9.string().parse(projectName),
3536
+ projectName: z13.string().parse(projectName),
3420
3537
  repoName,
3421
3538
  prefixPath
3422
3539
  };
@@ -3430,7 +3547,7 @@ function detectAdoUrl(args) {
3430
3547
  scmType: "Ado" /* Ado */,
3431
3548
  organization,
3432
3549
  // project has only one repo - repoName === projectName
3433
- projectName: z9.string().parse(repoName),
3550
+ projectName: z13.string().parse(repoName),
3434
3551
  repoName,
3435
3552
  prefixPath
3436
3553
  };
@@ -3440,7 +3557,7 @@ function detectAdoUrl(args) {
3440
3557
  return {
3441
3558
  scmType: "Ado" /* Ado */,
3442
3559
  organization,
3443
- projectName: z9.string().parse(projectName),
3560
+ projectName: z13.string().parse(projectName),
3444
3561
  repoName,
3445
3562
  prefixPath
3446
3563
  };
@@ -3591,10 +3708,10 @@ var scmTypeToScmLibScmType = {
3591
3708
  ["Ado" /* Ado */]: "ADO" /* ADO */,
3592
3709
  ["Bitbucket" /* Bitbucket */]: "BITBUCKET" /* BITBUCKET */
3593
3710
  };
3594
- var GetRefererenceResultZ = z10.object({
3595
- date: z10.date().optional(),
3596
- sha: z10.string(),
3597
- type: z10.nativeEnum(ReferenceType)
3711
+ var GetRefererenceResultZ = z14.object({
3712
+ date: z14.date().optional(),
3713
+ sha: z14.string(),
3714
+ type: z14.nativeEnum(ReferenceType)
3598
3715
  });
3599
3716
 
3600
3717
  // src/features/analysis/scm/github/consts.ts
@@ -3670,19 +3787,19 @@ var DEFUALT_ADO_ORIGIN = scmCloudUrl.Ado;
3670
3787
  import querystring from "node:querystring";
3671
3788
  import * as api from "azure-devops-node-api";
3672
3789
  import Debug2 from "debug";
3673
- import { z as z14 } from "zod";
3790
+ import { z as z18 } from "zod";
3674
3791
 
3675
3792
  // src/features/analysis/scm/env.ts
3676
- import { z as z11 } from "zod";
3677
- var EnvVariablesZod = z11.object({
3678
- GITLAB_API_TOKEN: z11.string().optional(),
3679
- GITHUB_API_TOKEN: z11.string().optional(),
3680
- GIT_PROXY_HOST: z11.string()
3793
+ import { z as z15 } from "zod";
3794
+ var EnvVariablesZod = z15.object({
3795
+ GITLAB_API_TOKEN: z15.string().optional(),
3796
+ GITHUB_API_TOKEN: z15.string().optional(),
3797
+ GIT_PROXY_HOST: z15.string()
3681
3798
  });
3682
3799
  var { GITLAB_API_TOKEN, GITHUB_API_TOKEN, GIT_PROXY_HOST } = EnvVariablesZod.parse(process.env);
3683
3800
 
3684
3801
  // src/features/analysis/scm/utils/index.ts
3685
- import { z as z12 } from "zod";
3802
+ import { z as z16 } from "zod";
3686
3803
  function getFixUrlWithRedirect(params) {
3687
3804
  const {
3688
3805
  fixId,
@@ -3751,7 +3868,7 @@ function shouldValidateUrl(repoUrl) {
3751
3868
  return repoUrl && isUrlHasPath(repoUrl);
3752
3869
  }
3753
3870
  function isBrokerUrl(url) {
3754
- return z12.string().uuid().safeParse(new URL(url).host).success;
3871
+ return z16.string().uuid().safeParse(new URL(url).host).success;
3755
3872
  }
3756
3873
  function buildAuthorizedRepoUrl(args) {
3757
3874
  const { url, username, password } = args;
@@ -3787,7 +3904,7 @@ function getCloudScmLibTypeFromUrl(url) {
3787
3904
  return void 0;
3788
3905
  }
3789
3906
  function getScmLibTypeFromScmType(scmType) {
3790
- const parsedScmType = z12.nativeEnum(ScmType).parse(scmType);
3907
+ const parsedScmType = z16.nativeEnum(ScmType).parse(scmType);
3791
3908
  return scmTypeToScmLibScmType[parsedScmType];
3792
3909
  }
3793
3910
  function getScmConfig({
@@ -3854,36 +3971,36 @@ function getScmConfig({
3854
3971
  }
3855
3972
 
3856
3973
  // src/features/analysis/scm/ado/validation.ts
3857
- import { z as z13 } from "zod";
3858
- var ValidPullRequestStatusZ = z13.union([
3859
- z13.literal(1 /* Active */),
3860
- z13.literal(2 /* Abandoned */),
3861
- z13.literal(3 /* Completed */)
3974
+ import { z as z17 } from "zod";
3975
+ var ValidPullRequestStatusZ = z17.union([
3976
+ z17.literal(1 /* Active */),
3977
+ z17.literal(2 /* Abandoned */),
3978
+ z17.literal(3 /* Completed */)
3862
3979
  ]);
3863
- var AdoAuthResultZ = z13.object({
3864
- access_token: z13.string().min(1),
3865
- token_type: z13.string().min(1),
3866
- refresh_token: z13.string().min(1)
3980
+ var AdoAuthResultZ = z17.object({
3981
+ access_token: z17.string().min(1),
3982
+ token_type: z17.string().min(1),
3983
+ refresh_token: z17.string().min(1)
3867
3984
  });
3868
3985
  var AdoAuthResultWithOrgsZ = AdoAuthResultZ.extend({
3869
- scmOrgs: z13.array(z13.string())
3986
+ scmOrgs: z17.array(z17.string())
3870
3987
  });
3871
- var profileZ = z13.object({
3872
- displayName: z13.string(),
3873
- publicAlias: z13.string().min(1),
3874
- emailAddress: z13.string(),
3875
- coreRevision: z13.number(),
3876
- timeStamp: z13.string(),
3877
- id: z13.string(),
3878
- revision: z13.number()
3988
+ var profileZ = z17.object({
3989
+ displayName: z17.string(),
3990
+ publicAlias: z17.string().min(1),
3991
+ emailAddress: z17.string(),
3992
+ coreRevision: z17.number(),
3993
+ timeStamp: z17.string(),
3994
+ id: z17.string(),
3995
+ revision: z17.number()
3879
3996
  });
3880
- var accountsZ = z13.object({
3881
- count: z13.number(),
3882
- value: z13.array(
3883
- z13.object({
3884
- accountId: z13.string(),
3885
- accountUri: z13.string(),
3886
- accountName: z13.string()
3997
+ var accountsZ = z17.object({
3998
+ count: z17.number(),
3999
+ value: z17.array(
4000
+ z17.object({
4001
+ accountId: z17.string(),
4002
+ accountUri: z17.string(),
4003
+ accountName: z17.string()
3887
4004
  })
3888
4005
  )
3889
4006
  });
@@ -3968,7 +4085,7 @@ async function getAdoConnectData({
3968
4085
  oauthToken: adoTokenInfo.accessToken
3969
4086
  });
3970
4087
  return {
3971
- org: z14.string().parse(org),
4088
+ org: z18.string().parse(org),
3972
4089
  origin: DEFUALT_ADO_ORIGIN
3973
4090
  };
3974
4091
  }
@@ -4054,7 +4171,7 @@ async function getAdoClientParams(params) {
4054
4171
  return {
4055
4172
  tokenType: "PAT" /* PAT */,
4056
4173
  accessToken: adoTokenInfo.accessToken,
4057
- patTokenOrg: z14.string().parse(tokenOrg).toLowerCase(),
4174
+ patTokenOrg: z18.string().parse(tokenOrg).toLowerCase(),
4058
4175
  origin: origin2,
4059
4176
  orgName: org.toLowerCase()
4060
4177
  };
@@ -4450,100 +4567,100 @@ import parseDiff from "parse-diff";
4450
4567
  import path4 from "path";
4451
4568
  import { simpleGit } from "simple-git";
4452
4569
  import tmp from "tmp";
4453
- import { z as z16 } from "zod";
4570
+ import { z as z20 } from "zod";
4454
4571
 
4455
4572
  // src/features/analysis/scm/scmSubmit/types.ts
4456
- import { z as z15 } from "zod";
4457
- var BaseSubmitToScmMessageZ = z15.object({
4458
- submitFixRequestId: z15.string().uuid(),
4459
- fixes: z15.array(
4460
- z15.object({
4461
- fixId: z15.string().uuid(),
4462
- patchesOriginalEncodingBase64: z15.array(z15.string()),
4463
- patches: z15.array(z15.string())
4573
+ import { z as z19 } from "zod";
4574
+ var BaseSubmitToScmMessageZ = z19.object({
4575
+ submitFixRequestId: z19.string().uuid(),
4576
+ fixes: z19.array(
4577
+ z19.object({
4578
+ fixId: z19.string().uuid(),
4579
+ patchesOriginalEncodingBase64: z19.array(z19.string()),
4580
+ patches: z19.array(z19.string())
4464
4581
  })
4465
4582
  ),
4466
- commitHash: z15.string(),
4467
- repoUrl: z15.string(),
4468
- mobbUserEmail: z15.string(),
4469
- extraHeaders: z15.record(z15.string(), z15.string()).default({})
4583
+ commitHash: z19.string(),
4584
+ repoUrl: z19.string(),
4585
+ mobbUserEmail: z19.string(),
4586
+ extraHeaders: z19.record(z19.string(), z19.string()).default({})
4470
4587
  });
4471
4588
  var submitToScmMessageType = {
4472
4589
  commitToSameBranch: "commitToSameBranch",
4473
4590
  submitFixesForDifferentBranch: "submitFixesForDifferentBranch"
4474
4591
  };
4475
4592
  var CommitToSameBranchParamsZ = BaseSubmitToScmMessageZ.merge(
4476
- z15.object({
4477
- type: z15.literal(submitToScmMessageType.commitToSameBranch),
4478
- branch: z15.string(),
4479
- commitMessages: z15.array(z15.string()),
4480
- commitDescriptions: z15.array(z15.string().nullish()),
4481
- githubCommentId: z15.number().nullish()
4593
+ z19.object({
4594
+ type: z19.literal(submitToScmMessageType.commitToSameBranch),
4595
+ branch: z19.string(),
4596
+ commitMessages: z19.array(z19.string()),
4597
+ commitDescriptions: z19.array(z19.string().nullish()),
4598
+ githubCommentId: z19.number().nullish()
4482
4599
  })
4483
4600
  );
4484
- var SubmitFixesToDifferentBranchParamsZ = z15.object({
4485
- type: z15.literal(submitToScmMessageType.submitFixesForDifferentBranch),
4486
- submitBranch: z15.string(),
4487
- baseBranch: z15.string()
4601
+ var SubmitFixesToDifferentBranchParamsZ = z19.object({
4602
+ type: z19.literal(submitToScmMessageType.submitFixesForDifferentBranch),
4603
+ submitBranch: z19.string(),
4604
+ baseBranch: z19.string()
4488
4605
  }).merge(BaseSubmitToScmMessageZ);
4489
- var SubmitFixesMessageZ = z15.union([
4606
+ var SubmitFixesMessageZ = z19.union([
4490
4607
  CommitToSameBranchParamsZ,
4491
4608
  SubmitFixesToDifferentBranchParamsZ
4492
4609
  ]);
4493
- var FixResponseArrayZ = z15.array(
4494
- z15.object({
4495
- fixId: z15.string().uuid()
4610
+ var FixResponseArrayZ = z19.array(
4611
+ z19.object({
4612
+ fixId: z19.string().uuid()
4496
4613
  })
4497
4614
  );
4498
- var SubmitFixesBaseResponseMessageZ = z15.object({
4499
- mobbUserEmail: z15.string(),
4500
- submitFixRequestId: z15.string().uuid(),
4501
- submitBranches: z15.array(
4502
- z15.object({
4503
- branchName: z15.string(),
4615
+ var SubmitFixesBaseResponseMessageZ = z19.object({
4616
+ mobbUserEmail: z19.string(),
4617
+ submitFixRequestId: z19.string().uuid(),
4618
+ submitBranches: z19.array(
4619
+ z19.object({
4620
+ branchName: z19.string(),
4504
4621
  fixes: FixResponseArrayZ
4505
4622
  })
4506
4623
  ),
4507
- error: z15.object({
4508
- type: z15.enum([
4624
+ error: z19.object({
4625
+ type: z19.enum([
4509
4626
  "InitialRepoAccessError",
4510
4627
  "PushBranchError",
4511
4628
  "AllFixesConflictWithTargetBranchError",
4512
4629
  "InternalFixConflictError",
4513
4630
  "UnknownError"
4514
4631
  ]),
4515
- info: z15.object({
4516
- message: z15.string(),
4517
- pushBranchName: z15.string().optional()
4632
+ info: z19.object({
4633
+ message: z19.string(),
4634
+ pushBranchName: z19.string().optional()
4518
4635
  })
4519
4636
  }).optional()
4520
4637
  });
4521
- var authorSchemaZ = z15.object({
4522
- email: z15.string(),
4523
- name: z15.string()
4638
+ var authorSchemaZ = z19.object({
4639
+ email: z19.string(),
4640
+ name: z19.string()
4524
4641
  }).nullable();
4525
- var summarySchemaZ = z15.object({
4526
- changes: z15.number(),
4527
- insertions: z15.number(),
4528
- deletions: z15.number()
4642
+ var summarySchemaZ = z19.object({
4643
+ changes: z19.number(),
4644
+ insertions: z19.number(),
4645
+ deletions: z19.number()
4529
4646
  });
4530
- var GitCommitZ = z15.object({
4647
+ var GitCommitZ = z19.object({
4531
4648
  author: authorSchemaZ,
4532
- branch: z15.string(),
4533
- commit: z15.string(),
4534
- root: z15.boolean(),
4649
+ branch: z19.string(),
4650
+ commit: z19.string(),
4651
+ root: z19.boolean(),
4535
4652
  summary: summarySchemaZ
4536
4653
  });
4537
- var SubmitFixesToSameBranchResponseMessageZ = z15.object({
4538
- type: z15.literal(submitToScmMessageType.commitToSameBranch),
4539
- githubCommentId: z15.number().nullish(),
4540
- commits: z15.array(GitCommitZ)
4654
+ var SubmitFixesToSameBranchResponseMessageZ = z19.object({
4655
+ type: z19.literal(submitToScmMessageType.commitToSameBranch),
4656
+ githubCommentId: z19.number().nullish(),
4657
+ commits: z19.array(GitCommitZ)
4541
4658
  }).merge(SubmitFixesBaseResponseMessageZ);
4542
- var SubmitFixesToDifferentBranchResponseMessageZ = z15.object({
4543
- type: z15.literal(submitToScmMessageType.submitFixesForDifferentBranch),
4544
- githubCommentId: z15.number().optional()
4659
+ var SubmitFixesToDifferentBranchResponseMessageZ = z19.object({
4660
+ type: z19.literal(submitToScmMessageType.submitFixesForDifferentBranch),
4661
+ githubCommentId: z19.number().optional()
4545
4662
  }).merge(SubmitFixesBaseResponseMessageZ);
4546
- var SubmitFixesResponseMessageZ = z15.discriminatedUnion("type", [
4663
+ var SubmitFixesResponseMessageZ = z19.discriminatedUnion("type", [
4547
4664
  SubmitFixesToSameBranchResponseMessageZ,
4548
4665
  SubmitFixesToDifferentBranchResponseMessageZ
4549
4666
  ]);
@@ -4561,10 +4678,10 @@ var isValidBranchName = async (branchName) => {
4561
4678
  return false;
4562
4679
  }
4563
4680
  };
4564
- var FixesZ = z16.array(
4565
- z16.object({
4566
- fixId: z16.string(),
4567
- patchesOriginalEncodingBase64: z16.array(z16.string())
4681
+ var FixesZ = z20.array(
4682
+ z20.object({
4683
+ fixId: z20.string(),
4684
+ patchesOriginalEncodingBase64: z20.array(z20.string())
4568
4685
  })
4569
4686
  ).nonempty();
4570
4687
 
@@ -4819,33 +4936,33 @@ import querystring2 from "node:querystring";
4819
4936
  import * as bitbucketPkgNode from "bitbucket";
4820
4937
  import bitbucketPkg from "bitbucket";
4821
4938
  import Debug3 from "debug";
4822
- import { z as z18 } from "zod";
4939
+ import { z as z22 } from "zod";
4823
4940
 
4824
4941
  // src/features/analysis/scm/bitbucket/validation.ts
4825
- import { z as z17 } from "zod";
4826
- var BitbucketAuthResultZ = z17.object({
4827
- access_token: z17.string(),
4828
- token_type: z17.string(),
4829
- refresh_token: z17.string()
4942
+ import { z as z21 } from "zod";
4943
+ var BitbucketAuthResultZ = z21.object({
4944
+ access_token: z21.string(),
4945
+ token_type: z21.string(),
4946
+ refresh_token: z21.string()
4830
4947
  });
4831
4948
 
4832
4949
  // src/features/analysis/scm/bitbucket/bitbucket.ts
4833
4950
  var debug3 = Debug3("scm:bitbucket");
4834
4951
  var BITBUCKET_HOSTNAME = "bitbucket.org";
4835
- var TokenExpiredErrorZ = z18.object({
4836
- status: z18.number(),
4837
- error: z18.object({
4838
- type: z18.string(),
4839
- error: z18.object({
4840
- message: z18.string()
4952
+ var TokenExpiredErrorZ = z22.object({
4953
+ status: z22.number(),
4954
+ error: z22.object({
4955
+ type: z22.string(),
4956
+ error: z22.object({
4957
+ message: z22.string()
4841
4958
  })
4842
4959
  })
4843
4960
  });
4844
4961
  var BITBUCKET_ACCESS_TOKEN_URL = `https://${BITBUCKET_HOSTNAME}/site/oauth2/access_token`;
4845
- var BitbucketParseResultZ = z18.object({
4846
- organization: z18.string(),
4847
- repoName: z18.string(),
4848
- hostname: z18.literal(BITBUCKET_HOSTNAME)
4962
+ var BitbucketParseResultZ = z22.object({
4963
+ organization: z22.string(),
4964
+ repoName: z22.string(),
4965
+ hostname: z22.literal(BITBUCKET_HOSTNAME)
4849
4966
  });
4850
4967
  function parseBitbucketOrganizationAndRepo(bitbucketUrl) {
4851
4968
  const parsedGitHubUrl = normalizeUrl(bitbucketUrl);
@@ -4906,7 +5023,7 @@ function getBitbucketSdk(params) {
4906
5023
  if (!res.data.values) {
4907
5024
  return [];
4908
5025
  }
4909
- return res.data.values.filter((branch) => !!branch.name).map((branch) => z18.string().parse(branch.name));
5026
+ return res.data.values.filter((branch) => !!branch.name).map((branch) => z22.string().parse(branch.name));
4910
5027
  },
4911
5028
  async getIsUserCollaborator(params2) {
4912
5029
  const { repoUrl } = params2;
@@ -5021,7 +5138,7 @@ function getBitbucketSdk(params) {
5021
5138
  return GetRefererenceResultZ.parse({
5022
5139
  sha: tagRes.data.target?.hash,
5023
5140
  type: "TAG" /* TAG */,
5024
- date: new Date(z18.string().parse(tagRes.data.target?.date))
5141
+ date: new Date(z22.string().parse(tagRes.data.target?.date))
5025
5142
  });
5026
5143
  },
5027
5144
  async getBranchRef(params2) {
@@ -5029,7 +5146,7 @@ function getBitbucketSdk(params) {
5029
5146
  return GetRefererenceResultZ.parse({
5030
5147
  sha: getBranchRes.target?.hash,
5031
5148
  type: "BRANCH" /* BRANCH */,
5032
- date: new Date(z18.string().parse(getBranchRes.target?.date))
5149
+ date: new Date(z22.string().parse(getBranchRes.target?.date))
5033
5150
  });
5034
5151
  },
5035
5152
  async getCommitRef(params2) {
@@ -5037,13 +5154,13 @@ function getBitbucketSdk(params) {
5037
5154
  return GetRefererenceResultZ.parse({
5038
5155
  sha: getCommitRes.hash,
5039
5156
  type: "COMMIT" /* COMMIT */,
5040
- date: new Date(z18.string().parse(getCommitRes.date))
5157
+ date: new Date(z22.string().parse(getCommitRes.date))
5041
5158
  });
5042
5159
  },
5043
5160
  async getDownloadUrl({ url, sha }) {
5044
5161
  this.getReferenceData({ ref: sha, url });
5045
5162
  const repoRes = await this.getRepo({ repoUrl: url });
5046
- const parsedRepoUrl = z18.string().url().parse(repoRes.links?.html?.href);
5163
+ const parsedRepoUrl = z22.string().url().parse(repoRes.links?.html?.href);
5047
5164
  return `${parsedRepoUrl}/get/${sha}.zip`;
5048
5165
  },
5049
5166
  async getPullRequest(params2) {
@@ -5089,7 +5206,7 @@ async function validateBitbucketParams(params) {
5089
5206
  }
5090
5207
  async function getUsersworkspacesSlugs(bitbucketClient) {
5091
5208
  const res = await bitbucketClient.workspaces.getWorkspaces({});
5092
- return res.data.values?.map((v) => z18.string().parse(v.slug));
5209
+ return res.data.values?.map((v) => z22.string().parse(v.slug));
5093
5210
  }
5094
5211
  async function getllUsersrepositories(bitbucketClient) {
5095
5212
  const userWorspacesSlugs = await getUsersworkspacesSlugs(bitbucketClient);
@@ -5117,10 +5234,10 @@ async function getRepositoriesByWorkspace(bitbucketClient, { workspaceSlug }) {
5117
5234
 
5118
5235
  // src/features/analysis/scm/bitbucket/BitbucketSCMLib.ts
5119
5236
  import { setTimeout as setTimeout3 } from "node:timers/promises";
5120
- import { z as z19 } from "zod";
5237
+ import { z as z23 } from "zod";
5121
5238
  function getUserAndPassword(token) {
5122
5239
  const [username, password] = token.split(":");
5123
- const safePasswordAndUsername = z19.object({ username: z19.string(), password: z19.string() }).parse({ username, password });
5240
+ const safePasswordAndUsername = z23.object({ username: z23.string(), password: z23.string() }).parse({ username, password });
5124
5241
  return {
5125
5242
  username: safePasswordAndUsername.username,
5126
5243
  password: safePasswordAndUsername.password
@@ -5192,7 +5309,7 @@ var BitbucketSCMLib = class extends SCMLib {
5192
5309
  return { username, password, authType };
5193
5310
  }
5194
5311
  case "token": {
5195
- return { authType, token: z19.string().parse(this.accessToken) };
5312
+ return { authType, token: z23.string().parse(this.accessToken) };
5196
5313
  }
5197
5314
  case "public":
5198
5315
  return { authType };
@@ -5206,7 +5323,7 @@ var BitbucketSCMLib = class extends SCMLib {
5206
5323
  ...params,
5207
5324
  repoUrl: this.url
5208
5325
  });
5209
- return String(z19.number().parse(pullRequestRes.id));
5326
+ return String(z23.number().parse(pullRequestRes.id));
5210
5327
  } catch (e) {
5211
5328
  console.warn(
5212
5329
  `error creating pull request for BB. Try number ${i + 1}`,
@@ -5291,7 +5408,7 @@ var BitbucketSCMLib = class extends SCMLib {
5291
5408
  async getUsername() {
5292
5409
  this._validateAccessToken();
5293
5410
  const res = await this.bitbucketSdk.getUser();
5294
- return z19.string().parse(res.username);
5411
+ return z23.string().parse(res.username);
5295
5412
  }
5296
5413
  async getSubmitRequestStatus(_scmSubmitRequestId) {
5297
5414
  this._validateAccessTokenAndUrl();
@@ -5320,7 +5437,7 @@ var BitbucketSCMLib = class extends SCMLib {
5320
5437
  async getRepoDefaultBranch() {
5321
5438
  this._validateUrl();
5322
5439
  const repoRes = await this.bitbucketSdk.getRepo({ repoUrl: this.url });
5323
- return z19.string().parse(repoRes.mainbranch?.name);
5440
+ return z23.string().parse(repoRes.mainbranch?.name);
5324
5441
  }
5325
5442
  getPrUrl(prNumber) {
5326
5443
  this._validateUrl();
@@ -5343,7 +5460,7 @@ var BitbucketSCMLib = class extends SCMLib {
5343
5460
  };
5344
5461
 
5345
5462
  // src/features/analysis/scm/github/GithubSCMLib.ts
5346
- import { z as z20 } from "zod";
5463
+ import { z as z24 } from "zod";
5347
5464
  var GithubSCMLib = class extends SCMLib {
5348
5465
  // we don't always need a url, what's important is that we have an access token
5349
5466
  constructor(url, accessToken, scmOrg) {
@@ -5444,7 +5561,7 @@ var GithubSCMLib = class extends SCMLib {
5444
5561
  owner,
5445
5562
  repo
5446
5563
  });
5447
- return z20.string().parse(prRes.data);
5564
+ return z24.string().parse(prRes.data);
5448
5565
  }
5449
5566
  async getRepoList(_scmOrg) {
5450
5567
  this._validateAccessToken();
@@ -5599,11 +5716,11 @@ import {
5599
5716
  } from "undici";
5600
5717
 
5601
5718
  // src/features/analysis/scm/gitlab/types.ts
5602
- import { z as z21 } from "zod";
5603
- var GitlabAuthResultZ = z21.object({
5604
- access_token: z21.string(),
5605
- token_type: z21.string(),
5606
- refresh_token: z21.string()
5719
+ import { z as z25 } from "zod";
5720
+ var GitlabAuthResultZ = z25.object({
5721
+ access_token: z25.string(),
5722
+ token_type: z25.string(),
5723
+ refresh_token: z25.string()
5607
5724
  });
5608
5725
 
5609
5726
  // src/features/analysis/scm/gitlab/gitlab.ts
@@ -6119,7 +6236,7 @@ var GitlabSCMLib = class extends SCMLib {
6119
6236
  };
6120
6237
 
6121
6238
  // src/features/analysis/scm/scmFactory.ts
6122
- import { z as z22 } from "zod";
6239
+ import { z as z26 } from "zod";
6123
6240
 
6124
6241
  // src/features/analysis/scm/StubSCMLib.ts
6125
6242
  var StubSCMLib = class extends SCMLib {
@@ -6238,7 +6355,7 @@ async function createScmLib({ url, accessToken, scmType, scmOrg }, { propagateEx
6238
6355
  if (e instanceof InvalidRepoUrlError && url) {
6239
6356
  throw new RepoNoTokenAccessError(
6240
6357
  "no access to repo",
6241
- scmLibScmTypeToScmType[z22.nativeEnum(ScmLibScmType).parse(scmType)]
6358
+ scmLibScmTypeToScmType[z26.nativeEnum(ScmLibScmType).parse(scmType)]
6242
6359
  );
6243
6360
  }
6244
6361
  console.error(`error validating scm: ${scmType} `, e);
@@ -6694,7 +6811,7 @@ function getGithubSdk(params = {}) {
6694
6811
  // src/features/analysis/add_fix_comments_for_pr/utils/utils.ts
6695
6812
  import Debug7 from "debug";
6696
6813
  import parseDiff2 from "parse-diff";
6697
- import { z as z24 } from "zod";
6814
+ import { z as z28 } from "zod";
6698
6815
 
6699
6816
  // src/features/analysis/utils/by_key.ts
6700
6817
  function keyBy(array, keyBy2) {
@@ -6766,7 +6883,7 @@ var scannerToFriendlyString = {
6766
6883
 
6767
6884
  // src/features/analysis/add_fix_comments_for_pr/utils/buildCommentBody.ts
6768
6885
  import Debug6 from "debug";
6769
- import { z as z23 } from "zod";
6886
+ import { z as z27 } from "zod";
6770
6887
  var debug6 = Debug6("mobbdev:handle-finished-analysis");
6771
6888
  var getCommitFixButton = (commitUrl) => `<a href="${commitUrl}"><img src=${COMMIT_FIX_SVG}></a>`;
6772
6889
  function buildCommentBody({
@@ -6800,11 +6917,11 @@ function buildCommentBody({
6800
6917
  });
6801
6918
  const issueType = getIssueTypeFriendlyString(fix.safeIssueType);
6802
6919
  const title = `# ${MobbIconMarkdown} ${issueType} fix is ready`;
6803
- const validFixParseRes = z23.object({
6920
+ const validFixParseRes = z27.object({
6804
6921
  patchAndQuestions: PatchAndQuestionsZ,
6805
- safeIssueLanguage: z23.nativeEnum(IssueLanguage_Enum),
6806
- severityText: z23.nativeEnum(Vulnerability_Severity_Enum),
6807
- safeIssueType: z23.nativeEnum(IssueType_Enum)
6922
+ safeIssueLanguage: z27.nativeEnum(IssueLanguage_Enum),
6923
+ severityText: z27.nativeEnum(Vulnerability_Severity_Enum),
6924
+ safeIssueType: z27.nativeEnum(IssueType_Enum)
6808
6925
  }).safeParse(fix);
6809
6926
  if (!validFixParseRes.success) {
6810
6927
  debug6(
@@ -6977,7 +7094,7 @@ async function getRelevantVulenrabilitiesFromDiff(params) {
6977
7094
  });
6978
7095
  const lineAddedRanges = calculateRanges(fileNumbers);
6979
7096
  const fileFilter = {
6980
- path: z24.string().parse(file.to),
7097
+ path: z28.string().parse(file.to),
6981
7098
  ranges: lineAddedRanges.map(([startLine, endLine]) => ({
6982
7099
  endLine,
6983
7100
  startLine
@@ -7328,30 +7445,30 @@ function subscribe(query, variables, callback, wsClientOptions) {
7328
7445
  }
7329
7446
 
7330
7447
  // src/features/analysis/graphql/types.ts
7331
- import { z as z25 } from "zod";
7332
- var VulnerabilityReportIssueCodeNodeZ = z25.object({
7333
- vulnerabilityReportIssueId: z25.string(),
7334
- path: z25.string(),
7335
- startLine: z25.number(),
7336
- vulnerabilityReportIssue: z25.object({
7337
- fixId: z25.string()
7448
+ import { z as z29 } from "zod";
7449
+ var VulnerabilityReportIssueCodeNodeZ = z29.object({
7450
+ vulnerabilityReportIssueId: z29.string(),
7451
+ path: z29.string(),
7452
+ startLine: z29.number(),
7453
+ vulnerabilityReportIssue: z29.object({
7454
+ fixId: z29.string()
7338
7455
  })
7339
7456
  });
7340
- var GetVulByNodesMetadataZ = z25.object({
7341
- vulnerabilityReportIssueCodeNodes: z25.array(VulnerabilityReportIssueCodeNodeZ),
7342
- nonFixablePrVuls: z25.object({
7343
- aggregate: z25.object({
7344
- count: z25.number()
7457
+ var GetVulByNodesMetadataZ = z29.object({
7458
+ vulnerabilityReportIssueCodeNodes: z29.array(VulnerabilityReportIssueCodeNodeZ),
7459
+ nonFixablePrVuls: z29.object({
7460
+ aggregate: z29.object({
7461
+ count: z29.number()
7345
7462
  })
7346
7463
  }),
7347
- fixablePrVuls: z25.object({
7348
- aggregate: z25.object({
7349
- count: z25.number()
7464
+ fixablePrVuls: z29.object({
7465
+ aggregate: z29.object({
7466
+ count: z29.number()
7350
7467
  })
7351
7468
  }),
7352
- totalScanVulnerabilities: z25.object({
7353
- aggregate: z25.object({
7354
- count: z25.number()
7469
+ totalScanVulnerabilities: z29.object({
7470
+ aggregate: z29.object({
7471
+ count: z29.number()
7355
7472
  })
7356
7473
  })
7357
7474
  });
@@ -8364,7 +8481,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
8364
8481
  spinner: mobbSpinner,
8365
8482
  submitVulnerabilityReportVariables: {
8366
8483
  fixReportId: reportUploadInfo.fixReportId,
8367
- repoUrl: z26.string().parse(repo),
8484
+ repoUrl: z30.string().parse(repo),
8368
8485
  reference,
8369
8486
  projectId,
8370
8487
  vulnerabilityReportFileName: "report.json",
@@ -8510,9 +8627,9 @@ async function _scan(params, { skipPrompts = false } = {}) {
8510
8627
  }
8511
8628
  });
8512
8629
  if (command === "review") {
8513
- const params2 = z26.object({
8514
- repo: z26.string().url(),
8515
- githubActionToken: z26.string()
8630
+ const params2 = z30.object({
8631
+ repo: z30.string().url(),
8632
+ githubActionToken: z30.string()
8516
8633
  }).parse({ repo, githubActionToken });
8517
8634
  const scm = await createScmLib(
8518
8635
  {
@@ -8534,7 +8651,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
8534
8651
  analysisId,
8535
8652
  gqlClient,
8536
8653
  scm,
8537
- scanner: z26.nativeEnum(SCANNERS).parse(scanner)
8654
+ scanner: z30.nativeEnum(SCANNERS).parse(scanner)
8538
8655
  });
8539
8656
  },
8540
8657
  callbackStates: ["Finished" /* Finished */]
@@ -8913,7 +9030,7 @@ var scmTokenOption = {
8913
9030
  // src/args/validation.ts
8914
9031
  import chalk7 from "chalk";
8915
9032
  import path8 from "path";
8916
- import { z as z27 } from "zod";
9033
+ import { z as z31 } from "zod";
8917
9034
  function throwRepoUrlErrorMessage({
8918
9035
  error,
8919
9036
  repoUrl,
@@ -8930,11 +9047,11 @@ Example:
8930
9047
  )}`;
8931
9048
  throw new CliError(formattedErrorMessage);
8932
9049
  }
8933
- var UrlZ = z27.string({
9050
+ var UrlZ = z31.string({
8934
9051
  invalid_type_error: `is not a valid ${Object.values(ScmType).join("/ ")} URL`
8935
9052
  });
8936
9053
  function validateOrganizationId(organizationId) {
8937
- const orgIdValidation = z27.string().uuid().nullish().safeParse(organizationId);
9054
+ const orgIdValidation = z31.string().uuid().nullish().safeParse(organizationId);
8938
9055
  if (!orgIdValidation.success) {
8939
9056
  throw new CliError(`organizationId: ${organizationId} is not a valid UUID`);
8940
9057
  }