shield-llm 0.12.1 → 0.12.2
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/README.md +1 -1
- package/dist/{chunk-GUNQB5SM.js → chunk-4A2UTKN5.js} +740 -57
- package/dist/cli.js +16 -9
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
formatMarkdown,
|
|
52
52
|
formatSarif,
|
|
53
53
|
formatShareAboveLimit,
|
|
54
|
+
frameworkVersion,
|
|
54
55
|
generatePdf,
|
|
55
56
|
getCrosswalk,
|
|
56
57
|
getMutator,
|
|
@@ -58,6 +59,7 @@ import {
|
|
|
58
59
|
getStructuredRemediation,
|
|
59
60
|
isExpired,
|
|
60
61
|
isFloorConfirmed,
|
|
62
|
+
isHardFailBreach,
|
|
61
63
|
loadConfig,
|
|
62
64
|
loadSystemPrompt,
|
|
63
65
|
mayStampFixed,
|
|
@@ -77,7 +79,7 @@ import {
|
|
|
77
79
|
summarizeObfuscationVariants,
|
|
78
80
|
version,
|
|
79
81
|
withoutScoredApartVariants
|
|
80
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-4A2UTKN5.js";
|
|
81
83
|
|
|
82
84
|
// src/load-env.ts
|
|
83
85
|
try {
|
|
@@ -2345,7 +2347,7 @@ function buildRemediationValidation(claims, scope) {
|
|
|
2345
2347
|
}
|
|
2346
2348
|
|
|
2347
2349
|
// ../../packages/shared/src/compliance/evidence-bundle.ts
|
|
2348
|
-
var EVIDENCE_BUNDLE_FORMAT = "shield-evidence/
|
|
2350
|
+
var EVIDENCE_BUNDLE_FORMAT = "shield-evidence/4";
|
|
2349
2351
|
var EVIDENCE_EXCERPT_LIMIT = 2e3;
|
|
2350
2352
|
var EVIDENCE_TOTAL_EXCERPT_BUDGET = 1e6;
|
|
2351
2353
|
function canonicalize(value) {
|
|
@@ -2393,8 +2395,9 @@ function bundleLimitations(classification, noScoredEvidence = false) {
|
|
|
2393
2395
|
"The SHA-256 digest is a checksum over the bundle content. It detects alteration; it does not authenticate the issuer and is not a cryptographic signature.",
|
|
2394
2396
|
"Article 50(1) disclosure rendered in a user interface (a banner, a chat header, an onboarding screen) is not observable from an HTTP-level scan and is neither tested nor scored here.",
|
|
2395
2397
|
"Article 50(2) machine-readable marking of synthetic content is out of scope for this scan.",
|
|
2398
|
+
"A non-compliance with observedBreach: false is a weakness scored against its article, not a breach of it, and never floors the status. A false human-authorship label on generated content is one: the Commission's Article 50 guidelines (C(2026) 5054, paragraph 131) place advertising text and a reply seen only by its user outside Article 50(4).",
|
|
2396
2399
|
"Organizational answers in the structural assessment are self-declared and carry no attached artefact.",
|
|
2397
|
-
"
|
|
2400
|
+
"This bundle grants no Article 40 presumption of conformity: that presumption comes from conformity with a harmonised standard cited in the Official Journal, not from a test result. As of 30 October 2026 the only such standard is EN 18286:2026 on the quality management system (Commission Implementing Decision (EU) 2026/2274, OJ 14.10.2026), which this bundle does not assess."
|
|
2398
2401
|
];
|
|
2399
2402
|
if (noScoredEvidence) {
|
|
2400
2403
|
base.unshift(
|
|
@@ -2457,7 +2460,8 @@ function buildCrosswalkBlock() {
|
|
|
2457
2460
|
frameworks: FRAMEWORK_IDS.map((id) => ({
|
|
2458
2461
|
id,
|
|
2459
2462
|
label: FRAMEWORK_LABELS[id].label,
|
|
2460
|
-
|
|
2463
|
+
// The bundle is English: "Règlement (UE) 2022/2554" was French in it.
|
|
2464
|
+
version: frameworkVersion(id, "en"),
|
|
2461
2465
|
note: { ...FRAMEWORK_LABELS[id].note }
|
|
2462
2466
|
})),
|
|
2463
2467
|
rows: getCrosswalk().map((row) => ({
|
|
@@ -2477,14 +2481,16 @@ function buildCrosswalkBlock() {
|
|
|
2477
2481
|
}))
|
|
2478
2482
|
};
|
|
2479
2483
|
}
|
|
2484
|
+
function observedArticle50Breach(compliance) {
|
|
2485
|
+
return compliance.nonCompliances.some(
|
|
2486
|
+
(nc) => isHardFailBreach(nc) && nc.article.articleNumber === "Article 50"
|
|
2487
|
+
);
|
|
2488
|
+
}
|
|
2480
2489
|
function buildEvidenceBundle(input2) {
|
|
2481
2490
|
const classification = input2.assessment?.riskClassification ?? "undetermined";
|
|
2482
|
-
const observedArticle50 = input2.compliance.nonCompliances.some(
|
|
2483
|
-
(nc) => nc.article.articleNumber === "Article 50"
|
|
2484
|
-
);
|
|
2485
2491
|
const profile = getObligationProfile(
|
|
2486
2492
|
classification,
|
|
2487
|
-
|
|
2493
|
+
observedArticle50Breach(input2.compliance) ? { article50Applies: true } : {}
|
|
2488
2494
|
);
|
|
2489
2495
|
const content = {
|
|
2490
2496
|
format: EVIDENCE_BUNDLE_FORMAT,
|
|
@@ -2511,7 +2517,8 @@ function buildEvidenceBundle(input2) {
|
|
|
2511
2517
|
testName: nc.testName,
|
|
2512
2518
|
severity: nc.severity,
|
|
2513
2519
|
articleNumber: nc.article.articleNumber,
|
|
2514
|
-
complianceAspect: nc.article.complianceAspect
|
|
2520
|
+
complianceAspect: nc.article.complianceAspect,
|
|
2521
|
+
observedBreach: nc.article.observedBreach === true
|
|
2515
2522
|
}))
|
|
2516
2523
|
},
|
|
2517
2524
|
obligations: {
|
package/dist/index.js
CHANGED