mobbdev 1.4.46 → 1.4.48
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/args/commands/upload_ai_blame.mjs +38 -5
- package/dist/index.mjs +88 -23
- package/package.json +1 -1
|
@@ -150,7 +150,7 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
var AiBlameInferenceType, FixQuestionInputType, Language, ManifestAction, Effort_To_Apply_Fix_Enum, Fix_Rating_Tag_Enum, Fix_Report_State_Enum, Fix_State_Enum, IssueLanguage_Enum, Pr_Status_Enum, Project_Role_Type_Enum, Vulnerability_Report_Issue_Category_Enum, Vulnerability_Report_Issue_State_Enum, Vulnerability_Report_Issue_Tag_Enum, Vulnerability_Report_Vendor_Enum, Vulnerability_Severity_Enum, FixDetailsFragmentDoc, FixReportSummaryFieldsFragmentDoc, MeDocument, GetLastOrgAndNamedProjectDocument, GetLastOrgDocument, GetEncryptedApiTokenDocument, FixReportStateDocument, GetVulnerabilityReportPathsDocument, GetAnalysisSubscriptionDocument, GetAnalysisDocument, GetFixesDocument, GetVulByNodesMetadataDocument, GetFalsePositiveDocument, UpdateScmTokenDocument, UploadS3BucketInfoDocument, GetTracyDiffUploadUrlDocument, AnalyzeCommitForExtensionAiBlameDocument, GetAiBlameInferenceDocument, GetAiBlameAttributionPromptDocument, GetPromptSummaryDocument, UploadAiBlameInferencesInitDocument, FinalizeAiBlameInferencesUploadDocument, UploadTracyRecordsDocument, GetTracyRawDataUploadUrlDocument, DigestVulnerabilityReportDocument, SubmitVulnerabilityReportDocument, CreateCommunityUserDocument, CreateCliLoginDocument, PerformCliLoginDocument, SetQuarantineEnabledDocument, CreateProjectDocument, ValidateRepoUrlDocument, GitReferenceDocument, AutoPrAnalysisDocument, GetFixWithAnswersDocument, GetFixReportsByRepoUrlDocument, GetReportFixesDocument, GetLatestReportByRepoUrlDocument, UpdateDownloadedFixDataDocument, GetUserMvsAutoFixDocument, StreamBlameAiAnalysisRequestsDocument, StreamCommitBlameRequestsDocument, ScanSkillDocument, SkillVerdictsByMd5Document, LogMvsEventDocument, GetMvsProjectDocument, IssueTypesDocument, defaultWrapper;
|
|
153
|
+
var AiBlameInferenceType, FixQuestionInputType, Language, ManifestAction, Effort_To_Apply_Fix_Enum, Fix_Rating_Tag_Enum, Fix_Report_State_Enum, Fix_State_Enum, IssueLanguage_Enum, Pr_Status_Enum, Project_Role_Type_Enum, Scan_Source_Enum, Vulnerability_Report_Issue_Category_Enum, Vulnerability_Report_Issue_State_Enum, Vulnerability_Report_Issue_Tag_Enum, Vulnerability_Report_Vendor_Enum, Vulnerability_Severity_Enum, FixDetailsFragmentDoc, FixReportSummaryFieldsFragmentDoc, MeDocument, GetLastOrgAndNamedProjectDocument, GetLastOrgDocument, GetEncryptedApiTokenDocument, FixReportStateDocument, GetVulnerabilityReportPathsDocument, GetAnalysisSubscriptionDocument, GetAnalysisDocument, GetFixesDocument, GetVulByNodesMetadataDocument, GetFalsePositiveDocument, UpdateScmTokenDocument, UploadS3BucketInfoDocument, GetTracyDiffUploadUrlDocument, AnalyzeCommitForExtensionAiBlameDocument, GetAiBlameInferenceDocument, GetAiBlameAttributionPromptDocument, GetPromptSummaryDocument, UploadAiBlameInferencesInitDocument, FinalizeAiBlameInferencesUploadDocument, UploadTracyRecordsDocument, GetTracyRawDataUploadUrlDocument, DigestVulnerabilityReportDocument, SubmitVulnerabilityReportDocument, CreateCommunityUserDocument, CreateCliLoginDocument, PerformCliLoginDocument, SetQuarantineEnabledDocument, CreateProjectDocument, ValidateRepoUrlDocument, GitReferenceDocument, AutoPrAnalysisDocument, GetFixWithAnswersDocument, GetFixReportsByRepoUrlDocument, GetReportFixesDocument, GetLatestReportByRepoUrlDocument, UpdateDownloadedFixDataDocument, GetUserMvsAutoFixDocument, StreamBlameAiAnalysisRequestsDocument, StreamCommitBlameRequestsDocument, ScanSkillDocument, SkillVerdictsByMd5Document, LogMvsEventDocument, GetMvsProjectDocument, IssueTypesDocument, defaultWrapper;
|
|
154
154
|
var init_client_generates = __esm({
|
|
155
155
|
"src/features/analysis/scm/generates/client_generates.ts"() {
|
|
156
156
|
"use strict";
|
|
@@ -250,6 +250,25 @@ var init_client_generates = __esm({
|
|
|
250
250
|
Project_Role_Type_Enum2["Writer"] = "writer";
|
|
251
251
|
return Project_Role_Type_Enum2;
|
|
252
252
|
})(Project_Role_Type_Enum || {});
|
|
253
|
+
Scan_Source_Enum = /* @__PURE__ */ ((Scan_Source_Enum2) => {
|
|
254
|
+
Scan_Source_Enum2["Aspm"] = "ASPM";
|
|
255
|
+
Scan_Source_Enum2["AutoFixer"] = "AUTO_FIXER";
|
|
256
|
+
Scan_Source_Enum2["CiAzure"] = "CI_AZURE";
|
|
257
|
+
Scan_Source_Enum2["CiBamboo"] = "CI_BAMBOO";
|
|
258
|
+
Scan_Source_Enum2["CiCircleci"] = "CI_CIRCLECI";
|
|
259
|
+
Scan_Source_Enum2["CiGithub"] = "CI_GITHUB";
|
|
260
|
+
Scan_Source_Enum2["CiGitlab"] = "CI_GITLAB";
|
|
261
|
+
Scan_Source_Enum2["CiJenkins"] = "CI_JENKINS";
|
|
262
|
+
Scan_Source_Enum2["CiUnknown"] = "CI_UNKNOWN";
|
|
263
|
+
Scan_Source_Enum2["Cli"] = "CLI";
|
|
264
|
+
Scan_Source_Enum2["Mcp"] = "MCP";
|
|
265
|
+
Scan_Source_Enum2["WebUiCheckmarxIntegration"] = "WEB_UI_CHECKMARX_INTEGRATION";
|
|
266
|
+
Scan_Source_Enum2["WebUiFixOwnCode"] = "WEB_UI_FIX_OWN_CODE";
|
|
267
|
+
Scan_Source_Enum2["WebUiOnboarding"] = "WEB_UI_ONBOARDING";
|
|
268
|
+
Scan_Source_Enum2["WebUiRerunAnalysis"] = "WEB_UI_RERUN_ANALYSIS";
|
|
269
|
+
Scan_Source_Enum2["WebUiTryNow"] = "WEB_UI_TRY_NOW";
|
|
270
|
+
return Scan_Source_Enum2;
|
|
271
|
+
})(Scan_Source_Enum || {});
|
|
253
272
|
Vulnerability_Report_Issue_Category_Enum = /* @__PURE__ */ ((Vulnerability_Report_Issue_Category_Enum2) => {
|
|
254
273
|
Vulnerability_Report_Issue_Category_Enum2["FalsePositive"] = "FalsePositive";
|
|
255
274
|
Vulnerability_Report_Issue_Category_Enum2["Filtered"] = "Filtered";
|
|
@@ -481,6 +500,7 @@ var init_client_generates = __esm({
|
|
|
481
500
|
organization {
|
|
482
501
|
id
|
|
483
502
|
enableV2Fixes
|
|
503
|
+
isFixEnabled
|
|
484
504
|
projects(where: {name: {_eq: $projectName}}) {
|
|
485
505
|
name
|
|
486
506
|
id
|
|
@@ -500,6 +520,7 @@ var init_client_generates = __esm({
|
|
|
500
520
|
organization {
|
|
501
521
|
id
|
|
502
522
|
enableV2Fixes
|
|
523
|
+
isFixEnabled
|
|
503
524
|
}
|
|
504
525
|
}
|
|
505
526
|
}
|
|
@@ -901,7 +922,7 @@ var init_client_generates = __esm({
|
|
|
901
922
|
}
|
|
902
923
|
`;
|
|
903
924
|
DigestVulnerabilityReportDocument = `
|
|
904
|
-
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String) {
|
|
925
|
+
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String, $isFixEnabled: Boolean) {
|
|
905
926
|
digestVulnerabilityReport(
|
|
906
927
|
fixReportId: $fixReportId
|
|
907
928
|
vulnerabilityReportFileName: $vulnerabilityReportFileName
|
|
@@ -911,6 +932,7 @@ var init_client_generates = __esm({
|
|
|
911
932
|
reference: $reference
|
|
912
933
|
sha: $sha
|
|
913
934
|
baselineCommit: $baselineCommit
|
|
935
|
+
isFixEnabled: $isFixEnabled
|
|
914
936
|
) {
|
|
915
937
|
__typename
|
|
916
938
|
... on VulnerabilityReport {
|
|
@@ -1460,6 +1482,7 @@ var init_analysis = __esm({
|
|
|
1460
1482
|
analysisUrl: z3.string(),
|
|
1461
1483
|
createdOn: z3.string(),
|
|
1462
1484
|
state: z3.enum(Fix_Report_State_Enum),
|
|
1485
|
+
isFixEnabled: z3.boolean().nullish(),
|
|
1463
1486
|
repo: z3.object({
|
|
1464
1487
|
name: z3.string().nullable(),
|
|
1465
1488
|
originalUrl: z3.string(),
|
|
@@ -1835,6 +1858,8 @@ var init_types = __esm({
|
|
|
1835
1858
|
createdOn: z7.string(),
|
|
1836
1859
|
expirationOn: z7.string().nullable(),
|
|
1837
1860
|
state: z7.enum(Fix_Report_State_Enum),
|
|
1861
|
+
// NOT NULL column with a default, so always present on the wire.
|
|
1862
|
+
isFixEnabled: z7.boolean(),
|
|
1838
1863
|
failReason: z7.string().nullable(),
|
|
1839
1864
|
candidateToRerun: z7.boolean(),
|
|
1840
1865
|
fixes: z7.array(
|
|
@@ -1891,6 +1916,8 @@ var init_types = __esm({
|
|
|
1891
1916
|
reportSummaryUrl: z7.url().nullish(),
|
|
1892
1917
|
computedVendor: z7.enum(Vulnerability_Report_Vendor_Enum).nullable(),
|
|
1893
1918
|
vendor: z7.enum(Vulnerability_Report_Vendor_Enum).nullable(),
|
|
1919
|
+
// Lets the waiting screen distinguish a first scan from a rescan.
|
|
1920
|
+
scanSource: z7.enum(Scan_Source_Enum).nullable(),
|
|
1894
1921
|
issuesWithKnownLanguage: z7.number().nullable(),
|
|
1895
1922
|
scanDate: z7.string().nullable(),
|
|
1896
1923
|
vendorReportId: z7.guid().nullable(),
|
|
@@ -5103,7 +5130,10 @@ var GQLClient = class {
|
|
|
5103
5130
|
return {
|
|
5104
5131
|
organizationId: organization.id,
|
|
5105
5132
|
projectId,
|
|
5106
|
-
enableV2Fixes: organization.enableV2Fixes === true
|
|
5133
|
+
enableV2Fixes: organization.enableV2Fixes === true,
|
|
5134
|
+
// NULL means "unset" and keeps the fix-enabled behaviour; only an
|
|
5135
|
+
// explicit false puts the org in SAST-only mode.
|
|
5136
|
+
isFixEnabled: organization.isFixEnabled !== false
|
|
5107
5137
|
};
|
|
5108
5138
|
}
|
|
5109
5139
|
async getEncryptedApiToken(variables) {
|
|
@@ -5191,7 +5221,8 @@ var GQLClient = class {
|
|
|
5191
5221
|
reference,
|
|
5192
5222
|
sha,
|
|
5193
5223
|
shouldScan,
|
|
5194
|
-
baselineCommit
|
|
5224
|
+
baselineCommit,
|
|
5225
|
+
scanOnly
|
|
5195
5226
|
}) {
|
|
5196
5227
|
const res = await this._clientSdk.DigestVulnerabilityReport({
|
|
5197
5228
|
fixReportId,
|
|
@@ -5201,7 +5232,9 @@ var GQLClient = class {
|
|
|
5201
5232
|
repoUrl,
|
|
5202
5233
|
reference,
|
|
5203
5234
|
sha,
|
|
5204
|
-
baselineCommit
|
|
5235
|
+
baselineCommit,
|
|
5236
|
+
// CLI exposes the inverse `--scan-only` flag; the wire field is isFixEnabled.
|
|
5237
|
+
isFixEnabled: scanOnly === void 0 ? void 0 : !scanOnly
|
|
5205
5238
|
});
|
|
5206
5239
|
if (res.digestVulnerabilityReport.__typename !== "VulnerabilityReport") {
|
|
5207
5240
|
throw new Error("Digesting vulnerability report failed");
|
package/dist/index.mjs
CHANGED
|
@@ -150,7 +150,7 @@ function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
var AiBlameInferenceType, FixQuestionInputType, Language, ManifestAction, Effort_To_Apply_Fix_Enum, Fix_Rating_Tag_Enum, Fix_Report_State_Enum, Fix_State_Enum, IssueLanguage_Enum, Pr_Status_Enum, Project_Role_Type_Enum, Vulnerability_Report_Issue_Category_Enum, Vulnerability_Report_Issue_State_Enum, Vulnerability_Report_Issue_Tag_Enum, Vulnerability_Report_Vendor_Enum, Vulnerability_Severity_Enum, FixDetailsFragmentDoc, FixReportSummaryFieldsFragmentDoc, MeDocument, GetLastOrgAndNamedProjectDocument, GetLastOrgDocument, GetEncryptedApiTokenDocument, FixReportStateDocument, GetVulnerabilityReportPathsDocument, GetAnalysisSubscriptionDocument, GetAnalysisDocument, GetFixesDocument, GetVulByNodesMetadataDocument, GetFalsePositiveDocument, UpdateScmTokenDocument, UploadS3BucketInfoDocument, GetTracyDiffUploadUrlDocument, AnalyzeCommitForExtensionAiBlameDocument, GetAiBlameInferenceDocument, GetAiBlameAttributionPromptDocument, GetPromptSummaryDocument, UploadAiBlameInferencesInitDocument, FinalizeAiBlameInferencesUploadDocument, UploadTracyRecordsDocument, GetTracyRawDataUploadUrlDocument, DigestVulnerabilityReportDocument, SubmitVulnerabilityReportDocument, CreateCommunityUserDocument, CreateCliLoginDocument, PerformCliLoginDocument, SetQuarantineEnabledDocument, CreateProjectDocument, ValidateRepoUrlDocument, GitReferenceDocument, AutoPrAnalysisDocument, GetFixWithAnswersDocument, GetFixReportsByRepoUrlDocument, GetReportFixesDocument, GetLatestReportByRepoUrlDocument, UpdateDownloadedFixDataDocument, GetUserMvsAutoFixDocument, StreamBlameAiAnalysisRequestsDocument, StreamCommitBlameRequestsDocument, ScanSkillDocument, SkillVerdictsByMd5Document, LogMvsEventDocument, GetMvsProjectDocument, IssueTypesDocument, defaultWrapper;
|
|
153
|
+
var AiBlameInferenceType, FixQuestionInputType, Language, ManifestAction, Effort_To_Apply_Fix_Enum, Fix_Rating_Tag_Enum, Fix_Report_State_Enum, Fix_State_Enum, IssueLanguage_Enum, Pr_Status_Enum, Project_Role_Type_Enum, Scan_Source_Enum, Vulnerability_Report_Issue_Category_Enum, Vulnerability_Report_Issue_State_Enum, Vulnerability_Report_Issue_Tag_Enum, Vulnerability_Report_Vendor_Enum, Vulnerability_Severity_Enum, FixDetailsFragmentDoc, FixReportSummaryFieldsFragmentDoc, MeDocument, GetLastOrgAndNamedProjectDocument, GetLastOrgDocument, GetEncryptedApiTokenDocument, FixReportStateDocument, GetVulnerabilityReportPathsDocument, GetAnalysisSubscriptionDocument, GetAnalysisDocument, GetFixesDocument, GetVulByNodesMetadataDocument, GetFalsePositiveDocument, UpdateScmTokenDocument, UploadS3BucketInfoDocument, GetTracyDiffUploadUrlDocument, AnalyzeCommitForExtensionAiBlameDocument, GetAiBlameInferenceDocument, GetAiBlameAttributionPromptDocument, GetPromptSummaryDocument, UploadAiBlameInferencesInitDocument, FinalizeAiBlameInferencesUploadDocument, UploadTracyRecordsDocument, GetTracyRawDataUploadUrlDocument, DigestVulnerabilityReportDocument, SubmitVulnerabilityReportDocument, CreateCommunityUserDocument, CreateCliLoginDocument, PerformCliLoginDocument, SetQuarantineEnabledDocument, CreateProjectDocument, ValidateRepoUrlDocument, GitReferenceDocument, AutoPrAnalysisDocument, GetFixWithAnswersDocument, GetFixReportsByRepoUrlDocument, GetReportFixesDocument, GetLatestReportByRepoUrlDocument, UpdateDownloadedFixDataDocument, GetUserMvsAutoFixDocument, StreamBlameAiAnalysisRequestsDocument, StreamCommitBlameRequestsDocument, ScanSkillDocument, SkillVerdictsByMd5Document, LogMvsEventDocument, GetMvsProjectDocument, IssueTypesDocument, defaultWrapper;
|
|
154
154
|
var init_client_generates = __esm({
|
|
155
155
|
"src/features/analysis/scm/generates/client_generates.ts"() {
|
|
156
156
|
"use strict";
|
|
@@ -250,6 +250,25 @@ var init_client_generates = __esm({
|
|
|
250
250
|
Project_Role_Type_Enum2["Writer"] = "writer";
|
|
251
251
|
return Project_Role_Type_Enum2;
|
|
252
252
|
})(Project_Role_Type_Enum || {});
|
|
253
|
+
Scan_Source_Enum = /* @__PURE__ */ ((Scan_Source_Enum2) => {
|
|
254
|
+
Scan_Source_Enum2["Aspm"] = "ASPM";
|
|
255
|
+
Scan_Source_Enum2["AutoFixer"] = "AUTO_FIXER";
|
|
256
|
+
Scan_Source_Enum2["CiAzure"] = "CI_AZURE";
|
|
257
|
+
Scan_Source_Enum2["CiBamboo"] = "CI_BAMBOO";
|
|
258
|
+
Scan_Source_Enum2["CiCircleci"] = "CI_CIRCLECI";
|
|
259
|
+
Scan_Source_Enum2["CiGithub"] = "CI_GITHUB";
|
|
260
|
+
Scan_Source_Enum2["CiGitlab"] = "CI_GITLAB";
|
|
261
|
+
Scan_Source_Enum2["CiJenkins"] = "CI_JENKINS";
|
|
262
|
+
Scan_Source_Enum2["CiUnknown"] = "CI_UNKNOWN";
|
|
263
|
+
Scan_Source_Enum2["Cli"] = "CLI";
|
|
264
|
+
Scan_Source_Enum2["Mcp"] = "MCP";
|
|
265
|
+
Scan_Source_Enum2["WebUiCheckmarxIntegration"] = "WEB_UI_CHECKMARX_INTEGRATION";
|
|
266
|
+
Scan_Source_Enum2["WebUiFixOwnCode"] = "WEB_UI_FIX_OWN_CODE";
|
|
267
|
+
Scan_Source_Enum2["WebUiOnboarding"] = "WEB_UI_ONBOARDING";
|
|
268
|
+
Scan_Source_Enum2["WebUiRerunAnalysis"] = "WEB_UI_RERUN_ANALYSIS";
|
|
269
|
+
Scan_Source_Enum2["WebUiTryNow"] = "WEB_UI_TRY_NOW";
|
|
270
|
+
return Scan_Source_Enum2;
|
|
271
|
+
})(Scan_Source_Enum || {});
|
|
253
272
|
Vulnerability_Report_Issue_Category_Enum = /* @__PURE__ */ ((Vulnerability_Report_Issue_Category_Enum2) => {
|
|
254
273
|
Vulnerability_Report_Issue_Category_Enum2["FalsePositive"] = "FalsePositive";
|
|
255
274
|
Vulnerability_Report_Issue_Category_Enum2["Filtered"] = "Filtered";
|
|
@@ -481,6 +500,7 @@ var init_client_generates = __esm({
|
|
|
481
500
|
organization {
|
|
482
501
|
id
|
|
483
502
|
enableV2Fixes
|
|
503
|
+
isFixEnabled
|
|
484
504
|
projects(where: {name: {_eq: $projectName}}) {
|
|
485
505
|
name
|
|
486
506
|
id
|
|
@@ -500,6 +520,7 @@ var init_client_generates = __esm({
|
|
|
500
520
|
organization {
|
|
501
521
|
id
|
|
502
522
|
enableV2Fixes
|
|
523
|
+
isFixEnabled
|
|
503
524
|
}
|
|
504
525
|
}
|
|
505
526
|
}
|
|
@@ -901,7 +922,7 @@ var init_client_generates = __esm({
|
|
|
901
922
|
}
|
|
902
923
|
`;
|
|
903
924
|
DigestVulnerabilityReportDocument = `
|
|
904
|
-
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String) {
|
|
925
|
+
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String, $isFixEnabled: Boolean) {
|
|
905
926
|
digestVulnerabilityReport(
|
|
906
927
|
fixReportId: $fixReportId
|
|
907
928
|
vulnerabilityReportFileName: $vulnerabilityReportFileName
|
|
@@ -911,6 +932,7 @@ var init_client_generates = __esm({
|
|
|
911
932
|
reference: $reference
|
|
912
933
|
sha: $sha
|
|
913
934
|
baselineCommit: $baselineCommit
|
|
935
|
+
isFixEnabled: $isFixEnabled
|
|
914
936
|
) {
|
|
915
937
|
__typename
|
|
916
938
|
... on VulnerabilityReport {
|
|
@@ -1562,6 +1584,7 @@ var init_analysis = __esm({
|
|
|
1562
1584
|
analysisUrl: z4.string(),
|
|
1563
1585
|
createdOn: z4.string(),
|
|
1564
1586
|
state: z4.enum(Fix_Report_State_Enum),
|
|
1587
|
+
isFixEnabled: z4.boolean().nullish(),
|
|
1565
1588
|
repo: z4.object({
|
|
1566
1589
|
name: z4.string().nullable(),
|
|
1567
1590
|
originalUrl: z4.string(),
|
|
@@ -1880,6 +1903,8 @@ var init_types = __esm({
|
|
|
1880
1903
|
createdOn: z7.string(),
|
|
1881
1904
|
expirationOn: z7.string().nullable(),
|
|
1882
1905
|
state: z7.enum(Fix_Report_State_Enum),
|
|
1906
|
+
// NOT NULL column with a default, so always present on the wire.
|
|
1907
|
+
isFixEnabled: z7.boolean(),
|
|
1883
1908
|
failReason: z7.string().nullable(),
|
|
1884
1909
|
candidateToRerun: z7.boolean(),
|
|
1885
1910
|
fixes: z7.array(
|
|
@@ -1936,6 +1961,8 @@ var init_types = __esm({
|
|
|
1936
1961
|
reportSummaryUrl: z7.url().nullish(),
|
|
1937
1962
|
computedVendor: z7.enum(Vulnerability_Report_Vendor_Enum).nullable(),
|
|
1938
1963
|
vendor: z7.enum(Vulnerability_Report_Vendor_Enum).nullable(),
|
|
1964
|
+
// Lets the waiting screen distinguish a first scan from a rescan.
|
|
1965
|
+
scanSource: z7.enum(Scan_Source_Enum).nullable(),
|
|
1939
1966
|
issuesWithKnownLanguage: z7.number().nullable(),
|
|
1940
1967
|
scanDate: z7.string().nullable(),
|
|
1941
1968
|
vendorReportId: z7.guid().nullable(),
|
|
@@ -11220,6 +11247,13 @@ var baselineCommitOption = {
|
|
|
11220
11247
|
),
|
|
11221
11248
|
type: "string"
|
|
11222
11249
|
};
|
|
11250
|
+
var scanOnlyOption = {
|
|
11251
|
+
describe: chalk2.bold(
|
|
11252
|
+
"Scan only: run the Mobb scan and report findings without generating fixes. The report can be fixed later (re-run without this flag, or use the Fix button in the app). Ignores fix-related flags (--auto-pr, --commit-directly, --create-one-pr)."
|
|
11253
|
+
),
|
|
11254
|
+
type: "boolean",
|
|
11255
|
+
default: false
|
|
11256
|
+
};
|
|
11223
11257
|
var pollingOption = {
|
|
11224
11258
|
describe: chalk2.bold(
|
|
11225
11259
|
"Use HTTP polling instead of WebSocket for status updates. Useful for proxy environments or firewalls that block WebSocket connections. Polling interval: 5 seconds, timeout: 30 minutes."
|
|
@@ -11836,7 +11870,10 @@ var GQLClient = class {
|
|
|
11836
11870
|
return {
|
|
11837
11871
|
organizationId: organization.id,
|
|
11838
11872
|
projectId,
|
|
11839
|
-
enableV2Fixes: organization.enableV2Fixes === true
|
|
11873
|
+
enableV2Fixes: organization.enableV2Fixes === true,
|
|
11874
|
+
// NULL means "unset" and keeps the fix-enabled behaviour; only an
|
|
11875
|
+
// explicit false puts the org in SAST-only mode.
|
|
11876
|
+
isFixEnabled: organization.isFixEnabled !== false
|
|
11840
11877
|
};
|
|
11841
11878
|
}
|
|
11842
11879
|
async getEncryptedApiToken(variables) {
|
|
@@ -11924,7 +11961,8 @@ var GQLClient = class {
|
|
|
11924
11961
|
reference,
|
|
11925
11962
|
sha,
|
|
11926
11963
|
shouldScan,
|
|
11927
|
-
baselineCommit
|
|
11964
|
+
baselineCommit,
|
|
11965
|
+
scanOnly
|
|
11928
11966
|
}) {
|
|
11929
11967
|
const res = await this._clientSdk.DigestVulnerabilityReport({
|
|
11930
11968
|
fixReportId,
|
|
@@ -11934,7 +11972,9 @@ var GQLClient = class {
|
|
|
11934
11972
|
repoUrl,
|
|
11935
11973
|
reference,
|
|
11936
11974
|
sha,
|
|
11937
|
-
baselineCommit
|
|
11975
|
+
baselineCommit,
|
|
11976
|
+
// CLI exposes the inverse `--scan-only` flag; the wire field is isFixEnabled.
|
|
11977
|
+
isFixEnabled: scanOnly === void 0 ? void 0 : !scanOnly
|
|
11938
11978
|
});
|
|
11939
11979
|
if (res.digestVulnerabilityReport.__typename !== "VulnerabilityReport") {
|
|
11940
11980
|
throw new Error("Digesting vulnerability report failed");
|
|
@@ -15053,7 +15093,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15053
15093
|
commitDirectly,
|
|
15054
15094
|
pullRequest,
|
|
15055
15095
|
polling,
|
|
15056
|
-
baselineCommit
|
|
15096
|
+
baselineCommit,
|
|
15097
|
+
scanOnly: requestedScanOnly
|
|
15057
15098
|
} = params;
|
|
15058
15099
|
debug22("start %s %s", dirname, repo);
|
|
15059
15100
|
const { createSpinner: createSpinner5 } = Spinner2({ ci });
|
|
@@ -15069,11 +15110,20 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15069
15110
|
const {
|
|
15070
15111
|
projectId,
|
|
15071
15112
|
organizationId,
|
|
15072
|
-
enableV2Fixes: orgEnableV2Fixes
|
|
15113
|
+
enableV2Fixes: orgEnableV2Fixes,
|
|
15114
|
+
isFixEnabled: orgIsFixEnabled
|
|
15073
15115
|
} = await gqlClient.getLastOrgAndNamedProject({
|
|
15074
15116
|
projectName: mobbProjectName,
|
|
15075
15117
|
userDefinedOrganizationId: userOrganizationId
|
|
15076
15118
|
});
|
|
15119
|
+
const scanOnly = requestedScanOnly || !orgIsFixEnabled;
|
|
15120
|
+
if (scanOnly && !requestedScanOnly) {
|
|
15121
|
+
console.log(
|
|
15122
|
+
chalk7.yellow(
|
|
15123
|
+
"\u2139\uFE0F Your organization is on Mobb Scan (scan-only): issues will be found and reported, but no fixes are generated. Contact support to enable Mobb Fixer."
|
|
15124
|
+
)
|
|
15125
|
+
);
|
|
15126
|
+
}
|
|
15077
15127
|
const {
|
|
15078
15128
|
uploadS3BucketInfo: { repoUploadInfo, reportUploadInfo }
|
|
15079
15129
|
} = await gqlClient.uploadS3BucketInfo();
|
|
@@ -15173,7 +15223,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15173
15223
|
shouldScan,
|
|
15174
15224
|
polling,
|
|
15175
15225
|
// Only meaningful when opengrep is going to run (no user-supplied report).
|
|
15176
|
-
baselineCommit: shouldScan ? baselineCommit : void 0
|
|
15226
|
+
baselineCommit: shouldScan ? baselineCommit : void 0,
|
|
15227
|
+
scanOnly
|
|
15177
15228
|
});
|
|
15178
15229
|
uploadReportSpinner.success({ text: "\u{1F4C1} Report uploaded successfully" });
|
|
15179
15230
|
const mobbSpinner = createSpinner5("\u{1F575}\uFE0F\u200D\u2642\uFE0F Initiating Mobb analysis").start();
|
|
@@ -15199,9 +15250,9 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15199
15250
|
throw new Error("\u{1F575}\uFE0F\u200D\u2642\uFE0F Mobb analysis failed");
|
|
15200
15251
|
}
|
|
15201
15252
|
mobbSpinner.success({
|
|
15202
|
-
text: "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15253
|
+
text: scanOnly ? "\u{1F50D} Scanning (scan-only, no fixes)..." : "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15203
15254
|
});
|
|
15204
|
-
if (autoPr) {
|
|
15255
|
+
if (autoPr && !scanOnly) {
|
|
15205
15256
|
await handleAutoPr({
|
|
15206
15257
|
gqlClient,
|
|
15207
15258
|
analysisId: reportUploadInfo.fixReportId,
|
|
@@ -15213,7 +15264,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15213
15264
|
});
|
|
15214
15265
|
}
|
|
15215
15266
|
await askToOpenAnalysis();
|
|
15216
|
-
if (command === "review") {
|
|
15267
|
+
if (command === "review" && !scanOnly) {
|
|
15217
15268
|
await waitForAnaysisAndReviewPr({
|
|
15218
15269
|
repo,
|
|
15219
15270
|
githubActionToken,
|
|
@@ -15320,7 +15371,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15320
15371
|
// shouldScan is false here (user provided a report); baseline filter
|
|
15321
15372
|
// only applies to the opengrep code path. Drop it to keep the contract
|
|
15322
15373
|
// honest with the CLI help text.
|
|
15323
|
-
baselineCommit: void 0
|
|
15374
|
+
baselineCommit: void 0,
|
|
15375
|
+
scanOnly
|
|
15324
15376
|
});
|
|
15325
15377
|
const res = await _zipAndUploadRepo({
|
|
15326
15378
|
srcPath,
|
|
@@ -15345,7 +15397,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15345
15397
|
ci,
|
|
15346
15398
|
shouldScan: shouldScan2,
|
|
15347
15399
|
polling,
|
|
15348
|
-
baselineCommit
|
|
15400
|
+
baselineCommit,
|
|
15401
|
+
scanOnly
|
|
15349
15402
|
});
|
|
15350
15403
|
}
|
|
15351
15404
|
const mobbSpinner2 = createSpinner5("\u{1F575}\uFE0F\u200D\u2642\uFE0F Initiating Mobb analysis").start();
|
|
@@ -15366,7 +15419,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15366
15419
|
},
|
|
15367
15420
|
polling
|
|
15368
15421
|
});
|
|
15369
|
-
if (command === "review") {
|
|
15422
|
+
if (command === "review" && !scanOnly) {
|
|
15370
15423
|
await waitForAnaysisAndReviewPr({
|
|
15371
15424
|
repo,
|
|
15372
15425
|
githubActionToken,
|
|
@@ -15381,9 +15434,9 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15381
15434
|
throw e;
|
|
15382
15435
|
}
|
|
15383
15436
|
mobbSpinner2.success({
|
|
15384
|
-
text: "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15437
|
+
text: scanOnly ? "\u{1F50D} Scanning (scan-only, no fixes)..." : "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15385
15438
|
});
|
|
15386
|
-
if (autoPr) {
|
|
15439
|
+
if (autoPr && !scanOnly) {
|
|
15387
15440
|
await handleAutoPr({
|
|
15388
15441
|
gqlClient,
|
|
15389
15442
|
analysisId: reportUploadInfo.fixReportId,
|
|
@@ -15441,7 +15494,8 @@ async function _digestReport({
|
|
|
15441
15494
|
reference,
|
|
15442
15495
|
shouldScan,
|
|
15443
15496
|
polling,
|
|
15444
|
-
baselineCommit
|
|
15497
|
+
baselineCommit,
|
|
15498
|
+
scanOnly
|
|
15445
15499
|
}) {
|
|
15446
15500
|
const digestSpinner = createSpinner4(
|
|
15447
15501
|
progressMassages.processingVulnerabilityReport
|
|
@@ -15456,7 +15510,8 @@ async function _digestReport({
|
|
|
15456
15510
|
sha,
|
|
15457
15511
|
reference,
|
|
15458
15512
|
shouldScan,
|
|
15459
|
-
baselineCommit
|
|
15513
|
+
baselineCommit,
|
|
15514
|
+
scanOnly
|
|
15460
15515
|
}
|
|
15461
15516
|
);
|
|
15462
15517
|
const callbackStates = [
|
|
@@ -15707,7 +15762,8 @@ async function analyze({
|
|
|
15707
15762
|
commitDirectly,
|
|
15708
15763
|
pullRequest,
|
|
15709
15764
|
polling,
|
|
15710
|
-
baselineCommit
|
|
15765
|
+
baselineCommit,
|
|
15766
|
+
scanOnly
|
|
15711
15767
|
}, { skipPrompts = false } = {}) {
|
|
15712
15768
|
!ci && await showWelcomeMessage(skipPrompts);
|
|
15713
15769
|
await runAnalysis(
|
|
@@ -15727,7 +15783,8 @@ async function analyze({
|
|
|
15727
15783
|
pullRequest,
|
|
15728
15784
|
createOnePr,
|
|
15729
15785
|
polling,
|
|
15730
|
-
baselineCommit
|
|
15786
|
+
baselineCommit,
|
|
15787
|
+
scanOnly
|
|
15731
15788
|
},
|
|
15732
15789
|
{ skipPrompts }
|
|
15733
15790
|
);
|
|
@@ -15937,7 +15994,10 @@ function analyzeBuilder(yargs2) {
|
|
|
15937
15994
|
describe: chalk10.bold("Number of the pull request"),
|
|
15938
15995
|
type: "number",
|
|
15939
15996
|
demandOption: false
|
|
15940
|
-
}).option("polling", pollingOption).option("baseline-commit", baselineCommitOption).example(
|
|
15997
|
+
}).option("polling", pollingOption).option("baseline-commit", baselineCommitOption).option("scan-only", scanOnlyOption).example(
|
|
15998
|
+
"npx mobbdev@latest analyze -r https://github.com/org/repo --scan-only",
|
|
15999
|
+
"scan only \u2014 report findings without generating fixes"
|
|
16000
|
+
).example(
|
|
15941
16001
|
"npx mobbdev@latest analyze -r https://github.com/WebGoat/WebGoat -f <your_vulnerability_report_path>",
|
|
15942
16002
|
"analyze an existing repository"
|
|
15943
16003
|
).example(
|
|
@@ -18257,7 +18317,7 @@ function createLogger(config2) {
|
|
|
18257
18317
|
|
|
18258
18318
|
// src/features/claude_code/hook_logger.ts
|
|
18259
18319
|
var DD_RUM_TOKEN = true ? "pubf59c0182545bfb4c299175119f1abf9b" : "";
|
|
18260
|
-
var CLI_VERSION = true ? "1.4.
|
|
18320
|
+
var CLI_VERSION = true ? "1.4.48" : "unknown";
|
|
18261
18321
|
var NAMESPACE = "mobbdev-claude-code-hook-logs";
|
|
18262
18322
|
var claudeCodeVersion;
|
|
18263
18323
|
function buildDdTags() {
|
|
@@ -20031,6 +20091,7 @@ var partitionInteractiveFixes = (fixes) => {
|
|
|
20031
20091
|
};
|
|
20032
20092
|
|
|
20033
20093
|
// src/mcp/services/McpGQLClient.ts
|
|
20094
|
+
var MVS_SCAN_ONLY_ERROR = "Mobb Vibe Shield is not available for your organization: it is on Mobb Scan (scan-only), which reports issues but does not generate fixes. Contact support to enable Mobb Fixer.";
|
|
20034
20095
|
var McpGQLClient = class extends GQLClient {
|
|
20035
20096
|
constructor(args) {
|
|
20036
20097
|
super({
|
|
@@ -20210,12 +20271,16 @@ var McpGQLClient = class extends GQLClient {
|
|
|
20210
20271
|
throw new Error("User email not found");
|
|
20211
20272
|
}
|
|
20212
20273
|
const orgRes = await this._clientSdk.getLastOrg({ email: userEmail });
|
|
20213
|
-
const
|
|
20274
|
+
const organization = orgRes.user?.[0]?.userOrganizationsAndUserOrganizationRoles?.[0]?.organization;
|
|
20275
|
+
const organizationId = organization?.id;
|
|
20214
20276
|
if (!organizationId) {
|
|
20215
20277
|
throw new Error(
|
|
20216
20278
|
`The user with email:${userEmail} is not associated with any organization`
|
|
20217
20279
|
);
|
|
20218
20280
|
}
|
|
20281
|
+
if (organization.isFixEnabled === false) {
|
|
20282
|
+
throw new Error(MVS_SCAN_ONLY_ERROR);
|
|
20283
|
+
}
|
|
20219
20284
|
const mvsRes = await this._clientSdk.getMvsProject({ organizationId });
|
|
20220
20285
|
const projectId = mvsRes.getMvsProject?.projectId;
|
|
20221
20286
|
if (!projectId) {
|