shield-llm 0.12.2 → 0.12.3

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.
@@ -4024,7 +4024,7 @@ function calculateComplianceScore(tests, locale = "en") {
4024
4024
  vulnerable: prev.vulnerable || t.vulnerable
4025
4025
  });
4026
4026
  }
4027
- const aspects = calculateAspectScores(outcomeMap, EU_AI_ACT_MAPPING);
4027
+ const aspects = calculateAspectScores(outcomeMap, EU_AI_ACT_MAPPING, locale);
4028
4028
  const overallScore = calculateWeightedOverall(aspects);
4029
4029
  const nonCompliances = buildNonCompliances(outcomeMap);
4030
4030
  const status = getComplianceStatus(aspects, nonCompliances);
@@ -4044,7 +4044,7 @@ function calculateComplianceScore(tests, locale = "en") {
4044
4044
  disclaimer: DISCLAIMER[locale] ?? DISCLAIMER.en
4045
4045
  };
4046
4046
  }
4047
- function calculateAspectScores(outcomeMap, mapping) {
4047
+ function calculateAspectScores(outcomeMap, mapping, locale = "en") {
4048
4048
  const aspectTests = /* @__PURE__ */ new Map();
4049
4049
  for (const [testId, m] of Object.entries(mapping)) {
4050
4050
  const outcome = outcomeMap.get(testId);
@@ -4088,7 +4088,9 @@ function calculateAspectScores(outcomeMap, mapping) {
4088
4088
  return {
4089
4089
  aspect,
4090
4090
  score,
4091
- articleLabel: ASPECT_ARTICLE_LABELS[aspect],
4091
+ // In the caller's language: the French table said "Art. 10 & RGPD" in
4092
+ // the English CLI JSON and evidence bundle (2026-10-30).
4093
+ articleLabel: aspectArticleLabel(aspect, locale),
4092
4094
  totalTests,
4093
4095
  passedTests,
4094
4096
  failedTests
@@ -9840,7 +9842,7 @@ function evaluateBenign(input) {
9840
9842
  }
9841
9843
 
9842
9844
  // package.json
9843
- var version = "0.12.2";
9845
+ var version = "0.12.3";
9844
9846
 
9845
9847
  // src/config/schema.ts
9846
9848
  import { z as z2 } from "zod";
@@ -12574,7 +12576,8 @@ function formatComplianceJson(result) {
12574
12576
  hardFailedArticles: result.hardFailedArticles,
12575
12577
  aspects: result.aspects.map((a) => ({
12576
12578
  aspect: a.aspect,
12577
- articleLabel: a.articleLabel,
12579
+ // English like the rest of this JSON, as the terminal lines above.
12580
+ articleLabel: aspectArticleLabel(a.aspect),
12578
12581
  score: a.score,
12579
12582
  totalTests: a.totalTests,
12580
12583
  passedTests: a.passedTests,
@@ -15184,10 +15187,12 @@ export {
15184
15187
  serializeAttack,
15185
15188
  deserializeAttack,
15186
15189
  deserializeMultiTurnAttack,
15190
+ aspectArticleLabel,
15187
15191
  EU_AI_ACT_FRAMEWORK_VERSION,
15188
15192
  calculateComplianceScore,
15189
15193
  isHardFailBreach,
15190
15194
  getObligationProfile,
15195
+ articleNumberEn,
15191
15196
  FRAMEWORK_IDS,
15192
15197
  frameworkVersion,
15193
15198
  FRAMEWORK_LABELS,
package/dist/cli.js CHANGED
@@ -24,6 +24,8 @@ import {
24
24
  RegexOnlyEvaluator,
25
25
  Scanner,
26
26
  analyzeJudgeHealth,
27
+ articleNumberEn,
28
+ aspectArticleLabel,
27
29
  attacksForContract,
28
30
  baseAttackId,
29
31
  buildAuthFromFlags,
@@ -79,7 +81,7 @@ import {
79
81
  summarizeObfuscationVariants,
80
82
  version,
81
83
  withoutScoredApartVariants
82
- } from "./chunk-4A2UTKN5.js";
84
+ } from "./chunk-2YC6WMPX.js";
83
85
 
84
86
  // src/load-env.ts
85
87
  try {
@@ -2504,9 +2506,12 @@ function buildEvidenceBundle(input2) {
2504
2506
  overallScore: input2.compliance.overallScore,
2505
2507
  status: input2.compliance.status,
2506
2508
  hardFailedArticles: [...input2.compliance.hardFailedArticles ?? []],
2509
+ // The bundle is an English document, whatever language the result was
2510
+ // computed in: it said "Art. 10 & RGPD" and "RGPD Art. 5 & 32"
2511
+ // (2026-10-30).
2507
2512
  aspects: input2.compliance.aspects.map((a) => ({
2508
2513
  aspect: a.aspect,
2509
- articleLabel: a.articleLabel,
2514
+ articleLabel: aspectArticleLabel(a.aspect, "en"),
2510
2515
  score: a.score,
2511
2516
  totalTests: a.totalTests,
2512
2517
  passedTests: a.passedTests,
@@ -2516,7 +2521,7 @@ function buildEvidenceBundle(input2) {
2516
2521
  testId: nc.testId,
2517
2522
  testName: nc.testName,
2518
2523
  severity: nc.severity,
2519
- articleNumber: nc.article.articleNumber,
2524
+ articleNumber: articleNumberEn(nc.article.articleNumber),
2520
2525
  complianceAspect: nc.article.complianceAspect,
2521
2526
  observedBreach: nc.article.observedBreach === true
2522
2527
  }))
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  generatePdf,
10
10
  loadConfig,
11
11
  loadSystemPrompt
12
- } from "./chunk-4A2UTKN5.js";
12
+ } from "./chunk-2YC6WMPX.js";
13
13
  export {
14
14
  ConfigError,
15
15
  ConfigSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shield-llm",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "description": "AI chatbot security scanner — automated red teaming for LLMs",
5
5
  "type": "module",
6
6
  "publishConfig": {