mobbdev 1.3.4 → 1.3.7
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.d.mts +33 -39
- package/dist/args/commands/upload_ai_blame.mjs +29 -18
- package/dist/index.mjs +874 -268
- package/package.json +1 -1
|
@@ -56,32 +56,22 @@ declare const PromptItemZ: z.ZodObject<{
|
|
|
56
56
|
name: string;
|
|
57
57
|
parameters: string;
|
|
58
58
|
result: string;
|
|
59
|
-
accepted?: boolean | undefined;
|
|
60
59
|
rawArguments?: string | undefined;
|
|
60
|
+
accepted?: boolean | undefined;
|
|
61
61
|
mcpServer?: string | undefined;
|
|
62
62
|
mcpToolName?: string | undefined;
|
|
63
63
|
}, {
|
|
64
64
|
name: string;
|
|
65
65
|
parameters: string;
|
|
66
66
|
result: string;
|
|
67
|
-
accepted?: boolean | undefined;
|
|
68
67
|
rawArguments?: string | undefined;
|
|
68
|
+
accepted?: boolean | undefined;
|
|
69
69
|
mcpServer?: string | undefined;
|
|
70
70
|
mcpToolName?: string | undefined;
|
|
71
71
|
}>>;
|
|
72
72
|
}, "strip", z.ZodTypeAny, {
|
|
73
73
|
type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING" | "MCP_TOOL_CALL";
|
|
74
|
-
tool?: {
|
|
75
|
-
name: string;
|
|
76
|
-
parameters: string;
|
|
77
|
-
result: string;
|
|
78
|
-
accepted?: boolean | undefined;
|
|
79
|
-
rawArguments?: string | undefined;
|
|
80
|
-
mcpServer?: string | undefined;
|
|
81
|
-
mcpToolName?: string | undefined;
|
|
82
|
-
} | undefined;
|
|
83
74
|
date?: Date | undefined;
|
|
84
|
-
text?: string | undefined;
|
|
85
75
|
attachedFiles?: {
|
|
86
76
|
relativePath: string;
|
|
87
77
|
startLine?: number | undefined;
|
|
@@ -90,19 +80,19 @@ declare const PromptItemZ: z.ZodObject<{
|
|
|
90
80
|
inputCount: number;
|
|
91
81
|
outputCount: number;
|
|
92
82
|
} | undefined;
|
|
93
|
-
|
|
94
|
-
type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING" | "MCP_TOOL_CALL";
|
|
83
|
+
text?: string | undefined;
|
|
95
84
|
tool?: {
|
|
96
85
|
name: string;
|
|
97
86
|
parameters: string;
|
|
98
87
|
result: string;
|
|
99
|
-
accepted?: boolean | undefined;
|
|
100
88
|
rawArguments?: string | undefined;
|
|
89
|
+
accepted?: boolean | undefined;
|
|
101
90
|
mcpServer?: string | undefined;
|
|
102
91
|
mcpToolName?: string | undefined;
|
|
103
92
|
} | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING" | "MCP_TOOL_CALL";
|
|
104
95
|
date?: Date | undefined;
|
|
105
|
-
text?: string | undefined;
|
|
106
96
|
attachedFiles?: {
|
|
107
97
|
relativePath: string;
|
|
108
98
|
startLine?: number | undefined;
|
|
@@ -111,6 +101,16 @@ declare const PromptItemZ: z.ZodObject<{
|
|
|
111
101
|
inputCount: number;
|
|
112
102
|
outputCount: number;
|
|
113
103
|
} | undefined;
|
|
104
|
+
text?: string | undefined;
|
|
105
|
+
tool?: {
|
|
106
|
+
name: string;
|
|
107
|
+
parameters: string;
|
|
108
|
+
result: string;
|
|
109
|
+
rawArguments?: string | undefined;
|
|
110
|
+
accepted?: boolean | undefined;
|
|
111
|
+
mcpServer?: string | undefined;
|
|
112
|
+
mcpToolName?: string | undefined;
|
|
113
|
+
} | undefined;
|
|
114
114
|
}>;
|
|
115
115
|
type PromptItem = z.infer<typeof PromptItemZ>;
|
|
116
116
|
declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
|
|
@@ -149,32 +149,22 @@ declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
|
|
|
149
149
|
name: string;
|
|
150
150
|
parameters: string;
|
|
151
151
|
result: string;
|
|
152
|
-
accepted?: boolean | undefined;
|
|
153
152
|
rawArguments?: string | undefined;
|
|
153
|
+
accepted?: boolean | undefined;
|
|
154
154
|
mcpServer?: string | undefined;
|
|
155
155
|
mcpToolName?: string | undefined;
|
|
156
156
|
}, {
|
|
157
157
|
name: string;
|
|
158
158
|
parameters: string;
|
|
159
159
|
result: string;
|
|
160
|
-
accepted?: boolean | undefined;
|
|
161
160
|
rawArguments?: string | undefined;
|
|
161
|
+
accepted?: boolean | undefined;
|
|
162
162
|
mcpServer?: string | undefined;
|
|
163
163
|
mcpToolName?: string | undefined;
|
|
164
164
|
}>>;
|
|
165
165
|
}, "strip", z.ZodTypeAny, {
|
|
166
166
|
type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING" | "MCP_TOOL_CALL";
|
|
167
|
-
tool?: {
|
|
168
|
-
name: string;
|
|
169
|
-
parameters: string;
|
|
170
|
-
result: string;
|
|
171
|
-
accepted?: boolean | undefined;
|
|
172
|
-
rawArguments?: string | undefined;
|
|
173
|
-
mcpServer?: string | undefined;
|
|
174
|
-
mcpToolName?: string | undefined;
|
|
175
|
-
} | undefined;
|
|
176
167
|
date?: Date | undefined;
|
|
177
|
-
text?: string | undefined;
|
|
178
168
|
attachedFiles?: {
|
|
179
169
|
relativePath: string;
|
|
180
170
|
startLine?: number | undefined;
|
|
@@ -183,19 +173,19 @@ declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
|
|
|
183
173
|
inputCount: number;
|
|
184
174
|
outputCount: number;
|
|
185
175
|
} | undefined;
|
|
186
|
-
|
|
187
|
-
type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING" | "MCP_TOOL_CALL";
|
|
176
|
+
text?: string | undefined;
|
|
188
177
|
tool?: {
|
|
189
178
|
name: string;
|
|
190
179
|
parameters: string;
|
|
191
180
|
result: string;
|
|
192
|
-
accepted?: boolean | undefined;
|
|
193
181
|
rawArguments?: string | undefined;
|
|
182
|
+
accepted?: boolean | undefined;
|
|
194
183
|
mcpServer?: string | undefined;
|
|
195
184
|
mcpToolName?: string | undefined;
|
|
196
185
|
} | undefined;
|
|
186
|
+
}, {
|
|
187
|
+
type: "USER_PROMPT" | "AI_RESPONSE" | "TOOL_EXECUTION" | "AI_THINKING" | "MCP_TOOL_CALL";
|
|
197
188
|
date?: Date | undefined;
|
|
198
|
-
text?: string | undefined;
|
|
199
189
|
attachedFiles?: {
|
|
200
190
|
relativePath: string;
|
|
201
191
|
startLine?: number | undefined;
|
|
@@ -204,6 +194,16 @@ declare const PromptItemArrayZ: z.ZodArray<z.ZodObject<{
|
|
|
204
194
|
inputCount: number;
|
|
205
195
|
outputCount: number;
|
|
206
196
|
} | undefined;
|
|
197
|
+
text?: string | undefined;
|
|
198
|
+
tool?: {
|
|
199
|
+
name: string;
|
|
200
|
+
parameters: string;
|
|
201
|
+
result: string;
|
|
202
|
+
rawArguments?: string | undefined;
|
|
203
|
+
accepted?: boolean | undefined;
|
|
204
|
+
mcpServer?: string | undefined;
|
|
205
|
+
mcpToolName?: string | undefined;
|
|
206
|
+
} | undefined;
|
|
207
207
|
}>, "many">;
|
|
208
208
|
type PromptItemArray = z.infer<typeof PromptItemArrayZ>;
|
|
209
209
|
/**
|
|
@@ -211,12 +211,6 @@ type PromptItemArray = z.infer<typeof PromptItemArrayZ>;
|
|
|
211
211
|
* Returns null if not in a git repository or if not a GitHub repository.
|
|
212
212
|
*/
|
|
213
213
|
declare function getRepositoryUrl(workingDir?: string): Promise<string | null>;
|
|
214
|
-
/**
|
|
215
|
-
* Gets the absolute git root path of the working directory's git checkout.
|
|
216
|
-
* Used by Tracy uploads to let the server filter out events whose filePath
|
|
217
|
-
* falls outside the repo (e.g., /tmp scratchpads, ~/.zshrc).
|
|
218
|
-
*/
|
|
219
|
-
declare function getRepoGitRoot(workingDir?: string): Promise<string | null>;
|
|
220
214
|
/**
|
|
221
215
|
* Get system information for tracking inference source.
|
|
222
216
|
* Works cross-platform (Windows, macOS, Linux).
|
|
@@ -271,4 +265,4 @@ type UploadAiBlameHandlerOptions = {
|
|
|
271
265
|
declare function uploadAiBlameHandler(options: UploadAiBlameHandlerOptions): Promise<void>;
|
|
272
266
|
declare function uploadAiBlameCommandHandler(args: UploadAiBlameOptions): Promise<void>;
|
|
273
267
|
|
|
274
|
-
export { type PromptItem, type PromptItemArray, type UploadAiBlameOptions, type UploadAiBlameResult,
|
|
268
|
+
export { type PromptItem, type PromptItemArray, type UploadAiBlameOptions, type UploadAiBlameResult, getRepositoryUrl, getSystemInfo, uploadAiBlameBuilder, uploadAiBlameCommandHandler, uploadAiBlameHandler, uploadAiBlameHandlerFromExtension };
|
|
@@ -326,6 +326,7 @@ var init_client_generates = __esm({
|
|
|
326
326
|
IssueType_Enum2["SystemExitShouldReraise"] = "SYSTEM_EXIT_SHOULD_RERAISE";
|
|
327
327
|
IssueType_Enum2["SystemInformationLeak"] = "SYSTEM_INFORMATION_LEAK";
|
|
328
328
|
IssueType_Enum2["SystemInformationLeakExternal"] = "SYSTEM_INFORMATION_LEAK_EXTERNAL";
|
|
329
|
+
IssueType_Enum2["TaintedNumericCast"] = "TAINTED_NUMERIC_CAST";
|
|
329
330
|
IssueType_Enum2["TarSlip"] = "TAR_SLIP";
|
|
330
331
|
IssueType_Enum2["TrustBoundaryViolation"] = "TRUST_BOUNDARY_VIOLATION";
|
|
331
332
|
IssueType_Enum2["TypeConfusion"] = "TYPE_CONFUSION";
|
|
@@ -1758,7 +1759,8 @@ var init_getIssueType = __esm({
|
|
|
1758
1759
|
["DJANGO_BLANK_FIELD_NEEDS_NULL_OR_DEFAULT" /* DjangoBlankFieldNeedsNullOrDefault */]: "Django Blank Field Needs Null or Default",
|
|
1759
1760
|
["REDUNDANT_NIL_ERROR_CHECK" /* RedundantNilErrorCheck */]: "Redundant Nil Error Check",
|
|
1760
1761
|
["MISSING_WORKFLOW_PERMISSIONS" /* MissingWorkflowPermissions */]: "Missing Workflow Permissions",
|
|
1761
|
-
["EXCESSIVE_SECRETS_EXPOSURE" /* ExcessiveSecretsExposure */]: "Excessive Secrets Exposure"
|
|
1762
|
+
["EXCESSIVE_SECRETS_EXPOSURE" /* ExcessiveSecretsExposure */]: "Excessive Secrets Exposure",
|
|
1763
|
+
["TAINTED_NUMERIC_CAST" /* TaintedNumericCast */]: "Tainted Numeric Cast"
|
|
1762
1764
|
};
|
|
1763
1765
|
issueTypeZ = z5.nativeEnum(IssueType_Enum);
|
|
1764
1766
|
getIssueTypeFriendlyString = (issueType) => {
|
|
@@ -4924,7 +4926,8 @@ var fixDetailsData = {
|
|
|
4924
4926
|
["DJANGO_BLANK_FIELD_NEEDS_NULL_OR_DEFAULT" /* DjangoBlankFieldNeedsNullOrDefault */]: void 0,
|
|
4925
4927
|
["REDUNDANT_NIL_ERROR_CHECK" /* RedundantNilErrorCheck */]: void 0,
|
|
4926
4928
|
["MISSING_WORKFLOW_PERMISSIONS" /* MissingWorkflowPermissions */]: void 0,
|
|
4927
|
-
["EXCESSIVE_SECRETS_EXPOSURE" /* ExcessiveSecretsExposure */]: void 0
|
|
4929
|
+
["EXCESSIVE_SECRETS_EXPOSURE" /* ExcessiveSecretsExposure */]: void 0,
|
|
4930
|
+
["TAINTED_NUMERIC_CAST" /* TaintedNumericCast */]: void 0
|
|
4928
4931
|
};
|
|
4929
4932
|
|
|
4930
4933
|
// src/features/analysis/scm/shared/src/commitDescriptionMarkup.ts
|
|
@@ -6369,6 +6372,17 @@ var openRedirect3 = {
|
|
|
6369
6372
|
}
|
|
6370
6373
|
};
|
|
6371
6374
|
|
|
6375
|
+
// src/features/analysis/scm/shared/src/storedQuestionData/python/ssrf.ts
|
|
6376
|
+
var ssrf5 = {
|
|
6377
|
+
domainsAllowlist: {
|
|
6378
|
+
content: () => "Allowed URL prefixes",
|
|
6379
|
+
description: () => `The security risk of this issue is the ability of an attacker to provide input that shoots HTTP requests from your server to arbitrary URLs, including internal ones, like \`https://admin.mycompany.com\`
|
|
6380
|
+
|
|
6381
|
+
To eliminate the risk and fix the issue, check out your app logic and make a whitelist of URLs this API should be allowed to call.`,
|
|
6382
|
+
guidance: () => ""
|
|
6383
|
+
}
|
|
6384
|
+
};
|
|
6385
|
+
|
|
6372
6386
|
// src/features/analysis/scm/shared/src/storedQuestionData/python/uncheckedLoopCondition.ts
|
|
6373
6387
|
var uncheckedLoopCondition3 = {
|
|
6374
6388
|
loopLimit: {
|
|
@@ -6390,7 +6404,8 @@ var vulnerabilities14 = {
|
|
|
6390
6404
|
["OPEN_REDIRECT" /* OpenRedirect */]: openRedirect3,
|
|
6391
6405
|
["UNCHECKED_LOOP_CONDITION" /* UncheckedLoopCondition */]: uncheckedLoopCondition3,
|
|
6392
6406
|
["DUPLICATED_STRINGS" /* DuplicatedStrings */]: duplicatedStrings2,
|
|
6393
|
-
["MISSING_ENCODING_FILE_OPEN" /* MissingEncodingFileOpen */]: missingEncoding
|
|
6407
|
+
["MISSING_ENCODING_FILE_OPEN" /* MissingEncodingFileOpen */]: missingEncoding,
|
|
6408
|
+
["SSRF" /* Ssrf */]: ssrf5
|
|
6394
6409
|
};
|
|
6395
6410
|
var python_default2 = vulnerabilities14;
|
|
6396
6411
|
|
|
@@ -6601,6 +6616,15 @@ var BitbucketParseResultZ = z21.object({
|
|
|
6601
6616
|
repoName: z21.string(),
|
|
6602
6617
|
hostname: z21.literal(BITBUCKET_HOSTNAME)
|
|
6603
6618
|
});
|
|
6619
|
+
var UserWorkspacePermissionsRepositoriesResponseZ = z21.object({
|
|
6620
|
+
values: z21.array(
|
|
6621
|
+
z21.object({
|
|
6622
|
+
repository: z21.object({
|
|
6623
|
+
full_name: z21.string().optional()
|
|
6624
|
+
}).optional()
|
|
6625
|
+
})
|
|
6626
|
+
).optional()
|
|
6627
|
+
});
|
|
6604
6628
|
|
|
6605
6629
|
// src/features/analysis/scm/bitbucket/BitbucketSCMLib.ts
|
|
6606
6630
|
import { setTimeout as setTimeout3 } from "timers/promises";
|
|
@@ -7320,13 +7344,13 @@ function maskString(str, showStart = 2, showEnd = 2) {
|
|
|
7320
7344
|
}
|
|
7321
7345
|
return str.slice(0, showStart) + "*".repeat(str.length - showStart - showEnd) + str.slice(-showEnd);
|
|
7322
7346
|
}
|
|
7323
|
-
async function sanitizeDataWithCounts(obj) {
|
|
7347
|
+
async function sanitizeDataWithCounts(obj, options) {
|
|
7324
7348
|
const counts = {
|
|
7325
7349
|
detections: { total: 0, high: 0, medium: 0, low: 0 }
|
|
7326
7350
|
};
|
|
7327
7351
|
const MAX_SCAN_LENGTH = 1e5;
|
|
7328
7352
|
const sanitizeString = async (str) => {
|
|
7329
|
-
if (str.length > MAX_SCAN_LENGTH) {
|
|
7353
|
+
if (!options?.noSizeLimit && str.length > MAX_SCAN_LENGTH) {
|
|
7330
7354
|
return str;
|
|
7331
7355
|
}
|
|
7332
7356
|
let result = str;
|
|
@@ -7941,18 +7965,6 @@ async function getRepositoryUrl(workingDir) {
|
|
|
7941
7965
|
return null;
|
|
7942
7966
|
}
|
|
7943
7967
|
}
|
|
7944
|
-
async function getRepoGitRoot(workingDir) {
|
|
7945
|
-
try {
|
|
7946
|
-
const gitService = new GitService(workingDir ?? process.cwd());
|
|
7947
|
-
const isRepo = await gitService.isGitRepository();
|
|
7948
|
-
if (!isRepo) {
|
|
7949
|
-
return null;
|
|
7950
|
-
}
|
|
7951
|
-
return await gitService.getGitRoot();
|
|
7952
|
-
} catch {
|
|
7953
|
-
return null;
|
|
7954
|
-
}
|
|
7955
|
-
}
|
|
7956
7968
|
function getSystemInfo() {
|
|
7957
7969
|
let userName;
|
|
7958
7970
|
try {
|
|
@@ -8231,7 +8243,6 @@ async function uploadAiBlameCommandHandler(args) {
|
|
|
8231
8243
|
await uploadAiBlameHandler({ args });
|
|
8232
8244
|
}
|
|
8233
8245
|
export {
|
|
8234
|
-
getRepoGitRoot,
|
|
8235
8246
|
getRepositoryUrl,
|
|
8236
8247
|
getSystemInfo,
|
|
8237
8248
|
uploadAiBlameBuilder,
|