xploitscan-shared-rules 2.4.4 → 2.4.5

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
@@ -263,12 +263,16 @@ declare const MODEL_ANALYSIS = "claude-sonnet-5";
263
263
  *
264
264
  * Haiku is the right tier: the task is bounded, the finding is handed to the
265
265
  * model rather than discovered by it, and the call count scales with findings
266
- * (one per file batch, many per scan). Pinned to a dated release deliberately
267
- * — this one runs on OUR key against user-visible output, and a silent model
268
- * swap underneath a filter that can *hide* a real vulnerability is not a
269
- * change we want to arrive unannounced.
266
+ * (one per file batch, many per scan). We pin to Anthropic's current Haiku
267
+ * line ID (`claude-haiku-5-5`), not a year-old dated snapshot — FP quality
268
+ * tracks the latest Haiku, and `MODEL_POLICY_REVIEWED` + CI force a human to
269
+ * re-check https://docs.claude.com/en/docs/about-claude/models often enough
270
+ * that a new Haiku generation cannot sit ignored.
271
+ *
272
+ * When Anthropic ships Haiku 6.x (or renames the line), update this ID and
273
+ * bump MODEL_POLICY_REVIEWED in the same commit.
270
274
  */
271
- declare const MODEL_TRIAGE = "claude-haiku-4-5-20251001";
275
+ declare const MODEL_TRIAGE = "claude-haiku-5-5";
272
276
  /**
273
277
  * Last time a human checked these against the current model line-up.
274
278
  *
@@ -278,20 +282,29 @@ declare const MODEL_TRIAGE = "claude-haiku-4-5-20251001";
278
282
  * is the exact failure this module exists to prevent.
279
283
  *
280
284
  * To clear it: re-read https://docs.claude.com/en/docs/about-claude/models,
281
- * update the IDs above if the line-up moved, and set today's date here.
285
+ * update the IDs above if the line-up moved (especially MODEL_TRIAGE to the
286
+ * current Haiku), and set today's date here.
287
+ */
288
+ declare const MODEL_POLICY_REVIEWED = "2026-10-12";
289
+ /**
290
+ * How long a review stays fresh before CI asks for another one.
291
+ *
292
+ * 30 days (not 180): the FP filter runs on our key against user-visible
293
+ * grades, so staying on current Haiku is part of scanner trust. A monthly
294
+ * nudge is cheap; a six-month lag is how we stayed on Haiku 4.5 after 5.5
295
+ * shipped.
282
296
  */
283
- declare const MODEL_POLICY_REVIEWED = "2026-09-15";
284
- /** How long a review stays fresh before CI asks for another one. */
285
- declare const MODEL_REVIEW_INTERVAL_DAYS = 180;
297
+ declare const MODEL_REVIEW_INTERVAL_DAYS = 30;
286
298
  /**
287
- * Sampling is pinned to 0 at every call site, and extended thinking is
288
- * deliberately NOT enabled at any of them.
299
+ * Sampling pin for models that still accept `temperature` (e.g. Sonnet 5
300
+ * analysis in the CLI). Do NOT send this on Haiku 5.5 triage calls —
301
+ * Anthropic returns HTTP 400 for any temperature other than 1 on that model;
302
+ * the FP filter omits the field and sets `thinking: { type: "disabled" }`
303
+ * instead (see ai-fp-filter.ts).
289
304
  *
290
- * Both follow from the same requirement: a user who scans the same unchanged
291
- * commit twice must get the same letter grade, with no explanation needed for
292
- * why it moved. Extended thinking requires temperature 1, so enabling it
293
- * would trade that guarantee away. If a future call site does not feed a
294
- * grade, it is free to make the opposite choice — but it should say so.
305
+ * Extended thinking is deliberately not enabled at grade-affecting call
306
+ * sites: a user who scans the same unchanged commit twice must get the same
307
+ * letter grade.
295
308
  */
296
309
  declare const MODEL_TEMPERATURE = 0;
297
310
 
package/dist/index.d.ts CHANGED
@@ -263,12 +263,16 @@ declare const MODEL_ANALYSIS = "claude-sonnet-5";
263
263
  *
264
264
  * Haiku is the right tier: the task is bounded, the finding is handed to the
265
265
  * model rather than discovered by it, and the call count scales with findings
266
- * (one per file batch, many per scan). Pinned to a dated release deliberately
267
- * — this one runs on OUR key against user-visible output, and a silent model
268
- * swap underneath a filter that can *hide* a real vulnerability is not a
269
- * change we want to arrive unannounced.
266
+ * (one per file batch, many per scan). We pin to Anthropic's current Haiku
267
+ * line ID (`claude-haiku-5-5`), not a year-old dated snapshot — FP quality
268
+ * tracks the latest Haiku, and `MODEL_POLICY_REVIEWED` + CI force a human to
269
+ * re-check https://docs.claude.com/en/docs/about-claude/models often enough
270
+ * that a new Haiku generation cannot sit ignored.
271
+ *
272
+ * When Anthropic ships Haiku 6.x (or renames the line), update this ID and
273
+ * bump MODEL_POLICY_REVIEWED in the same commit.
270
274
  */
