cuonztech-privacy-chaos-gate 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -11,12 +11,12 @@ import {
11
11
  resolveEntitlement,
12
12
  resolveGateConfig,
13
13
  resolveJurisdictions
14
- } from "./chunk-6MBUQ5EL.js";
14
+ } from "./chunk-NGGZYNRX.js";
15
15
 
16
16
  // src/cli.ts
17
17
  import { Command, CommanderError } from "commander";
18
18
  import pc from "picocolors";
19
- var VERSION = true ? "0.3.2" : "dev";
19
+ var VERSION = true ? "0.3.4" : "dev";
20
20
  for (const stream of [process.stdout, process.stderr]) {
21
21
  stream.on("error", (err) => {
22
22
  if (err.code !== "EPIPE") throw err;
@@ -31,7 +31,7 @@ var EXIT_CODES_HELP = `
31
31
  Exit-Codes:
32
32
  0 ok (kein Leak; bei unvollst\xE4ndigem Scan nur mit --fail-on-uncheckable false)
33
33
  1 Leaks gefunden (BLOCKED), auch wenn ein Fix nur vorgeschlagen (Commit/PR), aber nicht verifiziert ist
34
- 2 Lizenz ung\xFCltig, abgelaufen oder gesperrt (eine fehlende Lizenz oder ein nicht erreichbarer Lizenzserver ist KEIN Exit 2)
34
+ 2 nicht vergeben (eine fehlende oder ung\xFCltige Lizenz beendet den Lauf nicht, sie k\xFCrzt die Ausgabe auf Zahlen)
35
35
  3 Fehler (Ziel unerreichbar oder HTTP 4xx/5xx, Konfiguration, Browser fehlt, falsche Argumente)
36
36
  4 unvollst\xE4ndig (INCONCLUSIVE): Kernszenarien (Ablehnen-/Akzeptieren-Pfad) nicht pr\xFCfbar
37
37
 
@@ -41,10 +41,11 @@ Exit-Codes:
41
41
  gelten nur aus der echten Prozessumgebung oder als CLI-Option, damit eine mitgelieferte .env das Gate nicht entsch\xE4rft.
42
42
 
43
43
  Lizenz:
44
- Scan und Konsolen-Gate sind frei, auch ohne Lizenz. Eine g\xFCltige Lizenz (Lizenzcode CPCG-\u2026 oder Kunden-Key
45
- CPCG-K-\u2026) braucht es f\xFCr --report-pdf, den Kundenreport (--client), --git-commit und --create-pr; ohne Lizenz
46
- werden diese Funktionen mit Hinweis \xFCbersprungen, der Exit-Code bleibt der des Gates. Loopback-Ziele
47
- (localhost, 127.0.0.1, ::1) sind immer frei. Erwerb: ${LICENSE_CONTACT}
44
+ Scan und Gate laufen immer vollst\xE4ndig; Gate-Zustand und Exit-Code sind echt. Ohne g\xFCltige Lizenz (Lizenzcode CPCG-\u2026
45
+ oder Kunden-Key CPCG-K-\u2026, auch abgelaufen oder gesperrt) zeigt CPCG nur das Ergebnis in Zahlen: keine Tracker und
46
+ Belege, keine Reports (Markdown, HTML, PDF), kein HAR, kein Auto-Fix, kein Kundenreport (--client), kein --git-commit
47
+ und --create-pr. Ein nicht erreichbarer Lizenzserver k\xFCrzt die Ausgabe nicht. Loopback-Ziele (localhost, 127.0.0.1, ::1)
48
+ sind immer vollst\xE4ndig frei. Erwerb: ${LICENSE_CONTACT}
48
49
  `;
49
50
  var collect = (value, previous) => [...previous, value];
50
51
  var program = new Command();
@@ -63,14 +64,13 @@ program.name("cpcg").description("Cuonztech Privacy Chaos Gate - CI/CD Shift-Lef
63
64
  await assertReportOutputWritable(config.reportOutput);
64
65
  const isLoopback = isLoopbackTarget(config.targetUrl);
65
66
  const entitlement = await resolveEntitlement({ license: options.license });
66
- if (entitlement.status === "invalid") {
67
- for (const [i, line] of entitlement.messages.entries()) console.error(i === 0 ? pc.red(line) : pc.dim(line));
68
- finish(EXIT.LICENSE);
69
- return;
70
- }
71
67
  const licensedAsked = requestedLicensedFeatures(config);
72
68
  const licensedList = licensedAsked.length > 0 ? licensedAsked.join(", ") : "PDF-Report, Kundenreport (--client), Fix-Commit und Fix-PR";
73
- if (entitlement.status === "licensed") {
69
+ if (entitlement.status === "invalid") {
70
+ config.license = { entitled: false, reason: "invalid", detail: entitlement.messages[0] };
71
+ for (const [i, line] of entitlement.messages.entries()) console.log(i === 0 ? pc.yellow(line) : pc.dim(line));
72
+ if (!isLoopback) console.log(pc.yellow("\u26A0 Ohne g\xFCltige Lizenz zeigt CPCG nur das Ergebnis in Zahlen (Gate und Exit-Code bleiben echt)."));
73
+ } else if (entitlement.status === "licensed") {
74
74
  console.log(pc.green(entitlement.summary));
75
75
  config.license = { entitled: true };
76
76
  } else if (entitlement.status === "unreachable") {
@@ -83,9 +83,7 @@ program.name("cpcg").description("Cuonztech Privacy Chaos Gate - CI/CD Shift-Lef
83
83
  config.license = { entitled: false, reason: "none" };
84
84
  if (!isLoopback) {
85
85
  console.log(
86
- pc.dim(
87
- licensedAsked.length > 0 ? `\u2139 Keine Lizenz: Scan und Gate sind frei. \xDCbersprungen (lizenzpflichtig): ${licensedList} \u2014 ${LICENSE_CONTACT}` : `\u2139 Keine Lizenz: Scan und Gate sind frei. Lizenzpflichtig sind ${licensedList} \u2014 ${LICENSE_CONTACT}`
88
- )
86
+ pc.yellow("\u26A0 Keine Lizenz: Der Scan l\xE4uft vollst\xE4ndig, ausgegeben wird nur das Ergebnis in Zahlen.")
89
87
  );
90
88
  }
91
89
  }
package/dist/index.d.ts CHANGED
@@ -1938,19 +1938,26 @@ declare const GateConfigSchema: z.ZodObject<{
1938
1938
  bannerFrame: z.ZodOptional<z.ZodString>;
1939
1939
  /**
1940
1940
  * Lizenzstatus — wird ausschliesslich von der CLI (oder dem Aufrufer der API) gesetzt, nie aus Env/.env.
1941
- * Ohne gültige Lizenz laufen PDF-Report, Kundenreport (`client`), `gitCommit` und `createPr` nicht
1942
- * (Scan und Gate bleiben frei; Loopback-Ziele sind immer frei).
1941
+ * Ohne gültige Lizenz zeigt die CLI nur das Ergebnis in Zahlen; Reports, PDF, Kundenreport, Auto-Fix, `gitCommit`
1942
+ * und `createPr` entfallen (Scan, Gate-Zustand und Exit-Code bleiben echt; Loopback-Ziele sind immer frei).
1943
1943
  */
1944
1944
  license: z.ZodOptional<z.ZodObject<{
1945
1945
  entitled: z.ZodBoolean;
1946
- /** Warum nicht lizenziert: keine Lizenz gesetzt | Lizenzserver nicht erreichbar */
1947
- reason: z.ZodOptional<z.ZodEnum<["none", "unreachable"]>>;
1946
+ /**
1947
+ * Warum nicht lizenziert: keine Lizenz gesetzt | Lizenzserver nicht erreichbar | Lizenz ungültig, abgelaufen
1948
+ * oder gesperrt. Bei `none` und `invalid` gibt die CLI nur das gekürzte Ergebnis aus (siehe `limitedOutput.ts`).
1949
+ */
1950
+ reason: z.ZodOptional<z.ZodEnum<["none", "unreachable", "invalid"]>>;
1951
+ /** Meldung der Lizenzprüfung bei `invalid` (für den Hinweis im gekürzten Ergebnis) */
1952
+ detail: z.ZodOptional<z.ZodString>;
1948
1953
  }, "strip", z.ZodTypeAny, {
1949
1954
  entitled: boolean;
1950
- reason?: "none" | "unreachable" | undefined;
1955
+ reason?: "none" | "unreachable" | "invalid" | undefined;
1956
+ detail?: string | undefined;
1951
1957
  }, {
1952
1958
  entitled: boolean;
1953
- reason?: "none" | "unreachable" | undefined;
1959
+ reason?: "none" | "unreachable" | "invalid" | undefined;
1960
+ detail?: string | undefined;
1954
1961
  }>>;
1955
1962
  }, "strip", z.ZodTypeAny, {
1956
1963
  targetUrl: string;
@@ -1998,7 +2005,8 @@ declare const GateConfigSchema: z.ZodObject<{
1998
2005
  bannerFrame?: string | undefined;
1999
2006
  license?: {
2000
2007
  entitled: boolean;
2001
- reason?: "none" | "unreachable" | undefined;
2008
+ reason?: "none" | "unreachable" | "invalid" | undefined;
2009
+ detail?: string | undefined;
2002
2010
  } | undefined;
2003
2011
  }, {
2004
2012
  targetUrl: string;
@@ -2046,7 +2054,8 @@ declare const GateConfigSchema: z.ZodObject<{
2046
2054
  bannerFrame?: string | undefined;
2047
2055
  license?: {
2048
2056
  entitled: boolean;
2049
- reason?: "none" | "unreachable" | undefined;
2057
+ reason?: "none" | "unreachable" | "invalid" | undefined;
2058
+ detail?: string | undefined;
2050
2059
  } | undefined;
2051
2060
  }>;
2052
2061
  /** Geparste Konfiguration (alle Defaults gesetzt). */
@@ -2132,6 +2141,8 @@ interface ReportGate {
2132
2141
  /** Gewählte Rechtsräume, komma-getrennt (z. B. "CH,EU") */
2133
2142
  jurisdiction?: string;
2134
2143
  noBannerNoTracker?: boolean;
2144
+ /** Positiv festgestellt: kein Banner, keine Tracker, kein Bot-Schutz. Das Gate gilt als bestanden («nichts zu prüfen»). */
2145
+ nothingToCheck?: boolean;
2135
2146
  /** Vom Scanner gemeldet: wurde ein Consent-Banner gesehen? (undefined = unbekannt) */
2136
2147
  bannerObserved?: boolean;
2137
2148
  /** Warum «kein Banner» nicht belegt ist (Reload-Schleife, spät erschienen, nicht bedienbar) */
@@ -2330,6 +2341,8 @@ declare class ChaosScanner implements ChaosScannerInterface {
2330
2341
  /** Ergebnis der Schlusspruefung: nur `completed` belegt «kein Banner». */
2331
2342
  private bannerProbe;
2332
2343
  private bannerIssue?;
2344
+ /** Der Banner bietet nur einen Hinweis (kein Akzeptieren, kein Ablehnen); Text für die Scanner-Warnung. */
2345
+ private infoOnlyBanner?;
2333
2346
  /** Erster erkannter Bot-Schutz der Hauptseite (Challenge, Sperre, Rate-Limit) in diesem Lauf. */
2334
2347
  private botProtection?;
2335
2348
  /** Eine Challenge hat sich innerhalb der Wartezeit nicht gelöst: in diesem Lauf nicht mehr warten. */
@@ -2735,6 +2748,11 @@ declare class PrivacyChaosGate {
2735
2748
  */
2736
2749
  constructor(scanner?: ChaosScannerInterface, remediationEngine?: RemediationEngineInterface, preflight?: Preflight);
2737
2750
  run(input: GateConfigInput): Promise<GateExecutionResult>;
2751
+ /**
2752
+ * Gekürztes Ergebnis ohne gültige Lizenz: Gate-Zustand und Exit-Code wie bei vollem Lauf, ausgegeben nur Zahlen.
2753
+ * Kein Report ausser der schlanken report.json, kein Auto-Fix, kein Re-Scan, keine Hash-Manifeste.
2754
+ */
2755
+ private finishLimited;
2738
2756
  private printExitNotes;
2739
2757
  /** Aussage zum Re-Scan, ohne mehr zu behaupten als gemessen wurde. */
2740
2758
  private rescanNote;
@@ -2805,7 +2823,7 @@ interface ReportFacts {
2805
2823
  problemCount: number;
2806
2824
  problemsText: string;
2807
2825
  }
2808
- /** Konkrete Code-Lösung je verletzter Regel — nur für belegte Befunde. */
2826
+ /** Konkrete Code-Lösung je ausgelöster Regel — nur für belegte Befunde. */
2809
2827
  interface CodeSolution {
2810
2828
  ruleId: string;
2811
2829
  title: string;
package/dist/index.js CHANGED
@@ -56,7 +56,7 @@ import {
56
56
  uncheckableReasons,
57
57
  uncheckableReasonsForReport,
58
58
  waitForVerifyUrl
59
- } from "./chunk-6MBUQ5EL.js";
59
+ } from "./chunk-NGGZYNRX.js";
60
60
 
61
61
  // src/index.ts
62
62
  async function runGate(optionsOrConfig) {
@@ -1,116 +1,116 @@
1
- # Cuonztech Privacy Chaos Gate
2
- ## Evidence Report — Consent-Pre-Consent-Leaks auf pilot-kunde.ch
3
-
4
- > **BEISPIELBERICHT (Demo):** Dieses Dokument zeigt das Format eines Evidence-Reports an einem
5
- > **erfundenen Beispiel**. `pilot-kunde.ch`, die Tag-ID `GTM-DEMO01`, das Datum und alle Zahlen sind
6
- > Platzhalter aus Demo-Daten. Es beschreibt keinen realen Kunden und keine reale Website.
7
-
8
- **Produkt:** Cuonztech Privacy Chaos Gate (CPCG)
9
- **Kategorie:** CI-Gate · Chaos-Scanner · Auto-Fix-PR
10
- **Auftraggeber/Pilot:** Beispiel (Platzhalter), Read-only Audit, 20.10.2026
11
- **Status:** Gate BLOCKED — 10 Tracker-Leaks vor Einwilligung (Beispielwerte)
12
- **Rechtsraum:** `CH,EU` (Standard). Nach EU (opt-in) blockieren Tracker vor der Einwilligung; nach CH allein (opt-out) wären
13
- die Befunde vor der Einwilligung Hinweise, blockierend bliebe Tracking nach dem Ablehnen.
14
-
15
- > ⚠️ **Hinweis / Disclaimer:** CPCG ist ein technisches Hilfsmittel zur Unterstützung bei der
16
- > Implementierung von Consent-Lösungen — **keine Rechtsberatung** und keine Garantie für
17
- > DSGVO-/TTDSG-Konformität. Bitte lassen Sie die endgültige Umsetzung anwaltlich prüfen.
18
- > / CPCG is a technical aid, **not legal advice** and no guarantee of GDPR/ePrivacy compliance.
19
-
20
- ---
21
-
22
- ## 1. Was ist passiert?
23
-
24
- Die Produktionsseite **pilot-kunde.ch** setzt professionell auf **OneTrust** (`cdn.cookielaw.org`,
25
- Domain-Script `151e70dd-…`). Trotzdem lädt der **Google-Tag-Manager-Bootstrap**
26
- (`GTM-DEMO01`) **ungedeckt im HTML-Head** — **bevor** das OneTrust-Banner irgendeine
27
- Entgegennahme von Einwilligung darstellt.
28
-
29
- Ergebnis des CPCG-Chaos-Scans: **10 Unauthorized Tracker Requests**.
30
-
31
- | KPI | Wert |
32
- |-----|------|
33
- | Gate | **BLOCKED** |
34
- | Leaks | **10** |
35
- | Szenarien fehlgeschlagen | happy-path-denied, fast-click, state-manipulation, network-drop |
36
- | CMP | OneTrust (korrekt eingebunden) |
37
- | Kritischste Lücke | GTM feuert pre-consent |
38
- | Signatur-Lücke | Marketo Munchkin (seit diesem Release detektiert) |
39
-
40
- ---
41
-
42
- ## 2. Befunde (Auszug, priorisiert)
43
-
44
- | Prio | Szenario | Tracker | Request |
45
- |------|----------|---------|---------|
46
- | **P0** | happy-path-denied | Google Tag Manager | `gtm.js?id=GTM-DEMO01` |
47
- | **P0** | fast-click | GTM, Hotjar, LinkedIn, TikTok | Container + Pixel |
48
- | **P1** | network-drop | GTM, Hotjar | laufen trotz blockiertem CMP (Default-State) |
49
- | **P1** | state-manipulation | TikTok Pixel | `api/v2/pixel/act` nach Storage-Wipe |
50
- | **P2** | (Signatur) | Marketo Munchkin | `munchkin.marketo.net/munchkin.js` unbedingt im Head |
51
-
52
- ### Quelltext-Beweis (gekürzt)
53
-
54
- ```html
55
- <!-- OneTrust Cookies Consent Notice start for pilot-kunde.ch -->
56
- <script src="https://cdn.cookielaw.org/consent/151e70dd-…/OtAutoBlock.js"></script>
57
- <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" …></script>
58
-
59
- <!-- Google Tag Manager — läuft ohne Consent -->
60
- <script>(function(w,d,s,l,i){ … j.src='https://www.googletagmanager.com/gtm.js?id='+i;
61
- })(window,document,'script','dataLayer','GTM-DEMO01');</script>
62
- ```
63
-
64
- ---
65
-
66
- ## 3. Einordnung
67
-
68
- CMPs prüfen vorrangig die **Konfiguration** (Banner, Kategorien, Consent-Speicherung), CPCG prüft das **Verhalten**
69
- der laufenden Seite im Browser. CPCG ersetzt kein CMP und keine Rechtsberatung, sondern ergänzt beides.
70
-
71
- | | Schwerpunkt | Zeitpunkt |
72
- |---|---|---|
73
- | CMP (typisch) | Konfiguration: Banner, Kategorien, Consent-Speicherung | im Betrieb der Seite |
74
- | **CuonzTech CPCG** | Verhalten: welche Requests laufen vor und nach der Einwilligung (Fast-Click, Network-Drop u. a.) | im CI vor dem Merge oder als Stichprobe; optional mit Fix-Vorschlag |
75
-
76
- **Ansatz:** Shift-Left. Nicht erst nach dem Go-Live dokumentieren, sondern vor dem Merge prüfen.
77
-
78
- ---
79
-
80
- ## 4. Fix-Prinzip (nicht ohne Kunden-Freigabe anwenden)
81
-
82
- Das Tracker-Skript darf erst nach der Einwilligung der passenden Kategorie (Statistik/Marketing)
83
- laden, nicht im Head ohne Consent-Prüfung. Den konkreten Patch erzeugt CPCG im Scan-Lauf mit
84
- `--auto-fix` und `--source-dir <Quellverzeichnis>`; er steht als Diff im Report. Bei OneTrust und
85
- Cookiebot liest der Patch die Kategorien automatisch. Bei eigenen Bannern gibt der Auto-Fix nur
86
- eine Anleitung aus; die Anbindung über cpcgGrantConsent() übernimmt der Kunde. Andere Consent-Plattformen und Tracker, die nicht im
87
- Quelltext stehen (Tag Manager, Server, CMS), bleiben «manuell zu beheben» (siehe README, Abschnitt
88
- «Auto-Fix: Grenzen»). Dieses Beispiel enthält bewusst keinen Beispiel-Patch: ein gekürzter Code
89
- würde nicht dem echten Ausgabeformat entsprechen.
90
-
91
- **Nach Umsetzung:** Ein erneuter Scan muss ein grünes Gate liefern (Exit-Code 0).
92
-
93
- ---
94
-
95
- ## 5. Was der Kunde bekommt (Produkt-Fluss)
96
-
97
- 1. **Online-Kauf** auf cuonztech.ch → Lizenzcode per E-Mail
98
- 2. **Scan:** `npx cuonztech-privacy-chaos-gate --url <staging>`. Scan und Konsolen-Gate brauchen keine Lizenz.
99
- 3. **Report** (JSON + Markdown/HTML). Den **Kundenreport** (mit `--client`, PDF mit `--report-pdf`) schaltet die Lizenz frei:
100
- Code per Umgebungsvariable `CPCG_LICENSE` übergeben.
101
- 4. **Auto-Fix-PR** (optional, mit Review-Agent; Commit/PR brauchen eine Lizenz, das lokale Anwenden nicht)
102
- 5. **CI-Gate** im GitHub-Action-Workflow — Merge-Blocker bei Pre-Consent-Leaks (nach EU/UK/BR; nach CH nur Hinweis)
103
-
104
- ---
105
-
106
- ## 6. Nächste Schritte
107
-
108
- - [ ] Technische Umsetzung Fix (intern oder CPCG Auto-Fix-PR)
109
- - [ ] Juristische Prüfung (Datenschutzbeauftragte/r) — siehe Disclaimer
110
- - [ ] Rescan + Freigabe
111
- - [ ] CPCG als CI-Gate in die Pipeline
112
-
113
- ---
114
-
115
- *© Cuonztech — Cuonztech Privacy Chaos Gate (CPCG)*
116
- *Technisches Hilfsmittel, keine Rechtsberatung.*
1
+ # Cuonztech Privacy Chaos Gate
2
+ ## Evidence Report — Consent-Pre-Consent-Leaks auf pilot-kunde.ch
3
+
4
+ > **BEISPIELBERICHT (Demo):** Dieses Dokument zeigt das Format eines Evidence-Reports an einem
5
+ > **erfundenen Beispiel**. `pilot-kunde.ch`, die Tag-ID `GTM-DEMO01`, das Datum und alle Zahlen sind
6
+ > Platzhalter aus Demo-Daten. Es beschreibt keinen realen Kunden und keine reale Website.
7
+
8
+ **Produkt:** Cuonztech Privacy Chaos Gate (CPCG)
9
+ **Kategorie:** CI-Gate · Chaos-Scanner · Auto-Fix-PR
10
+ **Auftraggeber/Pilot:** Beispiel (Platzhalter), Read-only Audit, 20.10.2026
11
+ **Status:** Gate BLOCKED — 10 Tracker-Leaks vor Einwilligung (Beispielwerte)
12
+ **Rechtsraum:** `CH,EU` (Standard). Nach EU (opt-in) blockieren Tracker vor der Einwilligung; nach CH allein (opt-out) wären
13
+ die Befunde vor der Einwilligung Hinweise, blockierend bliebe Tracking nach dem Ablehnen.
14
+
15
+ > ⚠️ **Hinweis / Disclaimer:** CPCG ist ein technisches Hilfsmittel zur Unterstützung bei der
16
+ > Implementierung von Consent-Lösungen — **keine Rechtsberatung** und keine Garantie für
17
+ > DSGVO-/TTDSG-Konformität. Bitte lassen Sie die endgültige Umsetzung anwaltlich prüfen.
18
+ > / CPCG is a technical aid, **not legal advice** and no guarantee of GDPR/ePrivacy compliance.
19
+
20
+ ---
21
+
22
+ ## 1. Was ist passiert?
23
+
24
+ Die Produktionsseite **pilot-kunde.ch** setzt professionell auf **OneTrust** (`cdn.cookielaw.org`,
25
+ Domain-Script `151e70dd-…`). Trotzdem lädt der **Google-Tag-Manager-Bootstrap**
26
+ (`GTM-DEMO01`) **ungedeckt im HTML-Head** — **bevor** das OneTrust-Banner irgendeine
27
+ Entgegennahme von Einwilligung darstellt.
28
+
29
+ Ergebnis des CPCG-Chaos-Scans: **10 Unauthorized Tracker Requests**.
30
+
31
+ | KPI | Wert |
32
+ |-----|------|
33
+ | Gate | **BLOCKED** |
34
+ | Leaks | **10** |
35
+ | Szenarien fehlgeschlagen | happy-path-denied, fast-click, state-manipulation, network-drop |
36
+ | CMP | OneTrust (korrekt eingebunden) |
37
+ | Kritischste Lücke | GTM feuert pre-consent |
38
+ | Signatur-Lücke | Marketo Munchkin (seit diesem Release detektiert) |
39
+
40
+ ---
41
+
42
+ ## 2. Befunde (Auszug, priorisiert)
43
+
44
+ | Prio | Szenario | Tracker | Request |
45
+ |------|----------|---------|---------|
46
+ | **P0** | happy-path-denied | Google Tag Manager | `gtm.js?id=GTM-DEMO01` |
47
+ | **P0** | fast-click | GTM, Hotjar, LinkedIn, TikTok | Container + Pixel |
48
+ | **P1** | network-drop | GTM, Hotjar | laufen trotz blockiertem CMP (Default-State) |
49
+ | **P1** | state-manipulation | TikTok Pixel | `api/v2/pixel/act` nach Storage-Wipe |
50
+ | **P2** | (Signatur) | Marketo Munchkin | `munchkin.marketo.net/munchkin.js` unbedingt im Head |
51
+
52
+ ### Quelltext-Beweis (gekürzt)
53
+
54
+ ```html
55
+ <!-- OneTrust Cookies Consent Notice start for pilot-kunde.ch -->
56
+ <script src="https://cdn.cookielaw.org/consent/151e70dd-…/OtAutoBlock.js"></script>
57
+ <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" …></script>
58
+
59
+ <!-- Google Tag Manager — läuft ohne Consent -->
60
+ <script>(function(w,d,s,l,i){ … j.src='https://www.googletagmanager.com/gtm.js?id='+i;
61
+ })(window,document,'script','dataLayer','GTM-DEMO01');</script>
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 3. Einordnung
67
+
68
+ CMPs prüfen vorrangig die **Konfiguration** (Banner, Kategorien, Consent-Speicherung), CPCG prüft das **Verhalten**
69
+ der laufenden Seite im Browser. CPCG ersetzt kein CMP und keine Rechtsberatung, sondern ergänzt beides.
70
+
71
+ | | Schwerpunkt | Zeitpunkt |
72
+ |---|---|---|
73
+ | CMP (typisch) | Konfiguration: Banner, Kategorien, Consent-Speicherung | im Betrieb der Seite |
74
+ | **CuonzTech CPCG** | Verhalten: welche Requests laufen vor und nach der Einwilligung (Fast-Click, Network-Drop u. a.) | im CI vor dem Merge oder als Stichprobe; optional mit Fix-Vorschlag |
75
+
76
+ **Ansatz:** Shift-Left. Nicht erst nach dem Go-Live dokumentieren, sondern vor dem Merge prüfen.
77
+
78
+ ---
79
+
80
+ ## 4. Fix-Prinzip (nicht ohne Kunden-Freigabe anwenden)
81
+
82
+ Das Tracker-Skript darf erst nach der Einwilligung der passenden Kategorie (Statistik/Marketing)
83
+ laden, nicht im Head ohne Consent-Prüfung. Den konkreten Patch erzeugt CPCG im Scan-Lauf mit
84
+ `--auto-fix` und `--source-dir <Quellverzeichnis>`; er steht als Diff im Report. Bei OneTrust und
85
+ Cookiebot liest der Patch die Kategorien automatisch. Bei eigenen Bannern gibt der Auto-Fix nur
86
+ eine Anleitung aus; die Anbindung über cpcgGrantConsent() übernimmt der Kunde. Andere Consent-Plattformen und Tracker, die nicht im
87
+ Quelltext stehen (Tag Manager, Server, CMS), bleiben «manuell zu beheben» (siehe README, Abschnitt
88
+ «Auto-Fix: Grenzen»). Dieses Beispiel enthält bewusst keinen Beispiel-Patch: ein gekürzter Code
89
+ würde nicht dem echten Ausgabeformat entsprechen.
90
+
91
+ **Nach Umsetzung:** Ein erneuter Scan muss ein grünes Gate liefern (Exit-Code 0).
92
+
93
+ ---
94
+
95
+ ## 5. Was der Kunde bekommt (Produkt-Fluss)
96
+
97
+ 1. **Online-Kauf** auf cuonztech.ch → Lizenzcode per E-Mail
98
+ 2. **Scan:** `npx cuonztech-privacy-chaos-gate --url <staging>`. Der Scan läuft auch ohne Lizenz; dann zeigt das Ergebnis nur Zahlen, die vollständigen Befunde und Reports brauchen die Lizenz.
99
+ 3. **Report** (JSON + Markdown/HTML). Den **Kundenreport** (mit `--client`, PDF mit `--report-pdf`) schaltet die Lizenz frei:
100
+ Code per Umgebungsvariable `CPCG_LICENSE` übergeben.
101
+ 4. **Auto-Fix-PR** (optional, mit Review-Agent; Commit/PR brauchen eine Lizenz, das lokale Anwenden nicht)
102
+ 5. **CI-Gate** im GitHub-Action-Workflow — Merge-Blocker bei Pre-Consent-Leaks (nach EU/UK/BR; nach CH nur Hinweis)
103
+
104
+ ---
105
+
106
+ ## 6. Nächste Schritte
107
+
108
+ - [ ] Technische Umsetzung Fix (intern oder CPCG Auto-Fix-PR)
109
+ - [ ] Juristische Prüfung (Datenschutzbeauftragte/r) — siehe Disclaimer
110
+ - [ ] Rescan + Freigabe
111
+ - [ ] CPCG als CI-Gate in die Pipeline
112
+
113
+ ---
114
+
115
+ *© Cuonztech — Cuonztech Privacy Chaos Gate (CPCG)*
116
+ *Technisches Hilfsmittel, keine Rechtsberatung.*
@@ -0,0 +1,96 @@
1
+ Die Schriften Cormorant Garamond und Inter sind im PDF-Report von CPCG eingebettet (unverändert, Latin-Teilmenge).
2
+
3
+ Cormorant Garamond
4
+ Copyright 2015 The Cormorant Project Authors (https://github.com/CatharsisFonts/Cormorant)
5
+
6
+ Inter
7
+ Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)
8
+
9
+ Beide stehen unter der SIL Open Font License, Version 1.1. Der Lizenztext folgt.
10
+
11
+ -----------------------------------------------------------
12
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
13
+ -----------------------------------------------------------
14
+
15
+ PREAMBLE
16
+ The goals of the Open Font License (OFL) are to stimulate worldwide
17
+ development of collaborative font projects, to support the font creation
18
+ efforts of academic and linguistic communities, and to provide a free and
19
+ open framework in which fonts may be shared and improved in partnership
20
+ with others.
21
+
22
+ The OFL allows the licensed fonts to be used, studied, modified and
23
+ redistributed freely as long as they are not sold by themselves. The
24
+ fonts, including any derivative works, can be bundled, embedded,
25
+ redistributed and/or sold with any software provided that any reserved
26
+ names are not used by derivative works. The fonts and derivatives,
27
+ however, cannot be released under any other type of license. The
28
+ requirement for fonts to remain under this license does not apply
29
+ to any document created using the fonts or their derivatives.
30
+
31
+ DEFINITIONS
32
+ "Font Software" refers to the set of files released by the Copyright
33
+ Holder(s) under this license and clearly marked as such. This may
34
+ include source files, build scripts and documentation.
35
+
36
+ "Reserved Font Name" refers to any names specified as such after the
37
+ copyright statement(s).
38
+
39
+ "Original Version" refers to the collection of Font Software components as
40
+ distributed by the Copyright Holder(s).
41
+
42
+ "Modified Version" refers to any derivative made by adding to, deleting,
43
+ or substituting -- in part or in whole -- any of the components of the
44
+ Original Version, by changing formats or by porting the Font Software to a
45
+ new environment.
46
+
47
+ "Author" refers to any designer, engineer, programmer, technical
48
+ writer or other person who contributed to the Font Software.
49
+
50
+ PERMISSION & CONDITIONS
51
+ Permission is hereby granted, free of charge, to any person obtaining
52
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
53
+ redistribute, and sell modified and unmodified copies of the Font
54
+ Software, subject to the following conditions:
55
+
56
+ 1) Neither the Font Software nor any of its individual components,
57
+ in Original or Modified Versions, may be sold by itself.
58
+
59
+ 2) Original or Modified Versions of the Font Software may be bundled,
60
+ redistributed and/or sold with any software, provided that each copy
61
+ contains the above copyright notice and this license. These can be
62
+ included either as stand-alone text files, human-readable headers or
63
+ in the appropriate machine-readable metadata fields within text or
64
+ binary files as long as those fields can be easily viewed by the user.
65
+
66
+ 3) No Modified Version of the Font Software may use the Reserved Font
67
+ Name(s) unless explicit written permission is granted by the corresponding
68
+ Copyright Holder. This restriction only applies to the primary font name as
69
+ presented to the users.
70
+
71
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
72
+ Software shall not be used to promote, endorse or advertise any
73
+ Modified Version, except to acknowledge the contribution(s) of the
74
+ Copyright Holder(s) and the Author(s) or with their explicit written
75
+ permission.
76
+
77
+ 5) The Font Software, modified or unmodified, in part or in whole,
78
+ must be distributed entirely under this license, and must not be
79
+ distributed under any other license. The requirement for fonts to
80
+ remain under this license does not apply to any document created
81
+ using the Font Software.
82
+
83
+ TERMINATION
84
+ This license becomes null and void if any of the above conditions are
85
+ not met.
86
+
87
+ DISCLAIMER
88
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
89
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
90
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
91
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
92
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
93
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
94
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
95
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
96
+ OTHER DEALINGS IN THE FONT SOFTWARE.
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "cuonztech-privacy-chaos-gate",
3
- "version": "0.3.2",
4
- "description": "CuonzTech Privacy Chaos Gate — CI/CD Consent-Scanner, Chaos-Szenarien und Auto-Fix-PR",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "bin": {
8
- "cpcg": "dist/cli.js"
9
- },
10
- "type": "module",
11
- "files": [
12
- "dist",
13
- "!dist/**/*.map",
14
- "action.yml",
15
- "LICENSE",
16
- "THIRD_PARTY_NOTICES.md",
17
- "licenses",
18
- "README.md",
19
- "docs/BRAND-PILOT-EVIDENCE.md"
20
- ],
21
- "engines": {
22
- "node": ">=20"
23
- },
24
- "repository": {
25
- "type": "git",
26
- "url": "git+https://github.com/cuonztech/privacy-chaos-gate.git"
27
- },
28
- "homepage": "https://cuonztech.ch/privacy-chaos-gate.html",
29
- "bugs": {
30
- "url": "https://github.com/cuonztech/privacy-chaos-gate/issues"
31
- },
32
- "publishConfig": {},
33
- "scripts": {
34
- "dev": "tsx src/cli.ts",
35
- "build": "tsup",
36
- "start": "node dist/cli.js",
37
- "serve:fixture": "tsx tests/helpers/serveFixtureCli.ts",
38
- "test": "vitest run",
39
- "test:watch": "vitest",
40
- "typecheck": "tsc --noEmit",
41
- "typecheck:all": "tsc -p tsconfig.test.json --noEmit",
42
- "prepublishOnly": "pnpm run typecheck && pnpm run test && pnpm run build",
43
- "demo": "tsx scripts/scan-demo-portal.mts && tsx scripts/make-deluxe-report.mts && tsx scripts/package-delivery.mts",
44
- "demo:report": "tsx scripts/make-deluxe-report.mts"
45
- },
46
- "keywords": [
47
- "privacy",
48
- "chaos-engineering",
49
- "consent",
50
- "cmp",
51
- "gdpr",
52
- "revdsg",
53
- "ci-cd",
54
- "playwright",
55
- "cuonztech"
56
- ],
57
- "author": "CuonzTech · Carlo Cuonz",
58
- "license": "SEE LICENSE IN LICENSE",
59
- "dependencies": {
60
- "commander": "^12.1.0",
61
- "dotenv": "^16.4.5",
62
- "picocolors": "^1.1.0",
63
- "playwright": "^1.64.1",
64
- "typescript": "5.9.3",
65
- "zod": "^3.23.8"
66
- },
67
- "devDependencies": {
68
- "@types/node": "^22.8.1",
69
- "tsup": "^8.3.0",
70
- "tsx": "^4.19.1",
71
- "vitest": "^2.1.3"
72
- }
73
- }
1
+ {
2
+ "name": "cuonztech-privacy-chaos-gate",
3
+ "version": "0.3.4",
4
+ "description": "CuonzTech Privacy Chaos Gate — CI/CD Consent-Scanner, Chaos-Szenarien und Auto-Fix-PR",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "cpcg": "dist/cli.js"
9
+ },
10
+ "type": "module",
11
+ "files": [
12
+ "dist",
13
+ "!dist/**/*.map",
14
+ "action.yml",
15
+ "LICENSE",
16
+ "THIRD_PARTY_NOTICES.md",
17
+ "licenses",
18
+ "README.md",
19
+ "docs/BRAND-PILOT-EVIDENCE.md"
20
+ ],
21
+ "engines": {
22
+ "node": ">=20"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/cuonztech/privacy-chaos-gate.git"
27
+ },
28
+ "homepage": "https://cuonztech.ch/privacy-chaos-gate.html",
29
+ "bugs": {
30
+ "url": "https://github.com/cuonztech/privacy-chaos-gate/issues"
31
+ },
32
+ "publishConfig": {},
33
+ "scripts": {
34
+ "dev": "tsx src/cli.ts",
35
+ "build": "tsup",
36
+ "start": "node dist/cli.js",
37
+ "serve:fixture": "tsx tests/helpers/serveFixtureCli.ts",
38
+ "test": "vitest run",
39
+ "test:watch": "vitest",
40
+ "typecheck": "tsc --noEmit",
41
+ "typecheck:all": "tsc -p tsconfig.test.json --noEmit",
42
+ "prepublishOnly": "pnpm run typecheck && pnpm run build && pnpm run test",
43
+ "demo": "tsx scripts/scan-demo-portal.mts && tsx scripts/make-deluxe-report.mts && tsx scripts/package-delivery.mts",
44
+ "demo:report": "tsx scripts/make-deluxe-report.mts"
45
+ },
46
+ "keywords": [
47
+ "privacy",
48
+ "chaos-engineering",
49
+ "consent",
50
+ "cmp",
51
+ "gdpr",
52
+ "revdsg",
53
+ "ci-cd",
54
+ "playwright",
55
+ "cuonztech"
56
+ ],
57
+ "author": "CuonzTech · Carlo Cuonz",
58
+ "license": "SEE LICENSE IN LICENSE",
59
+ "dependencies": {
60
+ "commander": "^12.1.0",
61
+ "dotenv": "^16.4.5",
62
+ "picocolors": "^1.1.0",
63
+ "playwright": "^1.64.1",
64
+ "typescript": "5.9.3",
65
+ "zod": "^3.23.8"
66
+ },
67
+ "devDependencies": {
68
+ "@types/node": "^22.8.1",
69
+ "tsup": "^8.3.0",
70
+ "tsx": "^4.19.1",
71
+ "vitest": "^2.1.3"
72
+ }
73
+ }