@blakfy/cookie 2.1.1 → 2.2.0
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/CHANGELOG.md +194 -120
- package/README.md +594 -480
- package/SECURITY.md +54 -0
- package/dist/cookie-defaults.js +1 -2
- package/dist/cookie-defaults.min.js +1 -2
- package/dist/cookie.d.ts +171 -0
- package/dist/cookie.js +2863 -2376
- package/dist/cookie.js.map +4 -4
- package/dist/cookie.min.js +2 -3
- package/{ARCHITECTURE.md → docs/architecture.md} +187 -186
- package/{COMPLIANCE.md → docs/compliance.md} +199 -191
- package/{MIGRATION.md → docs/migration.md} +172 -156
- package/docs/release.md +176 -0
- package/{TCF-CERTIFICATION.md → docs/tcf-certification.md} +115 -106
- package/package.json +145 -61
- package/status.json +30 -30
package/SECURITY.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Aşağıdaki sürümler güvenlik düzeltmeleri alır:
|
|
6
|
+
|
|
7
|
+
| Version | Supported | End of life |
|
|
8
|
+
| ------- | ------------------------- | ----------- |
|
|
9
|
+
| 2.1.x | ✅ Aktif desteklenir | TBD |
|
|
10
|
+
| 2.0.x | ⚠️ Sadece kritik (90 gün) | 2026-08-07 |
|
|
11
|
+
| < 2.0 | ❌ Desteklenmez | — |
|
|
12
|
+
|
|
13
|
+
`@blakfy/cookie` ve `@blakfy/cookie-next` paketleri aynı sürüm matrisini takip eder.
|
|
14
|
+
|
|
15
|
+
## Reporting a Vulnerability
|
|
16
|
+
|
|
17
|
+
Bir güvenlik açığı bulduğunda **lütfen public GitHub issue açma**. Bunun yerine:
|
|
18
|
+
|
|
19
|
+
📧 **E-posta:** security@blakfy.com
|
|
20
|
+
|
|
21
|
+
Aşağıdaki bilgileri eklersen yararlı olur:
|
|
22
|
+
|
|
23
|
+
- Açığın tipi (XSS, prototype pollution, supply chain, vb.)
|
|
24
|
+
- Etkilenen sürüm(ler)
|
|
25
|
+
- Reproducible test case veya proof-of-concept
|
|
26
|
+
- Potansiyel etki alanı
|
|
27
|
+
|
|
28
|
+
## Response Timeline
|
|
29
|
+
|
|
30
|
+
| Süre | Aksiyon |
|
|
31
|
+
| ------- | ---------------------------------------------- |
|
|
32
|
+
| 72 saat | İlk yanıt + onay (alındı / inceleniyor) |
|
|
33
|
+
| 7 gün | Açığın doğrulanması ve severity scoring (CVSS) |
|
|
34
|
+
| 30 gün | Kritik / yüksek öncelik için yama yayını |
|
|
35
|
+
| 90 gün | Public disclosure (yamadan sonra) |
|
|
36
|
+
|
|
37
|
+
Coordinated disclosure tercih edilir. Bildirimi yapan araştırmacıların isimleri (rıza dahilinde) yama notlarında credit edilir.
|
|
38
|
+
|
|
39
|
+
## Out of Scope
|
|
40
|
+
|
|
41
|
+
Bu paket bir **çerez izni / consent management** widget'ıdır. Aşağıdakiler güvenlik bug'ı olarak değerlendirilmez:
|
|
42
|
+
|
|
43
|
+
- Sosyal mühendislik / phishing senaryoları (paket sınırının dışında)
|
|
44
|
+
- HTTP başlık eksiklikleri (site sahibinin sorumluluğu — CSP, HSTS, vs.)
|
|
45
|
+
- DDoS veya rate-limit eksikliği (bizim altyapı değil — CDN sağlayıcı)
|
|
46
|
+
- HIPAA / PCI-DSS / FERPA gibi düzenlemelerin "implementation gap"i (README → "Out of Scope" bölümü)
|
|
47
|
+
|
|
48
|
+
## Hall of Fame
|
|
49
|
+
|
|
50
|
+
Güvenlik araştırmacılarına teşekkür listesi (henüz boş — ilk olabilirsin 🎯).
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
**Coordination:** Anthropic'in [Coordinated Vulnerability Disclosure](https://anthropic.com/responsible-disclosure) yaklaşımına benzer bir politika uyguluyoruz.
|
package/dist/cookie-defaults.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blakfy Cookie Widget v2.
|
|
2
|
+
* Blakfy Cookie Widget v2.2.0
|
|
3
3
|
* https://github.com/tariktunc/blakfy-cookie
|
|
4
4
|
* MIT License | (c) Blakfy Studio
|
|
5
5
|
*
|
|
@@ -73,4 +73,3 @@
|
|
|
73
73
|
}
|
|
74
74
|
})();
|
|
75
75
|
})();
|
|
76
|
-
/*! For license information please see cookie-defaults.js.LEGAL.txt */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blakfy Cookie Widget v2.
|
|
2
|
+
* Blakfy Cookie Widget v2.2.0
|
|
3
3
|
* https://github.com/tariktunc/blakfy-cookie
|
|
4
4
|
* MIT License | (c) Blakfy Studio
|
|
5
5
|
*
|
|
@@ -7,4 +7,3 @@
|
|
|
7
7
|
* 23 languages | 18 presets | Tag-gating | Powered by Blakfy Studio
|
|
8
8
|
*/
|
|
9
9
|
(()=>{var n=!1,e=()=>{typeof window!="undefined"&&(n||(n=!0,window.dataLayer=window.dataLayer||[],typeof window.gtag!="function"&&(window.gtag=function(){window.dataLayer.push(arguments)}),window.gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied",functionality_storage:"denied",personalization_storage:"denied",security_storage:"granted",wait_for_update:500})))};var a=!1,o=()=>{typeof window!="undefined"&&(a||(a=!0,window.uetq=window.uetq||[],window.uetq.push("consent","default",{ad_storage:"denied"})))};var i=!1,d=()=>{typeof window!="undefined"&&(i||(i=!0,typeof window.ym!="function"&&(window.ym=function(){},window.ym.__blakfyStub=!0)))};(function(){if(typeof window!="undefined"&&!window.__blakfyConsentDefaultsLoaded){window.__blakfyConsentDefaultsLoaded=!0;try{e()}catch(t){}try{o()}catch(t){}try{d()}catch(t){}}})();})();
|
|
10
|
-
/*! For license information please see cookie-defaults.min.js.LEGAL.txt */
|
package/dist/cookie.d.ts
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// @blakfy/cookie — public ambient type definitions
|
|
2
|
+
// Bu dosya scripts/build.js tarafından dist/cookie.d.ts olarak kopyalanır.
|
|
3
|
+
// `import "@blakfy/cookie"` deyince TypeScript bu dosyayı pickup eder.
|
|
4
|
+
|
|
5
|
+
/** Desteklenen 23 dil (BCP47) */
|
|
6
|
+
export type BlakfyLocale =
|
|
7
|
+
| "tr"
|
|
8
|
+
| "en"
|
|
9
|
+
| "ar"
|
|
10
|
+
| "fa"
|
|
11
|
+
| "ur"
|
|
12
|
+
| "fr"
|
|
13
|
+
| "ru"
|
|
14
|
+
| "de"
|
|
15
|
+
| "he"
|
|
16
|
+
| "uk"
|
|
17
|
+
| "es"
|
|
18
|
+
| "it"
|
|
19
|
+
| "pt"
|
|
20
|
+
| "nl"
|
|
21
|
+
| "pl"
|
|
22
|
+
| "sv"
|
|
23
|
+
| "cs"
|
|
24
|
+
| "zh"
|
|
25
|
+
| "zh-TW"
|
|
26
|
+
| "ja"
|
|
27
|
+
| "ko"
|
|
28
|
+
| "id"
|
|
29
|
+
| "hi";
|
|
30
|
+
|
|
31
|
+
/** Tespit edilen yasal yetki alanı */
|
|
32
|
+
export type Jurisdiction = "GDPR" | "CCPA" | "LGPD" | "default";
|
|
33
|
+
|
|
34
|
+
/** Consent kategorileri — `essential` her zaman `true` */
|
|
35
|
+
export type ConsentCategory = "essential" | "analytics" | "marketing" | "functional" | "recording";
|
|
36
|
+
|
|
37
|
+
/** Banner / modal konum seçenekleri (default: bottom-center) */
|
|
38
|
+
export type BlakfyPosition =
|
|
39
|
+
| "bottom-center"
|
|
40
|
+
| "bottom-right"
|
|
41
|
+
| "bottom-left"
|
|
42
|
+
| "top-center"
|
|
43
|
+
| "top-right"
|
|
44
|
+
| "top-left";
|
|
45
|
+
|
|
46
|
+
/** Renk teması (default: auto = prefers-color-scheme) */
|
|
47
|
+
export type BlakfyTheme = "light" | "gray" | "dark" | "auto";
|
|
48
|
+
|
|
49
|
+
/** Tam consent state — `getState()` döndürür */
|
|
50
|
+
export interface BlakfyConsentState {
|
|
51
|
+
id: string;
|
|
52
|
+
essential: true;
|
|
53
|
+
analytics: boolean;
|
|
54
|
+
marketing: boolean;
|
|
55
|
+
functional: boolean;
|
|
56
|
+
recording: boolean;
|
|
57
|
+
timestamp: string;
|
|
58
|
+
version: string;
|
|
59
|
+
locale: string;
|
|
60
|
+
mainLang: string;
|
|
61
|
+
jurisdiction: Jurisdiction;
|
|
62
|
+
tcString: string | null;
|
|
63
|
+
uspString: string | null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Widget konfigürasyon nesnesi (data-blakfy-* attribute karşılıkları) */
|
|
67
|
+
export interface BlakfyCookieConfig {
|
|
68
|
+
locale?: BlakfyLocale | "auto";
|
|
69
|
+
mainLang?: BlakfyLocale;
|
|
70
|
+
policyUrl?: string;
|
|
71
|
+
policyVersion?: string;
|
|
72
|
+
auditEndpoint?: string;
|
|
73
|
+
position?: BlakfyPosition;
|
|
74
|
+
theme?: BlakfyTheme;
|
|
75
|
+
accent?: string;
|
|
76
|
+
presets?: string;
|
|
77
|
+
tcf?: boolean;
|
|
78
|
+
cmpId?: number | string;
|
|
79
|
+
ccpa?: "auto" | "true" | "false";
|
|
80
|
+
gpc?: "respect" | "ignore";
|
|
81
|
+
dnt?: "respect" | "auto-deny";
|
|
82
|
+
statusUrl?: string;
|
|
83
|
+
statusEnabled?: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** registerCleanup() seçenekleri */
|
|
87
|
+
export interface RegisterCleanupOptions {
|
|
88
|
+
category: ConsentCategory;
|
|
89
|
+
cookies?: (string | RegExp)[];
|
|
90
|
+
storage?: string[];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** TCF v2.2 API alt-modülü */
|
|
94
|
+
export interface BlakfyTcfApi {
|
|
95
|
+
getTCString(): string | null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** CCPA / CPRA API alt-modülü */
|
|
99
|
+
export interface BlakfyCcpaApi {
|
|
100
|
+
optOut(): void;
|
|
101
|
+
isOptedOut(): boolean;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Public window.BlakfyCookie API yüzeyi */
|
|
105
|
+
export interface BlakfyCookieAPI {
|
|
106
|
+
/** Kütüphane sürümü (örn. "2.1.2") */
|
|
107
|
+
version: string;
|
|
108
|
+
/** Tercihler modalını aç */
|
|
109
|
+
open(): void;
|
|
110
|
+
/** Tüm kategorileri kabul et */
|
|
111
|
+
acceptAll(): void;
|
|
112
|
+
/** Tüm kategorileri reddet (essential dışında) */
|
|
113
|
+
rejectAll(): void;
|
|
114
|
+
/** Kategori onaylı mı? `essential` her zaman true */
|
|
115
|
+
getConsent(category: ConsentCategory): boolean;
|
|
116
|
+
/** Tam consent state objesi (henüz karar verilmediyse null) */
|
|
117
|
+
getState(): BlakfyConsentState | null;
|
|
118
|
+
/** State değişince çağrılır */
|
|
119
|
+
onChange(fn: (state: BlakfyConsentState) => void): void;
|
|
120
|
+
/** Kategori-bazlı listener; mevcut state ile anında çağrılır */
|
|
121
|
+
onConsent(category: ConsentCategory, fn: (granted: boolean) => void): void;
|
|
122
|
+
/** Dili değiştir (UI re-render) */
|
|
123
|
+
setLocale(locale: BlakfyLocale): void;
|
|
124
|
+
/** Audit log için ayarlanan birincil dil */
|
|
125
|
+
getMainLang(): BlakfyLocale;
|
|
126
|
+
/** Onay geri çekildiğinde silinecek cookie/localStorage anahtarları */
|
|
127
|
+
registerCleanup(opts: RegisterCleanupOptions): void;
|
|
128
|
+
/** Kategori için tag-gating'i manuel aç */
|
|
129
|
+
unblock(category: ConsentCategory): void;
|
|
130
|
+
/** DOM'u tekrar tara (SPA navigasyonu sonrası) */
|
|
131
|
+
scan(): void;
|
|
132
|
+
/** Hazır preset'i runtime'da uygula */
|
|
133
|
+
usePreset(name: string): void;
|
|
134
|
+
/** IAB TCF v2.2 alt-modülü */
|
|
135
|
+
tcf: BlakfyTcfApi;
|
|
136
|
+
/** CCPA / CPRA alt-modülü */
|
|
137
|
+
ccpa: BlakfyCcpaApi;
|
|
138
|
+
/** Tespit edilen yasal yetki alanı */
|
|
139
|
+
getJurisdiction(): Jurisdiction;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
declare global {
|
|
143
|
+
interface Window {
|
|
144
|
+
BlakfyCookie?: BlakfyCookieAPI;
|
|
145
|
+
/** Google gtag — IAB CMP standartlarına uyumlu */
|
|
146
|
+
gtag?: (...args: unknown[]) => void;
|
|
147
|
+
/** Microsoft UET (Bing Ads) consent queue */
|
|
148
|
+
uetq?: unknown[];
|
|
149
|
+
/** Yandex Metrica */
|
|
150
|
+
ym?: unknown;
|
|
151
|
+
/** Google Tag Manager dataLayer */
|
|
152
|
+
dataLayer?: unknown[];
|
|
153
|
+
/** IAB TCF v2.2 standart API */
|
|
154
|
+
__tcfapi?: (
|
|
155
|
+
cmd: string,
|
|
156
|
+
version: number,
|
|
157
|
+
callback: (data: unknown, success: boolean) => void,
|
|
158
|
+
parameter?: unknown
|
|
159
|
+
) => void;
|
|
160
|
+
/** IAB CCPA / USP API */
|
|
161
|
+
__uspapi?: (
|
|
162
|
+
cmd: string,
|
|
163
|
+
version: number,
|
|
164
|
+
callback: (data: unknown, success: boolean) => void
|
|
165
|
+
) => void;
|
|
166
|
+
/** Global Privacy Control sinyali */
|
|
167
|
+
globalPrivacyControl?: boolean;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export {};
|