mobbdev 1.4.45 → 1.4.47
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 +10 -3
- package/dist/index.mjs +44 -19
- package/package.json +1 -1
|
@@ -901,7 +901,7 @@ var init_client_generates = __esm({
|
|
|
901
901
|
}
|
|
902
902
|
`;
|
|
903
903
|
DigestVulnerabilityReportDocument = `
|
|
904
|
-
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String) {
|
|
904
|
+
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String, $isFixEnabled: Boolean) {
|
|
905
905
|
digestVulnerabilityReport(
|
|
906
906
|
fixReportId: $fixReportId
|
|
907
907
|
vulnerabilityReportFileName: $vulnerabilityReportFileName
|
|
@@ -911,6 +911,7 @@ var init_client_generates = __esm({
|
|
|
911
911
|
reference: $reference
|
|
912
912
|
sha: $sha
|
|
913
913
|
baselineCommit: $baselineCommit
|
|
914
|
+
isFixEnabled: $isFixEnabled
|
|
914
915
|
) {
|
|
915
916
|
__typename
|
|
916
917
|
... on VulnerabilityReport {
|
|
@@ -1460,6 +1461,7 @@ var init_analysis = __esm({
|
|
|
1460
1461
|
analysisUrl: z3.string(),
|
|
1461
1462
|
createdOn: z3.string(),
|
|
1462
1463
|
state: z3.enum(Fix_Report_State_Enum),
|
|
1464
|
+
isFixEnabled: z3.boolean().nullish(),
|
|
1463
1465
|
repo: z3.object({
|
|
1464
1466
|
name: z3.string().nullable(),
|
|
1465
1467
|
originalUrl: z3.string(),
|
|
@@ -1835,6 +1837,8 @@ var init_types = __esm({
|
|
|
1835
1837
|
createdOn: z7.string(),
|
|
1836
1838
|
expirationOn: z7.string().nullable(),
|
|
1837
1839
|
state: z7.enum(Fix_Report_State_Enum),
|
|
1840
|
+
// NOT NULL column with a default, so always present on the wire.
|
|
1841
|
+
isFixEnabled: z7.boolean(),
|
|
1838
1842
|
failReason: z7.string().nullable(),
|
|
1839
1843
|
candidateToRerun: z7.boolean(),
|
|
1840
1844
|
fixes: z7.array(
|
|
@@ -5191,7 +5195,8 @@ var GQLClient = class {
|
|
|
5191
5195
|
reference,
|
|
5192
5196
|
sha,
|
|
5193
5197
|
shouldScan,
|
|
5194
|
-
baselineCommit
|
|
5198
|
+
baselineCommit,
|
|
5199
|
+
scanOnly
|
|
5195
5200
|
}) {
|
|
5196
5201
|
const res = await this._clientSdk.DigestVulnerabilityReport({
|
|
5197
5202
|
fixReportId,
|
|
@@ -5201,7 +5206,9 @@ var GQLClient = class {
|
|
|
5201
5206
|
repoUrl,
|
|
5202
5207
|
reference,
|
|
5203
5208
|
sha,
|
|
5204
|
-
baselineCommit
|
|
5209
|
+
baselineCommit,
|
|
5210
|
+
// CLI exposes the inverse `--scan-only` flag; the wire field is isFixEnabled.
|
|
5211
|
+
isFixEnabled: scanOnly === void 0 ? void 0 : !scanOnly
|
|
5205
5212
|
});
|
|
5206
5213
|
if (res.digestVulnerabilityReport.__typename !== "VulnerabilityReport") {
|
|
5207
5214
|
throw new Error("Digesting vulnerability report failed");
|
package/dist/index.mjs
CHANGED
|
@@ -901,7 +901,7 @@ var init_client_generates = __esm({
|
|
|
901
901
|
}
|
|
902
902
|
`;
|
|
903
903
|
DigestVulnerabilityReportDocument = `
|
|
904
|
-
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String) {
|
|
904
|
+
mutation DigestVulnerabilityReport($vulnerabilityReportFileName: String, $fixReportId: String!, $projectId: String!, $scanSource: String!, $repoUrl: String, $reference: String, $sha: String, $baselineCommit: String, $isFixEnabled: Boolean) {
|
|
905
905
|
digestVulnerabilityReport(
|
|
906
906
|
fixReportId: $fixReportId
|
|
907
907
|
vulnerabilityReportFileName: $vulnerabilityReportFileName
|
|
@@ -911,6 +911,7 @@ var init_client_generates = __esm({
|
|
|
911
911
|
reference: $reference
|
|
912
912
|
sha: $sha
|
|
913
913
|
baselineCommit: $baselineCommit
|
|
914
|
+
isFixEnabled: $isFixEnabled
|
|
914
915
|
) {
|
|
915
916
|
__typename
|
|
916
917
|
... on VulnerabilityReport {
|
|
@@ -1562,6 +1563,7 @@ var init_analysis = __esm({
|
|
|
1562
1563
|
analysisUrl: z4.string(),
|
|
1563
1564
|
createdOn: z4.string(),
|
|
1564
1565
|
state: z4.enum(Fix_Report_State_Enum),
|
|
1566
|
+
isFixEnabled: z4.boolean().nullish(),
|
|
1565
1567
|
repo: z4.object({
|
|
1566
1568
|
name: z4.string().nullable(),
|
|
1567
1569
|
originalUrl: z4.string(),
|
|
@@ -1880,6 +1882,8 @@ var init_types = __esm({
|
|
|
1880
1882
|
createdOn: z7.string(),
|
|
1881
1883
|
expirationOn: z7.string().nullable(),
|
|
1882
1884
|
state: z7.enum(Fix_Report_State_Enum),
|
|
1885
|
+
// NOT NULL column with a default, so always present on the wire.
|
|
1886
|
+
isFixEnabled: z7.boolean(),
|
|
1883
1887
|
failReason: z7.string().nullable(),
|
|
1884
1888
|
candidateToRerun: z7.boolean(),
|
|
1885
1889
|
fixes: z7.array(
|
|
@@ -11220,6 +11224,13 @@ var baselineCommitOption = {
|
|
|
11220
11224
|
),
|
|
11221
11225
|
type: "string"
|
|
11222
11226
|
};
|
|
11227
|
+
var scanOnlyOption = {
|
|
11228
|
+
describe: chalk2.bold(
|
|
11229
|
+
"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)."
|
|
11230
|
+
),
|
|
11231
|
+
type: "boolean",
|
|
11232
|
+
default: false
|
|
11233
|
+
};
|
|
11223
11234
|
var pollingOption = {
|
|
11224
11235
|
describe: chalk2.bold(
|
|
11225
11236
|
"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."
|
|
@@ -11924,7 +11935,8 @@ var GQLClient = class {
|
|
|
11924
11935
|
reference,
|
|
11925
11936
|
sha,
|
|
11926
11937
|
shouldScan,
|
|
11927
|
-
baselineCommit
|
|
11938
|
+
baselineCommit,
|
|
11939
|
+
scanOnly
|
|
11928
11940
|
}) {
|
|
11929
11941
|
const res = await this._clientSdk.DigestVulnerabilityReport({
|
|
11930
11942
|
fixReportId,
|
|
@@ -11934,7 +11946,9 @@ var GQLClient = class {
|
|
|
11934
11946
|
repoUrl,
|
|
11935
11947
|
reference,
|
|
11936
11948
|
sha,
|
|
11937
|
-
baselineCommit
|
|
11949
|
+
baselineCommit,
|
|
11950
|
+
// CLI exposes the inverse `--scan-only` flag; the wire field is isFixEnabled.
|
|
11951
|
+
isFixEnabled: scanOnly === void 0 ? void 0 : !scanOnly
|
|
11938
11952
|
});
|
|
11939
11953
|
if (res.digestVulnerabilityReport.__typename !== "VulnerabilityReport") {
|
|
11940
11954
|
throw new Error("Digesting vulnerability report failed");
|
|
@@ -15053,7 +15067,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15053
15067
|
commitDirectly,
|
|
15054
15068
|
pullRequest,
|
|
15055
15069
|
polling,
|
|
15056
|
-
baselineCommit
|
|
15070
|
+
baselineCommit,
|
|
15071
|
+
scanOnly
|
|
15057
15072
|
} = params;
|
|
15058
15073
|
debug22("start %s %s", dirname, repo);
|
|
15059
15074
|
const { createSpinner: createSpinner5 } = Spinner2({ ci });
|
|
@@ -15173,7 +15188,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15173
15188
|
shouldScan,
|
|
15174
15189
|
polling,
|
|
15175
15190
|
// Only meaningful when opengrep is going to run (no user-supplied report).
|
|
15176
|
-
baselineCommit: shouldScan ? baselineCommit : void 0
|
|
15191
|
+
baselineCommit: shouldScan ? baselineCommit : void 0,
|
|
15192
|
+
scanOnly
|
|
15177
15193
|
});
|
|
15178
15194
|
uploadReportSpinner.success({ text: "\u{1F4C1} Report uploaded successfully" });
|
|
15179
15195
|
const mobbSpinner = createSpinner5("\u{1F575}\uFE0F\u200D\u2642\uFE0F Initiating Mobb analysis").start();
|
|
@@ -15199,9 +15215,9 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15199
15215
|
throw new Error("\u{1F575}\uFE0F\u200D\u2642\uFE0F Mobb analysis failed");
|
|
15200
15216
|
}
|
|
15201
15217
|
mobbSpinner.success({
|
|
15202
|
-
text: "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15218
|
+
text: scanOnly ? "\u{1F50D} Scanning (scan-only, no fixes)..." : "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15203
15219
|
});
|
|
15204
|
-
if (autoPr) {
|
|
15220
|
+
if (autoPr && !scanOnly) {
|
|
15205
15221
|
await handleAutoPr({
|
|
15206
15222
|
gqlClient,
|
|
15207
15223
|
analysisId: reportUploadInfo.fixReportId,
|
|
@@ -15213,7 +15229,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15213
15229
|
});
|
|
15214
15230
|
}
|
|
15215
15231
|
await askToOpenAnalysis();
|
|
15216
|
-
if (command === "review") {
|
|
15232
|
+
if (command === "review" && !scanOnly) {
|
|
15217
15233
|
await waitForAnaysisAndReviewPr({
|
|
15218
15234
|
repo,
|
|
15219
15235
|
githubActionToken,
|
|
@@ -15320,7 +15336,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15320
15336
|
// shouldScan is false here (user provided a report); baseline filter
|
|
15321
15337
|
// only applies to the opengrep code path. Drop it to keep the contract
|
|
15322
15338
|
// honest with the CLI help text.
|
|
15323
|
-
baselineCommit: void 0
|
|
15339
|
+
baselineCommit: void 0,
|
|
15340
|
+
scanOnly
|
|
15324
15341
|
});
|
|
15325
15342
|
const res = await _zipAndUploadRepo({
|
|
15326
15343
|
srcPath,
|
|
@@ -15345,7 +15362,8 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15345
15362
|
ci,
|
|
15346
15363
|
shouldScan: shouldScan2,
|
|
15347
15364
|
polling,
|
|
15348
|
-
baselineCommit
|
|
15365
|
+
baselineCommit,
|
|
15366
|
+
scanOnly
|
|
15349
15367
|
});
|
|
15350
15368
|
}
|
|
15351
15369
|
const mobbSpinner2 = createSpinner5("\u{1F575}\uFE0F\u200D\u2642\uFE0F Initiating Mobb analysis").start();
|
|
@@ -15366,7 +15384,7 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15366
15384
|
},
|
|
15367
15385
|
polling
|
|
15368
15386
|
});
|
|
15369
|
-
if (command === "review") {
|
|
15387
|
+
if (command === "review" && !scanOnly) {
|
|
15370
15388
|
await waitForAnaysisAndReviewPr({
|
|
15371
15389
|
repo,
|
|
15372
15390
|
githubActionToken,
|
|
@@ -15381,9 +15399,9 @@ async function _scan(params, { skipPrompts = false } = {}) {
|
|
|
15381
15399
|
throw e;
|
|
15382
15400
|
}
|
|
15383
15401
|
mobbSpinner2.success({
|
|
15384
|
-
text: "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15402
|
+
text: scanOnly ? "\u{1F50D} Scanning (scan-only, no fixes)..." : "\u{1F575}\uFE0F\u200D\u2642\uFE0F Generating fixes..."
|
|
15385
15403
|
});
|
|
15386
|
-
if (autoPr) {
|
|
15404
|
+
if (autoPr && !scanOnly) {
|
|
15387
15405
|
await handleAutoPr({
|
|
15388
15406
|
gqlClient,
|
|
15389
15407
|
analysisId: reportUploadInfo.fixReportId,
|
|
@@ -15441,7 +15459,8 @@ async function _digestReport({
|
|
|
15441
15459
|
reference,
|
|
15442
15460
|
shouldScan,
|
|
15443
15461
|
polling,
|
|
15444
|
-
baselineCommit
|
|
15462
|
+
baselineCommit,
|
|
15463
|
+
scanOnly
|
|
15445
15464
|
}) {
|
|
15446
15465
|
const digestSpinner = createSpinner4(
|
|
15447
15466
|
progressMassages.processingVulnerabilityReport
|
|
@@ -15456,7 +15475,8 @@ async function _digestReport({
|
|
|
15456
15475
|
sha,
|
|
15457
15476
|
reference,
|
|
15458
15477
|
shouldScan,
|
|
15459
|
-
baselineCommit
|
|
15478
|
+
baselineCommit,
|
|
15479
|
+
scanOnly
|
|
15460
15480
|
}
|
|
15461
15481
|
);
|
|
15462
15482
|
const callbackStates = [
|
|
@@ -15707,7 +15727,8 @@ async function analyze({
|
|
|
15707
15727
|
commitDirectly,
|
|
15708
15728
|
pullRequest,
|
|
15709
15729
|
polling,
|
|
15710
|
-
baselineCommit
|
|
15730
|
+
baselineCommit,
|
|
15731
|
+
scanOnly
|
|
15711
15732
|
}, { skipPrompts = false } = {}) {
|
|
15712
15733
|
!ci && await showWelcomeMessage(skipPrompts);
|
|
15713
15734
|
await runAnalysis(
|
|
@@ -15727,7 +15748,8 @@ async function analyze({
|
|
|
15727
15748
|
pullRequest,
|
|
15728
15749
|
createOnePr,
|
|
15729
15750
|
polling,
|
|
15730
|
-
baselineCommit
|
|
15751
|
+
baselineCommit,
|
|
15752
|
+
scanOnly
|
|
15731
15753
|
},
|
|
15732
15754
|
{ skipPrompts }
|
|
15733
15755
|
);
|
|
@@ -15937,7 +15959,10 @@ function analyzeBuilder(yargs2) {
|
|
|
15937
15959
|
describe: chalk10.bold("Number of the pull request"),
|
|
15938
15960
|
type: "number",
|
|
15939
15961
|
demandOption: false
|
|
15940
|
-
}).option("polling", pollingOption).option("baseline-commit", baselineCommitOption).example(
|
|
15962
|
+
}).option("polling", pollingOption).option("baseline-commit", baselineCommitOption).option("scan-only", scanOnlyOption).example(
|
|
15963
|
+
"npx mobbdev@latest analyze -r https://github.com/org/repo --scan-only",
|
|
15964
|
+
"scan only \u2014 report findings without generating fixes"
|
|
15965
|
+
).example(
|
|
15941
15966
|
"npx mobbdev@latest analyze -r https://github.com/WebGoat/WebGoat -f <your_vulnerability_report_path>",
|
|
15942
15967
|
"analyze an existing repository"
|
|
15943
15968
|
).example(
|
|
@@ -18257,7 +18282,7 @@ function createLogger(config2) {
|
|
|
18257
18282
|
|
|
18258
18283
|
// src/features/claude_code/hook_logger.ts
|
|
18259
18284
|
var DD_RUM_TOKEN = true ? "pubf59c0182545bfb4c299175119f1abf9b" : "";
|
|
18260
|
-
var CLI_VERSION = true ? "1.4.
|
|
18285
|
+
var CLI_VERSION = true ? "1.4.47" : "unknown";
|
|
18261
18286
|
var NAMESPACE = "mobbdev-claude-code-hook-logs";
|
|
18262
18287
|
var claudeCodeVersion;
|
|
18263
18288
|
function buildDdTags() {
|