xploitscan-shared-rules 1.14.3 → 1.14.4

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.d.cts CHANGED
@@ -364,6 +364,15 @@ interface AIFilterResult {
364
364
  aiReviewed: boolean;
365
365
  removedCount: number;
366
366
  totalBefore: number;
367
+ /**
368
+ * Findings that were NOT AI-reviewed because their batch's model call
369
+ * failed (e.g. a burst of 429s), even though other batches succeeded.
370
+ * 0 on a full review. Lets the UI honestly say "partially reviewed"
371
+ * instead of labeling unreviewed findings as AI-verified. Does NOT count
372
+ * findings skipped by the MAX_TOTAL_FINDINGS cap — that's by design, not
373
+ * a failure.
374
+ */
375
+ unreviewedCount: number;
367
376
  }
368
377
  /**
369
378
  * Filter false positives from findings using Claude Haiku.
package/dist/index.d.ts CHANGED
@@ -364,6 +364,15 @@ interface AIFilterResult {
364
364
  aiReviewed: boolean;
365
365
  removedCount: number;
366
366
  totalBefore: number;
367
+ /**
368
+ * Findings that were NOT AI-reviewed because their batch's model call
369
+ * failed (e.g. a burst of 429s), even though other batches succeeded.
370
+ * 0 on a full review. Lets the UI honestly say "partially reviewed"
371
+ * instead of labeling unreviewed findings as AI-verified. Does NOT count
372
+ * findings skipped by the MAX_TOTAL_FINDINGS cap — that's by design, not
373
+ * a failure.
374
+ */
375
+ unreviewedCount: number;
367
376
  }
368
377
  /**
369
378
  * Filter false positives from findings using Claude Haiku.
package/dist/index.js CHANGED
@@ -8632,7 +8632,7 @@ function parseReviewResponse(text) {
8632
8632
  }
8633
8633
  }
8634
8634
  async function filterFalsePositives(findings, fileContents) {
8635
- const empty = { findings, filteredFindings: [], aiReviewed: false, removedCount: 0, totalBefore: findings.length };
8635
+ const empty = { findings, filteredFindings: [], aiReviewed: false, removedCount: 0, totalBefore: findings.length, unreviewedCount: 0 };
8636
8636
  if (!process.env.ANTHROPIC_API_KEY) return empty;
8637
8637
  if (findings.length === 0) return empty;
8638
8638
  const prioritized = [...findings].sort((a, b) => {
@@ -8659,6 +8659,7 @@ async function filterFalsePositives(findings, fileContents) {
8659
8659
  let reviewedAny = false;
8660
8660
  let firstError = null;
8661
8661
  let failedBatches = 0;
8662
+ let unreviewedCount = 0;
8662
8663
  const tasks = [];
8663
8664
  for (const [file, fileFindings] of byFile) {
8664
8665
  const content = fileContents.get(file);
@@ -8668,8 +8669,8 @@ async function filterFalsePositives(findings, fileContents) {
8668
8669
  }
8669
8670
  }
8670
8671
  const reviewBatch = async (task) => {
8672
+ const { batch, content } = task;
8671
8673
  try {
8672
- const { batch, content } = task;
8673
8674
  const prompt = buildReviewPrompt(batch, content);
8674
8675
  const response = await client.messages.create(
8675
8676
  {
@@ -8698,6 +8699,7 @@ async function filterFalsePositives(findings, fileContents) {
8698
8699
  }
8699
8700
  } catch (err) {
8700
8701
  failedBatches++;
8702
+ unreviewedCount += batch.length;
8701
8703
  if (!firstError) firstError = err;
8702
8704
  }
8703
8705
  };
@@ -8734,7 +8736,8 @@ async function filterFalsePositives(findings, fileContents) {
8734
8736
  filteredFindings,
8735
8737
  aiReviewed: reviewedAny,
8736
8738
  removedCount: fpMap.size,
8737
- totalBefore
8739
+ totalBefore,
8740
+ unreviewedCount
8738
8741
  };
8739
8742
  }
8740
8743