mobbdev 1.4.7 → 1.4.9
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 +18 -6
- package/dist/index.mjs +48 -26
- package/package.json +10 -10
|
@@ -598,6 +598,7 @@ var init_client_generates = __esm({
|
|
|
598
598
|
id
|
|
599
599
|
organization {
|
|
600
600
|
id
|
|
601
|
+
enableV2Fixes
|
|
601
602
|
projects(where: {name: {_eq: $projectName}}) {
|
|
602
603
|
name
|
|
603
604
|
id
|
|
@@ -616,6 +617,7 @@ var init_client_generates = __esm({
|
|
|
616
617
|
id
|
|
617
618
|
organization {
|
|
618
619
|
id
|
|
620
|
+
enableV2Fixes
|
|
619
621
|
}
|
|
620
622
|
}
|
|
621
623
|
}
|
|
@@ -2707,7 +2709,7 @@ var init_env = __esm({
|
|
|
2707
2709
|
GITLAB_API_TOKEN: z16.string().optional(),
|
|
2708
2710
|
GITHUB_API_TOKEN: z16.string().optional(),
|
|
2709
2711
|
GIT_PROXY_HOST: z16.string().optional().default("http://tinyproxy:8888"),
|
|
2710
|
-
MAX_UPLOAD_FILE_SIZE_MB: z16.coerce.number().gt(0).default(
|
|
2712
|
+
MAX_UPLOAD_FILE_SIZE_MB: z16.coerce.number().gt(0).default(2),
|
|
2711
2713
|
GITHUB_API_CONCURRENCY: z16.coerce.number().gt(0).optional().default(10)
|
|
2712
2714
|
});
|
|
2713
2715
|
({
|
|
@@ -3569,7 +3571,13 @@ var init_FileUtils = __esm({
|
|
|
3569
3571
|
const results = [];
|
|
3570
3572
|
const filePromises = [];
|
|
3571
3573
|
for (const item of items) {
|
|
3572
|
-
const
|
|
3574
|
+
const safeInput = path4.resolve(
|
|
3575
|
+
path4.sep,
|
|
3576
|
+
path4.normalize(
|
|
3577
|
+
String(dir || "").replace("\0", "").replace(/^(\.\.(\/|\\$))+/, "")
|
|
3578
|
+
)
|
|
3579
|
+
);
|
|
3580
|
+
const fullPath = path4.join(safeInput, item);
|
|
3573
3581
|
try {
|
|
3574
3582
|
await fsPromises.access(fullPath, fs4.constants.R_OK);
|
|
3575
3583
|
const stat = await fsPromises.stat(fullPath);
|
|
@@ -3607,7 +3615,9 @@ var init_FileUtils = __esm({
|
|
|
3607
3615
|
}) {
|
|
3608
3616
|
try {
|
|
3609
3617
|
const stats = fs4.statSync(dir);
|
|
3610
|
-
if (!stats.isDirectory())
|
|
3618
|
+
if (!stats.isDirectory()) {
|
|
3619
|
+
return [];
|
|
3620
|
+
}
|
|
3611
3621
|
} catch {
|
|
3612
3622
|
return [];
|
|
3613
3623
|
}
|
|
@@ -3616,7 +3626,7 @@ var init_FileUtils = __esm({
|
|
|
3616
3626
|
const { GitService: GitService2 } = await Promise.resolve().then(() => (init_GitService(), GitService_exports));
|
|
3617
3627
|
const gitService = new GitService2(dir);
|
|
3618
3628
|
gitMatcher = await gitService.getGitignoreMatcher();
|
|
3619
|
-
} catch
|
|
3629
|
+
} catch {
|
|
3620
3630
|
}
|
|
3621
3631
|
const allFiles = await this.processRootDirectory(dir, EXCLUDED_DIRS);
|
|
3622
3632
|
const filteredFiles = allFiles.filter(
|
|
@@ -6945,7 +6955,8 @@ var GQLClient = class {
|
|
|
6945
6955
|
const getLastOrgRes = await this._clientSdk.getLastOrg({ email });
|
|
6946
6956
|
return {
|
|
6947
6957
|
organizationId: getLastOrgRes?.user?.[0]?.userOrganizationsAndUserOrganizationRoles?.[0]?.organization?.id,
|
|
6948
|
-
userName: getLastOrgRes?.user?.[0]?.name ?? ""
|
|
6958
|
+
userName: getLastOrgRes?.user?.[0]?.name ?? "",
|
|
6959
|
+
enableV2Fixes: getLastOrgRes?.user?.[0]?.userOrganizationsAndUserOrganizationRoles?.[0]?.organization?.enableV2Fixes === true
|
|
6949
6960
|
};
|
|
6950
6961
|
}
|
|
6951
6962
|
async createCliLogin(variables) {
|
|
@@ -7027,7 +7038,8 @@ var GQLClient = class {
|
|
|
7027
7038
|
}
|
|
7028
7039
|
return {
|
|
7029
7040
|
organizationId: organization.id,
|
|
7030
|
-
projectId
|
|
7041
|
+
projectId,
|
|
7042
|
+
enableV2Fixes: organization.enableV2Fixes === true
|
|
7031
7043
|
};
|
|
7032
7044
|
}
|
|
7033
7045
|
async getEncryptedApiToken(variables) {
|
package/dist/index.mjs
CHANGED
|
@@ -598,6 +598,7 @@ var init_client_generates = __esm({
|
|
|
598
598
|
id
|
|
599
599
|
organization {
|
|
600
600
|
id
|
|
601
|
+
enableV2Fixes
|
|
601
602
|
projects(where: {name: {_eq: $projectName}}) {
|
|
602
603
|
name
|
|
603
604
|
id
|
|
@@ -616,6 +617,7 @@ var init_client_generates = __esm({
|
|
|
616
617
|
id
|
|
617
618
|
organization {
|
|
618
619
|
id
|
|
620
|
+
enableV2Fixes
|
|
619
621
|
}
|
|
620
622
|
}
|
|
621
623
|
}
|
|
@@ -2756,7 +2758,7 @@ var init_env = __esm({
|
|
|
2756
2758
|
GITLAB_API_TOKEN: z15.string().optional(),
|
|
2757
2759
|
GITHUB_API_TOKEN: z15.string().optional(),
|
|
2758
2760
|
GIT_PROXY_HOST: z15.string().optional().default("http://tinyproxy:8888"),
|
|
2759
|
-
MAX_UPLOAD_FILE_SIZE_MB: z15.coerce.number().gt(0).default(
|
|
2761
|
+
MAX_UPLOAD_FILE_SIZE_MB: z15.coerce.number().gt(0).default(2),
|
|
2760
2762
|
GITHUB_API_CONCURRENCY: z15.coerce.number().gt(0).optional().default(10)
|
|
2761
2763
|
});
|
|
2762
2764
|
({
|
|
@@ -3621,7 +3623,13 @@ var init_FileUtils = __esm({
|
|
|
3621
3623
|
const results = [];
|
|
3622
3624
|
const filePromises = [];
|
|
3623
3625
|
for (const item of items) {
|
|
3624
|
-
const
|
|
3626
|
+
const safeInput = path.resolve(
|
|
3627
|
+
path.sep,
|
|
3628
|
+
path.normalize(
|
|
3629
|
+
String(dir || "").replace("\0", "").replace(/^(\.\.(\/|\\$))+/, "")
|
|
3630
|
+
)
|
|
3631
|
+
);
|
|
3632
|
+
const fullPath = path.join(safeInput, item);
|
|
3625
3633
|
try {
|
|
3626
3634
|
await fsPromises.access(fullPath, fs.constants.R_OK);
|
|
3627
3635
|
const stat5 = await fsPromises.stat(fullPath);
|
|
@@ -3659,7 +3667,9 @@ var init_FileUtils = __esm({
|
|
|
3659
3667
|
}) {
|
|
3660
3668
|
try {
|
|
3661
3669
|
const stats = fs.statSync(dir);
|
|
3662
|
-
if (!stats.isDirectory())
|
|
3670
|
+
if (!stats.isDirectory()) {
|
|
3671
|
+
return [];
|
|
3672
|
+
}
|
|
3663
3673
|
} catch {
|
|
3664
3674
|
return [];
|
|
3665
3675
|
}
|
|
@@ -3668,7 +3678,7 @@ var init_FileUtils = __esm({
|
|
|
3668
3678
|
const { GitService: GitService2 } = await Promise.resolve().then(() => (init_GitService(), GitService_exports));
|
|
3669
3679
|
const gitService = new GitService2(dir);
|
|
3670
3680
|
gitMatcher = await gitService.getGitignoreMatcher();
|
|
3671
|
-
} catch
|
|
3681
|
+
} catch {
|
|
3672
3682
|
}
|
|
3673
3683
|
const allFiles = await this.processRootDirectory(dir, EXCLUDED_DIRS);
|
|
3674
3684
|
const filteredFiles = allFiles.filter(
|
|
@@ -13309,7 +13319,8 @@ var GQLClient = class {
|
|
|
13309
13319
|
const getLastOrgRes = await this._clientSdk.getLastOrg({ email });
|
|
13310
13320
|
return {
|
|
13311
13321
|
organizationId: getLastOrgRes?.user?.[0]?.userOrganizationsAndUserOrganizationRoles?.[0]?.organization?.id,
|
|
13312
|
-
userName: getLastOrgRes?.user?.[0]?.name ?? ""
|
|
13322
|
+
userName: getLastOrgRes?.user?.[0]?.name ?? "",
|
|
13323
|
+
enableV2Fixes: getLastOrgRes?.user?.[0]?.userOrganizationsAndUserOrganizationRoles?.[0]?.organization?.enableV2Fixes === true
|
|
13313
13324
|
};
|
|
13314
13325
|
}
|
|
13315
13326
|
async createCliLogin(variables) {
|
|
@@ -13391,7 +13402,8 @@ var GQLClient = class {
|
|
|
13391
13402
|
}
|
|
13392
13403
|
return {
|
|
13393
13404
|
organizationId: organization.id,
|
|
13394
|
-
projectId
|
|
13405
|
+
projectId,
|
|
13406
|
+
enableV2Fixes: organization.enableV2Fixes === true
|
|
13395
13407
|
};
|
|
13396
13408
|
}
|
|
13397
13409
|
async getEncryptedApiToken(variables) {
|
|
@@ -15697,7 +15709,7 @@ function getManifestFilesSuffixes() {
|
|
|
15697
15709
|
}
|
|
15698
15710
|
async function pack(srcDirPath, vulnFiles, isIncludeAllFiles = false) {
|
|
15699
15711
|
debug18("pack folder %s", srcDirPath);
|
|
15700
|
-
let git
|
|
15712
|
+
let git;
|
|
15701
15713
|
try {
|
|
15702
15714
|
git = simpleGit3({
|
|
15703
15715
|
baseDir: srcDirPath,
|
|
@@ -15743,7 +15755,11 @@ async function pack(srcDirPath, vulnFiles, isIncludeAllFiles = false) {
|
|
|
15743
15755
|
}
|
|
15744
15756
|
}
|
|
15745
15757
|
if (fs9.lstatSync(absFilepath).size > MCP_MAX_FILE_SIZE) {
|
|
15746
|
-
debug18(
|
|
15758
|
+
debug18(
|
|
15759
|
+
"ignoring %s \u2014 file size exceeds MCP_MAX_FILE_SIZE (%d bytes)",
|
|
15760
|
+
filepath,
|
|
15761
|
+
MCP_MAX_FILE_SIZE
|
|
15762
|
+
);
|
|
15747
15763
|
continue;
|
|
15748
15764
|
}
|
|
15749
15765
|
let data;
|
|
@@ -16124,7 +16140,9 @@ async function getSnykReport(reportPath, repoRoot, { skipPrompts = false }) {
|
|
|
16124
16140
|
init_client_generates();
|
|
16125
16141
|
var { CliError: CliError2, Spinner: Spinner2 } = utils_exports;
|
|
16126
16142
|
function _getScanSource(command, ci) {
|
|
16127
|
-
if (command === "review")
|
|
16143
|
+
if (command === "review") {
|
|
16144
|
+
return "AUTO_FIXER" /* AutoFixer */;
|
|
16145
|
+
}
|
|
16128
16146
|
const envToCi = [
|
|
16129
16147
|
["GITLAB_CI", "CI_GITLAB" /* CiGitlab */],
|
|
16130
16148
|
["GITHUB_ACTIONS", "CI_GITHUB" /* CiGithub */],
|
|
@@ -16341,7 +16359,11 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
16341
16359
|
if (!mobbProjectName) {
|
|
16342
16360
|
throw new Error("mobbProjectName is required");
|
|
16343
16361
|
}
|
|
16344
|
-
const {
|
|
16362
|
+
const {
|
|
16363
|
+
projectId,
|
|
16364
|
+
organizationId,
|
|
16365
|
+
enableV2Fixes: orgEnableV2Fixes
|
|
16366
|
+
} = await gqlClient.getLastOrgAndNamedProject({
|
|
16345
16367
|
projectName: mobbProjectName,
|
|
16346
16368
|
userDefinedOrganizationId: userOrganizationId
|
|
16347
16369
|
});
|
|
@@ -16591,7 +16613,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
16591
16613
|
srcPath,
|
|
16592
16614
|
vulnFiles,
|
|
16593
16615
|
repoUploadInfo,
|
|
16594
|
-
isIncludeAllFiles:
|
|
16616
|
+
isIncludeAllFiles: orgEnableV2Fixes
|
|
16595
16617
|
});
|
|
16596
16618
|
gitInfo2 = res.gitInfo;
|
|
16597
16619
|
} else {
|
|
@@ -17804,16 +17826,23 @@ function groupSkills(files, root, baseDir) {
|
|
|
17804
17826
|
standalone.push(f);
|
|
17805
17827
|
} else {
|
|
17806
17828
|
const folderName = relFromSkills.slice(0, slashIdx);
|
|
17807
|
-
|
|
17808
|
-
|
|
17829
|
+
const folderKey = rel.slice(
|
|
17830
|
+
0,
|
|
17831
|
+
skillsIdx + skillsMarker.length + folderName.length
|
|
17832
|
+
);
|
|
17833
|
+
let bucket = folderMap.get(folderKey);
|
|
17834
|
+
if (!bucket) {
|
|
17835
|
+
bucket = { folderName, files: [] };
|
|
17836
|
+
folderMap.set(folderKey, bucket);
|
|
17809
17837
|
}
|
|
17810
|
-
|
|
17838
|
+
bucket.files.push(f);
|
|
17811
17839
|
}
|
|
17812
17840
|
}
|
|
17813
17841
|
const groups = [];
|
|
17814
17842
|
for (const f of standalone) {
|
|
17815
17843
|
const name = path14.basename(f.path, path14.extname(f.path));
|
|
17816
|
-
const
|
|
17844
|
+
const standaloneRel = path14.relative(baseDir, f.path).replace(/\\/g, "/");
|
|
17845
|
+
const sessionKey = `skill:${root}:${standaloneRel}`;
|
|
17817
17846
|
groups.push({
|
|
17818
17847
|
name,
|
|
17819
17848
|
root,
|
|
@@ -17824,17 +17853,10 @@ function groupSkills(files, root, baseDir) {
|
|
|
17824
17853
|
sessionKey
|
|
17825
17854
|
});
|
|
17826
17855
|
}
|
|
17827
|
-
for (const [folderName, folderFiles] of folderMap) {
|
|
17856
|
+
for (const [folderKey, { folderName, files: folderFiles }] of folderMap) {
|
|
17828
17857
|
const maxMtimeMs = Math.max(...folderFiles.map((f) => f.mtimeMs));
|
|
17829
|
-
const
|
|
17830
|
-
const
|
|
17831
|
-
const skillsIdx = rel.indexOf("skills/");
|
|
17832
|
-
const skillRelPath = rel.slice(
|
|
17833
|
-
0,
|
|
17834
|
-
skillsIdx + "skills/".length + folderName.length
|
|
17835
|
-
);
|
|
17836
|
-
const skillPath = path14.join(baseDir, skillRelPath);
|
|
17837
|
-
const sessionKey = `skill:${root}:${folderName}`;
|
|
17858
|
+
const skillPath = path14.join(baseDir, folderKey);
|
|
17859
|
+
const sessionKey = `skill:${root}:${folderKey}`;
|
|
17838
17860
|
groups.push({
|
|
17839
17861
|
name: folderName,
|
|
17840
17862
|
root,
|
|
@@ -19190,7 +19212,7 @@ function createLogger(config2) {
|
|
|
19190
19212
|
|
|
19191
19213
|
// src/features/claude_code/hook_logger.ts
|
|
19192
19214
|
var DD_RUM_TOKEN = true ? "pubf59c0182545bfb4c299175119f1abf9b" : "";
|
|
19193
|
-
var CLI_VERSION = true ? "1.4.
|
|
19215
|
+
var CLI_VERSION = true ? "1.4.9" : "unknown";
|
|
19194
19216
|
var NAMESPACE = "mobbdev-claude-code-hook-logs";
|
|
19195
19217
|
var claudeCodeVersion;
|
|
19196
19218
|
function buildDdTags() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobbdev",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9",
|
|
4
4
|
"description": "Automated secure code remediation tool",
|
|
5
5
|
"repository": "git+https://github.com/mobb-dev/bugsy.git",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@octokit/core": "5.2.0",
|
|
60
60
|
"@octokit/request-error": "5.1.1",
|
|
61
61
|
"@openredaction/openredaction": "1.0.4",
|
|
62
|
-
"adm-zip": "0.5.
|
|
63
|
-
"axios": "1.
|
|
62
|
+
"adm-zip": "0.5.17",
|
|
63
|
+
"axios": "1.16.0",
|
|
64
64
|
"azure-devops-node-api": "15.1.2",
|
|
65
65
|
"bitbucket": "2.12.0",
|
|
66
66
|
"chalk": "5.6.2",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"https-proxy-agent": "7.0.6",
|
|
81
81
|
"ignore": "7.0.5",
|
|
82
82
|
"inquirer": "9.3.8",
|
|
83
|
-
"isomorphic-ws": "5.0.0",
|
|
84
83
|
"istextorbinary": "9.5.0",
|
|
84
|
+
"isomorphic-ws": "5.0.0",
|
|
85
85
|
"jsonc-parser": "3.3.1",
|
|
86
86
|
"libsodium-wrappers": "0.7.15",
|
|
87
87
|
"multimatch": "7.0.0",
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
"sax": "1.6.0",
|
|
97
97
|
"semver": "7.7.4",
|
|
98
98
|
"shell-quote": "1.8.3",
|
|
99
|
-
"simple-git": "3.
|
|
100
|
-
"snyk": "1.
|
|
99
|
+
"simple-git": "3.36.0",
|
|
100
|
+
"snyk": "1.1304.1",
|
|
101
101
|
"tar": "7.5.13",
|
|
102
102
|
"tmp": "0.2.5",
|
|
103
103
|
"tmp-promise": "3.0.3",
|
|
104
104
|
"undici": "6.24.0",
|
|
105
|
-
"uuid": "11.1.
|
|
105
|
+
"uuid": "11.1.1",
|
|
106
106
|
"ws": "8.20.0",
|
|
107
107
|
"xml2js": "0.6.2",
|
|
108
108
|
"yargs": "17.7.2",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@graphql-codegen/typescript-operations": "4.6.1",
|
|
116
116
|
"@graphql-eslint/eslint-plugin": "4.4.0",
|
|
117
117
|
"@octokit/types": "13.10.0",
|
|
118
|
-
"@types/adm-zip": "0.5.
|
|
118
|
+
"@types/adm-zip": "0.5.8",
|
|
119
119
|
"@types/chalk-animation": "1.6.3",
|
|
120
120
|
"@types/configstore": "6.0.2",
|
|
121
121
|
"@types/debug": "4.1.13",
|
|
@@ -141,8 +141,8 @@
|
|
|
141
141
|
"eslint-plugin-prettier": "5.5.5",
|
|
142
142
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
143
143
|
"msw": "2.10.5",
|
|
144
|
-
"nock": "14.0.
|
|
145
|
-
"prettier": "3.8.
|
|
144
|
+
"nock": "14.0.14",
|
|
145
|
+
"prettier": "3.8.3",
|
|
146
146
|
"tsup": "8.5.1",
|
|
147
147
|
"typescript": "5.9.3",
|
|
148
148
|
"vitest": "3.2.4"
|