mobbdev 1.0.193 → 1.0.194
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 +3 -0
- package/dist/index.mjs +73 -65
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2094,6 +2094,9 @@ var GetAnalysisDocument = `
|
|
|
2094
2094
|
projectId
|
|
2095
2095
|
project {
|
|
2096
2096
|
organizationId
|
|
2097
|
+
organization {
|
|
2098
|
+
ghFixerNoFixComments
|
|
2099
|
+
}
|
|
2097
2100
|
}
|
|
2098
2101
|
file {
|
|
2099
2102
|
signedFile {
|
|
@@ -10518,7 +10521,10 @@ async function addFixCommentsForPr({
|
|
|
10518
10521
|
const {
|
|
10519
10522
|
vulnerabilityReport: {
|
|
10520
10523
|
projectId,
|
|
10521
|
-
project: {
|
|
10524
|
+
project: {
|
|
10525
|
+
organizationId,
|
|
10526
|
+
organization: { ghFixerNoFixComments }
|
|
10527
|
+
}
|
|
10522
10528
|
}
|
|
10523
10529
|
} = getAnalysisRes;
|
|
10524
10530
|
if (!getAnalysisRes.repo?.commitSha || !getAnalysisRes.repo.pullRequest) {
|
|
@@ -10547,74 +10553,76 @@ async function addFixCommentsForPr({
|
|
|
10547
10553
|
...deleteAllPreviousComments({ comments, scm }),
|
|
10548
10554
|
...deleteAllPreviousGeneralPrComments({ generalPrComments, scm })
|
|
10549
10555
|
]);
|
|
10550
|
-
await Promise.all(
|
|
10551
|
-
|
|
10552
|
-
(
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
}
|
|
10565
|
-
),
|
|
10566
|
-
...irrelevantVulnerabilityReportIssues.map(
|
|
10567
|
-
async (vulnerabilityReportIssue) => {
|
|
10568
|
-
let fpDescription = null;
|
|
10569
|
-
if (vulnerabilityReportIssue.fpId) {
|
|
10570
|
-
const fpRes = await gqlClient.getFalsePositive({
|
|
10571
|
-
fpId: vulnerabilityReportIssue.fpId
|
|
10556
|
+
await Promise.all(
|
|
10557
|
+
[
|
|
10558
|
+
...prVulenrabilities.vulnerabilityReportIssueCodeNodes.map(
|
|
10559
|
+
(vulnerabilityReportIssueCodeNode) => {
|
|
10560
|
+
return postFixComment({
|
|
10561
|
+
vulnerabilityReportIssueCodeNode,
|
|
10562
|
+
projectId,
|
|
10563
|
+
analysisId,
|
|
10564
|
+
organizationId,
|
|
10565
|
+
fixesById,
|
|
10566
|
+
scm,
|
|
10567
|
+
pullRequest,
|
|
10568
|
+
scanner,
|
|
10569
|
+
commitSha
|
|
10572
10570
|
});
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
fpDescription =
|
|
10571
|
+
}
|
|
10572
|
+
),
|
|
10573
|
+
...irrelevantVulnerabilityReportIssues.map(
|
|
10574
|
+
async (vulnerabilityReportIssue) => {
|
|
10575
|
+
let fpDescription = null;
|
|
10576
|
+
if (vulnerabilityReportIssue.fpId) {
|
|
10577
|
+
const fpRes = await gqlClient.getFalsePositive({
|
|
10578
|
+
fpId: vulnerabilityReportIssue.fpId
|
|
10579
|
+
});
|
|
10580
|
+
const parsedFpRes = await FalsePositivePartsZ.parseAsync(
|
|
10581
|
+
fpRes?.getFalsePositive
|
|
10582
|
+
);
|
|
10583
|
+
const { description, contextString } = getParsedFalsePositiveMessage(parsedFpRes);
|
|
10584
|
+
fpDescription = contextString ? `${description}
|
|
10578
10585
|
|
|
10579
10586
|
${contextString}` : description;
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10587
|
+
}
|
|
10588
|
+
return await Promise.all(
|
|
10589
|
+
vulnerabilityReportIssue.codeNodes.map(
|
|
10590
|
+
async (vulnerabilityReportIssueCodeNode) => {
|
|
10591
|
+
return await postIssueComment({
|
|
10592
|
+
vulnerabilityReportIssueCodeNode: {
|
|
10593
|
+
path: vulnerabilityReportIssueCodeNode.path,
|
|
10594
|
+
startLine: vulnerabilityReportIssueCodeNode.startLine,
|
|
10595
|
+
vulnerabilityReportIssue: {
|
|
10596
|
+
fixId: "",
|
|
10597
|
+
safeIssueType: vulnerabilityReportIssue.safeIssueType,
|
|
10598
|
+
vulnerabilityReportIssueTags: vulnerabilityReportIssue.vulnerabilityReportIssueTags,
|
|
10599
|
+
category: vulnerabilityReportIssue.category
|
|
10600
|
+
},
|
|
10601
|
+
vulnerabilityReportIssueId: vulnerabilityReportIssue.id
|
|
10593
10602
|
},
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
]);
|
|
10603
|
+
projectId,
|
|
10604
|
+
analysisId,
|
|
10605
|
+
organizationId,
|
|
10606
|
+
fixesById,
|
|
10607
|
+
scm,
|
|
10608
|
+
pullRequest,
|
|
10609
|
+
scanner,
|
|
10610
|
+
commitSha,
|
|
10611
|
+
fpDescription
|
|
10612
|
+
});
|
|
10613
|
+
}
|
|
10614
|
+
)
|
|
10615
|
+
);
|
|
10616
|
+
}
|
|
10617
|
+
),
|
|
10618
|
+
!ghFixerNoFixComments && postAnalysisInsightComment({
|
|
10619
|
+
prVulenrabilities,
|
|
10620
|
+
pullRequest,
|
|
10621
|
+
scanner,
|
|
10622
|
+
scm
|
|
10623
|
+
})
|
|
10624
|
+
].filter(Boolean)
|
|
10625
|
+
);
|
|
10618
10626
|
}
|
|
10619
10627
|
|
|
10620
10628
|
// src/features/analysis/auto_pr_handler.ts
|