271
- declare const MODEL_TRIAGE = "claude-haiku-4-5-20251001";
275
+ declare const MODEL_TRIAGE = "claude-haiku-5-5";
272
276
  /**
273
277
  * Last time a human checked these against the current model line-up.
274
278
  *
@@ -278,20 +282,29 @@ declare const MODEL_TRIAGE = "claude-haiku-4-5-20251001";
278
282
  * is the exact failure this module exists to prevent.
279
283
  *
280
284
  * To clear it: re-read https://docs.claude.com/en/docs/about-claude/models,
281
- * update the IDs above if the line-up moved, and set today's date here.
285
+ * update the IDs above if the line-up moved (especially MODEL_TRIAGE to the
286
+ * current Haiku), and set today's date here.
287
+ */
288
+ declare const MODEL_POLICY_REVIEWED = "2026-10-12";
289
+ /**
290
+ * How long a review stays fresh before CI asks for another one.
291
+ *
292
+ * 30 days (not 180): the FP filter runs on our key against user-visible
293
+ * grades, so staying on current Haiku is part of scanner trust. A monthly
294
+ * nudge is cheap; a six-month lag is how we stayed on Haiku 4.5 after 5.5
295
+ * shipped.
282
296
  */
283
- declare const MODEL_POLICY_REVIEWED = "2026-09-15";
284
- /** How long a review stays fresh before CI asks for another one. */
285
- declare const MODEL_REVIEW_INTERVAL_DAYS = 180;
297
+ declare const MODEL_REVIEW_INTERVAL_DAYS = 30;
286
298
  /**
287
- * Sampling is pinned to 0 at every call site, and extended thinking is
288
- * deliberately NOT enabled at any of them.
299
+ * Sampling pin for models that still accept `temperature` (e.g. Sonnet 5
300
+ * analysis in the CLI). Do NOT send this on Haiku 5.5 triage calls —
301
+ * Anthropic returns HTTP 400 for any temperature other than 1 on that model;
302
+ * the FP filter omits the field and sets `thinking: { type: "disabled" }`
303
+ * instead (see ai-fp-filter.ts).
289
304
  *
290
- * Both follow from the same requirement: a user who scans the same unchanged
291
- * commit twice must get the same letter grade, with no explanation needed for
292
- * why it moved. Extended thinking requires temperature 1, so enabling it
293
- * would trade that guarantee away. If a future call site does not feed a
294
- * grade, it is free to make the opposite choice — but it should say so.
305
+ * Extended thinking is deliberately not enabled at grade-affecting call
306
+ * sites: a user who scans the same unchanged commit twice must get the same
307
+ * letter grade.
295
308
  */
296
309
  declare const MODEL_TEMPERATURE = 0;
297
310
 
package/dist/index.js CHANGED
@@ -67,9 +67,9 @@ function isLineSilenced(lines, lineIdx, ruleId) {
67
67
 
68
68
  // src/models.ts
69
69
  var MODEL_ANALYSIS = "claude-sonnet-5";
70
- var MODEL_TRIAGE = "claude-haiku-4-5-20251001";
71
- var MODEL_POLICY_REVIEWED = "2026-09-15";
72
- var MODEL_REVIEW_INTERVAL_DAYS = 180;
70
+ var MODEL_TRIAGE = "claude-haiku-5-5";
71
+ var MODEL_POLICY_REVIEWED = "2026-10-12";
72
+ var MODEL_REVIEW_INTERVAL_DAYS = 30;
73
73
  var MODEL_TEMPERATURE = 0;
74
74
 
75
75
  // src/rule-impacts.ts
@@ -4708,17 +4708,14 @@ async function filterFalsePositives(findings, fileContents, budgetMs = AI_FILTER
4708
4708
  {
4709
4709
  model: MODEL_TRIAGE,
4710
4710
  max_tokens: 1024,
4711
- // Pinned, NOT left to the API default of 1.0. This is a binary
4712
- // classification (real vs. false positive), not generation — there
4713
- // is no upside to sampling variety and a real downside to it: a
4714
- // filtered finding is a finding the user never sees, so drift here
4715
- // means scanning the same unchanged code twice can yield different
4716
- // results. Temperature 0 does not make the model bit-deterministic
4717
- // (Anthropic makes no such guarantee), but it removes the one
4718
- // variance source that was ours to control. See
4719
- // scripts/fp-filter-repeatability.cjs for the measured flip rate,
4720
- // and the assertion in ai-fp-filter.test.ts that keeps it pinned.
4721
- temperature: MODEL_TEMPERATURE,
4711
+ // Haiku 5.5 rejects non-default sampling params with HTTP 400
4712
+ // ("temperature is deprecated for this model"). Omit temperature /
4713
+ // top_p / top_k entirely — do NOT send MODEL_TEMPERATURE (0).
4714
+ // Adaptive thinking is on by default for 5.5; disable it here: this
4715
+ // is binary FP classification, not open-ended analysis, and thinking
4716
+ // burns the shared AI budget (Isobar rescan: every call 400'd on
4717
+ // temperature, then timed_out with aiReviewed:false → grade D).
4718
+ thinking: { type: "disabled" },
4722
4719
  system: REVIEW_SYSTEM_PROMPT,
4723
4720
  messages: [{ role: "user", content: prompt }]
4724
4721
  },