mobbdev 0.0.182 → 0.0.184
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.
- package/dist/index.mjs +732 -613
- package/package.json +5 -4
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
|
|
40
|
+
import { z as z4 } from "zod";
|
|
41
41
|
|
|
42
42
|
// src/features/analysis/scm/generates/client_generates.ts
|
|
43
43
|
var FixQuestionInputType = /* @__PURE__ */ ((FixQuestionInputType2) => {
|
|
@@ -122,6 +122,7 @@ var IssueType_Enum = /* @__PURE__ */ ((IssueType_Enum2) => {
|
|
|
122
122
|
IssueType_Enum2["HardcodedDomainInHtml"] = "HARDCODED_DOMAIN_IN_HTML";
|
|
123
123
|
IssueType_Enum2["HardcodedSecrets"] = "HARDCODED_SECRETS";
|
|
124
124
|
IssueType_Enum2["HeaderManipulation"] = "HEADER_MANIPULATION";
|
|
125
|
+
IssueType_Enum2["HeapInspection"] = "HEAP_INSPECTION";
|
|
125
126
|
IssueType_Enum2["HtmlCommentInJsp"] = "HTML_COMMENT_IN_JSP";
|
|
126
127
|
IssueType_Enum2["HttpOnlyCookie"] = "HTTP_ONLY_COOKIE";
|
|
127
128
|
IssueType_Enum2["HttpResponseSplitting"] = "HTTP_RESPONSE_SPLITTING";
|
|
@@ -650,467 +651,589 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
650
651
|
}
|
|
651
652
|
|
|
652
653
|
// src/features/analysis/scm/shared/src/types.ts
|
|
654
|
+
import { z as z3 } from "zod";
|
|
655
|
+
|
|
656
|
+
// src/features/analysis/scm/shared/src/validations.ts
|
|
657
|
+
import { z as z2 } from "zod";
|
|
658
|
+
|
|
659
|
+
// src/features/analysis/scm/shared/src/getIssueType.ts
|
|
653
660
|
import { z } from "zod";
|
|
654
|
-
var
|
|
655
|
-
|
|
661
|
+
var issueTypeMap = {
|
|
662
|
+
["NO_LIMITS_OR_THROTTLING" /* NoLimitsOrThrottling */]: "Missing Rate Limiting",
|
|
663
|
+
["SQL_Injection" /* SqlInjection */]: "SQL Injection",
|
|
664
|
+
["CMDi_relative_path_command" /* CmDiRelativePathCommand */]: "Relative Path Command Injection",
|
|
665
|
+
["CMDi" /* CmDi */]: "Command Injection",
|
|
666
|
+
["CONFUSING_NAMING" /* ConfusingNaming */]: "Confusing Naming",
|
|
667
|
+
["XXE" /* Xxe */]: "XXE",
|
|
668
|
+
["XSS" /* Xss */]: "XSS",
|
|
669
|
+
["PT" /* Pt */]: "Path Traversal",
|
|
670
|
+
["ZIP_SLIP" /* ZipSlip */]: "Zip Slip",
|
|
671
|
+
["INSECURE_RANDOMNESS" /* InsecureRandomness */]: "Insecure Randomness",
|
|
672
|
+
["SSRF" /* Ssrf */]: "Server Side Request Forgery",
|
|
673
|
+
["TYPE_CONFUSION" /* TypeConfusion */]: "Type Confusion",
|
|
674
|
+
["REGEX_INJECTION" /* RegexInjection */]: "Regular Expression Injection",
|
|
675
|
+
["INCOMPLETE_URL_SANITIZATION" /* IncompleteUrlSanitization */]: "Incomplete URL Sanitization",
|
|
676
|
+
["LOCALE_DEPENDENT_COMPARISON" /* LocaleDependentComparison */]: "Locale Dependent Comparison",
|
|
677
|
+
["LOG_FORGING" /* LogForging */]: "Log Forging",
|
|
678
|
+
["MISSING_CHECK_AGAINST_NULL" /* MissingCheckAgainstNull */]: "Missing Check against Null",
|
|
679
|
+
["PASSWORD_IN_COMMENT" /* PasswordInComment */]: "Password in Comment",
|
|
680
|
+
["OVERLY_BROAD_CATCH" /* OverlyBroadCatch */]: "Poor Error Handling: Overly Broad Catch",
|
|
681
|
+
["USE_OF_SYSTEM_OUTPUT_STREAM" /* UseOfSystemOutputStream */]: "Use of System.out/System.err",
|
|
682
|
+
["DANGEROUS_FUNCTION_OVERFLOW" /* DangerousFunctionOverflow */]: "Use of dangerous function",
|
|
683
|
+
["DOS_STRING_BUILDER" /* DosStringBuilder */]: "Denial of Service: StringBuilder",
|
|
684
|
+
["OPEN_REDIRECT" /* OpenRedirect */]: "Open Redirect",
|
|
685
|
+
["WEAK_XML_SCHEMA_UNBOUNDED_OCCURRENCES" /* WeakXmlSchemaUnboundedOccurrences */]: "Weak XML Schema: Unbounded Occurrences",
|
|
686
|
+
["SYSTEM_INFORMATION_LEAK" /* SystemInformationLeak */]: "System Information Leak",
|
|
687
|
+
["SYSTEM_INFORMATION_LEAK_EXTERNAL" /* SystemInformationLeakExternal */]: "External System Information Leak",
|
|
688
|
+
["HTTP_RESPONSE_SPLITTING" /* HttpResponseSplitting */]: "HTTP response splitting",
|
|
689
|
+
["HTTP_ONLY_COOKIE" /* HttpOnlyCookie */]: "Cookie is not HttpOnly",
|
|
690
|
+
["INSECURE_COOKIE" /* InsecureCookie */]: "Insecure Cookie",
|
|
691
|
+
["TRUST_BOUNDARY_VIOLATION" /* TrustBoundaryViolation */]: "Trust Boundary Violation",
|
|
692
|
+
["NULL_DEREFERENCE" /* NullDereference */]: "Null Dereference",
|
|
693
|
+
["UNSAFE_DESERIALIZATION" /* UnsafeDeserialization */]: "Unsafe deserialization",
|
|
694
|
+
["INSECURE_BINDER_CONFIGURATION" /* InsecureBinderConfiguration */]: "Insecure Binder Configuration",
|
|
695
|
+
["UNSAFE_TARGET_BLANK" /* UnsafeTargetBlank */]: "Unsafe use of target blank",
|
|
696
|
+
["IFRAME_WITHOUT_SANDBOX" /* IframeWithoutSandbox */]: "Client use of iframe without sandbox",
|
|
697
|
+
["JQUERY_DEPRECATED_SYMBOLS" /* JqueryDeprecatedSymbols */]: "jQuery deprecated symbols",
|
|
698
|
+
["MISSING_ANTIFORGERY_VALIDATION" /* MissingAntiforgeryValidation */]: "Missing Anti-Forgery Validation",
|
|
699
|
+
["GRAPHQL_DEPTH_LIMIT" /* GraphqlDepthLimit */]: "GraphQL Depth Limit",
|
|
700
|
+
["UNCHECKED_LOOP_CONDITION" /* UncheckedLoopCondition */]: "Unchecked Loop Condition",
|
|
701
|
+
["IMPROPER_RESOURCE_SHUTDOWN_OR_RELEASE" /* ImproperResourceShutdownOrRelease */]: "Improper Resource Shutdown or Release",
|
|
702
|
+
["IMPROPER_EXCEPTION_HANDLING" /* ImproperExceptionHandling */]: "Improper Exception Handling",
|
|
703
|
+
["DEFAULT_RIGHTS_IN_OBJ_DEFINITION" /* DefaultRightsInObjDefinition */]: "Default Definer Rights in Package or Object Definition",
|
|
704
|
+
["HTML_COMMENT_IN_JSP" /* HtmlCommentInJsp */]: "HTML Comment in JSP",
|
|
705
|
+
["ERROR_CONDTION_WITHOUT_ACTION" /* ErrorCondtionWithoutAction */]: "Error Condition Without Action",
|
|
706
|
+
["DEPRECATED_FUNCTION" /* DeprecatedFunction */]: "Deprecated Function",
|
|
707
|
+
["HARDCODED_SECRETS" /* HardcodedSecrets */]: "Hardcoded Secrets",
|
|
708
|
+
["PROTOTYPE_POLLUTION" /* PrototypePollution */]: "Prototype Pollution",
|
|
709
|
+
["RACE_CONDITION_FORMAT_FLAW" /* RaceConditionFormatFlaw */]: "Race Condition Format Flaw",
|
|
710
|
+
["NON_FINAL_PUBLIC_STATIC_FIELD" /* NonFinalPublicStaticField */]: "Non-final Public Static Field",
|
|
711
|
+
["MISSING_HSTS_HEADER" /* MissingHstsHeader */]: "Missing HSTS Header",
|
|
712
|
+
["DEAD_CODE_UNUSED_FIELD" /* DeadCodeUnusedField */]: "Dead Code: Unused Field",
|
|
713
|
+
["HEADER_MANIPULATION" /* HeaderManipulation */]: "Header Manipulation",
|
|
714
|
+
["MISSING_EQUALS_OR_HASHCODE" /* MissingEqualsOrHashcode */]: "Missing equals or hashcode method",
|
|
715
|
+
["WCF_MISCONFIGURATION_INSUFFICIENT_LOGGING" /* WcfMisconfigurationInsufficientLogging */]: "WCF Misconfiguration: Insufficient Logging",
|
|
716
|
+
["WCF_MISCONFIGURATION_THROTTLING_NOT_ENABLED" /* WcfMisconfigurationThrottlingNotEnabled */]: "WCF Misconfiguration: Throttling Not Enabled",
|
|
717
|
+
["USELESS_REGEXP_CHAR_ESCAPE" /* UselessRegexpCharEscape */]: "Useless regular-expression character escape",
|
|
718
|
+
["INCOMPLETE_HOSTNAME_REGEX" /* IncompleteHostnameRegex */]: "Incomplete Hostname Regex",
|
|
719
|
+
["OVERLY_LARGE_RANGE" /* OverlyLargeRange */]: "Regex: Overly Large Range",
|
|
720
|
+
["INSUFFICIENT_LOGGING" /* InsufficientLogging */]: "Insufficient Logging of Sensitive Operations",
|
|
721
|
+
["PRIVACY_VIOLATION" /* PrivacyViolation */]: "Privacy Violation",
|
|
722
|
+
["INCOMPLETE_URL_SCHEME_CHECK" /* IncompleteUrlSchemeCheck */]: "Incomplete URL Scheme Check",
|
|
723
|
+
["VALUE_NEVER_READ" /* ValueNeverRead */]: "Value Never Read",
|
|
724
|
+
["VALUE_SHADOWING" /* ValueShadowing */]: "Value Shadowing",
|
|
725
|
+
["NO_EQUIVALENCE_METHOD" /* NoEquivalenceMethod */]: "Class Does Not Implement Equivalence Method",
|
|
726
|
+
["INFORMATION_EXPOSURE_VIA_HEADERS" /* InformationExposureViaHeaders */]: "Information Exposure via Headers",
|
|
727
|
+
["DEBUG_ENABLED" /* DebugEnabled */]: "Debug Enabled",
|
|
728
|
+
["LEFTOVER_DEBUG_CODE" /* LeftoverDebugCode */]: "Leftover Debug Code",
|
|
729
|
+
["POOR_ERROR_HANDLING_EMPTY_CATCH_BLOCK" /* PoorErrorHandlingEmptyCatchBlock */]: "Poor Error Handling: Empty Catch Block",
|
|
730
|
+
["ERRONEOUS_STRING_COMPARE" /* ErroneousStringCompare */]: "Erroneous String Compare",
|
|
731
|
+
["UNVALIDATED_PUBLIC_METHOD_ARGUMENT" /* UnvalidatedPublicMethodArgument */]: "Unvalidated Public Method Argument",
|
|
732
|
+
["AUTO_ESCAPE_FALSE" /* AutoEscapeFalse */]: "Auto-escape False",
|
|
733
|
+
["MISSING_CSP_HEADER" /* MissingCspHeader */]: "Missing CSP Header",
|
|
734
|
+
["HARDCODED_DOMAIN_IN_HTML" /* HardcodedDomainInHtml */]: "Hardcoded Domain in HTML",
|
|
735
|
+
["HEAP_INSPECTION" /* HeapInspection */]: "Heap Inspection"
|
|
736
|
+
};
|
|
737
|
+
var issueTypeZ = z.nativeEnum(IssueType_Enum);
|
|
738
|
+
var getIssueTypeFriendlyString = (issueType) => {
|
|
739
|
+
const issueTypeZParseRes = issueTypeZ.safeParse(issueType);
|
|
740
|
+
if (!issueTypeZParseRes.success) {
|
|
741
|
+
return issueType ? issueType.replaceAll("_", " ") : "Other";
|
|
742
|
+
}
|
|
743
|
+
return issueTypeMap[issueTypeZParseRes.data];
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
// src/features/analysis/scm/shared/src/validations.ts
|
|
747
|
+
var IssueTypeSettingZ = z2.object({
|
|
748
|
+
autoPrEnabled: z2.boolean(),
|
|
749
|
+
enabled: z2.boolean(),
|
|
750
|
+
issueType: z2.nativeEnum(IssueType_Enum)
|
|
751
|
+
});
|
|
752
|
+
var IssueTypeSettingsZ = z2.array(IssueTypeSettingZ).transform((issueTypeSettings) => {
|
|
753
|
+
return Object.values(IssueType_Enum).map((issueTypeEnum) => {
|
|
754
|
+
const existingIssueTypeSetting = issueTypeSettings.find(
|
|
755
|
+
({ issueType: dbIssueType }) => dbIssueType === issueTypeEnum
|
|
756
|
+
);
|
|
757
|
+
if (existingIssueTypeSetting) {
|
|
758
|
+
return existingIssueTypeSetting;
|
|
759
|
+
}
|
|
760
|
+
return {
|
|
761
|
+
autoPrEnabled: false,
|
|
762
|
+
enabled: true,
|
|
763
|
+
issueType: issueTypeEnum
|
|
764
|
+
};
|
|
765
|
+
}).sort((a, b) => {
|
|
766
|
+
return getIssueTypeFriendlyString(a.issueType).localeCompare(
|
|
767
|
+
getIssueTypeFriendlyString(b.issueType)
|
|
768
|
+
);
|
|
769
|
+
});
|
|
656
770
|
});
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
771
|
+
|
|
772
|
+
// src/features/analysis/scm/shared/src/types.ts
|
|
773
|
+
var OrganizationScreenQueryParamsZ = z3.object({
|
|
774
|
+
organizationId: z3.string().uuid()
|
|
775
|
+
});
|
|
776
|
+
var ProjectPageQueryParamsZ = z3.object({
|
|
777
|
+
organizationId: z3.string().uuid(),
|
|
778
|
+
projectId: z3.string().uuid()
|
|
660
779
|
});
|
|
661
780
|
var AnalysisPageQueryParamsZ = ProjectPageQueryParamsZ.extend({
|
|
662
|
-
reportId:
|
|
781
|
+
reportId: z3.string().uuid()
|
|
663
782
|
});
|
|
664
783
|
var FixPageQueryParamsZ = AnalysisPageQueryParamsZ.extend({
|
|
665
|
-
fixId:
|
|
784
|
+
fixId: z3.string().uuid()
|
|
666
785
|
});
|
|
667
|
-
var CliLoginPageQueryParamsZ =
|
|
668
|
-
loginId:
|
|
786
|
+
var CliLoginPageQueryParamsZ = z3.object({
|
|
787
|
+
loginId: z3.string().uuid()
|
|
669
788
|
});
|
|
670
|
-
var ScmSubmitFixRequestsZ =
|
|
671
|
-
|
|
672
|
-
scmSubmitFixRequest:
|
|
673
|
-
submitFixRequest:
|
|
674
|
-
createdByUser:
|
|
675
|
-
email:
|
|
789
|
+
var ScmSubmitFixRequestsZ = z3.array(
|
|
790
|
+
z3.object({
|
|
791
|
+
scmSubmitFixRequest: z3.object({
|
|
792
|
+
submitFixRequest: z3.object({
|
|
793
|
+
createdByUser: z3.object({
|
|
794
|
+
email: z3.string()
|
|
676
795
|
})
|
|
677
796
|
}),
|
|
678
|
-
prUrl:
|
|
679
|
-
|
|
797
|
+
prUrl: z3.string().nullable(),
|
|
798
|
+
commitUrl: z3.string().nullable(),
|
|
799
|
+
scmId: z3.string()
|
|
680
800
|
})
|
|
681
801
|
})
|
|
682
802
|
);
|
|
683
|
-
var AnalysisReportDigestedZ =
|
|
684
|
-
id:
|
|
685
|
-
state:
|
|
686
|
-
vulnerabilityReport:
|
|
687
|
-
reportSummaryUrl:
|
|
688
|
-
scanDate:
|
|
689
|
-
supported:
|
|
690
|
-
aggregate:
|
|
691
|
-
count:
|
|
803
|
+
var AnalysisReportDigestedZ = z3.object({
|
|
804
|
+
id: z3.string().uuid(),
|
|
805
|
+
state: z3.nativeEnum(Fix_Report_State_Enum),
|
|
806
|
+
vulnerabilityReport: z3.object({
|
|
807
|
+
reportSummaryUrl: z3.string().url().nullish(),
|
|
808
|
+
scanDate: z3.string().nullable(),
|
|
809
|
+
supported: z3.object({
|
|
810
|
+
aggregate: z3.object({
|
|
811
|
+
count: z3.number()
|
|
692
812
|
})
|
|
693
813
|
}),
|
|
694
|
-
all:
|
|
695
|
-
aggregate:
|
|
696
|
-
count:
|
|
814
|
+
all: z3.object({
|
|
815
|
+
aggregate: z3.object({
|
|
816
|
+
count: z3.number()
|
|
697
817
|
})
|
|
698
818
|
}),
|
|
699
|
-
vendor:
|
|
700
|
-
project:
|
|
701
|
-
organizationId:
|
|
819
|
+
vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum),
|
|
820
|
+
project: z3.object({
|
|
821
|
+
organizationId: z3.string().uuid()
|
|
702
822
|
})
|
|
703
823
|
})
|
|
704
824
|
});
|
|
705
|
-
var FixRatingZ =
|
|
706
|
-
voteScore:
|
|
707
|
-
fixRatingTag:
|
|
708
|
-
comment:
|
|
709
|
-
updatedDate:
|
|
710
|
-
user:
|
|
711
|
-
email:
|
|
712
|
-
name:
|
|
825
|
+
var FixRatingZ = z3.object({
|
|
826
|
+
voteScore: z3.number(),
|
|
827
|
+
fixRatingTag: z3.nativeEnum(Fix_Rating_Tag_Enum).nullable().default(null),
|
|
828
|
+
comment: z3.string().nullable().default(null),
|
|
829
|
+
updatedDate: z3.string().nullable(),
|
|
830
|
+
user: z3.object({
|
|
831
|
+
email: z3.string(),
|
|
832
|
+
name: z3.string()
|
|
713
833
|
})
|
|
714
834
|
});
|
|
715
|
-
var ReportQueryResultZ =
|
|
716
|
-
fixReport_by_pk:
|
|
717
|
-
id:
|
|
718
|
-
fixesCommitted:
|
|
719
|
-
aggregate:
|
|
835
|
+
var ReportQueryResultZ = z3.object({
|
|
836
|
+
fixReport_by_pk: z3.object({
|
|
837
|
+
id: z3.string().uuid(),
|
|
838
|
+
fixesCommitted: z3.object({
|
|
839
|
+
aggregate: z3.object({ count: z3.number() })
|
|
720
840
|
}),
|
|
721
|
-
fixesDownloaded:
|
|
722
|
-
aggregate:
|
|
841
|
+
fixesDownloaded: z3.object({
|
|
842
|
+
aggregate: z3.object({ count: z3.number() })
|
|
723
843
|
}),
|
|
724
|
-
fixesReadyCount:
|
|
725
|
-
issueTypes:
|
|
726
|
-
issueLanguages:
|
|
727
|
-
fixesCountByEffort:
|
|
728
|
-
vulnerabilitySeverities:
|
|
729
|
-
createdOn:
|
|
730
|
-
expirationOn:
|
|
731
|
-
state:
|
|
732
|
-
fixes_aggregate:
|
|
733
|
-
aggregate:
|
|
734
|
-
count:
|
|
844
|
+
fixesReadyCount: z3.number(),
|
|
845
|
+
issueTypes: z3.record(z3.string(), z3.number()).nullable(),
|
|
846
|
+
issueLanguages: z3.record(z3.string(), z3.number()).nullable(),
|
|
847
|
+
fixesCountByEffort: z3.record(z3.string(), z3.number()).nullable(),
|
|
848
|
+
vulnerabilitySeverities: z3.record(z3.string(), z3.number()).nullable(),
|
|
849
|
+
createdOn: z3.string(),
|
|
850
|
+
expirationOn: z3.string().nullable(),
|
|
851
|
+
state: z3.nativeEnum(Fix_Report_State_Enum),
|
|
852
|
+
fixes_aggregate: z3.object({
|
|
853
|
+
aggregate: z3.object({
|
|
854
|
+
count: z3.number()
|
|
735
855
|
})
|
|
736
856
|
}),
|
|
737
|
-
fixes:
|
|
738
|
-
|
|
739
|
-
id:
|
|
740
|
-
safeIssueLanguage:
|
|
741
|
-
safeIssueType:
|
|
742
|
-
confidence:
|
|
743
|
-
effortToApplyFix:
|
|
744
|
-
modifiedBy:
|
|
745
|
-
gitBlameLogin:
|
|
746
|
-
fixReportId:
|
|
747
|
-
vulnerabilitySeverity:
|
|
748
|
-
filePaths:
|
|
749
|
-
|
|
750
|
-
fileRepoRelativePath:
|
|
857
|
+
fixes: z3.array(
|
|
858
|
+
z3.object({
|
|
859
|
+
id: z3.string().uuid(),
|
|
860
|
+
safeIssueLanguage: z3.string(),
|
|
861
|
+
safeIssueType: z3.string(),
|
|
862
|
+
confidence: z3.number(),
|
|
863
|
+
effortToApplyFix: z3.nativeEnum(Effort_To_Apply_Fix_Enum).nullable(),
|
|
864
|
+
modifiedBy: z3.string().nullable(),
|
|
865
|
+
gitBlameLogin: z3.string().nullable(),
|
|
866
|
+
fixReportId: z3.string().uuid(),
|
|
867
|
+
vulnerabilitySeverity: z3.nativeEnum(Vulnerability_Severity_Enum).nullable().transform((i) => i ?? "low" /* Low */),
|
|
868
|
+
filePaths: z3.array(
|
|
869
|
+
z3.object({
|
|
870
|
+
fileRepoRelativePath: z3.string()
|
|
751
871
|
})
|
|
752
872
|
),
|
|
753
|
-
state:
|
|
754
|
-
numberOfVulnerabilityIssues:
|
|
755
|
-
vulnerabilityReportIssues:
|
|
756
|
-
|
|
757
|
-
issueType:
|
|
758
|
-
issueLanguage:
|
|
873
|
+
state: z3.nativeEnum(Fix_State_Enum),
|
|
874
|
+
numberOfVulnerabilityIssues: z3.number(),
|
|
875
|
+
vulnerabilityReportIssues: z3.array(
|
|
876
|
+
z3.object({
|
|
877
|
+
issueType: z3.string(),
|
|
878
|
+
issueLanguage: z3.string()
|
|
759
879
|
})
|
|
760
880
|
),
|
|
761
881
|
scmSubmitFixRequests: ScmSubmitFixRequestsZ,
|
|
762
|
-
isArchived:
|
|
763
|
-
fixRatings:
|
|
882
|
+
isArchived: z3.boolean().nullable(),
|
|
883
|
+
fixRatings: z3.array(FixRatingZ).default([])
|
|
764
884
|
})
|
|
765
885
|
),
|
|
766
|
-
repo:
|
|
767
|
-
name:
|
|
768
|
-
originalUrl:
|
|
769
|
-
reference:
|
|
770
|
-
commitSha:
|
|
771
|
-
isKnownBranch:
|
|
886
|
+
repo: z3.object({
|
|
887
|
+
name: z3.string().nullable(),
|
|
888
|
+
originalUrl: z3.string(),
|
|
889
|
+
reference: z3.string(),
|
|
890
|
+
commitSha: z3.string(),
|
|
891
|
+
isKnownBranch: z3.boolean().nullish().default(true)
|
|
772
892
|
}),
|
|
773
|
-
vulnerabilityReport:
|
|
774
|
-
reportSummaryUrl:
|
|
775
|
-
vendor:
|
|
776
|
-
issuesWithKnownLanguage:
|
|
777
|
-
scanDate:
|
|
778
|
-
vendorReportId:
|
|
779
|
-
projectId:
|
|
780
|
-
project:
|
|
781
|
-
organizationId:
|
|
893
|
+
vulnerabilityReport: z3.object({
|
|
894
|
+
reportSummaryUrl: z3.string().url().nullish(),
|
|
895
|
+
vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
|
|
896
|
+
issuesWithKnownLanguage: z3.number().nullable(),
|
|
897
|
+
scanDate: z3.string().nullable(),
|
|
898
|
+
vendorReportId: z3.string().uuid().nullable(),
|
|
899
|
+
projectId: z3.string().uuid(),
|
|
900
|
+
project: z3.object({
|
|
901
|
+
organizationId: z3.string().uuid()
|
|
782
902
|
}),
|
|
783
|
-
file:
|
|
784
|
-
id:
|
|
785
|
-
path:
|
|
903
|
+
file: z3.object({
|
|
904
|
+
id: z3.string().uuid(),
|
|
905
|
+
path: z3.string()
|
|
786
906
|
}),
|
|
787
|
-
pending:
|
|
788
|
-
aggregate:
|
|
789
|
-
count:
|
|
907
|
+
pending: z3.object({
|
|
908
|
+
aggregate: z3.object({
|
|
909
|
+
count: z3.number()
|
|
790
910
|
})
|
|
791
911
|
}),
|
|
792
|
-
supported:
|
|
793
|
-
aggregate:
|
|
794
|
-
count:
|
|
912
|
+
supported: z3.object({
|
|
913
|
+
aggregate: z3.object({
|
|
914
|
+
count: z3.number()
|
|
795
915
|
})
|
|
796
916
|
}),
|
|
797
|
-
digested:
|
|
798
|
-
aggregate:
|
|
799
|
-
count:
|
|
917
|
+
digested: z3.object({
|
|
918
|
+
aggregate: z3.object({
|
|
919
|
+
count: z3.number()
|
|
800
920
|
})
|
|
801
921
|
}),
|
|
802
|
-
all:
|
|
803
|
-
aggregate:
|
|
804
|
-
count:
|
|
922
|
+
all: z3.object({
|
|
923
|
+
aggregate: z3.object({
|
|
924
|
+
count: z3.number()
|
|
805
925
|
})
|
|
806
926
|
}),
|
|
807
|
-
fixable:
|
|
808
|
-
aggregate:
|
|
809
|
-
count:
|
|
927
|
+
fixable: z3.object({
|
|
928
|
+
aggregate: z3.object({
|
|
929
|
+
count: z3.number()
|
|
810
930
|
})
|
|
811
931
|
}),
|
|
812
|
-
errors:
|
|
813
|
-
aggregate:
|
|
814
|
-
count:
|
|
932
|
+
errors: z3.object({
|
|
933
|
+
aggregate: z3.object({
|
|
934
|
+
count: z3.number()
|
|
815
935
|
})
|
|
816
936
|
}),
|
|
817
|
-
vulnerabilityReportIssues:
|
|
818
|
-
extraData:
|
|
819
|
-
missing_files:
|
|
820
|
-
large_files:
|
|
821
|
-
error_files:
|
|
937
|
+
vulnerabilityReportIssues: z3.object({
|
|
938
|
+
extraData: z3.object({
|
|
939
|
+
missing_files: z3.string().array().nullish(),
|
|
940
|
+
large_files: z3.string().array().nullish(),
|
|
941
|
+
error_files: z3.string().array().nullish()
|
|
822
942
|
})
|
|
823
943
|
}).array()
|
|
824
944
|
})
|
|
825
945
|
})
|
|
826
946
|
});
|
|
827
|
-
var ReportFixesQueryZ =
|
|
828
|
-
|
|
829
|
-
id:
|
|
830
|
-
state:
|
|
831
|
-
isArchived:
|
|
832
|
-
confidence:
|
|
833
|
-
gitBlameLogin:
|
|
834
|
-
effortToApplyFix:
|
|
835
|
-
safeIssueLanguage:
|
|
836
|
-
safeIssueType:
|
|
837
|
-
vulnerabilitySeverity:
|
|
838
|
-
fixReportId:
|
|
839
|
-
filePaths:
|
|
840
|
-
|
|
841
|
-
fileRepoRelativePath:
|
|
947
|
+
var ReportFixesQueryZ = z3.array(
|
|
948
|
+
z3.object({
|
|
949
|
+
id: z3.string().uuid(),
|
|
950
|
+
state: z3.nativeEnum(Fix_State_Enum),
|
|
951
|
+
isArchived: z3.boolean().nullable(),
|
|
952
|
+
confidence: z3.number(),
|
|
953
|
+
gitBlameLogin: z3.string().nullable(),
|
|
954
|
+
effortToApplyFix: z3.nativeEnum(Effort_To_Apply_Fix_Enum).nullable(),
|
|
955
|
+
safeIssueLanguage: z3.string(),
|
|
956
|
+
safeIssueType: z3.string(),
|
|
957
|
+
vulnerabilitySeverity: z3.nativeEnum(Vulnerability_Severity_Enum).nullable().transform((i) => i ?? "low" /* Low */),
|
|
958
|
+
fixReportId: z3.string().uuid(),
|
|
959
|
+
filePaths: z3.array(
|
|
960
|
+
z3.object({
|
|
961
|
+
fileRepoRelativePath: z3.string()
|
|
842
962
|
})
|
|
843
963
|
),
|
|
844
|
-
numberOfVulnerabilityIssues:
|
|
845
|
-
vulnerabilityReportIssues:
|
|
846
|
-
|
|
847
|
-
issueType:
|
|
848
|
-
issueLanguage:
|
|
964
|
+
numberOfVulnerabilityIssues: z3.number(),
|
|
965
|
+
vulnerabilityReportIssues: z3.array(
|
|
966
|
+
z3.object({
|
|
967
|
+
issueType: z3.string(),
|
|
968
|
+
issueLanguage: z3.string()
|
|
849
969
|
})
|
|
850
970
|
),
|
|
851
971
|
scmSubmitFixRequests: ScmSubmitFixRequestsZ,
|
|
852
|
-
fixRatings:
|
|
972
|
+
fixRatings: z3.array(FixRatingZ).default([])
|
|
853
973
|
})
|
|
854
974
|
);
|
|
855
|
-
var ExtraContextInternalZ =
|
|
856
|
-
key:
|
|
857
|
-
value:
|
|
858
|
-
|
|
859
|
-
int:
|
|
860
|
-
integer:
|
|
861
|
-
string:
|
|
862
|
-
date:
|
|
975
|
+
var ExtraContextInternalZ = z3.object({
|
|
976
|
+
key: z3.string(),
|
|
977
|
+
value: z3.string().or(z3.boolean()).or(
|
|
978
|
+
z3.object({
|
|
979
|
+
int: z3.boolean(),
|
|
980
|
+
integer: z3.boolean(),
|
|
981
|
+
string: z3.boolean(),
|
|
982
|
+
date: z3.boolean()
|
|
863
983
|
})
|
|
864
984
|
)
|
|
865
985
|
});
|
|
866
|
-
var PackageInfoZ =
|
|
867
|
-
name:
|
|
868
|
-
version:
|
|
869
|
-
envName:
|
|
986
|
+
var PackageInfoZ = z3.object({
|
|
987
|
+
name: z3.string(),
|
|
988
|
+
version: z3.string(),
|
|
989
|
+
envName: z3.string().nullable()
|
|
870
990
|
});
|
|
871
|
-
var ManifestActionRequiredZ =
|
|
872
|
-
action:
|
|
873
|
-
language:
|
|
991
|
+
var ManifestActionRequiredZ = z3.object({
|
|
992
|
+
action: z3.nativeEnum(ManifestAction),
|
|
993
|
+
language: z3.nativeEnum(Language),
|
|
874
994
|
lib: PackageInfoZ,
|
|
875
995
|
typesLib: PackageInfoZ.nullable()
|
|
876
996
|
});
|
|
877
|
-
var FixExtraContextZ =
|
|
878
|
-
fixDescription:
|
|
879
|
-
manifestActionsRequired:
|
|
880
|
-
extraContext:
|
|
997
|
+
var FixExtraContextZ = z3.object({
|
|
998
|
+
fixDescription: z3.string(),
|
|
999
|
+
manifestActionsRequired: z3.array(ManifestActionRequiredZ),
|
|
1000
|
+
extraContext: z3.array(ExtraContextInternalZ)
|
|
881
1001
|
});
|
|
882
|
-
var PatchAndQuestionsZ =
|
|
883
|
-
__typename:
|
|
884
|
-
patch:
|
|
885
|
-
questions:
|
|
886
|
-
|
|
887
|
-
name:
|
|
888
|
-
key:
|
|
889
|
-
index:
|
|
890
|
-
defaultValue:
|
|
891
|
-
value:
|
|
892
|
-
extraContext:
|
|
893
|
-
inputType:
|
|
894
|
-
options:
|
|
1002
|
+
var PatchAndQuestionsZ = z3.object({
|
|
1003
|
+
__typename: z3.literal("FixData"),
|
|
1004
|
+
patch: z3.string(),
|
|
1005
|
+
questions: z3.array(
|
|
1006
|
+
z3.object({
|
|
1007
|
+
name: z3.string(),
|
|
1008
|
+
key: z3.string(),
|
|
1009
|
+
index: z3.number(),
|
|
1010
|
+
defaultValue: z3.string(),
|
|
1011
|
+
value: z3.string().nullable(),
|
|
1012
|
+
extraContext: z3.array(ExtraContextInternalZ),
|
|
1013
|
+
inputType: z3.nativeEnum(FixQuestionInputType),
|
|
1014
|
+
options: z3.array(z3.string())
|
|
895
1015
|
})
|
|
896
1016
|
),
|
|
897
1017
|
extraContext: FixExtraContextZ
|
|
898
1018
|
});
|
|
899
|
-
var FixQueryZ =
|
|
900
|
-
__typename:
|
|
901
|
-
id:
|
|
902
|
-
state:
|
|
903
|
-
modifiedBy:
|
|
904
|
-
gitBlameLogin:
|
|
905
|
-
safeIssueLanguage:
|
|
906
|
-
safeIssueType:
|
|
907
|
-
confidence:
|
|
908
|
-
fixReportId:
|
|
909
|
-
isExpired:
|
|
910
|
-
isArchived:
|
|
1019
|
+
var FixQueryZ = z3.object({
|
|
1020
|
+
__typename: z3.literal("fix").optional(),
|
|
1021
|
+
id: z3.string().uuid(),
|
|
1022
|
+
state: z3.nativeEnum(Fix_State_Enum),
|
|
1023
|
+
modifiedBy: z3.string().nullable(),
|
|
1024
|
+
gitBlameLogin: z3.string().nullable(),
|
|
1025
|
+
safeIssueLanguage: z3.string(),
|
|
1026
|
+
safeIssueType: z3.string(),
|
|
1027
|
+
confidence: z3.number(),
|
|
1028
|
+
fixReportId: z3.string().uuid(),
|
|
1029
|
+
isExpired: z3.boolean().default(false),
|
|
1030
|
+
isArchived: z3.boolean().nullable(),
|
|
911
1031
|
// TODO: remove nullish once the data on the backend is ready
|
|
912
|
-
vulnerabilitySeverity:
|
|
913
|
-
fixFiles:
|
|
914
|
-
|
|
915
|
-
fileRepoRelativePath:
|
|
1032
|
+
vulnerabilitySeverity: z3.nativeEnum(Vulnerability_Severity_Enum).nullable().transform((i) => i ?? "low" /* Low */),
|
|
1033
|
+
fixFiles: z3.array(
|
|
1034
|
+
z3.object({
|
|
1035
|
+
fileRepoRelativePath: z3.string()
|
|
916
1036
|
})
|
|
917
1037
|
),
|
|
918
|
-
numberOfVulnerabilityIssues:
|
|
919
|
-
vulnerabilityReportIssues:
|
|
920
|
-
|
|
921
|
-
vendorIssueId:
|
|
922
|
-
issueLanguage:
|
|
1038
|
+
numberOfVulnerabilityIssues: z3.number(),
|
|
1039
|
+
vulnerabilityReportIssues: z3.array(
|
|
1040
|
+
z3.object({
|
|
1041
|
+
vendorIssueId: z3.string(),
|
|
1042
|
+
issueLanguage: z3.string()
|
|
923
1043
|
})
|
|
924
1044
|
),
|
|
925
1045
|
patchAndQuestions: PatchAndQuestionsZ,
|
|
926
1046
|
scmSubmitFixRequests: ScmSubmitFixRequestsZ,
|
|
927
|
-
effortToApplyFix:
|
|
928
|
-
fixRatings:
|
|
1047
|
+
effortToApplyFix: z3.nativeEnum(Effort_To_Apply_Fix_Enum).nullable(),
|
|
1048
|
+
fixRatings: z3.array(FixRatingZ).default([])
|
|
929
1049
|
});
|
|
930
|
-
var FixScreenQueryResultZ =
|
|
931
|
-
fixReport_by_pk:
|
|
932
|
-
id:
|
|
933
|
-
expirationOn:
|
|
934
|
-
createdOn:
|
|
935
|
-
state:
|
|
936
|
-
fixes_aggregate:
|
|
937
|
-
aggregate:
|
|
938
|
-
count:
|
|
1050
|
+
var FixScreenQueryResultZ = z3.object({
|
|
1051
|
+
fixReport_by_pk: z3.object({
|
|
1052
|
+
id: z3.string().uuid(),
|
|
1053
|
+
expirationOn: z3.string(),
|
|
1054
|
+
createdOn: z3.string(),
|
|
1055
|
+
state: z3.nativeEnum(Fix_Report_State_Enum),
|
|
1056
|
+
fixes_aggregate: z3.object({
|
|
1057
|
+
aggregate: z3.object({
|
|
1058
|
+
count: z3.number()
|
|
939
1059
|
})
|
|
940
1060
|
}),
|
|
941
|
-
repo:
|
|
942
|
-
name:
|
|
943
|
-
originalUrl:
|
|
944
|
-
reference:
|
|
945
|
-
commitSha:
|
|
1061
|
+
repo: z3.object({
|
|
1062
|
+
name: z3.string().nullable(),
|
|
1063
|
+
originalUrl: z3.string(),
|
|
1064
|
+
reference: z3.string(),
|
|
1065
|
+
commitSha: z3.string()
|
|
946
1066
|
}),
|
|
947
|
-
vulnerabilityReport:
|
|
948
|
-
vendor:
|
|
949
|
-
vendorReportId:
|
|
950
|
-
projectId:
|
|
951
|
-
project:
|
|
952
|
-
organizationId:
|
|
1067
|
+
vulnerabilityReport: z3.object({
|
|
1068
|
+
vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum),
|
|
1069
|
+
vendorReportId: z3.string().uuid().nullable(),
|
|
1070
|
+
projectId: z3.string().uuid(),
|
|
1071
|
+
project: z3.object({
|
|
1072
|
+
organizationId: z3.string().uuid()
|
|
953
1073
|
}),
|
|
954
|
-
file:
|
|
955
|
-
id:
|
|
956
|
-
path:
|
|
1074
|
+
file: z3.object({
|
|
1075
|
+
id: z3.string().uuid(),
|
|
1076
|
+
path: z3.string()
|
|
957
1077
|
}),
|
|
958
|
-
pending:
|
|
959
|
-
aggregate:
|
|
960
|
-
count:
|
|
1078
|
+
pending: z3.object({
|
|
1079
|
+
aggregate: z3.object({
|
|
1080
|
+
count: z3.number()
|
|
961
1081
|
})
|
|
962
1082
|
}),
|
|
963
|
-
supported:
|
|
964
|
-
aggregate:
|
|
965
|
-
count:
|
|
1083
|
+
supported: z3.object({
|
|
1084
|
+
aggregate: z3.object({
|
|
1085
|
+
count: z3.number()
|
|
966
1086
|
})
|
|
967
1087
|
}),
|
|
968
|
-
all:
|
|
969
|
-
aggregate:
|
|
970
|
-
count:
|
|
1088
|
+
all: z3.object({
|
|
1089
|
+
aggregate: z3.object({
|
|
1090
|
+
count: z3.number()
|
|
971
1091
|
})
|
|
972
1092
|
}),
|
|
973
|
-
fixable:
|
|
974
|
-
aggregate:
|
|
975
|
-
count:
|
|
1093
|
+
fixable: z3.object({
|
|
1094
|
+
aggregate: z3.object({
|
|
1095
|
+
count: z3.number()
|
|
976
1096
|
})
|
|
977
1097
|
}),
|
|
978
|
-
errors:
|
|
979
|
-
aggregate:
|
|
980
|
-
count:
|
|
1098
|
+
errors: z3.object({
|
|
1099
|
+
aggregate: z3.object({
|
|
1100
|
+
count: z3.number()
|
|
981
1101
|
})
|
|
982
1102
|
}),
|
|
983
|
-
vulnerabilityReportIssues:
|
|
984
|
-
extraData:
|
|
985
|
-
missing_files:
|
|
986
|
-
large_files:
|
|
987
|
-
error_files:
|
|
1103
|
+
vulnerabilityReportIssues: z3.object({
|
|
1104
|
+
extraData: z3.object({
|
|
1105
|
+
missing_files: z3.string().array().nullish(),
|
|
1106
|
+
large_files: z3.string().array().nullish(),
|
|
1107
|
+
error_files: z3.string().array().nullish()
|
|
988
1108
|
})
|
|
989
1109
|
}).array()
|
|
990
1110
|
})
|
|
991
1111
|
}),
|
|
992
1112
|
fix_by_pk: FixQueryZ.merge(
|
|
993
|
-
|
|
994
|
-
vulnerabilityReportIssues:
|
|
995
|
-
|
|
996
|
-
vendorIssueId:
|
|
997
|
-
issueType:
|
|
998
|
-
issueLanguage:
|
|
1113
|
+
z3.object({
|
|
1114
|
+
vulnerabilityReportIssues: z3.array(
|
|
1115
|
+
z3.object({
|
|
1116
|
+
vendorIssueId: z3.string(),
|
|
1117
|
+
issueType: z3.string(),
|
|
1118
|
+
issueLanguage: z3.string()
|
|
999
1119
|
})
|
|
1000
1120
|
)
|
|
1001
1121
|
})
|
|
1002
1122
|
),
|
|
1003
|
-
fixesWithSameIssueType:
|
|
1004
|
-
fix:
|
|
1123
|
+
fixesWithSameIssueType: z3.object({
|
|
1124
|
+
fix: z3.array(z3.object({ id: z3.string().uuid() }))
|
|
1005
1125
|
})
|
|
1006
1126
|
});
|
|
1007
|
-
var FixReportByProjectZ =
|
|
1008
|
-
project_by_pk:
|
|
1009
|
-
vulnerabilityReports:
|
|
1010
|
-
|
|
1011
|
-
fixReport:
|
|
1127
|
+
var FixReportByProjectZ = z3.object({
|
|
1128
|
+
project_by_pk: z3.object({
|
|
1129
|
+
vulnerabilityReports: z3.array(
|
|
1130
|
+
z3.object({
|
|
1131
|
+
fixReport: z3.object({ id: z3.string().uuid() }).nullable()
|
|
1012
1132
|
})
|
|
1013
1133
|
)
|
|
1014
1134
|
})
|
|
1015
1135
|
});
|
|
1016
|
-
var FixPageQueryZ =
|
|
1136
|
+
var FixPageQueryZ = z3.object({
|
|
1017
1137
|
data: FixScreenQueryResultZ
|
|
1018
1138
|
});
|
|
1019
|
-
var GetReportFixesQueryZ =
|
|
1020
|
-
fixReport:
|
|
1139
|
+
var GetReportFixesQueryZ = z3.object({
|
|
1140
|
+
fixReport: z3.object({
|
|
1021
1141
|
fixes: ReportFixesQueryZ,
|
|
1022
|
-
vulnerabilityReport:
|
|
1023
|
-
vulnerabilityReportIssues_aggregate:
|
|
1024
|
-
aggregate:
|
|
1142
|
+
vulnerabilityReport: z3.object({
|
|
1143
|
+
vulnerabilityReportIssues_aggregate: z3.object({
|
|
1144
|
+
aggregate: z3.object({ count: z3.number() })
|
|
1025
1145
|
})
|
|
1026
1146
|
})
|
|
1027
1147
|
}).array()
|
|
1028
1148
|
}).nullish();
|
|
1029
|
-
var ProjectVulnerabilityReport =
|
|
1030
|
-
id:
|
|
1031
|
-
name:
|
|
1032
|
-
vendor:
|
|
1033
|
-
fixReport:
|
|
1034
|
-
id:
|
|
1035
|
-
createdOn:
|
|
1036
|
-
fixes_aggregate:
|
|
1037
|
-
aggregate:
|
|
1038
|
-
count:
|
|
1149
|
+
var ProjectVulnerabilityReport = z3.object({
|
|
1150
|
+
id: z3.string().uuid(),
|
|
1151
|
+
name: z3.string().nullable(),
|
|
1152
|
+
vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
|
|
1153
|
+
fixReport: z3.object({
|
|
1154
|
+
id: z3.string().uuid(),
|
|
1155
|
+
createdOn: z3.string(),
|
|
1156
|
+
fixes_aggregate: z3.object({
|
|
1157
|
+
aggregate: z3.object({
|
|
1158
|
+
count: z3.number()
|
|
1039
1159
|
})
|
|
1040
1160
|
}),
|
|
1041
|
-
issueTypes:
|
|
1042
|
-
issueLanguages:
|
|
1043
|
-
fixesCountByEffort:
|
|
1044
|
-
vulnerabilitySeverities:
|
|
1045
|
-
fixesDoneCount:
|
|
1046
|
-
fixesInprogressCount:
|
|
1047
|
-
fixesReadyCount:
|
|
1048
|
-
repo:
|
|
1049
|
-
originalUrl:
|
|
1050
|
-
reference:
|
|
1051
|
-
name:
|
|
1161
|
+
issueTypes: z3.record(z3.string(), z3.number()).nullable(),
|
|
1162
|
+
issueLanguages: z3.record(z3.nativeEnum(IssueLanguage_Enum), z3.number()).nullable(),
|
|
1163
|
+
fixesCountByEffort: z3.record(z3.nativeEnum(Effort_To_Apply_Fix_Enum), z3.number()).nullable(),
|
|
1164
|
+
vulnerabilitySeverities: z3.record(z3.nativeEnum(Vulnerability_Severity_Enum), z3.number()).nullable(),
|
|
1165
|
+
fixesDoneCount: z3.number(),
|
|
1166
|
+
fixesInprogressCount: z3.number(),
|
|
1167
|
+
fixesReadyCount: z3.number(),
|
|
1168
|
+
repo: z3.object({
|
|
1169
|
+
originalUrl: z3.string(),
|
|
1170
|
+
reference: z3.string(),
|
|
1171
|
+
name: z3.string()
|
|
1052
1172
|
}),
|
|
1053
|
-
createdByUser:
|
|
1054
|
-
email:
|
|
1173
|
+
createdByUser: z3.object({
|
|
1174
|
+
email: z3.string()
|
|
1055
1175
|
}).nullable(),
|
|
1056
|
-
state:
|
|
1057
|
-
expirationOn:
|
|
1176
|
+
state: z3.nativeEnum(Fix_Report_State_Enum),
|
|
1177
|
+
expirationOn: z3.string()
|
|
1058
1178
|
})
|
|
1059
1179
|
});
|
|
1060
|
-
var ProjectGetProjectZ =
|
|
1061
|
-
id:
|
|
1062
|
-
name:
|
|
1063
|
-
vulnerabilityReports:
|
|
1064
|
-
vendor:
|
|
1065
|
-
fixReport:
|
|
1066
|
-
issueLanguages:
|
|
1067
|
-
state:
|
|
1068
|
-
fixes_aggregate:
|
|
1069
|
-
aggregate:
|
|
1070
|
-
count:
|
|
1180
|
+
var ProjectGetProjectZ = z3.object({
|
|
1181
|
+
id: z3.string().uuid(),
|
|
1182
|
+
name: z3.string(),
|
|
1183
|
+
vulnerabilityReports: z3.object({
|
|
1184
|
+
vendor: z3.nativeEnum(Vulnerability_Report_Vendor_Enum).nullable(),
|
|
1185
|
+
fixReport: z3.object({
|
|
1186
|
+
issueLanguages: z3.record(z3.nativeEnum(IssueLanguage_Enum), z3.number()).nullable(),
|
|
1187
|
+
state: z3.nativeEnum(Fix_Report_State_Enum),
|
|
1188
|
+
fixes_aggregate: z3.object({
|
|
1189
|
+
aggregate: z3.object({
|
|
1190
|
+
count: z3.number()
|
|
1071
1191
|
})
|
|
1072
1192
|
}),
|
|
1073
|
-
repo:
|
|
1074
|
-
originalUrl:
|
|
1075
|
-
reference:
|
|
1193
|
+
repo: z3.object({
|
|
1194
|
+
originalUrl: z3.string(),
|
|
1195
|
+
reference: z3.string()
|
|
1076
1196
|
}),
|
|
1077
|
-
expirationOn:
|
|
1197
|
+
expirationOn: z3.string()
|
|
1078
1198
|
})
|
|
1079
1199
|
}).array()
|
|
1080
1200
|
});
|
|
1081
|
-
var GetProjectsQueryZ =
|
|
1082
|
-
var ProjectPageQueryResultZ =
|
|
1083
|
-
name:
|
|
1084
|
-
id:
|
|
1085
|
-
isDefault:
|
|
1086
|
-
organizationId:
|
|
1087
|
-
vulnerabilityReports:
|
|
1201
|
+
var GetProjectsQueryZ = z3.array(ProjectGetProjectZ);
|
|
1202
|
+
var ProjectPageQueryResultZ = z3.object({
|
|
1203
|
+
name: z3.string(),
|
|
1204
|
+
id: z3.string().uuid(),
|
|
1205
|
+
isDefault: z3.boolean().default(false),
|
|
1206
|
+
organizationId: z3.string().uuid(),
|
|
1207
|
+
vulnerabilityReports: z3.array(ProjectVulnerabilityReport),
|
|
1208
|
+
projectIssueTypeSettings: z3.array(
|
|
1209
|
+
IssueTypeSettingZ.merge(z3.object({ id: z3.string() }))
|
|
1210
|
+
)
|
|
1088
1211
|
});
|
|
1089
|
-
var GetProjectMembersDataZ =
|
|
1090
|
-
project_by_pk:
|
|
1091
|
-
name:
|
|
1092
|
-
id:
|
|
1093
|
-
projectUsers:
|
|
1094
|
-
|
|
1095
|
-
projectToRole:
|
|
1096
|
-
projectRole:
|
|
1097
|
-
type:
|
|
1212
|
+
var GetProjectMembersDataZ = z3.object({
|
|
1213
|
+
project_by_pk: z3.object({
|
|
1214
|
+
name: z3.string(),
|
|
1215
|
+
id: z3.string(),
|
|
1216
|
+
projectUsers: z3.array(
|
|
1217
|
+
z3.object({
|
|
1218
|
+
projectToRole: z3.object({
|
|
1219
|
+
projectRole: z3.object({
|
|
1220
|
+
type: z3.nativeEnum(Project_Role_Type_Enum)
|
|
1098
1221
|
})
|
|
1099
1222
|
}),
|
|
1100
|
-
user:
|
|
1101
|
-
id:
|
|
1102
|
-
picture:
|
|
1103
|
-
name:
|
|
1104
|
-
email:
|
|
1223
|
+
user: z3.object({
|
|
1224
|
+
id: z3.string().uuid(),
|
|
1225
|
+
picture: z3.string().optional(),
|
|
1226
|
+
name: z3.string().nullish(),
|
|
1227
|
+
email: z3.string().email()
|
|
1105
1228
|
})
|
|
1106
1229
|
})
|
|
1107
1230
|
)
|
|
1108
1231
|
})
|
|
1109
1232
|
});
|
|
1110
|
-
var RepoArgs =
|
|
1111
|
-
originalUrl:
|
|
1112
|
-
branch:
|
|
1113
|
-
commitSha:
|
|
1233
|
+
var RepoArgs = z3.object({
|
|
1234
|
+
originalUrl: z3.string().url(),
|
|
1235
|
+
branch: z3.string(),
|
|
1236
|
+
commitSha: z3.string()
|
|
1114
1237
|
});
|
|
1115
1238
|
var scmCloudUrl = {
|
|
1116
1239
|
GitLab: "https://gitlab.com",
|
|
@@ -1150,12 +1273,12 @@ var scannerToVulnerability_Report_Vendor_Enum = {
|
|
|
1150
1273
|
[SCANNERS.Codeql]: "codeql" /* Codeql */,
|
|
1151
1274
|
[SCANNERS.Fortify]: "fortify" /* Fortify */
|
|
1152
1275
|
};
|
|
1153
|
-
var SupportedScannersZ =
|
|
1154
|
-
var envVariablesSchema =
|
|
1155
|
-
WEB_APP_URL:
|
|
1156
|
-
API_URL:
|
|
1157
|
-
HASURA_ACCESS_KEY:
|
|
1158
|
-
LOCAL_GRAPHQL_ENDPOINT:
|
|
1276
|
+
var SupportedScannersZ = z4.enum([SCANNERS.Checkmarx, SCANNERS.Snyk]);
|
|
1277
|
+
var envVariablesSchema = z4.object({
|
|
1278
|
+
WEB_APP_URL: z4.string(),
|
|
1279
|
+
API_URL: z4.string(),
|
|
1280
|
+
HASURA_ACCESS_KEY: z4.string(),
|
|
1281
|
+
LOCAL_GRAPHQL_ENDPOINT: z4.string()
|
|
1159
1282
|
}).required();
|
|
1160
1283
|
var envVariables = envVariablesSchema.parse(process.env);
|
|
1161
1284
|
debug("config %o", envVariables);
|
|
@@ -1293,7 +1416,7 @@ import fetch4 from "node-fetch";
|
|
|
1293
1416
|
import open2 from "open";
|
|
1294
1417
|
import semver from "semver";
|
|
1295
1418
|
import tmp2 from "tmp";
|
|
1296
|
-
import { z as
|
|
1419
|
+
import { z as z22 } from "zod";
|
|
1297
1420
|
|
|
1298
1421
|
// src/features/analysis/add_fix_comments_for_pr/add_fix_comments_for_pr.ts
|
|
1299
1422
|
import Debug7 from "debug";
|
|
@@ -1305,29 +1428,33 @@ var DEFUALT_ADO_ORIGIN = scmCloudUrl.Ado;
|
|
|
1305
1428
|
import querystring3 from "node:querystring";
|
|
1306
1429
|
import * as api from "azure-devops-node-api";
|
|
1307
1430
|
import Debug3 from "debug";
|
|
1308
|
-
import { z as
|
|
1431
|
+
import { z as z18 } from "zod";
|
|
1309
1432
|
|
|
1310
1433
|
// src/features/analysis/scm/env.ts
|
|
1311
|
-
import { z as
|
|
1312
|
-
var EnvVariablesZod =
|
|
1313
|
-
GITLAB_API_TOKEN:
|
|
1314
|
-
GITHUB_API_TOKEN:
|
|
1315
|
-
GIT_PROXY_HOST:
|
|
1434
|
+
import { z as z5 } from "zod";
|
|
1435
|
+
var EnvVariablesZod = z5.object({
|
|
1436
|
+
GITLAB_API_TOKEN: z5.string().optional(),
|
|
1437
|
+
GITHUB_API_TOKEN: z5.string().optional(),
|
|
1438
|
+
GIT_PROXY_HOST: z5.string()
|
|
1316
1439
|
});
|
|
1317
1440
|
var { GITLAB_API_TOKEN, GITHUB_API_TOKEN, GIT_PROXY_HOST } = EnvVariablesZod.parse(process.env);
|
|
1318
1441
|
|
|
1319
1442
|
// src/features/analysis/scm/scm.ts
|
|
1320
|
-
import { z as
|
|
1443
|
+
import { z as z16 } from "zod";
|
|
1321
1444
|
|
|
1322
1445
|
// src/features/analysis/scm/bitbucket/bitbucket.ts
|
|
1323
1446
|
import querystring from "node:querystring";
|
|
1324
1447
|
import bitbucketPkg from "bitbucket";
|
|
1325
1448
|
import * as bitbucketPkgNode from "bitbucket";
|
|
1326
1449
|
import Debug2 from "debug";
|
|
1327
|
-
import { z as
|
|
1450
|
+
import { z as z12 } from "zod";
|
|
1451
|
+
|
|
1452
|
+
// src/features/analysis/scm/constants.ts
|
|
1453
|
+
var MOBB_ICON_IMG = "https://app.mobb.ai/gh-action/Logo_Rounded_Icon.svg";
|
|
1454
|
+
var MAX_BRANCHES_FETCH = 100;
|
|
1328
1455
|
|
|
1329
1456
|
// src/features/analysis/scm/shared/src/commitDescriptionMarkup.ts
|
|
1330
|
-
import { z as
|
|
1457
|
+
import { z as z6 } from "zod";
|
|
1331
1458
|
|
|
1332
1459
|
// src/features/analysis/scm/shared/src/fixDetailsData.ts
|
|
1333
1460
|
var fixDetailsData = {
|
|
@@ -1547,93 +1674,11 @@ var fixDetailsData = {
|
|
|
1547
1674
|
fixInstructions: "Use express-rate-limit npm package to set a rate limit."
|
|
1548
1675
|
},
|
|
1549
1676
|
["MISSING_CSP_HEADER" /* MissingCspHeader */]: void 0,
|
|
1550
|
-
["HARDCODED_DOMAIN_IN_HTML" /* HardcodedDomainInHtml */]: void 0
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
import { z as z4 } from "zod";
|
|
1555
|
-
var issueTypeMap = {
|
|
1556
|
-
["NO_LIMITS_OR_THROTTLING" /* NoLimitsOrThrottling */]: "Missing Rate Limiting",
|
|
1557
|
-
["SQL_Injection" /* SqlInjection */]: "SQL Injection",
|
|
1558
|
-
["CMDi_relative_path_command" /* CmDiRelativePathCommand */]: "Relative Path Command Injection",
|
|
1559
|
-
["CMDi" /* CmDi */]: "Command Injection",
|
|
1560
|
-
["CONFUSING_NAMING" /* ConfusingNaming */]: "Confusing Naming",
|
|
1561
|
-
["XXE" /* Xxe */]: "XXE",
|
|
1562
|
-
["XSS" /* Xss */]: "XSS",
|
|
1563
|
-
["PT" /* Pt */]: "Path Traversal",
|
|
1564
|
-
["ZIP_SLIP" /* ZipSlip */]: "Zip Slip",
|
|
1565
|
-
["INSECURE_RANDOMNESS" /* InsecureRandomness */]: "Insecure Randomness",
|
|
1566
|
-
["SSRF" /* Ssrf */]: "Server Side Request Forgery",
|
|
1567
|
-
["TYPE_CONFUSION" /* TypeConfusion */]: "Type Confusion",
|
|
1568
|
-
["REGEX_INJECTION" /* RegexInjection */]: "Regular Expression Injection",
|
|
1569
|
-
["INCOMPLETE_URL_SANITIZATION" /* IncompleteUrlSanitization */]: "Incomplete URL Sanitization",
|
|
1570
|
-
["LOCALE_DEPENDENT_COMPARISON" /* LocaleDependentComparison */]: "Locale Dependent Comparison",
|
|
1571
|
-
["LOG_FORGING" /* LogForging */]: "Log Forging",
|
|
1572
|
-
["MISSING_CHECK_AGAINST_NULL" /* MissingCheckAgainstNull */]: "Missing Check against Null",
|
|
1573
|
-
["PASSWORD_IN_COMMENT" /* PasswordInComment */]: "Password in Comment",
|
|
1574
|
-
["OVERLY_BROAD_CATCH" /* OverlyBroadCatch */]: "Poor Error Handling: Overly Broad Catch",
|
|
1575
|
-
["USE_OF_SYSTEM_OUTPUT_STREAM" /* UseOfSystemOutputStream */]: "Use of System.out/System.err",
|
|
1576
|
-
["DANGEROUS_FUNCTION_OVERFLOW" /* DangerousFunctionOverflow */]: "Use of dangerous function",
|
|
1577
|
-
["DOS_STRING_BUILDER" /* DosStringBuilder */]: "Denial of Service: StringBuilder",
|
|
1578
|
-
["OPEN_REDIRECT" /* OpenRedirect */]: "Open Redirect",
|
|
1579
|
-
["WEAK_XML_SCHEMA_UNBOUNDED_OCCURRENCES" /* WeakXmlSchemaUnboundedOccurrences */]: "Weak XML Schema: Unbounded Occurrences",
|
|
1580
|
-
["SYSTEM_INFORMATION_LEAK" /* SystemInformationLeak */]: "System Information Leak",
|
|
1581
|
-
["SYSTEM_INFORMATION_LEAK_EXTERNAL" /* SystemInformationLeakExternal */]: "External System Information Leak",
|
|
1582
|
-
["HTTP_RESPONSE_SPLITTING" /* HttpResponseSplitting */]: "HTTP response splitting",
|
|
1583
|
-
["HTTP_ONLY_COOKIE" /* HttpOnlyCookie */]: "Cookie is not HttpOnly",
|
|
1584
|
-
["INSECURE_COOKIE" /* InsecureCookie */]: "Insecure Cookie",
|
|
1585
|
-
["TRUST_BOUNDARY_VIOLATION" /* TrustBoundaryViolation */]: "Trust Boundary Violation",
|
|
1586
|
-
["NULL_DEREFERENCE" /* NullDereference */]: "Null Dereference",
|
|
1587
|
-
["UNSAFE_DESERIALIZATION" /* UnsafeDeserialization */]: "Unsafe deserialization",
|
|
1588
|
-
["INSECURE_BINDER_CONFIGURATION" /* InsecureBinderConfiguration */]: "Insecure Binder Configuration",
|
|
1589
|
-
["UNSAFE_TARGET_BLANK" /* UnsafeTargetBlank */]: "Unsafe use of target blank",
|
|
1590
|
-
["IFRAME_WITHOUT_SANDBOX" /* IframeWithoutSandbox */]: "Client use of iframe without sandbox",
|
|
1591
|
-
["JQUERY_DEPRECATED_SYMBOLS" /* JqueryDeprecatedSymbols */]: "jQuery deprecated symbols",
|
|
1592
|
-
["MISSING_ANTIFORGERY_VALIDATION" /* MissingAntiforgeryValidation */]: "Missing Anti-Forgery Validation",
|
|
1593
|
-
["GRAPHQL_DEPTH_LIMIT" /* GraphqlDepthLimit */]: "GraphQL Depth Limit",
|
|
1594
|
-
["UNCHECKED_LOOP_CONDITION" /* UncheckedLoopCondition */]: "Unchecked Loop Condition",
|
|
1595
|
-
["IMPROPER_RESOURCE_SHUTDOWN_OR_RELEASE" /* ImproperResourceShutdownOrRelease */]: "Improper Resource Shutdown or Release",
|
|
1596
|
-
["IMPROPER_EXCEPTION_HANDLING" /* ImproperExceptionHandling */]: "Improper Exception Handling",
|
|
1597
|
-
["DEFAULT_RIGHTS_IN_OBJ_DEFINITION" /* DefaultRightsInObjDefinition */]: "Default Definer Rights in Package or Object Definition",
|
|
1598
|
-
["HTML_COMMENT_IN_JSP" /* HtmlCommentInJsp */]: "HTML Comment in JSP",
|
|
1599
|
-
["ERROR_CONDTION_WITHOUT_ACTION" /* ErrorCondtionWithoutAction */]: "Error Condition Without Action",
|
|
1600
|
-
["DEPRECATED_FUNCTION" /* DeprecatedFunction */]: "Deprecated Function",
|
|
1601
|
-
["HARDCODED_SECRETS" /* HardcodedSecrets */]: "Hardcoded Secrets",
|
|
1602
|
-
["PROTOTYPE_POLLUTION" /* PrototypePollution */]: "Prototype Pollution",
|
|
1603
|
-
["RACE_CONDITION_FORMAT_FLAW" /* RaceConditionFormatFlaw */]: "Race Condition Format Flaw",
|
|
1604
|
-
["NON_FINAL_PUBLIC_STATIC_FIELD" /* NonFinalPublicStaticField */]: "Non-final Public Static Field",
|
|
1605
|
-
["MISSING_HSTS_HEADER" /* MissingHstsHeader */]: "Missing HSTS Header",
|
|
1606
|
-
["DEAD_CODE_UNUSED_FIELD" /* DeadCodeUnusedField */]: "Dead Code: Unused Field",
|
|
1607
|
-
["HEADER_MANIPULATION" /* HeaderManipulation */]: "Header Manipulation",
|
|
1608
|
-
["MISSING_EQUALS_OR_HASHCODE" /* MissingEqualsOrHashcode */]: "Missing equals or hashcode method",
|
|
1609
|
-
["WCF_MISCONFIGURATION_INSUFFICIENT_LOGGING" /* WcfMisconfigurationInsufficientLogging */]: "WCF Misconfiguration: Insufficient Logging",
|
|
1610
|
-
["WCF_MISCONFIGURATION_THROTTLING_NOT_ENABLED" /* WcfMisconfigurationThrottlingNotEnabled */]: "WCF Misconfiguration: Throttling Not Enabled",
|
|
1611
|
-
["USELESS_REGEXP_CHAR_ESCAPE" /* UselessRegexpCharEscape */]: "Useless regular-expression character escape",
|
|
1612
|
-
["INCOMPLETE_HOSTNAME_REGEX" /* IncompleteHostnameRegex */]: "Incomplete Hostname Regex",
|
|
1613
|
-
["OVERLY_LARGE_RANGE" /* OverlyLargeRange */]: "Regex: Overly Large Range",
|
|
1614
|
-
["INSUFFICIENT_LOGGING" /* InsufficientLogging */]: "Insufficient Logging of Sensitive Operations",
|
|
1615
|
-
["PRIVACY_VIOLATION" /* PrivacyViolation */]: "Privacy Violation",
|
|
1616
|
-
["INCOMPLETE_URL_SCHEME_CHECK" /* IncompleteUrlSchemeCheck */]: "Incomplete URL Scheme Check",
|
|
1617
|
-
["VALUE_NEVER_READ" /* ValueNeverRead */]: "Value Never Read",
|
|
1618
|
-
["VALUE_SHADOWING" /* ValueShadowing */]: "Value Shadowing",
|
|
1619
|
-
["NO_EQUIVALENCE_METHOD" /* NoEquivalenceMethod */]: "Class Does Not Implement Equivalence Method",
|
|
1620
|
-
["INFORMATION_EXPOSURE_VIA_HEADERS" /* InformationExposureViaHeaders */]: "Information Exposure via Headers",
|
|
1621
|
-
["DEBUG_ENABLED" /* DebugEnabled */]: "Debug Enabled",
|
|
1622
|
-
["LEFTOVER_DEBUG_CODE" /* LeftoverDebugCode */]: "Leftover Debug Code",
|
|
1623
|
-
["POOR_ERROR_HANDLING_EMPTY_CATCH_BLOCK" /* PoorErrorHandlingEmptyCatchBlock */]: "Poor Error Handling: Empty Catch Block",
|
|
1624
|
-
["ERRONEOUS_STRING_COMPARE" /* ErroneousStringCompare */]: "Erroneous String Compare",
|
|
1625
|
-
["UNVALIDATED_PUBLIC_METHOD_ARGUMENT" /* UnvalidatedPublicMethodArgument */]: "Unvalidated Public Method Argument",
|
|
1626
|
-
["AUTO_ESCAPE_FALSE" /* AutoEscapeFalse */]: "Auto-escape False",
|
|
1627
|
-
["MISSING_CSP_HEADER" /* MissingCspHeader */]: "Missing CSP Header",
|
|
1628
|
-
["HARDCODED_DOMAIN_IN_HTML" /* HardcodedDomainInHtml */]: "Hardcoded Domain in HTML"
|
|
1629
|
-
};
|
|
1630
|
-
var issueTypeZ = z4.nativeEnum(IssueType_Enum);
|
|
1631
|
-
var getIssueTypeFriendlyString = (issueType) => {
|
|
1632
|
-
const issueTypeZParseRes = issueTypeZ.safeParse(issueType);
|
|
1633
|
-
if (!issueTypeZParseRes.success) {
|
|
1634
|
-
return issueType ? issueType.replaceAll("_", " ") : "Other";
|
|
1677
|
+
["HARDCODED_DOMAIN_IN_HTML" /* HardcodedDomainInHtml */]: void 0,
|
|
1678
|
+
["HEAP_INSPECTION" /* HeapInspection */]: {
|
|
1679
|
+
issueDescription: "All variables stored by the application in unencrypted memory can be read by an attacker. This can lead to the exposure of sensitive information, such as passwords, credit card numbers, and personal data.",
|
|
1680
|
+
fixInstructions: "Use secure storage methods to store secrets in memory."
|
|
1635
1681
|
}
|
|
1636
|
-
return issueTypeMap[issueTypeZParseRes.data];
|
|
1637
1682
|
};
|
|
1638
1683
|
|
|
1639
1684
|
// src/features/analysis/scm/shared/src/commitDescriptionMarkup.ts
|
|
@@ -1653,7 +1698,7 @@ var getCommitDescription = ({
|
|
|
1653
1698
|
guidances,
|
|
1654
1699
|
fixUrl
|
|
1655
1700
|
}) => {
|
|
1656
|
-
const parseIssueTypeRes =
|
|
1701
|
+
const parseIssueTypeRes = z6.nativeEnum(IssueType_Enum).safeParse(issueType);
|
|
1657
1702
|
if (!parseIssueTypeRes.success) {
|
|
1658
1703
|
return "";
|
|
1659
1704
|
}
|
|
@@ -1684,10 +1729,10 @@ ${guidances.map(({ guidance }) => `## Additional actions required
|
|
|
1684
1729
|
};
|
|
1685
1730
|
|
|
1686
1731
|
// src/features/analysis/scm/shared/src/guidances.ts
|
|
1687
|
-
import { z as
|
|
1732
|
+
import { z as z9 } from "zod";
|
|
1688
1733
|
|
|
1689
1734
|
// src/features/analysis/scm/shared/src/storedFixData/index.ts
|
|
1690
|
-
import { z as
|
|
1735
|
+
import { z as z7 } from "zod";
|
|
1691
1736
|
|
|
1692
1737
|
// src/features/analysis/scm/shared/src/storedFixData/passwordInComment.ts
|
|
1693
1738
|
var passwordInComment = {
|
|
@@ -1842,8 +1887,8 @@ var vulnerabilities6 = {
|
|
|
1842
1887
|
var xml_default = vulnerabilities6;
|
|
1843
1888
|
|
|
1844
1889
|
// src/features/analysis/scm/shared/src/storedFixData/index.ts
|
|
1845
|
-
var StoredFixDataItemZ =
|
|
1846
|
-
guidance:
|
|
1890
|
+
var StoredFixDataItemZ = z7.object({
|
|
1891
|
+
guidance: z7.function().returns(z7.string())
|
|
1847
1892
|
});
|
|
1848
1893
|
var languages = {
|
|
1849
1894
|
["Java" /* Java */]: java_default,
|
|
@@ -1855,7 +1900,7 @@ var languages = {
|
|
|
1855
1900
|
};
|
|
1856
1901
|
|
|
1857
1902
|
// src/features/analysis/scm/shared/src/storedQuestionData/index.ts
|
|
1858
|
-
import { z as
|
|
1903
|
+
import { z as z8 } from "zod";
|
|
1859
1904
|
|
|
1860
1905
|
// src/features/analysis/scm/shared/src/storedQuestionData/csharp/httpOnlyCookie.ts
|
|
1861
1906
|
var httpOnlyCookie = {
|
|
@@ -2921,10 +2966,10 @@ var vulnerabilities10 = {
|
|
|
2921
2966
|
var xml_default2 = vulnerabilities10;
|
|
2922
2967
|
|
|
2923
2968
|
// src/features/analysis/scm/shared/src/storedQuestionData/index.ts
|
|
2924
|
-
var StoredQuestionDataItemZ =
|
|
2925
|
-
content:
|
|
2926
|
-
description:
|
|
2927
|
-
guidance:
|
|
2969
|
+
var StoredQuestionDataItemZ = z8.object({
|
|
2970
|
+
content: z8.function().args(z8.any()).returns(z8.string()),
|
|
2971
|
+
description: z8.function().args(z8.any()).returns(z8.string()),
|
|
2972
|
+
guidance: z8.function().args(z8.any()).returns(z8.string())
|
|
2928
2973
|
});
|
|
2929
2974
|
var languages2 = {
|
|
2930
2975
|
["Java" /* Java */]: java_default2,
|
|
@@ -3017,9 +3062,9 @@ function getFixGuidances({
|
|
|
3017
3062
|
const fixGuidance = storeFixResult.success ? [storeFixResult.data.guidance({ questions, ...extraContext })] : [];
|
|
3018
3063
|
return libGuidances.concat(fixGuidance).filter((guidance) => !!guidance);
|
|
3019
3064
|
}
|
|
3020
|
-
var IssueTypeAndLanguageZ =
|
|
3021
|
-
issueType:
|
|
3022
|
-
issueLanguage:
|
|
3065
|
+
var IssueTypeAndLanguageZ = z9.object({
|
|
3066
|
+
issueType: z9.nativeEnum(IssueType_Enum),
|
|
3067
|
+
issueLanguage: z9.nativeEnum(IssueLanguage_Enum)
|
|
3023
3068
|
});
|
|
3024
3069
|
function getGuidances(args) {
|
|
3025
3070
|
const safeIssueTypeAndLanguage = IssueTypeAndLanguageZ.safeParse({
|
|
@@ -3057,7 +3102,7 @@ function getGuidances(args) {
|
|
|
3057
3102
|
}
|
|
3058
3103
|
|
|
3059
3104
|
// src/features/analysis/scm/shared/src/urlParser/urlParser.ts
|
|
3060
|
-
import { z as
|
|
3105
|
+
import { z as z10 } from "zod";
|
|
3061
3106
|
function detectAdoUrl(args) {
|
|
3062
3107
|
const { pathname, hostname, scmType } = args;
|
|
3063
3108
|
const hostnameParts = hostname.split(".");
|
|
@@ -3072,7 +3117,7 @@ function detectAdoUrl(args) {
|
|
|
3072
3117
|
scmType: "Ado" /* Ado */,
|
|
3073
3118
|
organization,
|
|
3074
3119
|
// project has single repo - repoName === projectName
|
|
3075
|
-
projectName:
|
|
3120
|
+
projectName: z10.string().parse(projectName),
|
|
3076
3121
|
repoName: projectName,
|
|
3077
3122
|
prefixPath
|
|
3078
3123
|
};
|
|
@@ -3083,7 +3128,7 @@ function detectAdoUrl(args) {
|
|
|
3083
3128
|
return {
|
|
3084
3129
|
scmType: "Ado" /* Ado */,
|
|
3085
3130
|
organization,
|
|
3086
|
-
projectName:
|
|
3131
|
+
projectName: z10.string().parse(projectName),
|
|
3087
3132
|
repoName,
|
|
3088
3133
|
prefixPath
|
|
3089
3134
|
};
|
|
@@ -3097,7 +3142,7 @@ function detectAdoUrl(args) {
|
|
|
3097
3142
|
scmType: "Ado" /* Ado */,
|
|
3098
3143
|
organization,
|
|
3099
3144
|
// project has only one repo - repoName === projectName
|
|
3100
|
-
projectName:
|
|
3145
|
+
projectName: z10.string().parse(repoName),
|
|
3101
3146
|
repoName,
|
|
3102
3147
|
prefixPath
|
|
3103
3148
|
};
|
|
@@ -3107,7 +3152,7 @@ function detectAdoUrl(args) {
|
|
|
3107
3152
|
return {
|
|
3108
3153
|
scmType: "Ado" /* Ado */,
|
|
3109
3154
|
organization,
|
|
3110
|
-
projectName:
|
|
3155
|
+
projectName: z10.string().parse(projectName),
|
|
3111
3156
|
repoName,
|
|
3112
3157
|
prefixPath
|
|
3113
3158
|
};
|
|
@@ -3331,30 +3376,30 @@ var sanityRepoURL = (scmURL) => {
|
|
|
3331
3376
|
};
|
|
3332
3377
|
|
|
3333
3378
|
// src/features/analysis/scm/bitbucket/validation.ts
|
|
3334
|
-
import { z as
|
|
3335
|
-
var BitbucketAuthResultZ =
|
|
3336
|
-
access_token:
|
|
3337
|
-
token_type:
|
|
3338
|
-
refresh_token:
|
|
3379
|
+
import { z as z11 } from "zod";
|
|
3380
|
+
var BitbucketAuthResultZ = z11.object({
|
|
3381
|
+
access_token: z11.string(),
|
|
3382
|
+
token_type: z11.string(),
|
|
3383
|
+
refresh_token: z11.string()
|
|
3339
3384
|
});
|
|
3340
3385
|
|
|
3341
3386
|
// src/features/analysis/scm/bitbucket/bitbucket.ts
|
|
3342
3387
|
var debug2 = Debug2("scm:bitbucket");
|
|
3343
3388
|
var BITBUCKET_HOSTNAME = "bitbucket.org";
|
|
3344
|
-
var TokenExpiredErrorZ =
|
|
3345
|
-
status:
|
|
3346
|
-
error:
|
|
3347
|
-
type:
|
|
3348
|
-
error:
|
|
3349
|
-
message:
|
|
3389
|
+
var TokenExpiredErrorZ = z12.object({
|
|
3390
|
+
status: z12.number(),
|
|
3391
|
+
error: z12.object({
|
|
3392
|
+
type: z12.string(),
|
|
3393
|
+
error: z12.object({
|
|
3394
|
+
message: z12.string()
|
|
3350
3395
|
})
|
|
3351
3396
|
})
|
|
3352
3397
|
});
|
|
3353
3398
|
var BITBUCKET_ACCESS_TOKEN_URL = `https://${BITBUCKET_HOSTNAME}/site/oauth2/access_token`;
|
|
3354
|
-
var BitbucketParseResultZ =
|
|
3355
|
-
organization:
|
|
3356
|
-
repoName:
|
|
3357
|
-
hostname:
|
|
3399
|
+
var BitbucketParseResultZ = z12.object({
|
|
3400
|
+
organization: z12.string(),
|
|
3401
|
+
repoName: z12.string(),
|
|
3402
|
+
hostname: z12.literal(BITBUCKET_HOSTNAME)
|
|
3358
3403
|
});
|
|
3359
3404
|
function parseBitbucketOrganizationAndRepo(bitbucketUrl) {
|
|
3360
3405
|
const parsedGitHubUrl = normalizeUrl(bitbucketUrl);
|
|
@@ -3407,12 +3452,14 @@ function getBitbucketSdk(params) {
|
|
|
3407
3452
|
);
|
|
3408
3453
|
const res = await bitbucketClient.refs.listBranches({
|
|
3409
3454
|
repo_slug: repoSlug,
|
|
3410
|
-
workspace
|
|
3455
|
+
workspace,
|
|
3456
|
+
pagelen: MAX_BRANCHES_FETCH,
|
|
3457
|
+
sort: "-target.date"
|
|
3411
3458
|
});
|
|
3412
3459
|
if (!res.data.values) {
|
|
3413
3460
|
return [];
|
|
3414
3461
|
}
|
|
3415
|
-
return res.data.values.filter((branch) => !!branch.name).map((branch) =>
|
|
3462
|
+
return res.data.values.filter((branch) => !!branch.name).map((branch) => z12.string().parse(branch.name));
|
|
3416
3463
|
},
|
|
3417
3464
|
async getIsUserCollaborator(params2) {
|
|
3418
3465
|
const { repoUrl } = params2;
|
|
@@ -3527,7 +3574,7 @@ function getBitbucketSdk(params) {
|
|
|
3527
3574
|
return GetRefererenceResultZ.parse({
|
|
3528
3575
|
sha: tagRes.data.target?.hash,
|
|
3529
3576
|
type: "TAG" /* TAG */,
|
|
3530
|
-
date: new Date(
|
|
3577
|
+
date: new Date(z12.string().parse(tagRes.data.target?.date))
|
|
3531
3578
|
});
|
|
3532
3579
|
},
|
|
3533
3580
|
async getBranchRef(params2) {
|
|
@@ -3535,7 +3582,7 @@ function getBitbucketSdk(params) {
|
|
|
3535
3582
|
return GetRefererenceResultZ.parse({
|
|
3536
3583
|
sha: getBranchRes.target?.hash,
|
|
3537
3584
|
type: "BRANCH" /* BRANCH */,
|
|
3538
|
-
date: new Date(
|
|
3585
|
+
date: new Date(z12.string().parse(getBranchRes.target?.date))
|
|
3539
3586
|
});
|
|
3540
3587
|
},
|
|
3541
3588
|
async getCommitRef(params2) {
|
|
@@ -3543,13 +3590,13 @@ function getBitbucketSdk(params) {
|
|
|
3543
3590
|
return GetRefererenceResultZ.parse({
|
|
3544
3591
|
sha: getCommitRes.hash,
|
|
3545
3592
|
type: "COMMIT" /* COMMIT */,
|
|
3546
|
-
date: new Date(
|
|
3593
|
+
date: new Date(z12.string().parse(getCommitRes.date))
|
|
3547
3594
|
});
|
|
3548
3595
|
},
|
|
3549
3596
|
async getDownloadUrl({ url, sha }) {
|
|
3550
3597
|
this.getReferenceData({ ref: sha, url });
|
|
3551
3598
|
const repoRes = await this.getRepo({ repoUrl: url });
|
|
3552
|
-
const parsedRepoUrl =
|
|
3599
|
+
const parsedRepoUrl = z12.string().url().parse(repoRes.links?.html?.href);
|
|
3553
3600
|
return `${parsedRepoUrl}/get/${sha}.zip`;
|
|
3554
3601
|
},
|
|
3555
3602
|
async getPullRequest(params2) {
|
|
@@ -3592,7 +3639,7 @@ async function validateBitbucketParams(params) {
|
|
|
3592
3639
|
}
|
|
3593
3640
|
async function getUsersworkspacesSlugs(bitbucketClient) {
|
|
3594
3641
|
const res = await bitbucketClient.workspaces.getWorkspaces({});
|
|
3595
|
-
return res.data.values?.map((v) =>
|
|
3642
|
+
return res.data.values?.map((v) => z12.string().parse(v.slug));
|
|
3596
3643
|
}
|
|
3597
3644
|
async function getllUsersrepositories(bitbucketClient) {
|
|
3598
3645
|
const userWorspacesSlugs = await getUsersworkspacesSlugs(bitbucketClient);
|
|
@@ -4092,7 +4139,7 @@ function getGithubSdk(params = {}) {
|
|
|
4092
4139
|
return octokit.rest.repos.listBranches({
|
|
4093
4140
|
owner,
|
|
4094
4141
|
repo,
|
|
4095
|
-
per_page:
|
|
4142
|
+
per_page: MAX_BRANCHES_FETCH,
|
|
4096
4143
|
page: 1
|
|
4097
4144
|
});
|
|
4098
4145
|
},
|
|
@@ -4139,11 +4186,11 @@ import {
|
|
|
4139
4186
|
} from "undici";
|
|
4140
4187
|
|
|
4141
4188
|
// src/features/analysis/scm/gitlab/types.ts
|
|
4142
|
-
import { z as
|
|
4143
|
-
var GitlabAuthResultZ =
|
|
4144
|
-
access_token:
|
|
4145
|
-
token_type:
|
|
4146
|
-
refresh_token:
|
|
4189
|
+
import { z as z13 } from "zod";
|
|
4190
|
+
var GitlabAuthResultZ = z13.object({
|
|
4191
|
+
access_token: z13.string(),
|
|
4192
|
+
token_type: z13.string(),
|
|
4193
|
+
refresh_token: z13.string()
|
|
4147
4194
|
});
|
|
4148
4195
|
|
|
4149
4196
|
// src/features/analysis/scm/gitlab/gitlab.ts
|
|
@@ -4151,7 +4198,6 @@ function removeTrailingSlash(str) {
|
|
|
4151
4198
|
return str.trim().replace(/\/+$/, "");
|
|
4152
4199
|
}
|
|
4153
4200
|
function getGitBeaker(options) {
|
|
4154
|
-
console.log("getGitBeaker starting");
|
|
4155
4201
|
const token = options?.gitlabAuthToken ?? GITLAB_API_TOKEN ?? "";
|
|
4156
4202
|
const url = options.url;
|
|
4157
4203
|
const host = url ? new URL(url).origin : "https://gitlab.com";
|
|
@@ -4295,10 +4341,7 @@ async function getGitlabBranchList({
|
|
|
4295
4341
|
const api2 = getGitBeaker({ url: repoUrl, gitlabAuthToken: accessToken });
|
|
4296
4342
|
try {
|
|
4297
4343
|
const res = await api2.Branches.all(projectPath, {
|
|
4298
|
-
perPage:
|
|
4299
|
-
pagination: "keyset",
|
|
4300
|
-
orderBy: "updated_at",
|
|
4301
|
-
sort: "dec"
|
|
4344
|
+
perPage: MAX_BRANCHES_FETCH
|
|
4302
4345
|
});
|
|
4303
4346
|
return res.map((branch) => branch.name);
|
|
4304
4347
|
} catch (e) {
|
|
@@ -4334,6 +4377,18 @@ async function getGitlabMergeRequest({
|
|
|
4334
4377
|
});
|
|
4335
4378
|
return await api2.MergeRequests.show(projectPath, prNumber);
|
|
4336
4379
|
}
|
|
4380
|
+
async function getGitlabCommitUrl({
|
|
4381
|
+
url,
|
|
4382
|
+
commitSha,
|
|
4383
|
+
accessToken
|
|
4384
|
+
}) {
|
|
4385
|
+
const { projectPath } = parseGitlabOwnerAndRepo(url);
|
|
4386
|
+
const api2 = getGitBeaker({
|
|
4387
|
+
url,
|
|
4388
|
+
gitlabAuthToken: accessToken
|
|
4389
|
+
});
|
|
4390
|
+
return await api2.Commits.show(projectPath, commitSha);
|
|
4391
|
+
}
|
|
4337
4392
|
async function getGitlabRepoDefaultBranch(repoUrl, options) {
|
|
4338
4393
|
const api2 = getGitBeaker({
|
|
4339
4394
|
url: repoUrl,
|
|
@@ -4479,80 +4534,97 @@ import parseDiff from "parse-diff";
|
|
|
4479
4534
|
import path3 from "path";
|
|
4480
4535
|
import { simpleGit } from "simple-git";
|
|
4481
4536
|
import tmp from "tmp";
|
|
4482
|
-
import { z as
|
|
4537
|
+
import { z as z15 } from "zod";
|
|
4483
4538
|
|
|
4484
4539
|
// src/features/analysis/scm/scmSubmit/types.ts
|
|
4485
|
-
import { z as
|
|
4486
|
-
var BaseSubmitToScmMessageZ =
|
|
4487
|
-
submitFixRequestId:
|
|
4488
|
-
fixes:
|
|
4489
|
-
|
|
4490
|
-
fixId:
|
|
4491
|
-
patches:
|
|
4540
|
+
import { z as z14 } from "zod";
|
|
4541
|
+
var BaseSubmitToScmMessageZ = z14.object({
|
|
4542
|
+
submitFixRequestId: z14.string().uuid(),
|
|
4543
|
+
fixes: z14.array(
|
|
4544
|
+
z14.object({
|
|
4545
|
+
fixId: z14.string().uuid(),
|
|
4546
|
+
patches: z14.array(z14.string())
|
|
4492
4547
|
})
|
|
4493
4548
|
),
|
|
4494
|
-
commitHash:
|
|
4495
|
-
repoUrl:
|
|
4496
|
-
mobbUserEmail:
|
|
4497
|
-
extraHeaders:
|
|
4549
|
+
commitHash: z14.string(),
|
|
4550
|
+
repoUrl: z14.string(),
|
|
4551
|
+
mobbUserEmail: z14.string(),
|
|
4552
|
+
extraHeaders: z14.record(z14.string(), z14.string()).default({})
|
|
4498
4553
|
});
|
|
4499
4554
|
var submitToScmMessageType = {
|
|
4500
4555
|
commitToSameBranch: "commitToSameBranch",
|
|
4501
4556
|
submitFixesForDifferentBranch: "submitFixesForDifferentBranch"
|
|
4502
4557
|
};
|
|
4503
4558
|
var CommitToSameBranchParamsZ = BaseSubmitToScmMessageZ.merge(
|
|
4504
|
-
|
|
4505
|
-
type:
|
|
4506
|
-
branch:
|
|
4507
|
-
commitMessage:
|
|
4508
|
-
commitDescription:
|
|
4509
|
-
githubCommentId:
|
|
4559
|
+
z14.object({
|
|
4560
|
+
type: z14.literal(submitToScmMessageType.commitToSameBranch),
|
|
4561
|
+
branch: z14.string(),
|
|
4562
|
+
commitMessage: z14.string(),
|
|
4563
|
+
commitDescription: z14.string().nullish(),
|
|
4564
|
+
githubCommentId: z14.number().nullish()
|
|
4510
4565
|
})
|
|
4511
4566
|
);
|
|
4512
|
-
var SubmitFixesToDifferentBranchParamsZ =
|
|
4513
|
-
type:
|
|
4514
|
-
submitBranch:
|
|
4515
|
-
baseBranch:
|
|
4567
|
+
var SubmitFixesToDifferentBranchParamsZ = z14.object({
|
|
4568
|
+
type: z14.literal(submitToScmMessageType.submitFixesForDifferentBranch),
|
|
4569
|
+
submitBranch: z14.string(),
|
|
4570
|
+
baseBranch: z14.string()
|
|
4516
4571
|
}).merge(BaseSubmitToScmMessageZ);
|
|
4517
|
-
var SubmitFixesMessageZ =
|
|
4572
|
+
var SubmitFixesMessageZ = z14.union([
|
|
4518
4573
|
CommitToSameBranchParamsZ,
|
|
4519
4574
|
SubmitFixesToDifferentBranchParamsZ
|
|
4520
4575
|
]);
|
|
4521
|
-
var FixResponseArrayZ =
|
|
4522
|
-
|
|
4523
|
-
fixId:
|
|
4576
|
+
var FixResponseArrayZ = z14.array(
|
|
4577
|
+
z14.object({
|
|
4578
|
+
fixId: z14.string().uuid()
|
|
4524
4579
|
})
|
|
4525
4580
|
);
|
|
4526
|
-
var SubmitFixesBaseResponseMessageZ =
|
|
4527
|
-
mobbUserEmail:
|
|
4528
|
-
submitFixRequestId:
|
|
4529
|
-
submitBranches:
|
|
4530
|
-
|
|
4531
|
-
branchName:
|
|
4581
|
+
var SubmitFixesBaseResponseMessageZ = z14.object({
|
|
4582
|
+
mobbUserEmail: z14.string(),
|
|
4583
|
+
submitFixRequestId: z14.string().uuid(),
|
|
4584
|
+
submitBranches: z14.array(
|
|
4585
|
+
z14.object({
|
|
4586
|
+
branchName: z14.string(),
|
|
4532
4587
|
fixes: FixResponseArrayZ
|
|
4533
4588
|
})
|
|
4534
4589
|
),
|
|
4535
|
-
error:
|
|
4536
|
-
type:
|
|
4590
|
+
error: z14.object({
|
|
4591
|
+
type: z14.enum([
|
|
4537
4592
|
"InitialRepoAccessError",
|
|
4538
4593
|
"PushBranchError",
|
|
4539
4594
|
"UnknownError"
|
|
4540
4595
|
]),
|
|
4541
|
-
info:
|
|
4542
|
-
message:
|
|
4543
|
-
pushBranchName:
|
|
4596
|
+
info: z14.object({
|
|
4597
|
+
message: z14.string(),
|
|
4598
|
+
pushBranchName: z14.string().optional()
|
|
4544
4599
|
})
|
|
4545
4600
|
}).optional()
|
|
4546
4601
|
});
|
|
4547
|
-
var
|
|
4548
|
-
|
|
4549
|
-
|
|
4602
|
+
var authorSchemaZ = z14.object({
|
|
4603
|
+
email: z14.string(),
|
|
4604
|
+
name: z14.string()
|
|
4605
|
+
}).nullable();
|
|
4606
|
+
var summarySchemaZ = z14.object({
|
|
4607
|
+
changes: z14.number(),
|
|
4608
|
+
insertions: z14.number(),
|
|
4609
|
+
deletions: z14.number()
|
|
4610
|
+
});
|
|
4611
|
+
var GitCommitZ = z14.object({
|
|
4612
|
+
author: authorSchemaZ,
|
|
4613
|
+
branch: z14.string(),
|
|
4614
|
+
commit: z14.string(),
|
|
4615
|
+
root: z14.boolean(),
|
|
4616
|
+
summary: summarySchemaZ
|
|
4617
|
+
}).nullable();
|
|
4618
|
+
var SubmitFixesToSameBranchResponseMessageZ = z14.object({
|
|
4619
|
+
type: z14.literal(submitToScmMessageType.commitToSameBranch),
|
|
4620
|
+
githubCommentId: z14.number().nullish(),
|
|
4621
|
+
commit: GitCommitZ
|
|
4550
4622
|
}).merge(SubmitFixesBaseResponseMessageZ);
|
|
4551
|
-
var SubmitFixesToDifferentBranchResponseMessageZ =
|
|
4552
|
-
type:
|
|
4553
|
-
githubCommentId:
|
|
4623
|
+
var SubmitFixesToDifferentBranchResponseMessageZ = z14.object({
|
|
4624
|
+
type: z14.literal(submitToScmMessageType.submitFixesForDifferentBranch),
|
|
4625
|
+
githubCommentId: z14.number().optional()
|
|
4554
4626
|
}).merge(SubmitFixesBaseResponseMessageZ);
|
|
4555
|
-
var SubmitFixesResponseMessageZ =
|
|
4627
|
+
var SubmitFixesResponseMessageZ = z14.discriminatedUnion("type", [
|
|
4556
4628
|
SubmitFixesToSameBranchResponseMessageZ,
|
|
4557
4629
|
SubmitFixesToDifferentBranchResponseMessageZ
|
|
4558
4630
|
]);
|
|
@@ -4570,21 +4642,21 @@ var isValidBranchName = async (branchName) => {
|
|
|
4570
4642
|
return false;
|
|
4571
4643
|
}
|
|
4572
4644
|
};
|
|
4573
|
-
var FixesZ =
|
|
4574
|
-
|
|
4575
|
-
fixId:
|
|
4576
|
-
patches:
|
|
4645
|
+
var FixesZ = z15.array(
|
|
4646
|
+
z15.object({
|
|
4647
|
+
fixId: z15.string(),
|
|
4648
|
+
patches: z15.array(z15.string())
|
|
4577
4649
|
})
|
|
4578
4650
|
).nonempty();
|
|
4579
4651
|
|
|
4580
4652
|
// src/features/analysis/scm/scm.ts
|
|
4581
4653
|
function isBrokerUrl(url) {
|
|
4582
|
-
return
|
|
4654
|
+
return z16.string().uuid().safeParse(new URL(url).host).success;
|
|
4583
4655
|
}
|
|
4584
|
-
var GetRefererenceResultZ =
|
|
4585
|
-
date:
|
|
4586
|
-
sha:
|
|
4587
|
-
type:
|
|
4656
|
+
var GetRefererenceResultZ = z16.object({
|
|
4657
|
+
date: z16.date().optional(),
|
|
4658
|
+
sha: z16.string(),
|
|
4659
|
+
type: z16.nativeEnum(ReferenceType)
|
|
4588
4660
|
});
|
|
4589
4661
|
function getCloudScmLibTypeFromUrl(url) {
|
|
4590
4662
|
if (!url) {
|
|
@@ -4625,7 +4697,7 @@ var scmTypeToScmLibScmType = {
|
|
|
4625
4697
|
["Bitbucket" /* Bitbucket */]: "BITBUCKET" /* BITBUCKET */
|
|
4626
4698
|
};
|
|
4627
4699
|
function getScmLibTypeFromScmType(scmType) {
|
|
4628
|
-
const parsedScmType =
|
|
4700
|
+
const parsedScmType = z16.nativeEnum(ScmType).parse(scmType);
|
|
4629
4701
|
return scmTypeToScmLibScmType[parsedScmType];
|
|
4630
4702
|
}
|
|
4631
4703
|
function getScmConfig({
|
|
@@ -4839,7 +4911,7 @@ var SCMLib = class {
|
|
|
4839
4911
|
if (e instanceof InvalidRepoUrlError && url) {
|
|
4840
4912
|
throw new RepoNoTokenAccessError(
|
|
4841
4913
|
"no access to repo",
|
|
4842
|
-
scmLibScmTypeToScmType[
|
|
4914
|
+
scmLibScmTypeToScmType[z16.nativeEnum(ScmLibScmType).parse(scmType)]
|
|
4843
4915
|
);
|
|
4844
4916
|
}
|
|
4845
4917
|
console.error(`error validating scm: ${scmType} `, e);
|
|
@@ -5009,6 +5081,14 @@ var AdoSCMLib = class extends SCMLib {
|
|
|
5009
5081
|
prNumber
|
|
5010
5082
|
});
|
|
5011
5083
|
}
|
|
5084
|
+
async getCommitUrl(commitId) {
|
|
5085
|
+
this._validateUrl();
|
|
5086
|
+
const adoSdk = await this.getAdoSdk();
|
|
5087
|
+
return adoSdk.getAdoCommitUrl({
|
|
5088
|
+
url: this.url,
|
|
5089
|
+
commitId
|
|
5090
|
+
});
|
|
5091
|
+
}
|
|
5012
5092
|
};
|
|
5013
5093
|
var GitlabSCMLib = class extends SCMLib {
|
|
5014
5094
|
async createSubmitRequest(params) {
|
|
@@ -5146,6 +5226,15 @@ var GitlabSCMLib = class extends SCMLib {
|
|
|
5146
5226
|
});
|
|
5147
5227
|
return res.web_url;
|
|
5148
5228
|
}
|
|
5229
|
+
async getCommitUrl(commitId) {
|
|
5230
|
+
this._validateAccessTokenAndUrl();
|
|
5231
|
+
const res = await getGitlabCommitUrl({
|
|
5232
|
+
url: this.url,
|
|
5233
|
+
commitSha: commitId,
|
|
5234
|
+
accessToken: this.accessToken
|
|
5235
|
+
});
|
|
5236
|
+
return res.web_url;
|
|
5237
|
+
}
|
|
5149
5238
|
};
|
|
5150
5239
|
var GithubSCMLib = class extends SCMLib {
|
|
5151
5240
|
// we don't always need a url, what's important is that we have an access token
|
|
@@ -5247,7 +5336,7 @@ var GithubSCMLib = class extends SCMLib {
|
|
|
5247
5336
|
owner,
|
|
5248
5337
|
repo
|
|
5249
5338
|
});
|
|
5250
|
-
return
|
|
5339
|
+
return z16.string().parse(prRes.data);
|
|
5251
5340
|
}
|
|
5252
5341
|
async getRepoList(_scmOrg) {
|
|
5253
5342
|
this._validateAccessToken();
|
|
@@ -5338,6 +5427,16 @@ var GithubSCMLib = class extends SCMLib {
|
|
|
5338
5427
|
});
|
|
5339
5428
|
return getPrRes.data.html_url;
|
|
5340
5429
|
}
|
|
5430
|
+
async getCommitUrl(commitId) {
|
|
5431
|
+
this._validateAccessTokenAndUrl();
|
|
5432
|
+
const { owner, repo } = parseGithubOwnerAndRepo(this.url);
|
|
5433
|
+
const getCommitRes = await this.githubSdk.getCommit({
|
|
5434
|
+
owner,
|
|
5435
|
+
repo,
|
|
5436
|
+
commitSha: commitId
|
|
5437
|
+
});
|
|
5438
|
+
return getCommitRes.data.html_url;
|
|
5439
|
+
}
|
|
5341
5440
|
async postGeneralPrComment(params) {
|
|
5342
5441
|
const { prNumber, body } = params;
|
|
5343
5442
|
this._validateAccessTokenAndUrl();
|
|
@@ -5432,13 +5531,17 @@ var StubSCMLib = class extends SCMLib {
|
|
|
5432
5531
|
console.error("getPr() not implemented");
|
|
5433
5532
|
throw new Error("getPr() not implemented");
|
|
5434
5533
|
}
|
|
5534
|
+
async getCommitUrl(_commitId) {
|
|
5535
|
+
console.error("getCommitUrl() not implemented");
|
|
5536
|
+
throw new Error("getCommitUrl() not implemented");
|
|
5537
|
+
}
|
|
5435
5538
|
_getUsernameForAuthUrl() {
|
|
5436
5539
|
throw new Error("Method not implemented.");
|
|
5437
5540
|
}
|
|
5438
5541
|
};
|
|
5439
5542
|
function getUserAndPassword(token) {
|
|
5440
5543
|
const [username, password] = token.split(":");
|
|
5441
|
-
const safePasswordAndUsername =
|
|
5544
|
+
const safePasswordAndUsername = z16.object({ username: z16.string(), password: z16.string() }).parse({ username, password });
|
|
5442
5545
|
return {
|
|
5443
5546
|
username: safePasswordAndUsername.username,
|
|
5444
5547
|
password: safePasswordAndUsername.password
|
|
@@ -5474,7 +5577,7 @@ var BitbucketSCMLib = class extends SCMLib {
|
|
|
5474
5577
|
return { username, password, authType };
|
|
5475
5578
|
}
|
|
5476
5579
|
case "token": {
|
|
5477
|
-
return { authType, token:
|
|
5580
|
+
return { authType, token: z16.string().parse(this.accessToken) };
|
|
5478
5581
|
}
|
|
5479
5582
|
case "public":
|
|
5480
5583
|
return { authType };
|
|
@@ -5486,7 +5589,7 @@ var BitbucketSCMLib = class extends SCMLib {
|
|
|
5486
5589
|
...params,
|
|
5487
5590
|
repoUrl: this.url
|
|
5488
5591
|
});
|
|
5489
|
-
return String(
|
|
5592
|
+
return String(z16.number().parse(pullRequestRes.id));
|
|
5490
5593
|
}
|
|
5491
5594
|
async validateParams() {
|
|
5492
5595
|
return validateBitbucketParams({
|
|
@@ -5558,7 +5661,7 @@ var BitbucketSCMLib = class extends SCMLib {
|
|
|
5558
5661
|
async getUsername() {
|
|
5559
5662
|
this._validateAccessToken();
|
|
5560
5663
|
const res = await this.bitbucketSdk.getUser();
|
|
5561
|
-
return
|
|
5664
|
+
return z16.string().parse(res.username);
|
|
5562
5665
|
}
|
|
5563
5666
|
async getSubmitRequestStatus(_scmSubmitRequestId) {
|
|
5564
5667
|
this._validateAccessTokenAndUrl();
|
|
@@ -5587,7 +5690,7 @@ var BitbucketSCMLib = class extends SCMLib {
|
|
|
5587
5690
|
async getRepoDefaultBranch() {
|
|
5588
5691
|
this._validateUrl();
|
|
5589
5692
|
const repoRes = await this.bitbucketSdk.getRepo({ repoUrl: this.url });
|
|
5590
|
-
return
|
|
5693
|
+
return z16.string().parse(repoRes.mainbranch?.name);
|
|
5591
5694
|
}
|
|
5592
5695
|
getPrUrl(prNumber) {
|
|
5593
5696
|
this._validateUrl();
|
|
@@ -5596,39 +5699,46 @@ var BitbucketSCMLib = class extends SCMLib {
|
|
|
5596
5699
|
`https://bitbucket.org/${workspace}/${repoSlug}/pull-requests/${prNumber}`
|
|
5597
5700
|
);
|
|
5598
5701
|
}
|
|
5702
|
+
getCommitUrl(commitId) {
|
|
5703
|
+
this._validateUrl();
|
|
5704
|
+
const { repoSlug, workspace } = parseBitbucketOrganizationAndRepo(this.url);
|
|
5705
|
+
return Promise.resolve(
|
|
5706
|
+
`https://bitbucket.org/${workspace}/${repoSlug}/commits/${commitId}`
|
|
5707
|
+
);
|
|
5708
|
+
}
|
|
5599
5709
|
};
|
|
5600
5710
|
|
|
5601
5711
|
// src/features/analysis/scm/ado/validation.ts
|
|
5602
|
-
import { z as
|
|
5603
|
-
var ValidPullRequestStatusZ =
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5712
|
+
import { z as z17 } from "zod";
|
|
5713
|
+
var ValidPullRequestStatusZ = z17.union([
|
|
5714
|
+
z17.literal(1 /* Active */),
|
|
5715
|
+
z17.literal(2 /* Abandoned */),
|
|
5716
|
+
z17.literal(3 /* Completed */)
|
|
5607
5717
|
]);
|
|
5608
|
-
var AdoAuthResultZ =
|
|
5609
|
-
access_token:
|
|
5610
|
-
token_type:
|
|
5611
|
-
refresh_token:
|
|
5718
|
+
var AdoAuthResultZ = z17.object({
|
|
5719
|
+
access_token: z17.string().min(1),
|
|
5720
|
+
token_type: z17.string().min(1),
|
|
5721
|
+
refresh_token: z17.string().min(1)
|
|
5612
5722
|
});
|
|
5613
5723
|
var AdoAuthResultWithOrgsZ = AdoAuthResultZ.extend({
|
|
5614
|
-
scmOrgs:
|
|
5724
|
+
scmOrgs: z17.array(z17.string())
|
|
5615
5725
|
});
|
|
5616
|
-
var profileZ =
|
|
5617
|
-
displayName:
|
|
5618
|
-
publicAlias:
|
|
5619
|
-
emailAddress:
|
|
5620
|
-
coreRevision:
|
|
5621
|
-
timeStamp:
|
|
5622
|
-
id:
|
|
5623
|
-
revision:
|
|
5726
|
+
var profileZ = z17.object({
|
|
5727
|
+
displayName: z17.string(),
|
|
5728
|
+
publicAlias: z17.string().min(1),
|
|
5729
|
+
emailAddress: z17.string(),
|
|
5730
|
+
coreRevision: z17.number(),
|
|
5731
|
+
timeStamp: z17.string(),
|
|
5732
|
+
id: z17.string(),
|
|
5733
|
+
revision: z17.number()
|
|
5624
5734
|
});
|
|
5625
|
-
var accountsZ =
|
|
5626
|
-
count:
|
|
5627
|
-
value:
|
|
5628
|
-
|
|
5629
|
-
accountId:
|
|
5630
|
-
accountUri:
|
|
5631
|
-
accountName:
|
|
5735
|
+
var accountsZ = z17.object({
|
|
5736
|
+
count: z17.number(),
|
|
5737
|
+
value: z17.array(
|
|
5738
|
+
z17.object({
|
|
5739
|
+
accountId: z17.string(),
|
|
5740
|
+
accountUri: z17.string(),
|
|
5741
|
+
accountName: z17.string()
|
|
5632
5742
|
})
|
|
5633
5743
|
)
|
|
5634
5744
|
});
|
|
@@ -5713,7 +5823,7 @@ async function getAdoConnectData({
|
|
|
5713
5823
|
oauthToken: adoTokenInfo.accessToken
|
|
5714
5824
|
});
|
|
5715
5825
|
return {
|
|
5716
|
-
org:
|
|
5826
|
+
org: z18.string().parse(org),
|
|
5717
5827
|
origin: DEFUALT_ADO_ORIGIN
|
|
5718
5828
|
};
|
|
5719
5829
|
}
|
|
@@ -5799,7 +5909,7 @@ async function getAdoClientParams(params) {
|
|
|
5799
5909
|
return {
|
|
5800
5910
|
tokenType: "PAT" /* PAT */,
|
|
5801
5911
|
accessToken: adoTokenInfo.accessToken,
|
|
5802
|
-
patTokenOrg:
|
|
5912
|
+
patTokenOrg: z18.string().parse(tokenOrg).toLowerCase(),
|
|
5803
5913
|
origin: origin2,
|
|
5804
5914
|
orgName: org.toLowerCase()
|
|
5805
5915
|
};
|
|
@@ -5932,6 +6042,18 @@ async function getAdoSdk(params) {
|
|
|
5932
6042
|
);
|
|
5933
6043
|
return `${getRepositoryRes.webUrl}/pullrequest/${prNumber}`;
|
|
5934
6044
|
},
|
|
6045
|
+
async getAdoCommitUrl({
|
|
6046
|
+
url,
|
|
6047
|
+
commitId
|
|
6048
|
+
}) {
|
|
6049
|
+
const { repo, projectName } = parseAdoOwnerAndRepo(url);
|
|
6050
|
+
const git = await api2.getGitApi();
|
|
6051
|
+
const getRepositoryRes = await git.getRepository(
|
|
6052
|
+
decodeURI(repo),
|
|
6053
|
+
projectName ? decodeURI(projectName) : void 0
|
|
6054
|
+
);
|
|
6055
|
+
return `${getRepositoryRes.webUrl}/commit/${commitId}`;
|
|
6056
|
+
},
|
|
5935
6057
|
getAdoDownloadUrl({
|
|
5936
6058
|
repoUrl,
|
|
5937
6059
|
branch
|
|
@@ -5954,9 +6076,9 @@ async function getAdoSdk(params) {
|
|
|
5954
6076
|
return new URL(`${path9}?${params2}`, origin2).toString();
|
|
5955
6077
|
},
|
|
5956
6078
|
async getAdoBranchList({ repoUrl }) {
|
|
5957
|
-
const { repo, projectName } = parseAdoOwnerAndRepo(repoUrl);
|
|
5958
|
-
const git = await api2.getGitApi();
|
|
5959
6079
|
try {
|
|
6080
|
+
const { repo, projectName } = parseAdoOwnerAndRepo(repoUrl);
|
|
6081
|
+
const git = await api2.getGitApi();
|
|
5960
6082
|
const res = await git.getBranches(repo, projectName);
|
|
5961
6083
|
res.sort((a, b) => {
|
|
5962
6084
|
if (!a.commit?.committer?.date || !b.commit?.committer?.date) {
|
|
@@ -5970,7 +6092,7 @@ async function getAdoSdk(params) {
|
|
|
5970
6092
|
}
|
|
5971
6093
|
acc.push(branch.name);
|
|
5972
6094
|
return acc;
|
|
5973
|
-
}, []);
|
|
6095
|
+
}, []).slice(0, MAX_BRANCHES_FETCH);
|
|
5974
6096
|
} catch (e) {
|
|
5975
6097
|
return [];
|
|
5976
6098
|
}
|
|
@@ -6166,13 +6288,10 @@ async function getAdoRepoList({
|
|
|
6166
6288
|
return repos;
|
|
6167
6289
|
}
|
|
6168
6290
|
|
|
6169
|
-
// src/features/analysis/scm/constants.ts
|
|
6170
|
-
var MOBB_ICON_IMG = "https://app.mobb.ai/gh-action/Logo_Rounded_Icon.svg";
|
|
6171
|
-
|
|
6172
6291
|
// src/features/analysis/add_fix_comments_for_pr/utils/utils.ts
|
|
6173
6292
|
import Debug6 from "debug";
|
|
6174
6293
|
import parseDiff2 from "parse-diff";
|
|
6175
|
-
import { z as
|
|
6294
|
+
import { z as z20 } from "zod";
|
|
6176
6295
|
|
|
6177
6296
|
// src/features/analysis/utils/by_key.ts
|
|
6178
6297
|
function keyBy(array, keyBy2) {
|
|
@@ -6243,7 +6362,7 @@ var scannerToFriendlyString = {
|
|
|
6243
6362
|
|
|
6244
6363
|
// src/features/analysis/add_fix_comments_for_pr/utils/buildCommentBody.ts
|
|
6245
6364
|
import Debug5 from "debug";
|
|
6246
|
-
import { z as
|
|
6365
|
+
import { z as z19 } from "zod";
|
|
6247
6366
|
var debug5 = Debug5("mobbdev:handle-finished-analysis");
|
|
6248
6367
|
var getCommitFixButton = (commitUrl) => `<a href="${commitUrl}"><img src=${COMMIT_FIX_SVG}></a>`;
|
|
6249
6368
|
function buildCommentBody({
|
|
@@ -6277,11 +6396,11 @@ function buildCommentBody({
|
|
|
6277
6396
|
});
|
|
6278
6397
|
const issueType = getIssueTypeFriendlyString(fix.safeIssueType);
|
|
6279
6398
|
const title = `# ${MobbIconMarkdown} ${issueType} fix is ready`;
|
|
6280
|
-
const validFixParseRes =
|
|
6399
|
+
const validFixParseRes = z19.object({
|
|
6281
6400
|
patchAndQuestions: PatchAndQuestionsZ,
|
|
6282
|
-
vulnerabilitySeverity:
|
|
6283
|
-
safeIssueLanguage:
|
|
6284
|
-
safeIssueType:
|
|
6401
|
+
vulnerabilitySeverity: z19.nativeEnum(Vulnerability_Severity_Enum),
|
|
6402
|
+
safeIssueLanguage: z19.nativeEnum(IssueLanguage_Enum),
|
|
6403
|
+
safeIssueType: z19.nativeEnum(IssueType_Enum)
|
|
6285
6404
|
}).safeParse(fix);
|
|
6286
6405
|
if (!validFixParseRes.success) {
|
|
6287
6406
|
debug5(
|
|
@@ -6454,7 +6573,7 @@ async function getRelevantVulenrabilitiesFromDiff(params) {
|
|
|
6454
6573
|
});
|
|
6455
6574
|
const lineAddedRanges = calculateRanges(fileNumbers);
|
|
6456
6575
|
const fileFilter = {
|
|
6457
|
-
path:
|
|
6576
|
+
path: z20.string().parse(file.to),
|
|
6458
6577
|
ranges: lineAddedRanges.map(([startLine, endLine]) => ({
|
|
6459
6578
|
endLine,
|
|
6460
6579
|
startLine
|
|
@@ -6799,30 +6918,30 @@ function subscribe(query, variables, callback, wsClientOptions) {
|
|
|
6799
6918
|
}
|
|
6800
6919
|
|
|
6801
6920
|
// src/features/analysis/graphql/types.ts
|
|
6802
|
-
import { z as
|
|
6803
|
-
var VulnerabilityReportIssueCodeNodeZ =
|
|
6804
|
-
vulnerabilityReportIssueId:
|
|
6805
|
-
path:
|
|
6806
|
-
startLine:
|
|
6807
|
-
vulnerabilityReportIssue:
|
|
6808
|
-
fixId:
|
|
6921
|
+
import { z as z21 } from "zod";
|
|
6922
|
+
var VulnerabilityReportIssueCodeNodeZ = z21.object({
|
|
6923
|
+
vulnerabilityReportIssueId: z21.string(),
|
|
6924
|
+
path: z21.string(),
|
|
6925
|
+
startLine: z21.number(),
|
|
6926
|
+
vulnerabilityReportIssue: z21.object({
|
|
6927
|
+
fixId: z21.string()
|
|
6809
6928
|
})
|
|
6810
6929
|
});
|
|
6811
|
-
var GetVulByNodesMetadataZ =
|
|
6812
|
-
vulnerabilityReportIssueCodeNodes:
|
|
6813
|
-
nonFixablePrVuls:
|
|
6814
|
-
aggregate:
|
|
6815
|
-
count:
|
|
6930
|
+
var GetVulByNodesMetadataZ = z21.object({
|
|
6931
|
+
vulnerabilityReportIssueCodeNodes: z21.array(VulnerabilityReportIssueCodeNodeZ),
|
|
6932
|
+
nonFixablePrVuls: z21.object({
|
|
6933
|
+
aggregate: z21.object({
|
|
6934
|
+
count: z21.number()
|
|
6816
6935
|
})
|
|
6817
6936
|
}),
|
|
6818
|
-
fixablePrVuls:
|
|
6819
|
-
aggregate:
|
|
6820
|
-
count:
|
|
6937
|
+
fixablePrVuls: z21.object({
|
|
6938
|
+
aggregate: z21.object({
|
|
6939
|
+
count: z21.number()
|
|
6821
6940
|
})
|
|
6822
6941
|
}),
|
|
6823
|
-
totalScanVulnerabilities:
|
|
6824
|
-
aggregate:
|
|
6825
|
-
count:
|
|
6942
|
+
totalScanVulnerabilities: z21.object({
|
|
6943
|
+
aggregate: z21.object({
|
|
6944
|
+
count: z21.number()
|
|
6826
6945
|
})
|
|
6827
6946
|
})
|
|
6828
6947
|
});
|
|
@@ -7836,7 +7955,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
7836
7955
|
spinner: mobbSpinner,
|
|
7837
7956
|
submitVulnerabilityReportVariables: {
|
|
7838
7957
|
fixReportId: reportUploadInfo.fixReportId,
|
|
7839
|
-
repoUrl:
|
|
7958
|
+
repoUrl: z22.string().parse(repo),
|
|
7840
7959
|
reference,
|
|
7841
7960
|
projectId,
|
|
7842
7961
|
vulnerabilityReportFileName: "report.json",
|
|
@@ -8075,9 +8194,9 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
8075
8194
|
}
|
|
8076
8195
|
});
|
|
8077
8196
|
if (command === "review") {
|
|
8078
|
-
const params2 =
|
|
8079
|
-
repo:
|
|
8080
|
-
githubActionToken:
|
|
8197
|
+
const params2 = z22.object({
|
|
8198
|
+
repo: z22.string().url(),
|
|
8199
|
+
githubActionToken: z22.string()
|
|
8081
8200
|
}).parse({ repo, githubActionToken });
|
|
8082
8201
|
const scm = await SCMLib.init(
|
|
8083
8202
|
{
|
|
@@ -8099,7 +8218,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
8099
8218
|
analysisId,
|
|
8100
8219
|
gqlClient,
|
|
8101
8220
|
scm,
|
|
8102
|
-
scanner:
|
|
8221
|
+
scanner: z22.nativeEnum(SCANNERS).parse(scanner)
|
|
8103
8222
|
});
|
|
8104
8223
|
},
|
|
8105
8224
|
callbackStates: ["Finished" /* Finished */]
|
|
@@ -8326,7 +8445,7 @@ var scmTokenOption = {
|
|
|
8326
8445
|
// src/args/validation.ts
|
|
8327
8446
|
import chalk6 from "chalk";
|
|
8328
8447
|
import path8 from "path";
|
|
8329
|
-
import { z as
|
|
8448
|
+
import { z as z23 } from "zod";
|
|
8330
8449
|
function throwRepoUrlErrorMessage({
|
|
8331
8450
|
error,
|
|
8332
8451
|
repoUrl,
|
|
@@ -8343,13 +8462,13 @@ Example:
|
|
|
8343
8462
|
)}`;
|
|
8344
8463
|
throw new CliError(formattedErrorMessage);
|
|
8345
8464
|
}
|
|
8346
|
-
var UrlZ =
|
|
8465
|
+
var UrlZ = z23.string({
|
|
8347
8466
|
invalid_type_error: `is not a valid ${Object.values(ScmType).join("/ ")} URL`
|
|
8348
8467
|
}).refine((data) => !!sanityRepoURL(data), {
|
|
8349
8468
|
message: `is not a valid ${Object.values(ScmType).join(" / ")} URL`
|
|
8350
8469
|
});
|
|
8351
8470
|
function validateOrganizationId(organizationId) {
|
|
8352
|
-
const orgIdValidation =
|
|
8471
|
+
const orgIdValidation = z23.string().uuid().nullish().safeParse(organizationId);
|
|
8353
8472
|
if (!orgIdValidation.success) {
|
|
8354
8473
|
throw new CliError(`organizationId: ${organizationId} is not a valid UUID`);
|
|
8355
8474
|
}
|
|
@@ -8557,13 +8676,6 @@ var parseArgs = async (args) => {
|
|
|
8557
8676
|
)} ${chalk9.dim("[options]")}
|
|
8558
8677
|
`
|
|
8559
8678
|
).version(false).command(
|
|
8560
|
-
mobbCliCommand.addScmToken,
|
|
8561
|
-
chalk9.bold(
|
|
8562
|
-
"Add your SCM (Github, Gitlab, Azure DevOps) token to Mobb to enable automated fixes."
|
|
8563
|
-
),
|
|
8564
|
-
addScmTokenBuilder,
|
|
8565
|
-
addScmTokenHandler
|
|
8566
|
-
).command(
|
|
8567
8679
|
mobbCliCommand.scan,
|
|
8568
8680
|
chalk9.bold(
|
|
8569
8681
|
"Scan your code for vulnerabilities, get automated fixes right away."
|
|
@@ -8580,10 +8692,17 @@ var parseArgs = async (args) => {
|
|
|
8580
8692
|
).command(
|
|
8581
8693
|
mobbCliCommand.review,
|
|
8582
8694
|
chalk9.bold(
|
|
8583
|
-
"
|
|
8695
|
+
"Mobb will review your github pull requests and provide comments with fixes "
|
|
8584
8696
|
),
|
|
8585
8697
|
reviewBuilder,
|
|
8586
8698
|
reviewHandler
|
|
8699
|
+
).command(
|
|
8700
|
+
mobbCliCommand.addScmToken,
|
|
8701
|
+
chalk9.bold(
|
|
8702
|
+
"Add your SCM (Github, Gitlab, Azure DevOps) token to Mobb to enable automated fixes."
|
|
8703
|
+
),
|
|
8704
|
+
addScmTokenBuilder,
|
|
8705
|
+
addScmTokenHandler
|
|
8587
8706
|
).example(
|
|
8588
8707
|
"$0 scan -r https://github.com/WebGoat/WebGoat",
|
|
8589
8708
|
"Scan an existing repository"
|