cuonztech-privacy-chaos-gate 0.4.6 → 0.4.8
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 +23 -7
- package/action.yml +1 -1
- package/dist/{chunk-IZBJ3UWZ.js → chunk-ZSSGFLHF.js} +876 -22
- package/dist/cli.js +2 -2
- package/dist/index.d.ts +112 -1
- package/dist/index.js +1 -1
- package/docs/BRAND-EVIDENCE.md +3 -2
- package/package.json +1 -1
|
@@ -246,6 +246,37 @@ var LeakReportSchema = z.object({
|
|
|
246
246
|
bannerKind: BannerKindSchema.optional(),
|
|
247
247
|
/** Name des erkannten CMP (z. B. `onetrust`, `usercentrics`), falls ein Banner gesehen und ein CMP erkannt wurde. */
|
|
248
248
|
bannerCmp: z.string().optional(),
|
|
249
|
+
/**
|
|
250
|
+
* EU-Bezug: Merkmale auf der Startseite, die auf eine Ausrichtung an Kundinnen und Kunden in der EU deuten (Euro-Preise, Lieferung in EU-Länder,
|
|
251
|
+
* Länderversionen, Domain, Telefonvorwahl, ausdrückliche Zielgruppe), je mit Fundstelle. Beobachtung ohne Rechtswertung und ohne Gate-Wirkung;
|
|
252
|
+
* nur die Startseite ist ausgewertet.
|
|
253
|
+
*/
|
|
254
|
+
euReference: z.object({
|
|
255
|
+
assessment: z.enum(["indicated", "weak", "none"]),
|
|
256
|
+
indicators: z.array(
|
|
257
|
+
z.object({
|
|
258
|
+
kind: z.enum(["currency", "shipping", "country-selector", "hreflang", "domain", "phone", "audience"]),
|
|
259
|
+
strength: z.enum(["strong", "weak"]),
|
|
260
|
+
label: z.string(),
|
|
261
|
+
evidence: z.string()
|
|
262
|
+
})
|
|
263
|
+
),
|
|
264
|
+
truncated: z.boolean().optional()
|
|
265
|
+
}).optional(),
|
|
266
|
+
/**
|
|
267
|
+
* Information und Hinweis auf die Ablehnmöglichkeit (Art. 45c lit. b FMG), gelesen aus der Datenschutzerklärung (und einer getrennten
|
|
268
|
+
* Cookie-Richtlinie) der Seite: nennt sie Cookies/Tracking, und nennt sie einen Weg, die Bearbeitung abzulehnen? Stichwortsuche, keine
|
|
269
|
+
* Inhaltsprüfung. Fehlt, wenn der Lauf die Erklärung nicht gesucht hat.
|
|
270
|
+
*/
|
|
271
|
+
privacyNotice: z.object({
|
|
272
|
+
url: z.string().optional(),
|
|
273
|
+
pages: z.array(z.string()),
|
|
274
|
+
reason: z.enum(["not-found", "pdf-only", "unreadable"]).optional(),
|
|
275
|
+
readable: z.boolean(),
|
|
276
|
+
mentionsProcessing: z.boolean(),
|
|
277
|
+
refusalHint: z.boolean(),
|
|
278
|
+
evidence: z.string().optional()
|
|
279
|
+
}).optional(),
|
|
249
280
|
/**
|
|
250
281
|
* Seitenaufbau aus dem Quelltext der Startseite (Website-System, Cookie-Tool, Einbau von Google Analytics bzw. Tag Manager,
|
|
251
282
|
* Kennungen, Code-Block der Seite). Grundlage der zugeschnittenen Anleitung im Kundenbericht; Funde im Quelltext, keine Wertung.
|
|
@@ -297,7 +328,7 @@ var RemediationResultSchema = z.object({
|
|
|
297
328
|
pullRequest: PullRequestResultSchema.optional(),
|
|
298
329
|
error: z.string().optional()
|
|
299
330
|
});
|
|
300
|
-
var JurisdictionCodeSchema = z.enum(["CH", "CH-SENSIBEL", "EU", "UK", "US-CA", "BR", "ROW"]);
|
|
331
|
+
var JurisdictionCodeSchema = z.enum(["CH", "CH-SENSIBEL", "EU", "UK", "US-CA", "BR", "ROW", "EU-BEZUG", "EU-OHNE-BEZUG"]);
|
|
301
332
|
var GateConfigSchema = z.object({
|
|
302
333
|
targetUrl: z.string().url({ message: "Ung\xFCltige Ziel-URL. Beispiel: https://www.deine-firma.ch" }).refine((u) => /^https?:\/\//i.test(u), { message: "Die Ziel-URL muss mit http:// oder https:// beginnen" }),
|
|
303
334
|
/** LLM-Key — wird nur gesetzt, wenn `llmRemediation` aktiv ist (siehe resolveGateConfig). */
|
|
@@ -441,7 +472,7 @@ var EXIT = {
|
|
|
441
472
|
// src/core/legal/jurisdictions.ts
|
|
442
473
|
var CONSENT_MODEL_LABEL = {
|
|
443
474
|
"opt-in": "opt-in",
|
|
444
|
-
objection: "
|
|
475
|
+
objection: "Information und Widerspruch",
|
|
445
476
|
"opt-out": "opt-out",
|
|
446
477
|
"notice-only": "notice-only"
|
|
447
478
|
};
|
|
@@ -453,8 +484,8 @@ var JURISDICTIONS = {
|
|
|
453
484
|
consentModel: "objection",
|
|
454
485
|
priorOptInRequired: false,
|
|
455
486
|
consentModeV2: "recommended",
|
|
456
|
-
summary: "CPCG wendet hier das Modell \
|
|
457
|
-
note: "Regelwerk von CPCG, technische Beobachtung, keine Rechtsberatung und keine Aussage, was rechtlich verlangt ist. Der ED\xD6B-Leitfaden ist keine Rechtsnorm. Bei EU-Zielgruppe zus\xE4tzlich --jurisdiction EU setzen: bei mehreren Rechtsr\xE4umen gilt der strengere."
|
|
487
|
+
summary: "CPCG wendet hier das Modell \xABInformation und Widerspruch\xBB an (Gesetzeskern: Art. 45c lit. b FMG; Form und Zeitpunkt l\xE4sst das Gesetz offen). Blockierend sind: Tracker nach \xABAblehnen\xBB oder bei besch\xE4digter Ablehnung (der Banner verspricht, was nicht geschieht) und Tracker, wenn weder der Banner noch die Datenschutzerkl\xE4rung einen Hinweis auf die Ablehnm\xF6glichkeit enth\xE4lt (Stichwortsuche). Als Hinweis ausgewiesen wird die strengere Auslegung des ED\xD6B (Leitfaden Cookies V1.1, Ziff. 3.9; Merkblatt vom 31.03.2026): Tracker vor der Entscheidung, ein Banner ohne Ablehnen oder ohne Auswahl, Ablehnen nur in den Einstellungen.",
|
|
488
|
+
note: "Regelwerk von CPCG, technische Beobachtung, keine Rechtsberatung und keine Aussage, was rechtlich verlangt ist. Der ED\xD6B-Leitfaden ist keine Rechtsnorm. Bei EU-Zielgruppe zus\xE4tzlich --jurisdiction EU setzen: bei mehreren Rechtsr\xE4umen gilt der strengere. F\xFCr Seiten mit besonders sch\xFCtzenswerten Daten oder Profiling mit hohem Risiko: --jurisdiction CH-SENSIBEL (Opt-in)."
|
|
458
489
|
},
|
|
459
490
|
"CH-SENSIBEL": {
|
|
460
491
|
code: "CH-SENSIBEL",
|
|
@@ -476,6 +507,38 @@ var JURISDICTIONS = {
|
|
|
476
507
|
summary: "CPCG wendet hier das Modell opt-in an. Regeln dieses Modells: Jeder Tracker vor einer Einwilligung ist blockierend (rein funktionale Anbieter und cookielose Reichweitenmessung sind ein Hinweis). Blockierend sind ebenso Tracker nach \xABAblehnen\xBB, ein Banner ohne Ablehnen-M\xF6glichkeit und ein Banner ohne Auswahl. Google Consent Mode v2 wird als technisches Signal gelesen.",
|
|
477
508
|
note: "Regelwerk von CPCG, technische Beobachtung, keine Rechtsberatung und keine Aussage, was rechtlich verlangt ist. Verbindliche Einstufung durch Datenschutzbeauftragte oder Anwalt."
|
|
478
509
|
},
|
|
510
|
+
/**
|
|
511
|
+
* EU-Besuch einer Schweizer Seite im Standard `CH,EU`, solange der EU-Bezug noch nicht gemessen ist: wie EU. Nach dem Scan ersetzt
|
|
512
|
+
* `settleEuNexus` den Code durch `EU` (EU-Bezug belegt) oder `EU-OHNE-BEZUG`.
|
|
513
|
+
*/
|
|
514
|
+
"EU-BEZUG": {
|
|
515
|
+
code: "EU-BEZUG",
|
|
516
|
+
label: "Europ\xE4ische Union (soweit EU-Bezug belegt)",
|
|
517
|
+
frameworks: ["GDPR/DSGVO", "ePrivacy-Richtlinie", "TTDSG (DE)", "Google Consent Mode v2 (EEA)"],
|
|
518
|
+
consentModel: "opt-in",
|
|
519
|
+
priorOptInRequired: true,
|
|
520
|
+
consentModeV2: "required",
|
|
521
|
+
summary: "Wie EU (opt-in), solange der EU-Bezug der Seite nicht gemessen ist.",
|
|
522
|
+
note: "Zwischenzustand w\xE4hrend des Laufs; im Bericht steht danach EU oder EU (EU-Bezug nicht belegt).",
|
|
523
|
+
display: "EU (opt-in)"
|
|
524
|
+
},
|
|
525
|
+
/**
|
|
526
|
+
* EU-Besuch einer Schweizer Seite, deren Startseite keine ausreichenden Merkmale für eine Ausrichtung an die EU zeigt (Euro-Preise,
|
|
527
|
+
* Lieferung in EU-Länder, Länderversion, Domain, Telefonvorwahl, ausdrückliche Zielgruppe; EDPB-Leitlinien 3/2018 zu Art. 3 Abs. 2 DSGVO).
|
|
528
|
+
* Befunde nach dem EU-Modell sind dann ein Hinweis, nie blockierend: ob das EU-Modell gilt, hängt davon ab, ob sich die Seite an Kundschaft
|
|
529
|
+
* in der EU richtet. Ausdrücklich `--jurisdiction EU` (ohne CH) bewertet den EU-Besuch immer streng.
|
|
530
|
+
*/
|
|
531
|
+
"EU-OHNE-BEZUG": {
|
|
532
|
+
code: "EU-OHNE-BEZUG",
|
|
533
|
+
label: "Europ\xE4ische Union \u2014 EU-Bezug nicht belegt",
|
|
534
|
+
frameworks: ["GDPR/DSGVO", "ePrivacy-Richtlinie"],
|
|
535
|
+
consentModel: "notice-only",
|
|
536
|
+
priorOptInRequired: false,
|
|
537
|
+
consentModeV2: "recommended",
|
|
538
|
+
summary: "Der Besuch aus der EU wird beobachtet und dokumentiert, aber nicht blockierend bewertet: Auf der Startseite fand CPCG keine ausreichenden Merkmale f\xFCr eine Ausrichtung an Kundinnen und Kunden in der EU. Nach dem EU-Modell (opt-in) w\xE4ren Tracker vor der Einwilligung Befunde; ob dieses Modell f\xFCr die Seite gilt, h\xE4ngt davon ab, ob sie sich an Kundschaft in der EU richtet.",
|
|
539
|
+
note: "Regelwerk von CPCG, technische Beobachtung, keine Rechtsberatung. Ausgewertet ist nur die Startseite; \xABnicht belegt\xBB heisst nicht \xABkein EU-Bezug\xBB. Wer EU-Kundschaft hat, setzt --jurisdiction EU (der EU-Besuch gilt dann immer streng).",
|
|
540
|
+
display: "EU (EU-Bezug nicht belegt: Hinweis)"
|
|
541
|
+
},
|
|
479
542
|
UK: {
|
|
480
543
|
code: "UK",
|
|
481
544
|
label: "Vereinigtes K\xF6nigreich",
|
|
@@ -531,14 +594,18 @@ function verdictFor(profile, ruleId, trackerCategory, embed = false) {
|
|
|
531
594
|
const rule = ruleId === "tracking-without-consent" ? "pre-consent-tracking" : ruleId ?? "pre-consent-tracking";
|
|
532
595
|
if (profile.consentModel === "notice-only") return "hint";
|
|
533
596
|
if (rule === "gpc-ignored") return profile.code === "US-CA" && trackerCategory === "marketing" ? "block" : "hint";
|
|
597
|
+
if (rule === "refusal-notice-unchecked") return "hint";
|
|
598
|
+
if (rule === "refusal-notice-missing") return profile.code === "CH" || profile.code === "CH-SENSIBEL" ? "block" : "hint";
|
|
534
599
|
if (rule === "reject-less-prominent" || rule === "preticked-choices") return "hint";
|
|
535
600
|
if (rule === "reject-second-level") return profile.consentModel === "opt-in" ? "block" : "hint";
|
|
536
601
|
if (embed && trackerCategory === "functional" && (rule === "pre-consent-tracking" || rule === "pre-consent-embed")) {
|
|
537
602
|
return profile.consentModel === "opt-in" ? "block" : "hint";
|
|
538
603
|
}
|
|
539
|
-
if (rule === "tracking-after-deny"
|
|
604
|
+
if (rule === "tracking-after-deny") return "block";
|
|
605
|
+
if (rule === "pre-consent-embed" && profile.consentModel === "objection") return "hint";
|
|
606
|
+
if (rule === "no-reject-option" || rule === "no-consent-choice") return profile.consentModel === "objection" ? "hint" : "block";
|
|
540
607
|
if (rule === "pre-consent-tracking") {
|
|
541
|
-
if (profile.consentModel === "opt-in"
|
|
608
|
+
if (profile.consentModel === "opt-in") {
|
|
542
609
|
return trackerCategory === "functional" || trackerCategory === "cookieless-analytics" ? "hint" : "block";
|
|
543
610
|
}
|
|
544
611
|
return "hint";
|
|
@@ -546,14 +613,28 @@ function verdictFor(profile, ruleId, trackerCategory, embed = false) {
|
|
|
546
613
|
return "block";
|
|
547
614
|
}
|
|
548
615
|
function jurisdictionModelLabel(profiles) {
|
|
549
|
-
return profiles.map((p) => `${p.code} (${CONSENT_MODEL_LABEL[p.consentModel]})`).join(" + ");
|
|
616
|
+
return profiles.map((p) => p.display ?? `${p.code} (${CONSENT_MODEL_LABEL[p.consentModel]})`).join(" + ");
|
|
550
617
|
}
|
|
551
618
|
function hintReasonFor(profiles, ruleId, trackerCategory, embed = false) {
|
|
552
619
|
const label = jurisdictionModelLabel(profiles);
|
|
620
|
+
if (profiles.every((p) => p.code === "EU-OHNE-BEZUG")) {
|
|
621
|
+
return `Nach ${label} Hinweis, nicht blockierend: Nach dem EU-Modell (opt-in) w\xE4re das ein Befund. Auf der Startseite fand CPCG aber keine ausreichenden Merkmale f\xFCr eine Ausrichtung an Kundinnen und Kunden in der EU; ob das EU-Modell f\xFCr die Seite gilt, h\xE4ngt davon ab, ob sie sich an Kundschaft in der EU richtet. Technische Einordnung, keine Rechtsberatung.`;
|
|
622
|
+
}
|
|
553
623
|
if (profiles.every((p) => p.consentModel === "notice-only")) {
|
|
554
624
|
return `Nach ${label} nicht bewertet: neutral dokumentiert, l\xE4nderspezifische Pr\xFCfung n\xF6tig.`;
|
|
555
625
|
}
|
|
556
626
|
const rule = ruleId ?? "pre-consent-tracking";
|
|
627
|
+
const ch = profiles.some((p) => p.consentModel === "objection");
|
|
628
|
+
if (rule === "refusal-notice-unchecked") {
|
|
629
|
+
return `Nach ${label} Hinweis, nicht blockierend: ob die Seite auf anderem Weg auf die Ablehnm\xF6glichkeit hinweist (Datenschutzerkl\xE4rung), konnte CPCG nicht pr\xFCfen. Bitte manuell pr\xFCfen.`;
|
|
630
|
+
}
|
|
631
|
+
if (rule === "refusal-notice-missing") {
|
|
632
|
+
return `Nach ${label} Hinweis, nicht blockierend: der Hinweis auf die Ablehnm\xF6glichkeit (Art. 45c lit. b FMG) gilt als Befund nur in den Schweizer Profilen.`;
|
|
633
|
+
}
|
|
634
|
+
if (ch && (rule === "pre-consent-tracking" || rule === "tracking-without-consent" || rule === "no-reject-option" || rule === "no-consent-choice")) {
|
|
635
|
+
const what = rule === "no-reject-option" ? "Im Banner gibt es kein \xABAblehnen\xBB." : rule === "no-consent-choice" ? "Der Banner bietet keine Auswahl." : trackerCategory === "functional" ? "Ein funktionaler Anbieter l\xE4dt vor der Entscheidung." : "Tracker laden vor der Entscheidung.";
|
|
636
|
+
return `Nach ${label} Hinweis, nicht blockierend: ${what} Art. 45c lit. b FMG verlangt Information und einen Hinweis auf die Ablehnm\xF6glichkeit, keine Einwilligung vorab und keinen Knopf im Banner; blockierend ist, wenn nirgends auf die Ablehnm\xF6glichkeit hingewiesen wird (Banner oder Datenschutzerkl\xE4rung). Der ED\xD6B erwartet den Widerspruch m\xF6glichst vor der Aktivierung (Leitfaden Cookies V1.1, Ziff. 3.9; Merkblatt 31.03.2026): Aufsichtsposition, keine Rechtsnorm.`;
|
|
637
|
+
}
|
|
557
638
|
if (rule === "gpc-ignored") {
|
|
558
639
|
return `Nach ${label} Hinweis, nicht blockierend: Tracker trotz Global Privacy Control (GPC). CPCG wertet GPC nur im Modell US-CA (opt-out) und nur f\xFCr Werbe-Tracker als blockierend; in allen anderen Modellen ist es ein Hinweis.`;
|
|
559
640
|
}
|
|
@@ -570,7 +651,7 @@ function hintReasonFor(profiles, ruleId, trackerCategory, embed = false) {
|
|
|
570
651
|
return `Nach ${label} Hinweis, nicht blockierend: ohne gespeicherte Entscheidung beobachtet (Speicher gel\xF6scht), wie vor der Einwilligung.`;
|
|
571
652
|
}
|
|
572
653
|
if (embed && trackerCategory === "functional" && (rule === "pre-consent-tracking" || rule === "pre-consent-embed")) {
|
|
573
|
-
return `Nach ${label} Hinweis: Eingebetteter Inhalt (z. B. Karte) l\xE4dt vor der Wahl. Im Modell opt-in (EU) w\xE4re das ein Befund; hier gilt
|
|
654
|
+
return `Nach ${label} Hinweis: Eingebetteter Inhalt (z. B. Karte) l\xE4dt vor der Wahl. Im Modell opt-in (EU) w\xE4re das ein Befund; hier gilt Information und Widerspruch bzw. kein Einwilligungszwang. Technische Einordnung, keine Rechtsberatung.`;
|
|
574
655
|
}
|
|
575
656
|
if (rule === "pre-consent-tracking" && trackerCategory === "functional") {
|
|
576
657
|
return `Nach ${label} Hinweis: vor der Einwilligung beobachtet; CPCG stuft den Anbieter als funktional ein (kein Werbe- oder Analyse-Tracker).`;
|
|
@@ -590,12 +671,12 @@ function severityForPreConsentLeak(profile) {
|
|
|
590
671
|
if (profile.consentModel === "notice-only") {
|
|
591
672
|
return { severity: "P2", framing: "Modell notice-only: kein Einwilligungsmodell angewendet, Befunde werden neutral dokumentiert und sind nie blockierend." };
|
|
592
673
|
}
|
|
593
|
-
const blocksPreConsent = profile.consentModel === "opt-in"
|
|
674
|
+
const blocksPreConsent = profile.consentModel === "opt-in";
|
|
594
675
|
const severity = blocksPreConsent ? profile.consentModeV2 === "required" ? "P0" : "P1" : "P2";
|
|
595
676
|
if (profile.consentModel === "objection") {
|
|
596
677
|
return {
|
|
597
678
|
severity,
|
|
598
|
-
framing: "Modell \
|
|
679
|
+
framing: "Modell \xABInformation und Widerspruch\xBB (Art. 45c lit. b FMG): Tracker vor einer Entscheidung sind nach der CPCG-Regel ein Hinweis. Blockierend sind Tracker nach \xABAblehnen\xBB und Tracker ohne jeden Hinweis auf die Ablehnm\xF6glichkeit (weder im Banner noch in der Datenschutzerkl\xE4rung). Der ED\xD6B erwartet den Widerspruch m\xF6glichst vor der Aktivierung (Leitfaden Cookies V1.1, Ziff. 3.9): Aufsichtsposition, keine Rechtsnorm."
|
|
599
680
|
};
|
|
600
681
|
}
|
|
601
682
|
if (profile.consentModel === "opt-in") {
|
|
@@ -1539,7 +1620,9 @@ var BANNER_OBSERVATION_RULES = /* @__PURE__ */ new Set([
|
|
|
1539
1620
|
"no-consent-choice",
|
|
1540
1621
|
"reject-second-level",
|
|
1541
1622
|
"reject-less-prominent",
|
|
1542
|
-
"preticked-choices"
|
|
1623
|
+
"preticked-choices",
|
|
1624
|
+
"refusal-notice-missing",
|
|
1625
|
+
"refusal-notice-unchecked"
|
|
1543
1626
|
]);
|
|
1544
1627
|
var isBannerObservation = (ruleId) => BANNER_OBSERVATION_RULES.has(ruleId ?? "");
|
|
1545
1628
|
|
|
@@ -3735,6 +3818,513 @@ function detectStack(source) {
|
|
|
3735
3818
|
};
|
|
3736
3819
|
}
|
|
3737
3820
|
|
|
3821
|
+
// src/core/scanner/euReference.ts
|
|
3822
|
+
var EU_KIND_LABEL = {
|
|
3823
|
+
currency: "Preise in Euro",
|
|
3824
|
+
shipping: "Lieferung in die EU",
|
|
3825
|
+
"country-selector": "Auswahl von EU-L\xE4ndern",
|
|
3826
|
+
hreflang: "L\xE4nderversion f\xFCr ein EU-Land",
|
|
3827
|
+
domain: "Domain eines EU-Landes",
|
|
3828
|
+
phone: "Telefonnummer mit EU-Vorwahl",
|
|
3829
|
+
audience: "Ausdr\xFCckliche Zielgruppe in der EU"
|
|
3830
|
+
};
|
|
3831
|
+
var MAX_INDICATORS = 12;
|
|
3832
|
+
var EVIDENCE_MAX = 140;
|
|
3833
|
+
var EU_COUNTRY_CODES = /* @__PURE__ */ new Set([
|
|
3834
|
+
"AT",
|
|
3835
|
+
"BE",
|
|
3836
|
+
"BG",
|
|
3837
|
+
"HR",
|
|
3838
|
+
"CY",
|
|
3839
|
+
"CZ",
|
|
3840
|
+
"DK",
|
|
3841
|
+
"EE",
|
|
3842
|
+
"FI",
|
|
3843
|
+
"FR",
|
|
3844
|
+
"DE",
|
|
3845
|
+
"GR",
|
|
3846
|
+
"HU",
|
|
3847
|
+
"IE",
|
|
3848
|
+
"IT",
|
|
3849
|
+
"LV",
|
|
3850
|
+
"LT",
|
|
3851
|
+
"LU",
|
|
3852
|
+
"MT",
|
|
3853
|
+
"NL",
|
|
3854
|
+
"PL",
|
|
3855
|
+
"PT",
|
|
3856
|
+
"RO",
|
|
3857
|
+
"SK",
|
|
3858
|
+
"SI",
|
|
3859
|
+
"ES",
|
|
3860
|
+
"SE"
|
|
3861
|
+
]);
|
|
3862
|
+
var EU_TLDS = new Set([...EU_COUNTRY_CODES].map((c) => c.toLowerCase()).concat(["eu"]));
|
|
3863
|
+
var EU_COUNTRY_NAMES = [
|
|
3864
|
+
"Deutschland",
|
|
3865
|
+
"Germany",
|
|
3866
|
+
"Allemagne",
|
|
3867
|
+
"Germania",
|
|
3868
|
+
"\xD6sterreich",
|
|
3869
|
+
"Oesterreich",
|
|
3870
|
+
"Austria",
|
|
3871
|
+
"Autriche",
|
|
3872
|
+
"Frankreich",
|
|
3873
|
+
"France",
|
|
3874
|
+
"Italien",
|
|
3875
|
+
"Italy",
|
|
3876
|
+
"Italie",
|
|
3877
|
+
"Italia",
|
|
3878
|
+
"Spanien",
|
|
3879
|
+
"Spain",
|
|
3880
|
+
"Espagne",
|
|
3881
|
+
"Spagna",
|
|
3882
|
+
"Espa\xF1a",
|
|
3883
|
+
"Niederlande",
|
|
3884
|
+
"Netherlands",
|
|
3885
|
+
"Pays-Bas",
|
|
3886
|
+
"Paesi Bassi",
|
|
3887
|
+
"Belgien",
|
|
3888
|
+
"Belgium",
|
|
3889
|
+
"Belgique",
|
|
3890
|
+
"Belgio",
|
|
3891
|
+
"Luxemburg",
|
|
3892
|
+
"Luxembourg",
|
|
3893
|
+
"Lussemburgo",
|
|
3894
|
+
"Polen",
|
|
3895
|
+
"Poland",
|
|
3896
|
+
"Pologne",
|
|
3897
|
+
"Polonia",
|
|
3898
|
+
"Portugal",
|
|
3899
|
+
"Portogallo",
|
|
3900
|
+
"Irland",
|
|
3901
|
+
"Ireland",
|
|
3902
|
+
"Irlande",
|
|
3903
|
+
"Irlanda",
|
|
3904
|
+
"D\xE4nemark",
|
|
3905
|
+
"Denmark",
|
|
3906
|
+
"Danemark",
|
|
3907
|
+
"Danimarca",
|
|
3908
|
+
"Schweden",
|
|
3909
|
+
"Sweden",
|
|
3910
|
+
"Su\xE8de",
|
|
3911
|
+
"Svezia",
|
|
3912
|
+
"Finnland",
|
|
3913
|
+
"Finland",
|
|
3914
|
+
"Finlande",
|
|
3915
|
+
"Finlandia",
|
|
3916
|
+
"Tschechien",
|
|
3917
|
+
"Czechia",
|
|
3918
|
+
"Czech Republic",
|
|
3919
|
+
"Griechenland",
|
|
3920
|
+
"Greece",
|
|
3921
|
+
"Gr\xE8ce",
|
|
3922
|
+
"Grecia",
|
|
3923
|
+
"Ungarn",
|
|
3924
|
+
"Hungary",
|
|
3925
|
+
"Hongrie",
|
|
3926
|
+
"Ungheria",
|
|
3927
|
+
"Rum\xE4nien",
|
|
3928
|
+
"Romania",
|
|
3929
|
+
"Roumanie",
|
|
3930
|
+
"Bulgarien",
|
|
3931
|
+
"Bulgaria",
|
|
3932
|
+
"Bulgarie",
|
|
3933
|
+
"Kroatien",
|
|
3934
|
+
"Croatia",
|
|
3935
|
+
"Croatie",
|
|
3936
|
+
"Croazia",
|
|
3937
|
+
"Slowakei",
|
|
3938
|
+
"Slovakia",
|
|
3939
|
+
"Slovaquie",
|
|
3940
|
+
"Slowenien",
|
|
3941
|
+
"Slovenia",
|
|
3942
|
+
"Slov\xE9nie",
|
|
3943
|
+
"Litauen",
|
|
3944
|
+
"Lithuania",
|
|
3945
|
+
"Lituanie",
|
|
3946
|
+
"Lettland",
|
|
3947
|
+
"Latvia",
|
|
3948
|
+
"Lettonie",
|
|
3949
|
+
"Estland",
|
|
3950
|
+
"Estonia",
|
|
3951
|
+
"Estonie",
|
|
3952
|
+
"Malta",
|
|
3953
|
+
"Zypern",
|
|
3954
|
+
"Cyprus",
|
|
3955
|
+
"Chypre"
|
|
3956
|
+
];
|
|
3957
|
+
var COUNTRY_NAME_SET = new Set(EU_COUNTRY_NAMES.map((n) => n.toLowerCase()));
|
|
3958
|
+
var COUNTRY_ALTERNATION = EU_COUNTRY_NAMES.map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
|
|
3959
|
+
var EU_DIAL_CODES = "30|31|32|33|34|36|39|40|43|45|46|48|49|351|352|353|356|357|358|359|370|371|372|385|386|420|421";
|
|
3960
|
+
var decodeEntities = (s) => s.replace(/ | /gi, " ").replace(/€|€|€/gi, "\u20AC").replace(/&/gi, "&").replace(/"/gi, '"').replace(/'|'/gi, "'").replace(/ä/gi, "\xE4").replace(/ö/gi, "\xF6").replace(/ü/gi, "\xFC").replace(/Ö/g, "\xD6");
|
|
3961
|
+
function visibleText(html) {
|
|
3962
|
+
return decodeEntities(
|
|
3963
|
+
html.replace(/<!--[\s\S]*?-->/g, " ").replace(/<(script|style|noscript|template)\b[\s\S]*?<\/\1>/gi, " ").replace(/<[^>]+>/g, " ")
|
|
3964
|
+
).replace(/\s+/g, " ").trim();
|
|
3965
|
+
}
|
|
3966
|
+
function snippet(text, index, length) {
|
|
3967
|
+
const pad = Math.max(0, Math.floor((EVIDENCE_MAX - length) / 2));
|
|
3968
|
+
let start = Math.max(0, index - pad);
|
|
3969
|
+
let end = Math.min(text.length, index + length + pad);
|
|
3970
|
+
if (start > 0) {
|
|
3971
|
+
const sp = text.indexOf(" ", start);
|
|
3972
|
+
if (sp !== -1 && sp < index) start = sp + 1;
|
|
3973
|
+
}
|
|
3974
|
+
if (end < text.length) {
|
|
3975
|
+
const sp = text.lastIndexOf(" ", end);
|
|
3976
|
+
if (sp > index + length) end = sp;
|
|
3977
|
+
}
|
|
3978
|
+
const out = text.slice(start, end).trim();
|
|
3979
|
+
return `${start > 0 ? "\u2026" : ""}${out}${end < text.length ? "\u2026" : ""}`;
|
|
3980
|
+
}
|
|
3981
|
+
function fromJsonLd(html) {
|
|
3982
|
+
const out = [];
|
|
3983
|
+
for (const m of html.matchAll(/<script\b[^>]*type=["']application\/ld\+json["'][^>]*>([\s\S]*?)<\/script>/gi)) {
|
|
3984
|
+
let data;
|
|
3985
|
+
try {
|
|
3986
|
+
data = JSON.parse(m[1].trim());
|
|
3987
|
+
} catch {
|
|
3988
|
+
continue;
|
|
3989
|
+
}
|
|
3990
|
+
const walk = (node, depth) => {
|
|
3991
|
+
if (depth > 12 || node === null || typeof node !== "object") return;
|
|
3992
|
+
if (Array.isArray(node)) {
|
|
3993
|
+
for (const x of node) walk(x, depth + 1);
|
|
3994
|
+
return;
|
|
3995
|
+
}
|
|
3996
|
+
const o = node;
|
|
3997
|
+
if (typeof o.priceCurrency === "string" && o.priceCurrency.toUpperCase() === "EUR") {
|
|
3998
|
+
out.push({ kind: "currency", strength: "strong", evidence: 'Strukturierte Preisangabe (JSON-LD): priceCurrency "EUR"' });
|
|
3999
|
+
}
|
|
4000
|
+
for (const key of ["shippingDestination", "eligibleRegion", "areaServed"]) {
|
|
4001
|
+
const v = o[key];
|
|
4002
|
+
const list = Array.isArray(v) ? v : v === void 0 ? [] : [v];
|
|
4003
|
+
for (const entry of list) {
|
|
4004
|
+
const code = typeof entry === "string" ? entry : entry && typeof entry === "object" ? entry.addressCountry ?? entry.name : void 0;
|
|
4005
|
+
if (typeof code !== "string") continue;
|
|
4006
|
+
const hit = EU_COUNTRY_CODES.has(code.toUpperCase()) || COUNTRY_NAME_SET.has(code.toLowerCase());
|
|
4007
|
+
if (hit) {
|
|
4008
|
+
out.push({
|
|
4009
|
+
kind: key === "areaServed" ? "audience" : "shipping",
|
|
4010
|
+
strength: "strong",
|
|
4011
|
+
evidence: `Strukturierte Angabe (JSON-LD): ${key} ${code}`
|
|
4012
|
+
});
|
|
4013
|
+
}
|
|
4014
|
+
}
|
|
4015
|
+
}
|
|
4016
|
+
for (const x of Object.values(o)) walk(x, depth + 1);
|
|
4017
|
+
};
|
|
4018
|
+
walk(data, 0);
|
|
4019
|
+
}
|
|
4020
|
+
return out;
|
|
4021
|
+
}
|
|
4022
|
+
function fromMarkup(html) {
|
|
4023
|
+
const out = [];
|
|
4024
|
+
const attrEur = /<(?:meta|span|link|data)\b[^>]*(?:itemprop=["']priceCurrency["']|(?:property|name)=["'](?:product:price:currency|og:price:currency)["'])[^>]*>/gi;
|
|
4025
|
+
for (const m of html.matchAll(attrEur)) {
|
|
4026
|
+
if (/(?:content|value)=["']EUR["']/i.test(m[0]) || />\s*EUR\s*</i.test(m[0])) {
|
|
4027
|
+
out.push({ kind: "currency", strength: "strong", evidence: 'Preisangabe im Seitenkopf: W\xE4hrung "EUR"' });
|
|
4028
|
+
break;
|
|
4029
|
+
}
|
|
4030
|
+
}
|
|
4031
|
+
const codes = /* @__PURE__ */ new Set();
|
|
4032
|
+
for (const m of html.matchAll(/<link\b[^>]*>/gi)) {
|
|
4033
|
+
const tag = m[0];
|
|
4034
|
+
if (!/rel=["']alternate["']/i.test(tag)) continue;
|
|
4035
|
+
const h = /hreflang=["']([a-z]{2,3})[-_]([A-Za-z]{2})["']/i.exec(tag);
|
|
4036
|
+
if (h && EU_COUNTRY_CODES.has(h[2].toUpperCase())) codes.add(`${h[1].toLowerCase()}-${h[2].toUpperCase()}`);
|
|
4037
|
+
}
|
|
4038
|
+
if (codes.size > 0) out.push({ kind: "hreflang", strength: "strong", evidence: `L\xE4nderversionen (hreflang): ${[...codes].slice(0, 8).join(", ")}` });
|
|
4039
|
+
for (const m of html.matchAll(/<select\b([^>]*)>([\s\S]*?)<\/select>/gi)) {
|
|
4040
|
+
const attrs = m[1];
|
|
4041
|
+
const options = [...m[2].matchAll(/<option\b([^>]*)>([\s\S]*?)<\/option>/gi)].map((o) => ({
|
|
4042
|
+
value: /value=["']([^"']*)["']/i.exec(o[1])?.[1] ?? "",
|
|
4043
|
+
text: decodeEntities(o[2].replace(/<[^>]+>/g, " ")).replace(/\s+/g, " ").trim()
|
|
4044
|
+
}));
|
|
4045
|
+
if (/country|land\b|lieferland|pays|paese|shipping|versand/i.test(attrs)) {
|
|
4046
|
+
const eu = options.filter((o) => COUNTRY_NAME_SET.has(o.text.toLowerCase()) || EU_COUNTRY_CODES.has(o.value.toUpperCase()));
|
|
4047
|
+
if (eu.length >= 3) {
|
|
4048
|
+
out.push({ kind: "country-selector", strength: "strong", evidence: `Auswahlliste mit ${eu.length} EU-L\xE4ndern, darunter ${eu.slice(0, 3).map((o) => o.text || o.value).join(", ")}` });
|
|
4049
|
+
}
|
|
4050
|
+
}
|
|
4051
|
+
if (/currency|w(?:ä|ae)hrung|devise|valuta/i.test(attrs) && options.some((o) => /^EUR$|€/.test(o.value.toUpperCase()) || /^EUR\b|€|\bEuro\b/i.test(o.text))) {
|
|
4052
|
+
out.push({ kind: "currency", strength: "strong", evidence: "W\xE4hrungswahl enth\xE4lt Euro" });
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
4055
|
+
const tel = new RegExp(`href=["']tel:(?:\\+|00)(${EU_DIAL_CODES})[\\d\\s().-]{5,}["']`, "i").exec(html);
|
|
4056
|
+
if (tel) out.push({ kind: "phone", strength: "weak", evidence: `Telefonlink mit Vorwahl +${tel[1]}` });
|
|
4057
|
+
return out;
|
|
4058
|
+
}
|
|
4059
|
+
function fromText(text) {
|
|
4060
|
+
const out = [];
|
|
4061
|
+
const price = /(?:€|\bEUR\b)\s?\d[\d'’.,]*|\d[\d'’.,]*\s?(?:€|\bEUR\b|\bEuro\b)/gi;
|
|
4062
|
+
const prices = [...text.matchAll(price)];
|
|
4063
|
+
if (prices.length > 0) {
|
|
4064
|
+
const first = prices[0];
|
|
4065
|
+
out.push({
|
|
4066
|
+
kind: "currency",
|
|
4067
|
+
strength: prices.length >= 2 ? "strong" : "weak",
|
|
4068
|
+
evidence: `${prices.length === 1 ? "Preis in Euro" : `${prices.length} Preisangaben in Euro`}: ${snippet(text, first.index ?? 0, first[0].length)}`
|
|
4069
|
+
});
|
|
4070
|
+
}
|
|
4071
|
+
const ship = new RegExp(
|
|
4072
|
+
`(?:versand|lieferung|liefern|lieferbar|versenden|ship(?:s|ping)?|deliver(?:y|ies)?|livraison|spedizione)\\s+(?:in|nach|to|vers|en|a)\\s+(?:die\\s+|den\\s+|ganz\\s+|the\\s+|all\\s+)?(?:EU|Europa|Europe|(?:${COUNTRY_ALTERNATION}))\\b|\\bEU-Versand\\b|\\bVersand\\s+(?:innerhalb|in)\\s+(?:der\\s+)?EU\\b`,
|
|
4073
|
+
"i"
|
|
4074
|
+
).exec(text);
|
|
4075
|
+
if (ship) out.push({ kind: "shipping", strength: "strong", evidence: snippet(text, ship.index, ship[0].length) });
|
|
4076
|
+
const aud = /\bDACH(?:-Raum|-Region)?\b/.exec(text) ?? new RegExp(
|
|
4077
|
+
`(?:Kund(?:en|innen)|Kundschaft|Mandanten|Patienten|G\xE4ste|customers|clients)\\s+(?:aus|in|from|in\\s+the)\\s+(?:ganz\\s+)?(?:der\\s+EU|(?:${COUNTRY_ALTERNATION}))\\b`,
|
|
4078
|
+
"i"
|
|
4079
|
+
).exec(text);
|
|
4080
|
+
if (aud) out.push({ kind: "audience", strength: "strong", evidence: snippet(text, aud.index, aud[0].length) });
|
|
4081
|
+
const ph = new RegExp(`(?:Tel(?:efon)?|Phone|Hotline|Fon|Mobil)\\.?:?\\s*\\(?(?:\\+|00)(${EU_DIAL_CODES})[\\d\\s().-]{6,}`, "i").exec(text);
|
|
4082
|
+
if (ph) out.push({ kind: "phone", strength: "weak", evidence: snippet(text, ph.index, ph[0].length) });
|
|
4083
|
+
return out;
|
|
4084
|
+
}
|
|
4085
|
+
function fromDomain(pageUrl) {
|
|
4086
|
+
let host;
|
|
4087
|
+
try {
|
|
4088
|
+
host = new URL(pageUrl).hostname.toLowerCase();
|
|
4089
|
+
} catch {
|
|
4090
|
+
return [];
|
|
4091
|
+
}
|
|
4092
|
+
const tld = host.split(".").pop() ?? "";
|
|
4093
|
+
return EU_TLDS.has(tld) ? [{ kind: "domain", strength: "weak", evidence: `Adresse der Seite: ${host}` }] : [];
|
|
4094
|
+
}
|
|
4095
|
+
function detectEuReference(sources, pageUrl) {
|
|
4096
|
+
const found = [...fromDomain(pageUrl)];
|
|
4097
|
+
for (const html of sources) {
|
|
4098
|
+
if (!html) continue;
|
|
4099
|
+
found.push(...fromJsonLd(html), ...fromMarkup(html), ...fromText(visibleText(html)));
|
|
4100
|
+
}
|
|
4101
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4102
|
+
const unique = [];
|
|
4103
|
+
for (const f of found) {
|
|
4104
|
+
const key = `${f.kind}|${f.evidence}`;
|
|
4105
|
+
if (seen.has(key)) continue;
|
|
4106
|
+
seen.add(key);
|
|
4107
|
+
unique.push({ ...f, label: EU_KIND_LABEL[f.kind] });
|
|
4108
|
+
}
|
|
4109
|
+
const strongKinds = new Set(unique.filter((i) => i.strength === "strong").map((i) => i.kind));
|
|
4110
|
+
const kept = unique.filter((i) => i.strength === "strong" || !strongKinds.has(i.kind));
|
|
4111
|
+
kept.sort((a, b) => a.strength === b.strength ? 0 : a.strength === "strong" ? -1 : 1);
|
|
4112
|
+
const strong = kept.some((i) => i.strength === "strong");
|
|
4113
|
+
const weakKinds = new Set(kept.filter((i) => i.strength === "weak").map((i) => i.kind));
|
|
4114
|
+
const assessment = strong || weakKinds.size >= 2 ? "indicated" : weakKinds.size === 1 ? "weak" : "none";
|
|
4115
|
+
const truncated = kept.length > MAX_INDICATORS;
|
|
4116
|
+
return { assessment, indicators: kept.slice(0, MAX_INDICATORS), ...truncated ? { truncated: true } : {} };
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4119
|
+
// src/core/scanner/privacyNotice.ts
|
|
4120
|
+
var PAGE_LINKS_FUNCTION = `() => {
|
|
4121
|
+
const out = [];
|
|
4122
|
+
for (const a of document.querySelectorAll('a[href]')) {
|
|
4123
|
+
const href = a.href;
|
|
4124
|
+
if (!href || !/^https?:/i.test(href)) continue;
|
|
4125
|
+
const text = ((a.innerText || a.textContent || a.getAttribute('aria-label') || a.title || '') + '').replace(/\\s+/g, ' ').trim().slice(0, 90);
|
|
4126
|
+
out.push({ href, text, footer: !!a.closest('footer, [class*="footer" i], [id*="footer" i]') });
|
|
4127
|
+
if (out.length >= 1500) break;
|
|
4128
|
+
}
|
|
4129
|
+
return out;
|
|
4130
|
+
}`;
|
|
4131
|
+
var PAGE_TEXT_FUNCTION = `() => {
|
|
4132
|
+
const live = document.body;
|
|
4133
|
+
if (!live) return '';
|
|
4134
|
+
const drop = new Set();
|
|
4135
|
+
const KNOWN = '#onetrust-consent-sdk, #CybotCookiebotDialog, #usercentrics-root, #usercentrics-cmp-ui, #cmplz-cookiebanner-container, .cmplz-cookiebanner, #BorlabsCookieBox, .cc-window, #cookie-notice, #cookie-law-info-bar, .cky-consent-container, #didomi-host, .iubenda-cs-container, #klaro, .klaro, #cookiescript_injected, #CookieBoxSaveButton, [id^="CybotCookiebot"]';
|
|
4136
|
+
for (const el of live.querySelectorAll(KNOWN + ', [role="dialog"], [aria-modal="true"]')) drop.add(el);
|
|
4137
|
+
const NAME = /cookie|consent|cmp|gdpr|usercentrics|onetrust|cybot|borlabs|klaro|didomi|iubenda|cmplz|tarteaucitron|axeptio/i;
|
|
4138
|
+
for (const el of live.querySelectorAll('[id], [class]')) {
|
|
4139
|
+
if (drop.has(el)) continue;
|
|
4140
|
+
const name = (el.id || '') + ' ' + (typeof el.className === 'string' ? el.className : '');
|
|
4141
|
+
if (!NAME.test(name)) continue;
|
|
4142
|
+
const pos = getComputedStyle(el).position;
|
|
4143
|
+
if (pos === 'fixed' || pos === 'sticky') drop.add(el);
|
|
4144
|
+
}
|
|
4145
|
+
const root = live.cloneNode(true);
|
|
4146
|
+
// Entfernen am Klon: Elemente \xFCber ihre Reihenfolge im Original zuordnen
|
|
4147
|
+
const liveAll = live.querySelectorAll('*');
|
|
4148
|
+
const cloneAll = root.querySelectorAll('*');
|
|
4149
|
+
for (let i = 0; i < liveAll.length; i++) if (drop.has(liveAll[i]) && cloneAll[i]) cloneAll[i].remove();
|
|
4150
|
+
for (const el of root.querySelectorAll('script, style, noscript, template')) el.remove();
|
|
4151
|
+
return (root.textContent || '').replace(/\\s+/g, ' ').trim().slice(0, 600000);
|
|
4152
|
+
}`;
|
|
4153
|
+
var PRIVACY = /datenschutz|privacy|donn[ée]es\s+personnelles|protection\s+des\s+donn[ée]es|protezione\s+dei\s+dati|privacidad|informativa/i;
|
|
4154
|
+
var COOKIE_POLICY = /cookie[-\s]?(?:richtlinie|policy|hinweis|erkl[äa]rung|information|informationen)|cookies?\s*(?:&|und|and)\s*tracking|politique\s+(?:de\s+)?cookies|informativa\s+(?:sui|sull[ei])\s+cookie/i;
|
|
4155
|
+
var SETTINGS_OPENER = /einstellung|settings|pr[äa]ferenz|preferences|verwalten|manage|anpassen|param[èe]tres|impostazioni/i;
|
|
4156
|
+
var registrable = (host) => host.toLowerCase().replace(/^www\./, "").split(".").slice(-2).join(".");
|
|
4157
|
+
var FALLBACK = /impressum|rechtliche?s?(?:\s+hinweise?)?|legal\s+notice|mentions\s+l[ée]gales|note\s+legali|disclaimer/i;
|
|
4158
|
+
function pickPrivacyLinks(links, pageUrl) {
|
|
4159
|
+
let base;
|
|
4160
|
+
try {
|
|
4161
|
+
base = new URL(pageUrl);
|
|
4162
|
+
} catch {
|
|
4163
|
+
return { urls: [], pdfOnly: false, fallback: false };
|
|
4164
|
+
}
|
|
4165
|
+
const scored = [];
|
|
4166
|
+
for (const l of links) {
|
|
4167
|
+
let u;
|
|
4168
|
+
try {
|
|
4169
|
+
u = new URL(l.href);
|
|
4170
|
+
} catch {
|
|
4171
|
+
continue;
|
|
4172
|
+
}
|
|
4173
|
+
if (u.hash && u.pathname === base.pathname && u.hostname === base.hostname) continue;
|
|
4174
|
+
const label = l.text;
|
|
4175
|
+
let path13 = u.pathname + u.search;
|
|
4176
|
+
try {
|
|
4177
|
+
path13 = decodeURIComponent(path13);
|
|
4178
|
+
} catch {
|
|
4179
|
+
}
|
|
4180
|
+
path13 = path13.toLowerCase();
|
|
4181
|
+
const opener = SETTINGS_OPENER.test(label) && !/erkl[äa]rung|policy|statement|hinweis|informationen/i.test(label);
|
|
4182
|
+
const sameDomain = registrable(u.hostname) === registrable(base.hostname);
|
|
4183
|
+
const cookie = COOKIE_POLICY.test(label) || sameDomain && /cookie/.test(path13) && !SETTINGS_OPENER.test(label);
|
|
4184
|
+
const privacy = PRIVACY.test(label) || sameDomain && PRIVACY.test(path13);
|
|
4185
|
+
const fallback = sameDomain && !privacy && !cookie && (FALLBACK.test(label) || FALLBACK.test(path13));
|
|
4186
|
+
if (!cookie && !privacy && !fallback) continue;
|
|
4187
|
+
if (opener && !fallback) continue;
|
|
4188
|
+
let score = 0;
|
|
4189
|
+
if (PRIVACY.test(label)) score += 5;
|
|
4190
|
+
if (/erkl[äa]rung|policy|statement|notice|hinweise?/i.test(label)) score += 3;
|
|
4191
|
+
if (PRIVACY.test(path13)) score += 2;
|
|
4192
|
+
if (l.footer) score += 2;
|
|
4193
|
+
if (sameDomain) score += 3;
|
|
4194
|
+
if (label.length > 60) score -= 3;
|
|
4195
|
+
const pdf = /\.pdf(?:$|\?)/i.test(u.pathname + u.search);
|
|
4196
|
+
scored.push({ url: u.toString().replace(/#.*$/, ""), score, pdf, kind: fallback ? "fallback" : privacy && !cookie ? "privacy" : cookie && !privacy ? "cookie" : "privacy" });
|
|
4197
|
+
}
|
|
4198
|
+
scored.sort((a, b) => b.score - a.score);
|
|
4199
|
+
const urls = [];
|
|
4200
|
+
let pdfOnly = false;
|
|
4201
|
+
for (const kind of ["privacy", "cookie"]) {
|
|
4202
|
+
const best = scored.find((x) => x.kind === kind && !urls.includes(x.url) && !x.pdf);
|
|
4203
|
+
if (best) urls.push(best.url);
|
|
4204
|
+
else if (kind === "privacy" && scored.some((x) => x.kind === "privacy" && x.pdf)) pdfOnly = true;
|
|
4205
|
+
}
|
|
4206
|
+
if (urls.length === 0) {
|
|
4207
|
+
const fb = scored.find((x) => x.kind === "fallback" && !x.pdf);
|
|
4208
|
+
if (fb) return { urls: [fb.url], pdfOnly, fallback: true };
|
|
4209
|
+
}
|
|
4210
|
+
return { urls, pdfOnly, fallback: false };
|
|
4211
|
+
}
|
|
4212
|
+
function pickCookiePolicyLink(links, pageUrl, alreadyRead) {
|
|
4213
|
+
let base;
|
|
4214
|
+
try {
|
|
4215
|
+
base = new URL(pageUrl);
|
|
4216
|
+
} catch {
|
|
4217
|
+
return void 0;
|
|
4218
|
+
}
|
|
4219
|
+
const norm = (u) => u.replace(/#.*$/, "");
|
|
4220
|
+
const read = new Set(alreadyRead.map(norm));
|
|
4221
|
+
const found = links.filter((l) => COOKIE_POLICY.test(l.text) && !SETTINGS_OPENER.test(l.text.replace(COOKIE_POLICY, ""))).map((l) => {
|
|
4222
|
+
try {
|
|
4223
|
+
return { url: norm(new URL(l.href).toString()), same: registrable(new URL(l.href).hostname) === registrable(base.hostname) };
|
|
4224
|
+
} catch {
|
|
4225
|
+
return void 0;
|
|
4226
|
+
}
|
|
4227
|
+
}).filter((x) => x !== void 0 && !read.has(x.url) && !/\.pdf(?:$|\?)/i.test(x.url)).sort((a, b) => Number(b.same) - Number(a.same));
|
|
4228
|
+
return found[0]?.url;
|
|
4229
|
+
}
|
|
4230
|
+
var PROCESSING = /cookies?\b|tracking|tracker|web-?analyse|webanalyse|analytics|matomo|piwik|pixel|retargeting|remarketing|statistik|t[ée]moins|traceurs|suivi\b|tracciamento|google\s+(?:tag|ads)|facebook|meta\b/i;
|
|
4231
|
+
var REFUSAL_STRONG = new RegExp(
|
|
4232
|
+
[
|
|
4233
|
+
"ablehn",
|
|
4234
|
+
"opt-?\\s?out",
|
|
4235
|
+
"abw\xE4hl",
|
|
4236
|
+
"nicht\\s+(?:zustimmen|akzeptieren|w\xFCnschen|einverstanden)",
|
|
4237
|
+
"verweiger",
|
|
4238
|
+
"browser-?einstellung",
|
|
4239
|
+
"einstellungen\\s+(?:ihres|deines|des|in\\s+ihrem|in\\s+deinem|im)\\s+(?:web-?)?browsers?",
|
|
4240
|
+
"browser\\s+(?:so\\s+)?(?:ein)?stell",
|
|
4241
|
+
"cookies?\\s+(?:l\xF6schen|entfernen|verwalten|ablehnen|abweisen)",
|
|
4242
|
+
"(?:l\xF6schen|entfernen)\\s+sie\\s+(?:die\\s+)?cookies",
|
|
4243
|
+
"cookie-?einstellungen",
|
|
4244
|
+
"datenschutz-?einstellungen",
|
|
4245
|
+
"tracking-?schutz",
|
|
4246
|
+
"do\\s+not\\s+track",
|
|
4247
|
+
"keine\\s+cookies\\s+(?:zulassen|akzeptieren)",
|
|
4248
|
+
"refus",
|
|
4249
|
+
"param\xE8tres\\s+(?:de\\s+)?(?:votre|du)\\s+navigateur",
|
|
4250
|
+
"supprimer\\s+les\\s+cookies",
|
|
4251
|
+
"g\xE9rer\\s+(?:vos\\s+)?(?:pr\xE9f\xE9rences|cookies)",
|
|
4252
|
+
"rifiut",
|
|
4253
|
+
"impostazioni\\s+(?:del|del\\s+tuo|del\\s+suo)\\s+browser",
|
|
4254
|
+
"eliminare\\s+i\\s+cookie",
|
|
4255
|
+
"opt[- ]?out",
|
|
4256
|
+
"refuse",
|
|
4257
|
+
"decline",
|
|
4258
|
+
"browser\\s+settings",
|
|
4259
|
+
"settings\\s+of\\s+your\\s+browser",
|
|
4260
|
+
"delete\\s+(?:the\\s+)?cookies",
|
|
4261
|
+
"manage\\s+(?:your\\s+)?cookies"
|
|
4262
|
+
].join("|"),
|
|
4263
|
+
"gi"
|
|
4264
|
+
);
|
|
4265
|
+
var REFUSAL_WEAK = new RegExp(
|
|
4266
|
+
[
|
|
4267
|
+
"widerspr",
|
|
4268
|
+
"deaktivier",
|
|
4269
|
+
"abschalt",
|
|
4270
|
+
"ausschalt",
|
|
4271
|
+
"blockier",
|
|
4272
|
+
"verhindern",
|
|
4273
|
+
"unterbind",
|
|
4274
|
+
"abweis",
|
|
4275
|
+
"abmelden",
|
|
4276
|
+
"widerruf",
|
|
4277
|
+
"einwilligung\\s+(?:jederzeit\\s+)?(?:widerrufen|zur\xFCckziehen)",
|
|
4278
|
+
"s['\u2019]opposer",
|
|
4279
|
+
"opposition",
|
|
4280
|
+
"d\xE9sactiv",
|
|
4281
|
+
"bloquer",
|
|
4282
|
+
"retirer\\s+(?:votre\\s+)?consentement",
|
|
4283
|
+
"opporsi",
|
|
4284
|
+
"opposizione",
|
|
4285
|
+
"disattiv",
|
|
4286
|
+
"bloccare",
|
|
4287
|
+
"revocare",
|
|
4288
|
+
"disable",
|
|
4289
|
+
"block(?:ing)?\\b",
|
|
4290
|
+
"withdraw"
|
|
4291
|
+
].join("|"),
|
|
4292
|
+
"gi"
|
|
4293
|
+
);
|
|
4294
|
+
var AGENCY = /\b(?:sie|du|dein\w*|ihr\w*|man|nutzer\w*|benutzer\w*|besucher\w*|user|users|you|your|vous|votre|vos|lei|tu)\b|jederzeit|\bkönnen?\b|\bkann\b|\bmöglich\w*/i;
|
|
4295
|
+
var MIN_NOTICE_CHARS = 1500;
|
|
4296
|
+
function assessPrivacyTexts(texts) {
|
|
4297
|
+
const readableTexts = texts.filter((t) => t.length >= MIN_NOTICE_CHARS);
|
|
4298
|
+
if (readableTexts.length === 0) return { readable: false, mentionsProcessing: false, refusalHint: false };
|
|
4299
|
+
const all = readableTexts.join(" ");
|
|
4300
|
+
const mentionsProcessing = PROCESSING.test(all);
|
|
4301
|
+
const find = (re, needAgency) => {
|
|
4302
|
+
for (const m of all.matchAll(re)) {
|
|
4303
|
+
const i = m.index ?? 0;
|
|
4304
|
+
const wide = all.slice(Math.max(0, i - 420), i + 420);
|
|
4305
|
+
if (!(PROCESSING.test(wide) || /browser|navigateur/i.test(wide))) continue;
|
|
4306
|
+
if (needAgency && !AGENCY.test(all.slice(Math.max(0, i - 140), i + 140))) continue;
|
|
4307
|
+
const from = Math.max(0, i - 80);
|
|
4308
|
+
return `${from > 0 ? "\u2026" : ""}${all.slice(from, i + 110).trim()}\u2026`;
|
|
4309
|
+
}
|
|
4310
|
+
return void 0;
|
|
4311
|
+
};
|
|
4312
|
+
const evidence = find(REFUSAL_STRONG, false) ?? find(REFUSAL_WEAK, true);
|
|
4313
|
+
return evidence ? { readable: true, mentionsProcessing, refusalHint: true, evidence } : { readable: true, mentionsProcessing, refusalHint: false };
|
|
4314
|
+
}
|
|
4315
|
+
function homeRefusalCue(visibleText2) {
|
|
4316
|
+
const re = /ablehn|nur\s+notwendige|nicht\s+zustimmen|opt-?\s?out|reject\s+all|decline|refuser|tout\s+refuser|rifiut/gi;
|
|
4317
|
+
for (const m of visibleText2.matchAll(re)) {
|
|
4318
|
+
const i = m.index ?? 0;
|
|
4319
|
+
const wide = visibleText2.slice(Math.max(0, i - 200), i + 200);
|
|
4320
|
+
if (PROCESSING.test(wide) || /daten|data|donn[ée]es|dati/i.test(wide)) {
|
|
4321
|
+
const from = Math.max(0, i - 70);
|
|
4322
|
+
return `${from > 0 ? "\u2026" : ""}${visibleText2.slice(from, i + 90).replace(/\s+/g, " ").trim()}\u2026`;
|
|
4323
|
+
}
|
|
4324
|
+
}
|
|
4325
|
+
return void 0;
|
|
4326
|
+
}
|
|
4327
|
+
|
|
3738
4328
|
// src/core/scanner/sitemap.ts
|
|
3739
4329
|
import fs4 from "fs/promises";
|
|
3740
4330
|
import path4 from "path";
|
|
@@ -5617,7 +6207,7 @@ import { chromium } from "playwright";
|
|
|
5617
6207
|
import { createHash } from "crypto";
|
|
5618
6208
|
import fs5 from "fs/promises";
|
|
5619
6209
|
import path5 from "path";
|
|
5620
|
-
var CPCG_VERSION = true ? "0.4.
|
|
6210
|
+
var CPCG_VERSION = true ? "0.4.8" : "dev";
|
|
5621
6211
|
function scanConfigOf(config) {
|
|
5622
6212
|
return {
|
|
5623
6213
|
targetUrl: config.targetUrl,
|
|
@@ -6487,6 +7077,12 @@ var ChaosScanner = class {
|
|
|
6487
7077
|
siteNecessary = [];
|
|
6488
7078
|
/** Seitenaufbau aus dem Quelltext der Startseite (System, Cookie-Tool, Einbau von Google-Tags), aus der Vorprüfung. */
|
|
6489
7079
|
stack;
|
|
7080
|
+
euReference;
|
|
7081
|
+
privacyNotice;
|
|
7082
|
+
/** Links der Startseite (aus der Vorprüfung), Grundlage für das Lesen der Datenschutzerklärung */
|
|
7083
|
+
homeLinks;
|
|
7084
|
+
/** Auszug aus dem sichtbaren Text der Startseite, der auf eine Ablehnen-Möglichkeit hindeutet (z. B. nicht erkannter Banner) */
|
|
7085
|
+
homeRefusalCue;
|
|
6490
7086
|
/** Es gab mehr solche Kategorien als die Obergrenze (`MAX_LOCKED_CATEGORIES`). */
|
|
6491
7087
|
siteNecessaryMore = false;
|
|
6492
7088
|
/** Eine Challenge hat sich innerhalb der Wartezeit nicht gelöst: in diesem Lauf nicht mehr warten. */
|
|
@@ -6611,6 +7207,10 @@ var ChaosScanner = class {
|
|
|
6611
7207
|
this.confinedNavigations = /* @__PURE__ */ new Set();
|
|
6612
7208
|
this.siteNecessary = [];
|
|
6613
7209
|
this.stack = void 0;
|
|
7210
|
+
this.euReference = void 0;
|
|
7211
|
+
this.privacyNotice = void 0;
|
|
7212
|
+
this.homeLinks = void 0;
|
|
7213
|
+
this.homeRefusalCue = void 0;
|
|
6614
7214
|
this.siteNecessaryMore = false;
|
|
6615
7215
|
this.challengeUnsolved = false;
|
|
6616
7216
|
this.cname = new CnameCloakingDetector(this.cnameResolver);
|
|
@@ -6714,6 +7314,11 @@ var ChaosScanner = class {
|
|
|
6714
7314
|
preStepDeadlineMs(config),
|
|
6715
7315
|
(signal) => this.probeGtmConsentMode(scanBrowser, config, scope, signal)
|
|
6716
7316
|
);
|
|
7317
|
+
await this.boundedStep(
|
|
7318
|
+
"Lesen der Datenschutzerkl\xE4rung",
|
|
7319
|
+
preStepDeadlineMs(config),
|
|
7320
|
+
(signal) => this.readPrivacyNotice(scanBrowser, config, signal)
|
|
7321
|
+
);
|
|
6717
7322
|
await step("happy-path-denied", (sink) => this.runScenario(
|
|
6718
7323
|
"happy-path-denied",
|
|
6719
7324
|
scanBrowser,
|
|
@@ -7222,6 +7827,8 @@ var ChaosScanner = class {
|
|
|
7222
7827
|
...this.siteNecessary.length ? { siteNecessaryCategories: [...this.siteNecessary], ...this.siteNecessaryMore ? { siteNecessaryCategoriesTruncated: true } : {} } : {},
|
|
7223
7828
|
...unassignedHostsOf(evidence, config.targetUrl),
|
|
7224
7829
|
...this.stackReport(),
|
|
7830
|
+
...this.euReference ? { euReference: this.euReference } : {},
|
|
7831
|
+
...this.privacyNotice ? { privacyNotice: this.privacyNotice } : {},
|
|
7225
7832
|
// Art nur, wenn die Suche vollständig war: «none» heißt belegt «kein Banner», sonst bleibt sie unbekannt.
|
|
7226
7833
|
bannerKind: this.session.bannerSeen ? bannerKindOf(true, this.bannerCmp) : this.probeCompleted() ? "none" : void 0,
|
|
7227
7834
|
...this.session.bannerSeen && this.bannerCmp ? { bannerCmp: this.bannerCmp } : {},
|
|
@@ -7882,7 +8489,9 @@ var ChaosScanner = class {
|
|
|
7882
8489
|
});
|
|
7883
8490
|
await this.gotoTarget(page, config, scope, "domcontentloaded", { probe: true });
|
|
7884
8491
|
await settle(page, 1300, "Layout");
|
|
7885
|
-
await this.readStack(mainDoc, signal);
|
|
8492
|
+
await this.readStack(mainDoc, signal, page, config.targetUrl);
|
|
8493
|
+
this.homeLinks = { links: await page.evaluate(`(${PAGE_LINKS_FUNCTION})()`).catch(() => []), url: page.url() };
|
|
8494
|
+
this.homeRefusalCue = homeRefusalCue(String(await page.evaluate("document.body ? document.body.innerText.slice(0, 300000) : ''").catch(() => "")));
|
|
7886
8495
|
const cookies = await context.cookies().catch(() => []);
|
|
7887
8496
|
if (capableMeasuring.size > 0) {
|
|
7888
8497
|
const storageKeys = await page.evaluate(() => [...Object.keys(localStorage), ...Object.keys(sessionStorage)]).catch(() => null);
|
|
@@ -7943,18 +8552,80 @@ var ChaosScanner = class {
|
|
|
7943
8552
|
v.description = `${v.description} ${cookielessNote(v.requestUrl, siteHost)}`;
|
|
7944
8553
|
}
|
|
7945
8554
|
}
|
|
8555
|
+
/**
|
|
8556
|
+
* Liest die Datenschutzerklärung (und eine getrennte Cookie-Richtlinie) der Seite und prüft, ob sie Cookies/Tracking nennt und einen Weg
|
|
8557
|
+
* zum Ablehnen (Art. 45c lit. b FMG, Stichwortsuche). Eigener Kontext, damit die Messung der Szenarien unberührt bleibt. Jeder Fehler
|
|
8558
|
+
* lässt das Ergebnis leer («nicht geprüft»), nie einen Befund.
|
|
8559
|
+
*/
|
|
8560
|
+
async readPrivacyNotice(browser, config, signal) {
|
|
8561
|
+
const home = this.homeLinks;
|
|
8562
|
+
if (!home || this.botProtection) return;
|
|
8563
|
+
let context;
|
|
8564
|
+
try {
|
|
8565
|
+
const { urls, pdfOnly, fallback } = pickPrivacyLinks(home.links, home.url);
|
|
8566
|
+
if (urls.length === 0) {
|
|
8567
|
+
this.privacyNotice = { pages: [], reason: pdfOnly ? "pdf-only" : "not-found", readable: false, mentionsProcessing: false, refusalHint: false };
|
|
8568
|
+
return;
|
|
8569
|
+
}
|
|
8570
|
+
context = await this.newContext(browser, {}, { har: false });
|
|
8571
|
+
const page = await context.newPage();
|
|
8572
|
+
const texts = [];
|
|
8573
|
+
const read = [];
|
|
8574
|
+
const queue = [...urls];
|
|
8575
|
+
for (let n = 0; n < queue.length && n < 3; n++) {
|
|
8576
|
+
const url = queue[n];
|
|
8577
|
+
if (signal?.aborted) return;
|
|
8578
|
+
try {
|
|
8579
|
+
await page.goto(url, { waitUntil: "domcontentloaded", timeout: config.timeoutMs });
|
|
8580
|
+
let text = "";
|
|
8581
|
+
for (let attempt = 0; attempt < 4; attempt++) {
|
|
8582
|
+
await settle(page, 800, "Layout");
|
|
8583
|
+
text = String(await page.evaluate(`(${PAGE_TEXT_FUNCTION})()`));
|
|
8584
|
+
if (text.length >= MIN_NOTICE_CHARS) break;
|
|
8585
|
+
}
|
|
8586
|
+
texts.push(text);
|
|
8587
|
+
read.push(url);
|
|
8588
|
+
if (n === 0 && queue.length === 1 && !fallback) {
|
|
8589
|
+
const inner = await page.evaluate(`(${PAGE_LINKS_FUNCTION})()`).catch(() => []);
|
|
8590
|
+
const more = pickCookiePolicyLink(inner, page.url(), read);
|
|
8591
|
+
if (more) queue.push(more);
|
|
8592
|
+
}
|
|
8593
|
+
} catch {
|
|
8594
|
+
}
|
|
8595
|
+
}
|
|
8596
|
+
if (signal?.aborted) return;
|
|
8597
|
+
const reading = assessPrivacyTexts(texts);
|
|
8598
|
+
const conclusive = reading.readable && (!fallback || reading.refusalHint);
|
|
8599
|
+
this.privacyNotice = {
|
|
8600
|
+
url: urls[0],
|
|
8601
|
+
pages: read,
|
|
8602
|
+
...conclusive ? {} : { reason: fallback && reading.readable ? "not-found" : "unreadable" },
|
|
8603
|
+
readable: conclusive,
|
|
8604
|
+
mentionsProcessing: reading.mentionsProcessing,
|
|
8605
|
+
refusalHint: reading.refusalHint,
|
|
8606
|
+
...reading.evidence ? { evidence: reading.evidence } : {}
|
|
8607
|
+
};
|
|
8608
|
+
} catch {
|
|
8609
|
+
} finally {
|
|
8610
|
+
await context?.close().catch(() => void 0);
|
|
8611
|
+
}
|
|
8612
|
+
}
|
|
7946
8613
|
/** Seitenaufbau für den Report, nur wenn die Erkennung etwas gefunden hat. */
|
|
7947
8614
|
stackReport() {
|
|
7948
8615
|
const stack = this.stack ? reconcileConsentTool(this.stack, this.bannerCmp) : void 0;
|
|
7949
8616
|
return stack && (stack.system || stack.consentTool || stack.googleTags.length > 0) ? { stack } : {};
|
|
7950
8617
|
}
|
|
7951
8618
|
/** Erkennt den Seitenaufbau aus dem Quelltext (höchstens 3 MB); ein Fehler lässt die Erkennung einfach leer. */
|
|
7952
|
-
async readStack(doc, signal) {
|
|
8619
|
+
async readStack(doc, signal, page, pageUrl) {
|
|
7953
8620
|
if (!doc) return;
|
|
7954
8621
|
try {
|
|
7955
8622
|
const body = await doc.text();
|
|
7956
8623
|
if (signal?.aborted || body.length > 3e6) return;
|
|
7957
8624
|
this.stack = detectStack(body);
|
|
8625
|
+
if (pageUrl) {
|
|
8626
|
+
const rendered = page ? await page.content().catch(() => "") : "";
|
|
8627
|
+
if (!signal?.aborted) this.euReference = detectEuReference([body, rendered.length <= 3e6 ? rendered : ""], doc.url() || pageUrl);
|
|
8628
|
+
}
|
|
7958
8629
|
} catch {
|
|
7959
8630
|
}
|
|
7960
8631
|
}
|
|
@@ -8587,6 +9258,42 @@ var ChaosScanner = class {
|
|
|
8587
9258
|
}
|
|
8588
9259
|
const optional = pretickedOptional(this.preticked);
|
|
8589
9260
|
if (optional.length > 0) violations.push(make("preticked-choices", pretickedDescription(optional)));
|
|
9261
|
+
const notice = this.privacyNotice;
|
|
9262
|
+
if (notice) {
|
|
9263
|
+
const advertising = (v) => v.trackerCategory !== "functional" && v.trackerCategory !== "cookieless-analytics";
|
|
9264
|
+
const trackedBeforeChoice = violations.some(
|
|
9265
|
+
(v) => !v.advisory && (v.ruleId === "pre-consent-tracking" || v.ruleId === "tracking-without-consent") && advertising(v)
|
|
9266
|
+
);
|
|
9267
|
+
const bannerWithoutRefusal = violations.some((v) => v.ruleId === "no-reject-option" || v.ruleId === "no-consent-choice");
|
|
9268
|
+
const noBanner = !this.session.bannerSeen && this.probeCompleted();
|
|
9269
|
+
const bannerLikelyMissed = noBanner && !bannerWithoutRefusal && this.homeRefusalCue !== void 0;
|
|
9270
|
+
if ((trackedBeforeChoice || bannerWithoutRefusal) && (noBanner || bannerWithoutRefusal)) {
|
|
9271
|
+
const where = noBanner ? "Es wurde kein Banner gefunden" : "Der Banner bietet keine Ablehnung an";
|
|
9272
|
+
if (bannerLikelyMissed) {
|
|
9273
|
+
violations.push(
|
|
9274
|
+
make(
|
|
9275
|
+
"refusal-notice-unchecked",
|
|
9276
|
+
`Beim Besuch wurden Tracker geladen, und CPCG fand keinen Banner. Der sichtbare Text der Startseite spricht aber von einer Ablehnen-M\xF6glichkeit (\xAB${this.homeRefusalCue}\xBB): vermutlich gibt es einen Banner, den CPCG nicht erkannt hat. Ob die Seite auf die Ablehnm\xF6glichkeit hinweist (Art. 45c lit. b FMG), ist damit nicht pr\xFCfbar. Bitte manuell pr\xFCfen. Technischer Hinweis, keine Rechtsbewertung.`
|
|
9277
|
+
)
|
|
9278
|
+
);
|
|
9279
|
+
} else if (notice.readable && !notice.refusalHint) {
|
|
9280
|
+
violations.push(
|
|
9281
|
+
make(
|
|
9282
|
+
"refusal-notice-missing",
|
|
9283
|
+
`Beim Besuch wurden Tracker geladen. ${where}. In der gelesenen Datenschutzerkl\xE4rung (${notice.url}) fand die Stichwortsuche ${notice.mentionsProcessing ? "" : "weder eine Angabe zu Cookies oder Tracking noch "}keinen Hinweis, wie sich die Bearbeitung ablehnen l\xE4sst (z. B. Cookie-Einstellungen, Widerspruch, Browser-Einstellungen). Art. 45c lit. b FMG verlangt Information \xFCber Bearbeitung und Zweck und einen Hinweis auf die Ablehnm\xF6glichkeit; die Form l\xE4sst das Gesetz offen. Automatische Stichwortsuche, bitte manuell pr\xFCfen. Technischer Befund, keine Rechtsbewertung.`
|
|
9284
|
+
)
|
|
9285
|
+
);
|
|
9286
|
+
} else if (!notice.readable) {
|
|
9287
|
+
const why = notice.reason === "pdf-only" ? "die Datenschutzerkl\xE4rung liegt nur als PDF-Datei vor" : notice.reason === "not-found" ? "auf der Startseite wurde keine Datenschutzerkl\xE4rung verlinkt gefunden" : "die Datenschutzerkl\xE4rung war nicht lesbar";
|
|
9288
|
+
violations.push(
|
|
9289
|
+
make(
|
|
9290
|
+
"refusal-notice-unchecked",
|
|
9291
|
+
`Beim Besuch wurden Tracker geladen. ${where}. Ob die Seite auf anderem Weg (Datenschutzerkl\xE4rung) \xFCber die Bearbeitung informiert und auf die Ablehnm\xF6glichkeit hinweist (Art. 45c lit. b FMG), konnte CPCG nicht pr\xFCfen: ${why}. Bitte manuell pr\xFCfen. Technischer Hinweis, keine Rechtsbewertung.`
|
|
9292
|
+
)
|
|
9293
|
+
);
|
|
9294
|
+
}
|
|
9295
|
+
}
|
|
9296
|
+
}
|
|
8590
9297
|
const p = this.prominence;
|
|
8591
9298
|
if (p && !this.rejectOnlySecondLevel) {
|
|
8592
9299
|
const reasons = prominenceReasons(p.accept, p.reject);
|
|
@@ -8627,7 +9334,7 @@ var ChaosScanner = class {
|
|
|
8627
9334
|
trackerCategory: "unknown",
|
|
8628
9335
|
requestUrl: config.targetUrl,
|
|
8629
9336
|
method: "DOM",
|
|
8630
|
-
description: `${this.infoOnlyBanner} Vor einer Entscheidung wurden ${before2} Tracker-Request(s) beobachtet. Messergebnis: im Banner l\xE4sst sich keine Einwilligung erteilen (relevant im Modell opt-in) und keine Ablehnung w\xE4hlen (relevant in
|
|
9337
|
+
description: `${this.infoOnlyBanner} Vor einer Entscheidung wurden ${before2} Tracker-Request(s) beobachtet. Messergebnis: im Banner l\xE4sst sich keine Einwilligung erteilen (relevant im Modell opt-in) und keine Ablehnung w\xE4hlen (relevant im Modell opt-out; in der Schweiz gen\xFCgt ein Hinweis auf die Ablehnm\xF6glichkeit, Art. 45c FMG). Technischer Befund, keine Rechtsbewertung.`
|
|
8631
9338
|
},
|
|
8632
9339
|
"pre-consent"
|
|
8633
9340
|
);
|
|
@@ -8705,7 +9412,7 @@ var ChaosScanner = class {
|
|
|
8705
9412
|
trackerCategory: "unknown",
|
|
8706
9413
|
requestUrl: config.targetUrl,
|
|
8707
9414
|
method: "DOM",
|
|
8708
|
-
description: `Kein Ablehnen im Banner gefunden: Der Banner bietet \xAB${accept.label ?? accept.via}\xBB an, aber kein \xABAblehnen\xBB oder \xABNur notwendige\xBB auf der ersten Ebene, ${secondLevelOpened ? "und auch die ge\xF6ffneten Einstellungen bieten keinen Ablehnen-Weg" : "und keine Einstellungen"}; Tracking ist aktiv (${trackingText}).${closeNote} Messergebnis: im Banner l\xE4sst sich keine Ablehnung w\xE4hlen (relevant
|
|
9415
|
+
description: `Kein Ablehnen im Banner gefunden: Der Banner bietet \xAB${accept.label ?? accept.via}\xBB an, aber kein \xABAblehnen\xBB oder \xABNur notwendige\xBB auf der ersten Ebene, ${secondLevelOpened ? "und auch die ge\xF6ffneten Einstellungen bieten keinen Ablehnen-Weg" : "und keine Einstellungen"}; Tracking ist aktiv (${trackingText}).${closeNote} Messergebnis: im Banner l\xE4sst sich keine Ablehnung w\xE4hlen (relevant im Modell opt-out; im Modell opt-in fehlt die gleichwertige Wahl; in der Schweiz gen\xFCgt ein Hinweis auf die Ablehnm\xF6glichkeit, Art. 45c FMG). Automatische Erkennung, technischer Befund, keine Rechtsbewertung.`
|
|
8709
9416
|
},
|
|
8710
9417
|
"pre-consent"
|
|
8711
9418
|
);
|
|
@@ -10570,7 +11277,7 @@ function jurisdictionsPerVisit(jurisdiction) {
|
|
|
10570
11277
|
const codes = jurisdiction.split(",").map((c) => c.trim().toUpperCase().replaceAll("_", "-")).filter(Boolean);
|
|
10571
11278
|
const eu = codes.includes("EU");
|
|
10572
11279
|
const rest = [...new Set(codes.filter((c) => c !== "EU"))];
|
|
10573
|
-
return { ...rest.length > 0 ? { ch: rest.join(",") } : {}, ...eu ? { eu: "EU" } : {} };
|
|
11280
|
+
return { ...rest.length > 0 ? { ch: rest.join(",") } : {}, ...eu ? { eu: rest.length > 0 ? "EU-BEZUG" : "EU" } : {} };
|
|
10574
11281
|
}
|
|
10575
11282
|
function chooseExit(input) {
|
|
10576
11283
|
if (input.override) return { url: input.override, source: "override" };
|
|
@@ -12535,6 +13242,57 @@ ${reviewVerdict.comments.join("\n")}`,
|
|
|
12535
13242
|
// src/core/report/evidenceReport.ts
|
|
12536
13243
|
import fs9 from "fs";
|
|
12537
13244
|
import path9 from "path";
|
|
13245
|
+
|
|
13246
|
+
// src/core/report/euReferenceText.ts
|
|
13247
|
+
var EU_REFERENCE_SCOPE_NOTE = "Ausgewertet ist nur die Startseite; Unterseiten wie Shop oder Kasse, die Kundschaft und die Werbung der Seite sind nicht erfasst. Das ist eine technische Beobachtung und keine Aussage, ob die DSGVO f\xFCr dich gilt.";
|
|
13248
|
+
var EU_NEXUS_NOTE = "Die Befunde nach dem EU-Modell in diesem Bericht betreffen Besucher aus der EU; ob dieses Modell f\xFCr deine Seite gilt, h\xE4ngt davon ab, ob sie sich an Kundinnen und Kunden in der EU richtet.";
|
|
13249
|
+
function euReferenceBlock(ref) {
|
|
13250
|
+
const rows = ref.indicators.map((i) => ({ label: i.label, evidence: i.evidence, strong: i.strength === "strong" }));
|
|
13251
|
+
if (ref.assessment === "indicated") {
|
|
13252
|
+
return {
|
|
13253
|
+
tone: "indicated",
|
|
13254
|
+
head: "Merkmale deuten auf eine Ausrichtung an Kundinnen und Kunden in der EU",
|
|
13255
|
+
text: "Auf deiner Startseite stehen Merkmale, wie sie die europ\xE4ischen Datenschutzbeh\xF6rden heranziehen, um zu beurteilen, ob sich ein Angebot an Personen in der EU richtet. F\xFCr Besucher aus der EU kommt dann das strengere EU-Modell (Einwilligung vor dem Tracking) in Betracht; in der Schweiz gilt das Schweizer Modell. " + EU_REFERENCE_SCOPE_NOTE,
|
|
13256
|
+
rows,
|
|
13257
|
+
more: ref.truncated === true
|
|
13258
|
+
};
|
|
13259
|
+
}
|
|
13260
|
+
if (ref.assessment === "weak") {
|
|
13261
|
+
return {
|
|
13262
|
+
tone: "weak",
|
|
13263
|
+
head: "Einzelne Merkmale mit EU-Bezug, noch kein klares Bild",
|
|
13264
|
+
text: `Auf deiner Startseite steht ein einzelnes schwaches Merkmal. F\xFCr sich allein sagt es wenig; ein zweites Merkmal anderer Art w\xFCrde es zu einem Hinweis machen. ${EU_NEXUS_NOTE} ${EU_REFERENCE_SCOPE_NOTE}`,
|
|
13265
|
+
rows,
|
|
13266
|
+
more: false
|
|
13267
|
+
};
|
|
13268
|
+
}
|
|
13269
|
+
return {
|
|
13270
|
+
tone: "none",
|
|
13271
|
+
head: "Keine Merkmale mit EU-Bezug gefunden",
|
|
13272
|
+
text: `Auf der Startseite haben wir weder Euro-Preise noch Lieferung in EU-L\xE4nder, L\xE4nderversionen oder \xE4hnliche Merkmale gefunden. \xABNicht gefunden\xBB heisst nicht \xABkein EU-Bezug\xBB: ${EU_REFERENCE_SCOPE_NOTE} ${EU_NEXUS_NOTE}`,
|
|
13273
|
+
rows: [],
|
|
13274
|
+
more: false
|
|
13275
|
+
};
|
|
13276
|
+
}
|
|
13277
|
+
function scanContextLines(report) {
|
|
13278
|
+
const lines = [];
|
|
13279
|
+
const ref = report.euReference;
|
|
13280
|
+
if (ref) {
|
|
13281
|
+
const kinds = [...new Set(ref.indicators.map((i) => i.label))].join(", ");
|
|
13282
|
+
lines.push(
|
|
13283
|
+
ref.assessment === "indicated" ? `\u2139 EU-Bezug der Startseite: Merkmale einer Ausrichtung an die EU gefunden (${kinds}).` : ref.assessment === "weak" ? `\u2139 EU-Bezug der Startseite: nur ein einzelnes schwaches Merkmal (${kinds}), nicht ausreichend.` : "\u2139 EU-Bezug der Startseite: keine Merkmale einer Ausrichtung an die EU gefunden (nur die Startseite ist ausgewertet)."
|
|
13284
|
+
);
|
|
13285
|
+
}
|
|
13286
|
+
const n = report.privacyNotice;
|
|
13287
|
+
if (n) {
|
|
13288
|
+
lines.push(
|
|
13289
|
+
n.readable ? n.refusalHint ? `\u2139 Datenschutzerkl\xE4rung (${n.url}): Hinweis auf die Ablehnm\xF6glichkeit gefunden (Stichwortsuche).` : `\u2139 Datenschutzerkl\xE4rung (${n.url}): ${n.mentionsProcessing ? "nennt Cookies oder Tracking, aber " : ""}kein Hinweis auf die Ablehnm\xF6glichkeit gefunden (Stichwortsuche, bitte von Hand pr\xFCfen).` : `\u2139 Datenschutzerkl\xE4rung nicht gepr\xFCft: ${n.reason === "pdf-only" ? "nur als PDF-Datei verlinkt" : n.reason === "not-found" ? "auf der Startseite nicht (eindeutig) verlinkt" : "nicht lesbar"}.`
|
|
13290
|
+
);
|
|
13291
|
+
}
|
|
13292
|
+
return lines;
|
|
13293
|
+
}
|
|
13294
|
+
|
|
13295
|
+
// src/core/report/evidenceReport.ts
|
|
12538
13296
|
function statusLabelOf(s) {
|
|
12539
13297
|
return s === "passed" ? "bestanden" : s === "suspicious" ? "auff\xE4llig" : s === "not-applicable" ? "nicht anwendbar" : "nicht pr\xFCfbar";
|
|
12540
13298
|
}
|
|
@@ -12987,6 +13745,12 @@ function buildEvidenceMarkdown(report, title = "Nachweis-Bericht", options = {})
|
|
|
12987
13745
|
for (const c of report.siteNecessaryCategories) lines.push(`- ${escapeMarkdownText(c)}`);
|
|
12988
13746
|
if (report.siteNecessaryCategoriesTruncated) lines.push("", SITE_NECESSARY_MORE);
|
|
12989
13747
|
}
|
|
13748
|
+
if (report.euReference) {
|
|
13749
|
+
const eu = euReferenceBlock(report.euReference);
|
|
13750
|
+
lines.push("", "## EU-Bezug der Seite", "", `**${eu.head}.** ${eu.text}`, "");
|
|
13751
|
+
for (const r of eu.rows) lines.push(`- ${escapeMarkdownText(r.label)}${r.strong ? "" : " (schwach)"}: ${escapeMarkdownText(r.evidence)}`);
|
|
13752
|
+
if (eu.more) lines.push("", "Es gab weitere Merkmale, als hier stehen (Obergrenze).");
|
|
13753
|
+
}
|
|
12990
13754
|
if (report.cnameCloaking?.length) {
|
|
12991
13755
|
lines.push(
|
|
12992
13756
|
"",
|
|
@@ -13164,6 +13928,8 @@ function buildEvidenceHtml(report, title = "Nachweis-Bericht", options = {}) {
|
|
|
13164
13928
|
"reject-less-prominent": "Ablehnen ist gleich auff\xE4llig gestaltet wie Akzeptieren",
|
|
13165
13929
|
"preticked-choices": "Keine Kategorie im Banner ist vorangekreuzt",
|
|
13166
13930
|
"no-consent-choice": "Der Banner bietet eine Auswahl (Akzeptieren oder Ablehnen)",
|
|
13931
|
+
"refusal-notice-missing": "Banner oder Datenschutzerkl\xE4rung weisen auf die Ablehnm\xF6glichkeit hin",
|
|
13932
|
+
"refusal-notice-unchecked": "Datenschutzerkl\xE4rung ist auffindbar und lesbar (Hinweis auf die Ablehnm\xF6glichkeit)",
|
|
13167
13933
|
"gpc-ignored": "Global Privacy Control (GPC) wird als Opt-out beachtet"
|
|
13168
13934
|
};
|
|
13169
13935
|
const violatedRules = [...new Set(blocking.map((v) => v.ruleId ?? "pre-consent-tracking"))];
|
|
@@ -13685,7 +14451,7 @@ ${demoBanner}
|
|
|
13685
14451
|
${warningsHtml}
|
|
13686
14452
|
|
|
13687
14453
|
<h2><span class="num">02</span>Rechtsr\xE4ume</h2>
|
|
13688
|
-
<p class="sub">Dieselben technischen Fakten, je Modell eine andere Wirkung im Gate. Gezeigt wird das angewandte Modell (opt-in,
|
|
14454
|
+
<p class="sub">Dieselben technischen Fakten, je Modell eine andere Wirkung im Gate. Gezeigt wird das angewandte Modell (opt-in, Information und Widerspruch, opt-out, notice-only), keine Rechtsaussage.</p>
|
|
13689
14455
|
<div class="jgrid">
|
|
13690
14456
|
${jCards}
|
|
13691
14457
|
</div>
|
|
@@ -13711,6 +14477,12 @@ ${demoBanner}
|
|
|
13711
14477
|
<p class="sub">${esc2(siteNecessaryIntro(report))}</p>
|
|
13712
14478
|
<ul>${report.siteNecessaryCategories.map((c) => `<li>${esc2(c)}</li>`).join("")}</ul>${report.siteNecessaryCategoriesTruncated ? `<p class="sub">${esc2(SITE_NECESSARY_MORE)}</p>` : ""}` : ""}
|
|
13713
14479
|
|
|
14480
|
+
${report.euReference ? (() => {
|
|
14481
|
+
const eu = euReferenceBlock(report.euReference);
|
|
14482
|
+
return `<h3 class="subhead" id="eu-reference">EU-Bezug der Seite</h3>
|
|
14483
|
+
<p class="sub"><b>${esc2(eu.head)}.</b> ${esc2(eu.text)}</p>${eu.rows.length ? `<ul>${eu.rows.map((r) => `<li>${esc2(r.label)}${r.strong ? "" : " (schwach)"}: ${esc2(r.evidence)}</li>`).join("")}</ul>` : ""}`;
|
|
14484
|
+
})() : ""}
|
|
14485
|
+
|
|
13714
14486
|
${report.cnameCloaking?.length ? `<h3 class="subhead" id="cname-cloaking">CNAME-Cloaking</h3>
|
|
13715
14487
|
<p class="sub">Diese Hosts der eigenen Seite zeigen per DNS (CNAME) auf einen Tracker. Requests dorthin sind Tracker-Requests, auch wenn sie wie eigene aussehen.</p>
|
|
13716
14488
|
<table class="mini">
|
|
@@ -14710,6 +15482,14 @@ var RECIPES = {
|
|
|
14710
15482
|
"Nachpr\xFCfen: Banner im privaten Fenster \xF6ffnen und die beiden Kn\xF6pfe nebeneinander ansehen: Gr\xF6sse, Schrift und Kontrast sollen gleich wirken."
|
|
14711
15483
|
].join(" ")
|
|
14712
15484
|
},
|
|
15485
|
+
"refusal-notice-missing": {
|
|
15486
|
+
title: "In der Datenschutzerkl\xE4rung auf die Ablehnm\xF6glichkeit hinweisen",
|
|
15487
|
+
body: [
|
|
15488
|
+
"Das Schweizer Fernmeldegesetz (Art. 45c lit. b FMG) verlangt, dass die Besucher \xFCber die Bearbeitung und ihren Zweck informiert werden und einen Hinweis bekommen, dass sie die Bearbeitung ablehnen k\xF6nnen. Die Form l\xE4sst das Gesetz offen: ein Hinweis in der Datenschutzerkl\xE4rung gen\xFCgt.",
|
|
15489
|
+
"Erg\xE4nze in der Datenschutzerkl\xE4rung einen Abschnitt \xABCookies und Tracking\xBB: welche Dienste du einsetzt (z. B. Google Analytics), wozu, und wie man ablehnt (Cookie-Einstellungen der Seite, falls vorhanden, Einstellungen des Browsers, Widerspruch per Mail an die Adresse im Impressum).",
|
|
15490
|
+
"Nachpr\xFCfen: Datenschutzerkl\xE4rung \xF6ffnen und nach \xABCookies\xBB suchen; der Abschnitt muss die eingesetzten Dienste und den Weg zum Ablehnen nennen."
|
|
15491
|
+
].join(" ")
|
|
15492
|
+
},
|
|
14713
15493
|
"preticked-choices": {
|
|
14714
15494
|
title: "Kategorien im Banner nicht vorankreuzen",
|
|
14715
15495
|
body: [
|
|
@@ -14895,6 +15675,8 @@ var RULE_SHORT = {
|
|
|
14895
15675
|
"reject-less-prominent": "\xABAblehnen\xBB weniger auff\xE4llig als \xABAkzeptieren\xBB",
|
|
14896
15676
|
"preticked-choices": "Kategorien im Banner vorangekreuzt",
|
|
14897
15677
|
"no-consent-choice": "Banner ohne Auswahl",
|
|
15678
|
+
"refusal-notice-missing": "kein Hinweis auf die Ablehnm\xF6glichkeit",
|
|
15679
|
+
"refusal-notice-unchecked": "Hinweis auf die Ablehnm\xF6glichkeit nicht pr\xFCfbar",
|
|
14898
15680
|
"consent-mode-mismatch": "Consent-Mode-Zustand passt nicht zum Verhalten"
|
|
14899
15681
|
};
|
|
14900
15682
|
var PROTOCOL_ORDER = [
|
|
@@ -15042,6 +15824,16 @@ var RULE_TEXT = {
|
|
|
15042
15824
|
body: () => "Im Banner sind Auswahlfelder wie \xABStatistik\xBB schon angekreuzt, bevor der Besucher etwas tut (die gemessenen Kategorien stehen im technischen Nachweis).",
|
|
15043
15825
|
headline: () => "im Banner sind Kategorien vorangekreuzt"
|
|
15044
15826
|
},
|
|
15827
|
+
"refusal-notice-missing": {
|
|
15828
|
+
title: () => "Nirgends steht, wie sich das Tracking ablehnen l\xE4sst",
|
|
15829
|
+
body: () => "Die Seite l\xE4dt Tracker, bietet im Banner keine Ablehnung an, und in der Datenschutzerkl\xE4rung fand die Stichwortsuche keinen Hinweis, wie sich die Bearbeitung ablehnen l\xE4sst (Cookie-Einstellungen, Widerspruch oder Browser-Einstellungen). Das Gesetz verlangt diesen Hinweis (Art. 45c lit. b FMG); die Form l\xE4sst es offen.",
|
|
15830
|
+
headline: () => "nirgends steht, wie sich das Tracking ablehnen l\xE4sst"
|
|
15831
|
+
},
|
|
15832
|
+
"refusal-notice-unchecked": {
|
|
15833
|
+
title: () => "Hinweis auf die Ablehnm\xF6glichkeit konnte nicht gepr\xFCft werden",
|
|
15834
|
+
body: () => "Die Seite l\xE4dt Tracker und bietet im Banner keine Ablehnung an. Ob die Datenschutzerkl\xE4rung auf die Ablehnm\xF6glichkeit hinweist, konnte CPCG nicht pr\xFCfen (nicht auffindbar oder nicht lesbar). Bitte von Hand nachsehen.",
|
|
15835
|
+
headline: () => "der Hinweis auf die Ablehnm\xF6glichkeit konnte nicht gepr\xFCft werden"
|
|
15836
|
+
},
|
|
15045
15837
|
"no-consent-choice": {
|
|
15046
15838
|
title: () => "Der Banner bietet keine Wahl",
|
|
15047
15839
|
body: () => "Der Banner l\xE4sst dem Besucher keine Auswahl zwischen Zustimmen und Ablehnen.",
|
|
@@ -15125,6 +15917,14 @@ var TODO_TEXT = {
|
|
|
15125
15917
|
title: "Kategorien im Banner nicht vorankreuzen",
|
|
15126
15918
|
body: "Auswahlfelder f\xFCr Statistik, Marketing und Externe Medien beim \xD6ffnen des Banners ausgeschaltet lassen; nur \xABNotwendig\xBB ist vorgew\xE4hlt und gesperrt."
|
|
15127
15919
|
}),
|
|
15920
|
+
"refusal-notice-missing": () => ({
|
|
15921
|
+
title: "In der Datenschutzerkl\xE4rung auf die Ablehnm\xF6glichkeit hinweisen",
|
|
15922
|
+
body: "In der Datenschutzerkl\xE4rung (oder im Banner) angeben, welche Cookies und Tracker zu welchem Zweck eingesetzt werden, und wie sich die Bearbeitung ablehnen l\xE4sst: Cookie-Einstellungen der Seite, Widerspruch oder Einstellungen des Browsers."
|
|
15923
|
+
}),
|
|
15924
|
+
"refusal-notice-unchecked": () => ({
|
|
15925
|
+
title: "Datenschutzerkl\xE4rung auf den Hinweis zur Ablehnm\xF6glichkeit pr\xFCfen",
|
|
15926
|
+
body: "Von Hand pr\xFCfen, ob die Datenschutzerkl\xE4rung die eingesetzten Cookies und Tracker nennt und sagt, wie sich die Bearbeitung ablehnen l\xE4sst."
|
|
15927
|
+
}),
|
|
15128
15928
|
"no-consent-choice": () => ({
|
|
15129
15929
|
title: "Dem Banner eine Wahl geben",
|
|
15130
15930
|
body: "Der Banner muss Zustimmen und Ablehnen anbieten."
|
|
@@ -15446,8 +16246,9 @@ function buildCustomerReport(report, options = {}) {
|
|
|
15446
16246
|
const profiles = resolveJurisdictions(gate?.jurisdiction);
|
|
15447
16247
|
const frameworks = [...new Set(profiles.flatMap((p) => p.frameworks.filter((f) => !/Consent Mode|Opt-out model/i.test(f)).slice(0, 3)))].join(", ");
|
|
15448
16248
|
const nums = blockingShown.map((p) => String(p.num));
|
|
15449
|
-
const einordnung = `Bewertet nach ${jurisdictionModelLabel(profiles)}. ` + (failed && nums.length ? `${nums.length === 1 ? "Punkt" : "Punkte"} ${listJoin(nums)} ${nums.length === 1 ? "gilt" : "gelten"} nach diesem Regelwerk als zu beheben. ` : "") + // Schweiz:
|
|
15450
|
-
(profiles.some((p) => p.consentModel === "objection") && inventory.some((i) => i.
|
|
16249
|
+
const einordnung = `Bewertet nach ${jurisdictionModelLabel(profiles)}. ` + (failed && nums.length ? `${nums.length === 1 ? "Punkt" : "Punkte"} ${listJoin(nums)} ${nums.length === 1 ? "gilt" : "gelten"} nach diesem Regelwerk als zu beheben. ` : "") + // Schweiz: Gesetzeskern (Art. 45c lit. b FMG) und strengere Aufsichtsposition des EDÖB sauber trennen; Tracker vor der Wahl sind hier nur ein Hinweis.
|
|
16250
|
+
(profiles.some((p) => p.consentModel === "objection") && inventory.some((i) => i.ruleId === "pre-consent-tracking") ? "Zur Schweiz: Nach dem Gesetzeswortlaut (FMG Art. 45c) gen\xFCgen Information und ein Hinweis auf die Ablehnm\xF6glichkeit; eine Einwilligung vorab verlangt das Gesetz nicht. Tracker vor der Entscheidung sind deshalb ein Hinweis. Der ED\xD6B erwartet mehr (Leitfaden Cookies, Ziff. 3.9: Widerspruch m\xF6glichst vor der Aktivierung); das ist seine Aufsichtsposition, keine Rechtsnorm. Ein Befund ist, was nach \xABAblehnen\xBB weiterl\xE4uft, und wenn nirgends auf die Ablehnm\xF6glichkeit hingewiesen wird. " : "") + // EU-Besuch ohne belegten EU-Bezug: Befunde nach dem EU-Modell sind nur ein Hinweis, der Bericht sagt warum und was zu tun ist.
|
|
16251
|
+
(profiles.some((p) => p.code === "EU-OHNE-BEZUG") ? "Zur EU: Auf der Startseite fand CPCG keine ausreichenden Merkmale f\xFCr eine Ausrichtung an Kundinnen und Kunden in der EU (siehe \xABEU-Bezug deiner Seite\xBB). Befunde nach dem EU-Modell stehen deshalb als Hinweis. Richtet sich deine Seite an Kundschaft in der EU, gilt das EU-Modell: dann l\xE4sst du CPCG den EU-Besuch immer streng bewerten (--jurisdiction EU). " : "") + "Regelwerk von CPCG, technische Messung, keine Rechtsberatung.";
|
|
15451
16252
|
const recipe = withCodeSolutions(selectRecipe(report), report, inventory);
|
|
15452
16253
|
const todo = shown.map(todoOf);
|
|
15453
16254
|
const unassigned = unassignedInfo ? {
|
|
@@ -15462,6 +16263,13 @@ function buildCustomerReport(report, options = {}) {
|
|
|
15462
16263
|
if (denied && denied.actionSequence.some((a) => a === "click:reject") && !report.violations.some((v) => v.ruleId === "no-reject-option")) {
|
|
15463
16264
|
fine.push({ title: "\xABAblehnen\xBB l\xE4sst sich bedienen", text: "Der Banner bot \xABAblehnen\xBB an, und der Klick wurde angenommen." });
|
|
15464
16265
|
}
|
|
16266
|
+
const notice = report.privacyNotice;
|
|
16267
|
+
if (notice?.readable && notice.refusalHint) {
|
|
16268
|
+
fine.push({
|
|
16269
|
+
title: "Die Datenschutzerkl\xE4rung weist auf die Ablehnm\xF6glichkeit hin",
|
|
16270
|
+
text: `In der Datenschutzerkl\xE4rung (${notice.url}) fand eine Stichwortsuche einen Hinweis, wie sich die Bearbeitung ablehnen l\xE4sst${notice.evidence ? `: \xAB${notice.evidence.replace(/^…\s*|\s*…$/g, "").trim()}\xBB` : ""}.`
|
|
16271
|
+
});
|
|
16272
|
+
}
|
|
15465
16273
|
for (const scenario of PROTOCOL_ORDER) {
|
|
15466
16274
|
const ev = evidence.find((e) => e.scenario === scenario);
|
|
15467
16275
|
const f = SCENARIO_PLAIN[scenario].fine;
|
|
@@ -15497,7 +16305,7 @@ function buildCustomerReport(report, options = {}) {
|
|
|
15497
16305
|
}
|
|
15498
16306
|
] : [],
|
|
15499
16307
|
// Abgrenzung: gemessen wird das Verhalten der Seite und des Banners, nicht ein Rechtstext.
|
|
15500
|
-
{ label: "Nicht Gegenstand", text: "Datenschutzerkl\xE4rung,
|
|
16308
|
+
{ label: "Nicht Gegenstand", text: "Inhalt der Datenschutzerkl\xE4rung, des Impressums und anderer Rechtstexte (die Datenschutzerkl\xE4rung wird nur auf einen Hinweis zur Ablehnm\xF6glichkeit durchsucht); ob Zwecke und Dienste verst\xE4ndlich genannt sind; eine rechtliche W\xFCrdigung" },
|
|
15501
16309
|
{ label: "Nachvollziehbar", text: "Messdaten mit Zeitstempeln und Pr\xFCfsummen im technischen Nachweis" }
|
|
15502
16310
|
];
|
|
15503
16311
|
const proofs = shown.map((p) => proofFor(report, p)).filter((x) => x !== void 0);
|
|
@@ -15535,6 +16343,7 @@ function buildCustomerReport(report, options = {}) {
|
|
|
15535
16343
|
...unassigned ? { unassigned } : {},
|
|
15536
16344
|
todo,
|
|
15537
16345
|
fine: fineShown,
|
|
16346
|
+
...report.euReference ? { euReference: euReferenceBlock(report.euReference) } : {},
|
|
15538
16347
|
howChecked,
|
|
15539
16348
|
scopeBoxes,
|
|
15540
16349
|
recipe,
|
|
@@ -15668,6 +16477,8 @@ ${inv.slice(0, INV_MAX).map(
|
|
|
15668
16477
|
["\xABohne Gate-Wirkung\xBB", "das \xABGate\xBB ist die Schwelle, ab der der Bericht \xABHandlungsbedarf\xBB meldet; ein Hinweis ohne Gate-Wirkung wurde gemessen, l\xF6st aber keinen Handlungsbedarf aus"]
|
|
15669
16478
|
].map(([t, d]) => `<li style="break-inside:avoid"><b>${esc3(t)}:</b> ${esc3(d)}.</li>`).join("")}</ul></section>` : "";
|
|
15670
16479
|
const fine = m.fine.length > 0 ? `<section class="block"><h2>Was bereits stimmt</h2>${m.fine.map((f) => `<div class="ok"><div class="check">\u2713</div><div><h3>${esc3(f.title)}</h3><p class="seen">${esc3(f.text)}</p></div></div>`).join("")}</section>` : "";
|
|
16480
|
+
const eu = m.euReference;
|
|
16481
|
+
const euHtml = eu ? `<section class="block"><h2>EU-Bezug deiner Seite</h2><div class="rule" style="margin-top:0"><b>${esc3(eu.head)}</b><p class="seen" style="margin:1mm 0 0">${esc3(eu.text)}</p></div>${eu.rows.length ? `<table class="t"><tr><th style="width:50mm">Merkmal</th><th>Fundstelle auf der Startseite</th></tr>${eu.rows.map((r) => `<tr><td>${esc3(r.label)}${r.strong ? "" : ' <span class="small">(schwach)</span>'}</td><td>${esc3(r.evidence)}</td></tr>`).join("")}</table>${eu.more ? '<p class="small">Weitere Merkmale stehen im technischen Nachweis.</p>' : ""}` : ""}</section>` : "";
|
|
15671
16482
|
const recipe = m.recipe;
|
|
15672
16483
|
const steps = recipe.steps.map(
|
|
15673
16484
|
(s) => `<li><div class="who">${esc3(s.who)}</div><h3>${esc3(s.title)}</h3>${s.body.split("\n\n").map((para) => `<p>${rich(para)}</p>`).join("")}${(s.codes ?? []).map((c) => `<div class="codehead"><span>${rich(c.head)}${c.sub ? ` ${esc3(c.sub)}` : ""}</span></div><pre class="code">${codeHtml(c.text, c.highlight)}</pre>`).join("")}</li>`
|
|
@@ -15693,6 +16504,7 @@ ${unassignedHtml}
|
|
|
15693
16504
|
|
|
15694
16505
|
${todo}
|
|
15695
16506
|
${fine}
|
|
16507
|
+
${euHtml}
|
|
15696
16508
|
${glossary}
|
|
15697
16509
|
<section class="block"><h2>Wie wir gepr\xFCft haben</h2><p class="seen">${esc3(m.howChecked)}</p>
|
|
15698
16510
|
<div class="scope">${m.scopeBoxes.map((b) => `<div><b>${esc3(b.label)}</b>${esc3(b.text)}</div>`).join("")}</div>
|
|
@@ -16259,6 +17071,37 @@ async function compressScreenshots(files, options = {}) {
|
|
|
16259
17071
|
return out;
|
|
16260
17072
|
}
|
|
16261
17073
|
|
|
17074
|
+
// src/core/euNexus.ts
|
|
17075
|
+
var SWISS_TLD = /* @__PURE__ */ new Set(["ch", "swiss"]);
|
|
17076
|
+
function isSwissHost(url) {
|
|
17077
|
+
try {
|
|
17078
|
+
const host = new URL(url).hostname.toLowerCase();
|
|
17079
|
+
return SWISS_TLD.has(host.split(".").pop() ?? "");
|
|
17080
|
+
} catch {
|
|
17081
|
+
return false;
|
|
17082
|
+
}
|
|
17083
|
+
}
|
|
17084
|
+
function settleEuNexus(jurisdiction, report) {
|
|
17085
|
+
const codes = jurisdiction.split(",").map((c) => c.trim());
|
|
17086
|
+
if (!codes.includes("EU-BEZUG")) return { jurisdiction, outcome: "unchanged" };
|
|
17087
|
+
const replace = (code) => [...new Set(codes.map((c) => c === "EU-BEZUG" ? code : c))].join(",");
|
|
17088
|
+
const ref = report.euReference;
|
|
17089
|
+
if (!isSwissHost(report.targetUrl)) {
|
|
17090
|
+
return { jurisdiction: replace("EU"), outcome: "strict", reason: "die Adresse der Seite ist keine Schweizer Domain: Sitz unbekannt, das EU-Modell gilt streng" };
|
|
17091
|
+
}
|
|
17092
|
+
if (!ref) {
|
|
17093
|
+
return { jurisdiction: replace("EU"), outcome: "strict", reason: "der EU-Bezug der Startseite konnte nicht gemessen werden: ohne Messung gilt das EU-Modell streng" };
|
|
17094
|
+
}
|
|
17095
|
+
if (ref.assessment === "indicated") {
|
|
17096
|
+
return { jurisdiction: replace("EU"), outcome: "strict", reason: "die Startseite zeigt Merkmale einer Ausrichtung an die EU: das EU-Modell gilt" };
|
|
17097
|
+
}
|
|
17098
|
+
return {
|
|
17099
|
+
jurisdiction: replace("EU-OHNE-BEZUG"),
|
|
17100
|
+
outcome: "softened",
|
|
17101
|
+
reason: ref.assessment === "weak" ? "auf der Startseite steht nur ein einzelnes schwaches Merkmal mit EU-Bezug: f\xFCr eine Ausrichtung an die EU nicht ausreichend belegt" : "auf der Startseite wurden keine Merkmale einer Ausrichtung an die EU gefunden (nur die Startseite ist ausgewertet)"
|
|
17102
|
+
};
|
|
17103
|
+
}
|
|
17104
|
+
|
|
16262
17105
|
// src/core/orchestrator.ts
|
|
16263
17106
|
import { execFile as execFile3 } from "child_process";
|
|
16264
17107
|
import { promisify as promisify3 } from "util";
|
|
@@ -16797,8 +17640,18 @@ var PrivacyChaosGate = class {
|
|
|
16797
17640
|
}
|
|
16798
17641
|
}
|
|
16799
17642
|
await this.preflight?.(config);
|
|
16800
|
-
|
|
17643
|
+
let profiles = resolveJurisdictions(config.jurisdiction);
|
|
16801
17644
|
const analyse = (raw) => {
|
|
17645
|
+
const nexus = settleEuNexus(config.jurisdiction, raw);
|
|
17646
|
+
if (nexus.outcome !== "unchanged") {
|
|
17647
|
+
config.jurisdiction = nexus.jurisdiction;
|
|
17648
|
+
profiles = resolveJurisdictions(config.jurisdiction);
|
|
17649
|
+
console.log(
|
|
17650
|
+
nexus.outcome === "softened" ? pc.yellow(
|
|
17651
|
+
`\u2139 EU-Besuch: ${nexus.reason}. Befunde nach dem EU-Modell (opt-in) stehen deshalb als Hinweis, nicht als Befund. Richtet sich die Seite an Kundschaft in der EU, mit --jurisdiction EU pr\xFCfen (der EU-Besuch gilt dann immer streng).`
|
|
17652
|
+
) : pc.dim(`\u2139 EU-Besuch: ${nexus.reason}.`)
|
|
17653
|
+
);
|
|
17654
|
+
}
|
|
16802
17655
|
const rep = applyJurisdiction(applyIgnore(raw, config.ignore, { strict: config.strict, jurisdictions: profiles }), {
|
|
16803
17656
|
strict: config.strict,
|
|
16804
17657
|
jurisdictions: profiles
|
|
@@ -16811,6 +17664,7 @@ var PrivacyChaosGate = class {
|
|
|
16811
17664
|
};
|
|
16812
17665
|
console.log(pc.bold(pc.yellow("\u25B6 Phase 1: Pr\xFCfung l\xE4uft (Abl\xE4ufe mit Banner und Seite)...")));
|
|
16813
17666
|
const { report, blocking, assessment } = analyse(await scanner.scan(config));
|
|
17667
|
+
for (const l of scanContextLines(report)) console.log(pc.dim(l));
|
|
16814
17668
|
probe.visitor = report.visitor;
|
|
16815
17669
|
if (limited) return await this.finishLimited(config, report, blocking, assessment);
|
|
16816
17670
|
report.provenance = buildProvenance(config, report.browserVersion);
|