mobbdev 0.0.118 → 0.0.119
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 +22 -10
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -311,11 +311,12 @@ var UploadS3BucketInfoDocument = `
|
|
|
311
311
|
}
|
|
312
312
|
`;
|
|
313
313
|
var DigestVulnerabilityReportDocument = `
|
|
314
|
-
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String!, $fixReportId: String!, $projectId: String!) {
|
|
314
|
+
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String!, $fixReportId: String!, $projectId: String!, $scanSource: String!) {
|
|
315
315
|
digestVulnerabilityReport(
|
|
316
316
|
fixReportId: $fixReportId
|
|
317
317
|
vulnerabilityReportFileName: $vulnerabilityReportFileName
|
|
318
318
|
projectId: $projectId
|
|
319
|
+
scanSource: $scanSource
|
|
319
320
|
) {
|
|
320
321
|
__typename
|
|
321
322
|
... on VulnerabilityReport {
|
|
@@ -338,7 +339,7 @@ var DigestVulnerabilityReportDocument = `
|
|
|
338
339
|
}
|
|
339
340
|
`;
|
|
340
341
|
var SubmitVulnerabilityReportDocument = `
|
|
341
|
-
mutation SubmitVulnerabilityReport($fixReportId: String!, $repoUrl: String!, $reference: String!, $projectId: String!, $sha: String, $experimentalEnabled: Boolean, $vulnerabilityReportFileName: String, $pullRequest: Int) {
|
|
342
|
+
mutation SubmitVulnerabilityReport($fixReportId: String!, $repoUrl: String!, $reference: String!, $projectId: String!, $scanSource: String!, $sha: String, $experimentalEnabled: Boolean, $vulnerabilityReportFileName: String, $pullRequest: Int) {
|
|
342
343
|
submitVulnerabilityReport(
|
|
343
344
|
fixReportId: $fixReportId
|
|
344
345
|
repoUrl: $repoUrl
|
|
@@ -348,6 +349,7 @@ var SubmitVulnerabilityReportDocument = `
|
|
|
348
349
|
pullRequest: $pullRequest
|
|
349
350
|
projectId: $projectId
|
|
350
351
|
vulnerabilityReportFileName: $vulnerabilityReportFileName
|
|
352
|
+
scanSource: $scanSource
|
|
351
353
|
) {
|
|
352
354
|
__typename
|
|
353
355
|
... on VulnerabilityReport {
|
|
@@ -849,12 +851,14 @@ var GQLClient = class {
|
|
|
849
851
|
}
|
|
850
852
|
async digestVulnerabilityReport({
|
|
851
853
|
fixReportId,
|
|
852
|
-
projectId
|
|
854
|
+
projectId,
|
|
855
|
+
scanSource
|
|
853
856
|
}) {
|
|
854
857
|
const res = await this._clientSdk.DigestVulnerabilityReport({
|
|
855
858
|
fixReportId,
|
|
856
859
|
vulnerabilityReportFileName: "report.json",
|
|
857
|
-
projectId
|
|
860
|
+
projectId,
|
|
861
|
+
scanSource
|
|
858
862
|
});
|
|
859
863
|
if (res.digestVulnerabilityReport.__typename !== "VulnerabilityReport") {
|
|
860
864
|
throw new Error("Digesting vulnerability report failed");
|
|
@@ -872,7 +876,7 @@ var GQLClient = class {
|
|
|
872
876
|
vulnerabilityReportFileName,
|
|
873
877
|
pullRequest
|
|
874
878
|
} = params;
|
|
875
|
-
|
|
879
|
+
return await this._clientSdk.SubmitVulnerabilityReport({
|
|
876
880
|
fixReportId,
|
|
877
881
|
repoUrl,
|
|
878
882
|
reference,
|
|
@@ -880,9 +884,9 @@ var GQLClient = class {
|
|
|
880
884
|
projectId,
|
|
881
885
|
pullRequest,
|
|
882
886
|
sha: sha || "",
|
|
883
|
-
experimentalEnabled
|
|
887
|
+
experimentalEnabled,
|
|
888
|
+
scanSource: params.scanSource
|
|
884
889
|
});
|
|
885
|
-
return res;
|
|
886
890
|
}
|
|
887
891
|
async getFixReportState(fixReportId) {
|
|
888
892
|
const res = await this._clientSdk.FixReportState({ id: fixReportId });
|
|
@@ -4835,6 +4839,11 @@ async function uploadFile({
|
|
|
4835
4839
|
// src/features/analysis/index.ts
|
|
4836
4840
|
var { CliError: CliError2, Spinner: Spinner2, keypress: keypress2 } = utils_exports;
|
|
4837
4841
|
var webLoginUrl = `${WEB_APP_URL}/cli-login`;
|
|
4842
|
+
function _getScanSource(command) {
|
|
4843
|
+
if (command === "review")
|
|
4844
|
+
return "AUTO_FIXER" /* AutoFixer */;
|
|
4845
|
+
return "CLI" /* Cli */;
|
|
4846
|
+
}
|
|
4838
4847
|
async function downloadRepo({
|
|
4839
4848
|
repoUrl,
|
|
4840
4849
|
authHeaders,
|
|
@@ -5064,7 +5073,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
5064
5073
|
vulnerabilityReportFileName: "report.json",
|
|
5065
5074
|
sha,
|
|
5066
5075
|
experimentalEnabled,
|
|
5067
|
-
pullRequest: params.pullRequest
|
|
5076
|
+
pullRequest: params.pullRequest,
|
|
5077
|
+
scanSource: _getScanSource(command)
|
|
5068
5078
|
}
|
|
5069
5079
|
});
|
|
5070
5080
|
if (sendReportRes.submitVulnerabilityReport.__typename !== "VulnerabilityReport") {
|
|
@@ -5262,7 +5272,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
5262
5272
|
try {
|
|
5263
5273
|
const { vulnerabilityReportId } = await gqlClient.digestVulnerabilityReport({
|
|
5264
5274
|
fixReportId: reportUploadInfo.fixReportId,
|
|
5265
|
-
projectId
|
|
5275
|
+
projectId,
|
|
5276
|
+
scanSource: _getScanSource(command)
|
|
5266
5277
|
});
|
|
5267
5278
|
try {
|
|
5268
5279
|
await gqlClient.subscribeToAnalysis({
|
|
@@ -5317,7 +5328,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
5317
5328
|
projectId,
|
|
5318
5329
|
repoUrl: repo || gitInfo.repoUrl || getTopLevelDirName(srcPath),
|
|
5319
5330
|
reference: gitInfo.reference || "no-branch",
|
|
5320
|
-
sha: commitHash || gitInfo.hash || "0123456789abcdef"
|
|
5331
|
+
sha: commitHash || gitInfo.hash || "0123456789abcdef",
|
|
5332
|
+
scanSource: _getScanSource(command)
|
|
5321
5333
|
}
|
|
5322
5334
|
});
|
|
5323
5335
|
} catch (e) {
|