mobbdev 1.0.47 → 1.0.50
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 +24 -8
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -5896,6 +5896,9 @@ async function getGitlabIsUserCollaborator({
|
|
|
5896
5896
|
const members = await api2.ProjectMembers.all(res.id, {
|
|
5897
5897
|
includeInherited: true
|
|
5898
5898
|
});
|
|
5899
|
+
if (!username) {
|
|
5900
|
+
return true;
|
|
5901
|
+
}
|
|
5899
5902
|
return !!members.find((member) => member.username === username);
|
|
5900
5903
|
} catch (e) {
|
|
5901
5904
|
return false;
|
|
@@ -6254,7 +6257,14 @@ var GitlabSCMLib = class extends SCMLib {
|
|
|
6254
6257
|
}
|
|
6255
6258
|
async getUserHasAccessToRepo() {
|
|
6256
6259
|
this._validateAccessTokenAndUrl();
|
|
6257
|
-
|
|
6260
|
+
let username = void 0;
|
|
6261
|
+
try {
|
|
6262
|
+
username = await this.getUsername();
|
|
6263
|
+
} catch (e) {
|
|
6264
|
+
console.warn(
|
|
6265
|
+
"could not get username. this is okay if a project token is used"
|
|
6266
|
+
);
|
|
6267
|
+
}
|
|
6258
6268
|
return getGitlabIsUserCollaborator({
|
|
6259
6269
|
username,
|
|
6260
6270
|
accessToken: this.accessToken,
|
|
@@ -8346,7 +8356,7 @@ async function uploadFile({
|
|
|
8346
8356
|
|
|
8347
8357
|
// src/features/analysis/index.ts
|
|
8348
8358
|
var { CliError: CliError2, Spinner: Spinner2 } = utils_exports;
|
|
8349
|
-
function _getScanSource(command) {
|
|
8359
|
+
function _getScanSource(command, ci) {
|
|
8350
8360
|
if (command === "review")
|
|
8351
8361
|
return "AUTO_FIXER" /* AutoFixer */;
|
|
8352
8362
|
const envToCi = [
|
|
@@ -8362,6 +8372,9 @@ function _getScanSource(command) {
|
|
|
8362
8372
|
return source;
|
|
8363
8373
|
}
|
|
8364
8374
|
}
|
|
8375
|
+
if (ci) {
|
|
8376
|
+
return "CI_UNKNOWN" /* CiUnknown */;
|
|
8377
|
+
}
|
|
8365
8378
|
return "CLI" /* Cli */;
|
|
8366
8379
|
}
|
|
8367
8380
|
async function downloadRepo({
|
|
@@ -8659,7 +8672,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
8659
8672
|
gqlClient,
|
|
8660
8673
|
fixReportId: reportUploadInfo.fixReportId,
|
|
8661
8674
|
projectId,
|
|
8662
|
-
command
|
|
8675
|
+
command,
|
|
8676
|
+
ci
|
|
8663
8677
|
});
|
|
8664
8678
|
uploadReportSpinner.success({ text: "\u{1F4C1} Report uploaded successfully" });
|
|
8665
8679
|
const mobbSpinner = createSpinner5("\u{1F575}\uFE0F\u200D\u2642\uFE0F Initiating Mobb analysis").start();
|
|
@@ -8675,7 +8689,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
8675
8689
|
sha,
|
|
8676
8690
|
experimentalEnabled,
|
|
8677
8691
|
pullRequest: params.pullRequest,
|
|
8678
|
-
scanSource: _getScanSource(command)
|
|
8692
|
+
scanSource: _getScanSource(command, ci)
|
|
8679
8693
|
}
|
|
8680
8694
|
});
|
|
8681
8695
|
if (sendReportRes.submitVulnerabilityReport.__typename !== "VulnerabilityReport") {
|
|
@@ -8780,7 +8794,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
8780
8794
|
gqlClient,
|
|
8781
8795
|
fixReportId: reportUploadInfo.fixReportId,
|
|
8782
8796
|
projectId,
|
|
8783
|
-
command
|
|
8797
|
+
command,
|
|
8798
|
+
ci
|
|
8784
8799
|
});
|
|
8785
8800
|
const srcFileStatus = await fsPromises.lstat(srcPath);
|
|
8786
8801
|
const zippingSpinner = createSpinner5("\u{1F4E6} Zipping repo").start();
|
|
@@ -8817,7 +8832,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
8817
8832
|
repoUrl: repo || gitInfo.repoUrl || getTopLevelDirName(srcPath),
|
|
8818
8833
|
reference: ref || gitInfo.reference || "no-branch",
|
|
8819
8834
|
sha: commitHash || gitInfo.hash || "0123456789abcdef",
|
|
8820
|
-
scanSource: _getScanSource(command),
|
|
8835
|
+
scanSource: _getScanSource(command, ci),
|
|
8821
8836
|
pullRequest: params.pullRequest
|
|
8822
8837
|
}
|
|
8823
8838
|
});
|
|
@@ -8876,7 +8891,8 @@ async function _digestReport({
|
|
|
8876
8891
|
gqlClient,
|
|
8877
8892
|
fixReportId,
|
|
8878
8893
|
projectId,
|
|
8879
|
-
command
|
|
8894
|
+
command,
|
|
8895
|
+
ci
|
|
8880
8896
|
}) {
|
|
8881
8897
|
const digestSpinner = createSpinner4(
|
|
8882
8898
|
progressMassages.processingVulnerabilityReport
|
|
@@ -8886,7 +8902,7 @@ async function _digestReport({
|
|
|
8886
8902
|
{
|
|
8887
8903
|
fixReportId,
|
|
8888
8904
|
projectId,
|
|
8889
|
-
scanSource: _getScanSource(command)
|
|
8905
|
+
scanSource: _getScanSource(command, ci)
|
|
8890
8906
|
}
|
|
8891
8907
|
);
|
|
8892
8908
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobbdev",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.50",
|
|
4
4
|
"description": "Automated secure code remediation tool",
|
|
5
5
|
"repository": "git+https://github.com/mobb-dev/bugsy.git",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"@octokit/core": "5.2.0",
|
|
36
36
|
"@octokit/graphql": "5.0.6",
|
|
37
37
|
"@octokit/plugin-rest-endpoint-methods": "7.2.3",
|
|
38
|
-
"@octokit/request-error": "5.1.
|
|
38
|
+
"@octokit/request-error": "5.1.1",
|
|
39
39
|
"@types/libsodium-wrappers": "0.7.14",
|
|
40
40
|
"adm-zip": "0.5.16",
|
|
41
|
-
"axios": "1.
|
|
41
|
+
"axios": "1.8.2",
|
|
42
42
|
"azure-devops-node-api": "12.1.0",
|
|
43
43
|
"bitbucket": "2.11.0",
|
|
44
44
|
"chalk": "5.4.1",
|