xploitscan-shared-rules 2.4.29 → 2.4.30
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.cjs +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -230,7 +230,7 @@ __export(index_exports, {
|
|
|
230
230
|
module.exports = __toCommonJS(index_exports);
|
|
231
231
|
|
|
232
232
|
// src/version.ts
|
|
233
|
-
var SCANNER_VERSION = "2.4.
|
|
233
|
+
var SCANNER_VERSION = "2.4.30";
|
|
234
234
|
|
|
235
235
|
// src/snippet.ts
|
|
236
236
|
var cacheContent = null;
|
|
@@ -10589,7 +10589,9 @@ function parseReviewResponse(text) {
|
|
|
10589
10589
|
index,
|
|
10590
10590
|
file,
|
|
10591
10591
|
verdict: candidate.verdict,
|
|
10592
|
-
|
|
10592
|
+
// Non-strings stay non-strings. The verdict loop masks, then marks
|
|
10593
|
+
// reviewed. A reason that cannot be masked throws and stays unreviewed.
|
|
10594
|
+
reason: candidate.reason
|
|
10593
10595
|
});
|
|
10594
10596
|
}
|
|
10595
10597
|
return valid;
|
|
@@ -10688,6 +10690,9 @@ async function filterFalsePositives(findings, fileContents, budgetMs = AI_FILTER
|
|
|
10688
10690
|
let prepared;
|
|
10689
10691
|
try {
|
|
10690
10692
|
const raw = target.finding;
|
|
10693
|
+
if (!Number.isInteger(raw.line) || raw.line < 1) {
|
|
10694
|
+
throw new Error("finding line");
|
|
10695
|
+
}
|
|
10691
10696
|
const finding = {
|
|
10692
10697
|
...raw,
|
|
10693
10698
|
title: promptText(raw.title),
|
|
@@ -10856,9 +10861,12 @@ async function filterFalsePositives(findings, fileContents, budgetMs = AI_FILTER
|
|
|
10856
10861
|
continue;
|
|
10857
10862
|
}
|
|
10858
10863
|
const r = list[0];
|
|
10864
|
+
if (typeof r.reason !== "string") {
|
|
10865
|
+
throw new TypeError("review reason");
|
|
10866
|
+
}
|
|
10867
|
+
const reason2 = truncateChars(applySecretMasks(r.reason, secrets), MAX_FIELD_CHARS);
|
|
10859
10868
|
reviewedIndices.add(target.originalIndex);
|
|
10860
10869
|
if (r.verdict !== "fp") continue;
|
|
10861
|
-
const reason2 = truncateChars(applySecretMasks(r.reason, secrets), MAX_FIELD_CHARS);
|
|
10862
10870
|
if (isProtectedFromAiRemoval(target.finding)) {
|
|
10863
10871
|
policyRetainedMap.set(target.originalIndex, reason2);
|
|
10864
10872
|
} else {
|