@greenarmor/ges-policy-engine 1.2.7 → 1.3.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/dist/index.d.ts CHANGED
@@ -14,3 +14,10 @@ export { createNIST80053PolicyPack } from "./packs/nist-800-53.js";
14
14
  export { createISO27001PolicyPack } from "./packs/iso27001.js";
15
15
  export { createISO27701PolicyPack } from "./packs/iso27701.js";
16
16
  export { createHIPAAPolicyPack } from "./packs/hipaa.js";
17
+ export { createPrivacyCorePolicyPack } from "./packs/privacy-core.js";
18
+ export { createUKGDPRPolicyPack, createSwissFADPPolicyPack } from "./packs/privacy-europe.js";
19
+ export { createSingaporePDPAPolicyPack, createPhilippinesDPAPolicyPack, createJapanAPPIPolicyPack, createSouthKoreaPIPAPolicyPack, createChinaPIPLPolicyPack, createIndiaDPDPAPolicyPack, } from "./packs/privacy-asia.js";
20
+ export { createBrazilLGPDPolicyPack, createCanadaPIPEDAPolicyPack, createCaliforniaCRPAPolicyPack } from "./packs/privacy-americas.js";
21
+ export { createSouthAfricaPOPIAPolicyPack, createUAEPDPLPolicyPack, createSaudiArabiaPDPLPolicyPack } from "./packs/privacy-africa-me.js";
22
+ export { PRIVACY_COUNTRIES, getCountryByCode, getCountryPackId, getCountriesByRegion } from "./packs/countries.js";
23
+ export type { CountryPrivacyPack } from "./packs/countries.js";
package/dist/index.js CHANGED
@@ -9,6 +9,11 @@ import { createNIST80053PolicyPack } from "./packs/nist-800-53.js";
9
9
  import { createISO27001PolicyPack } from "./packs/iso27001.js";
10
10
  import { createISO27701PolicyPack } from "./packs/iso27701.js";
11
11
  import { createHIPAAPolicyPack } from "./packs/hipaa.js";
12
+ import { createPrivacyCorePolicyPack } from "./packs/privacy-core.js";
13
+ import { createUKGDPRPolicyPack, createSwissFADPPolicyPack } from "./packs/privacy-europe.js";
14
+ import { createSingaporePDPAPolicyPack, createPhilippinesDPAPolicyPack, createJapanAPPIPolicyPack, createSouthKoreaPIPAPolicyPack, createChinaPIPLPolicyPack, createIndiaDPDPAPolicyPack, } from "./packs/privacy-asia.js";
15
+ import { createBrazilLGPDPolicyPack, createCanadaPIPEDAPolicyPack, createCaliforniaCRPAPolicyPack } from "./packs/privacy-americas.js";
16
+ import { createSouthAfricaPOPIAPolicyPack, createUAEPDPLPolicyPack, createSaudiArabiaPDPLPolicyPack } from "./packs/privacy-africa-me.js";
12
17
  const ALL_PACKS = [
13
18
  createGDPRPolicyPack,
14
19
  createOWASPPolicyPack,
@@ -21,6 +26,26 @@ const ALL_PACKS = [
21
26
  createISO27001PolicyPack,
22
27
  createISO27701PolicyPack,
23
28
  createHIPAAPolicyPack,
29
+ // Global Privacy Framework
30
+ createPrivacyCorePolicyPack,
31
+ // Europe
32
+ createUKGDPRPolicyPack,
33
+ createSwissFADPPolicyPack,
34
+ // Asia-Pacific
35
+ createSingaporePDPAPolicyPack,
36
+ createPhilippinesDPAPolicyPack,
37
+ createJapanAPPIPolicyPack,
38
+ createSouthKoreaPIPAPolicyPack,
39
+ createChinaPIPLPolicyPack,
40
+ createIndiaDPDPAPolicyPack,
41
+ // Americas
42
+ createBrazilLGPDPolicyPack,
43
+ createCanadaPIPEDAPolicyPack,
44
+ createCaliforniaCRPAPolicyPack,
45
+ // Africa + Middle East
46
+ createSouthAfricaPOPIAPolicyPack,
47
+ createUAEPDPLPolicyPack,
48
+ createSaudiArabiaPDPLPolicyPack,
24
49
  ];
25
50
  const PACK_MAP = {
26
51
  gdpr: createGDPRPolicyPack,
@@ -34,6 +59,26 @@ const PACK_MAP = {
34
59
  iso27001: createISO27001PolicyPack,
35
60
  iso27701: createISO27701PolicyPack,
36
61
  hipaa: createHIPAAPolicyPack,
62
+ // Global Privacy Framework
63
+ "privacy-core": createPrivacyCorePolicyPack,
64
+ // Europe
65
+ "uk-gdpr": createUKGDPRPolicyPack,
66
+ "ch-fadp": createSwissFADPPolicyPack,
67
+ // Asia-Pacific
68
+ "sg-pdpa": createSingaporePDPAPolicyPack,
69
+ "ph-dpa": createPhilippinesDPAPolicyPack,
70
+ "jp-appi": createJapanAPPIPolicyPack,
71
+ "kr-pipa": createSouthKoreaPIPAPolicyPack,
72
+ "cn-pipl": createChinaPIPLPolicyPack,
73
+ "in-dpdpa": createIndiaDPDPAPolicyPack,
74
+ // Americas
75
+ "br-lgpd": createBrazilLGPDPolicyPack,
76
+ "ca-pipeda": createCanadaPIPEDAPolicyPack,
77
+ "us-cpra": createCaliforniaCRPAPolicyPack,
78
+ // Africa + Middle East
79
+ "za-popia": createSouthAfricaPOPIAPolicyPack,
80
+ "ae-pdpl": createUAEPDPLPolicyPack,
81
+ "sa-pdpl": createSaudiArabiaPDPLPolicyPack,
37
82
  };
38
83
  export function getAllPacks() {
39
84
  return ALL_PACKS.map(fn => fn());
@@ -59,3 +104,9 @@ export { createNIST80053PolicyPack } from "./packs/nist-800-53.js";
59
104
  export { createISO27001PolicyPack } from "./packs/iso27001.js";
60
105
  export { createISO27701PolicyPack } from "./packs/iso27701.js";
61
106
  export { createHIPAAPolicyPack } from "./packs/hipaa.js";
107
+ export { createPrivacyCorePolicyPack } from "./packs/privacy-core.js";
108
+ export { createUKGDPRPolicyPack, createSwissFADPPolicyPack } from "./packs/privacy-europe.js";
109
+ export { createSingaporePDPAPolicyPack, createPhilippinesDPAPolicyPack, createJapanAPPIPolicyPack, createSouthKoreaPIPAPolicyPack, createChinaPIPLPolicyPack, createIndiaDPDPAPolicyPack, } from "./packs/privacy-asia.js";
110
+ export { createBrazilLGPDPolicyPack, createCanadaPIPEDAPolicyPack, createCaliforniaCRPAPolicyPack } from "./packs/privacy-americas.js";
111
+ export { createSouthAfricaPOPIAPolicyPack, createUAEPDPLPolicyPack, createSaudiArabiaPDPLPolicyPack } from "./packs/privacy-africa-me.js";
112
+ export { PRIVACY_COUNTRIES, getCountryByCode, getCountryPackId, getCountriesByRegion } from "./packs/countries.js";
@@ -0,0 +1,13 @@
1
+ export interface CountryPrivacyPack {
2
+ code: string;
3
+ name: string;
4
+ region: "Europe" | "Asia-Pacific" | "Americas" | "Africa" | "Middle East";
5
+ packId: string;
6
+ frameworkName: string;
7
+ lawName: string;
8
+ regulator: string;
9
+ }
10
+ export declare const PRIVACY_COUNTRIES: CountryPrivacyPack[];
11
+ export declare function getCountryByCode(code: string): CountryPrivacyPack | undefined;
12
+ export declare function getCountryPackId(code: string): string | undefined;
13
+ export declare function getCountriesByRegion(region: CountryPrivacyPack["region"]): CountryPrivacyPack[];
@@ -0,0 +1,156 @@
1
+ // ============================================================
2
+ // COUNTRY-TO-PRIVACY-PACK MAPPING
3
+ // Maps country codes to their respective privacy compliance packs
4
+ // Used by `ges init` to auto-select the correct privacy pack
5
+ // ============================================================
6
+ export const PRIVACY_COUNTRIES = [
7
+ // --- Europe ---
8
+ {
9
+ code: "GB",
10
+ name: "United Kingdom",
11
+ region: "Europe",
12
+ packId: "uk-gdpr",
13
+ frameworkName: "UK-GDPR",
14
+ lawName: "UK GDPR & Data Protection Act 2018",
15
+ regulator: "ICO (Information Commissioner's Office)",
16
+ },
17
+ {
18
+ code: "CH",
19
+ name: "Switzerland",
20
+ region: "Europe",
21
+ packId: "ch-fadp",
22
+ frameworkName: "FADP",
23
+ lawName: "Federal Act on Data Protection (revFADP 2023)",
24
+ regulator: "FDPIC (Federal Data Protection and Information Commissioner)",
25
+ },
26
+ {
27
+ code: "EU",
28
+ name: "European Union (EEA)",
29
+ region: "Europe",
30
+ packId: "gdpr",
31
+ frameworkName: "GDPR",
32
+ lawName: "EU GDPR (Regulation 2016/679)",
33
+ regulator: "Lead Supervisory Authority (e.g., CNIL, DPC, BfDI)",
34
+ },
35
+ // --- Asia-Pacific ---
36
+ {
37
+ code: "SG",
38
+ name: "Singapore",
39
+ region: "Asia-Pacific",
40
+ packId: "sg-pdpa",
41
+ frameworkName: "PDPA-SG",
42
+ lawName: "Personal Data Protection Act 2012 (amended 2020/2021)",
43
+ regulator: "PDPC (Personal Data Protection Commission)",
44
+ },
45
+ {
46
+ code: "PH",
47
+ name: "Philippines",
48
+ region: "Asia-Pacific",
49
+ packId: "ph-dpa",
50
+ frameworkName: "DPA-PH",
51
+ lawName: "Data Privacy Act of 2012",
52
+ regulator: "NPC (National Privacy Commission)",
53
+ },
54
+ {
55
+ code: "JP",
56
+ name: "Japan",
57
+ region: "Asia-Pacific",
58
+ packId: "jp-appi",
59
+ frameworkName: "APPI",
60
+ lawName: "Act on the Protection of Personal Information (APPI 2022)",
61
+ regulator: "PPC (Personal Information Protection Commission)",
62
+ },
63
+ {
64
+ code: "KR",
65
+ name: "South Korea",
66
+ region: "Asia-Pacific",
67
+ packId: "kr-pipa",
68
+ frameworkName: "PIPA",
69
+ lawName: "Personal Information Protection Act (PIPA 2023)",
70
+ regulator: "PIPC (Personal Information Protection Commission)",
71
+ },
72
+ {
73
+ code: "CN",
74
+ name: "China",
75
+ region: "Asia-Pacific",
76
+ packId: "cn-pipl",
77
+ frameworkName: "PIPL",
78
+ lawName: "Personal Information Protection Law (PIPL 2021)",
79
+ regulator: "CAC (Cyberspace Administration of China)",
80
+ },
81
+ {
82
+ code: "IN",
83
+ name: "India",
84
+ region: "Asia-Pacific",
85
+ packId: "in-dpdpa",
86
+ frameworkName: "DPDPA",
87
+ lawName: "Digital Personal Data Protection Act 2023",
88
+ regulator: "Data Protection Board of India",
89
+ },
90
+ // --- Americas ---
91
+ {
92
+ code: "BR",
93
+ name: "Brazil",
94
+ region: "Americas",
95
+ packId: "br-lgpd",
96
+ frameworkName: "LGPD",
97
+ lawName: "Lei Geral de Proteção de Dados (Law 13,709/2018)",
98
+ regulator: "ANPD (Autoridade Nacional de Proteção de Dados)",
99
+ },
100
+ {
101
+ code: "CA",
102
+ name: "Canada",
103
+ region: "Americas",
104
+ packId: "ca-pipeda",
105
+ frameworkName: "PIPEDA",
106
+ lawName: "PIPEDA (S.C. 2000, c. 5)",
107
+ regulator: "OPC (Office of the Privacy Commissioner)",
108
+ },
109
+ {
110
+ code: "US-CA",
111
+ name: "United States (California)",
112
+ region: "Americas",
113
+ packId: "us-cpra",
114
+ frameworkName: "CPRA",
115
+ lawName: "CCPA as amended by CPRA (2020)",
116
+ regulator: "CPPA (California Privacy Protection Agency)",
117
+ },
118
+ // --- Africa ---
119
+ {
120
+ code: "ZA",
121
+ name: "South Africa",
122
+ region: "Africa",
123
+ packId: "za-popia",
124
+ frameworkName: "POPIA",
125
+ lawName: "Protection of Personal Information Act (Act 4 of 2013)",
126
+ regulator: "Information Regulator",
127
+ },
128
+ // --- Middle East ---
129
+ {
130
+ code: "AE",
131
+ name: "United Arab Emirates",
132
+ region: "Middle East",
133
+ packId: "ae-pdpl",
134
+ frameworkName: "PDPL-UAE",
135
+ lawName: "Federal Decree-Law No. 45 of 2021",
136
+ regulator: "UAE Data Office",
137
+ },
138
+ {
139
+ code: "SA",
140
+ name: "Saudi Arabia",
141
+ region: "Middle East",
142
+ packId: "sa-pdpl",
143
+ frameworkName: "PDPL-SA",
144
+ lawName: "Personal Data Protection Law (Royal Decree M/19, amended M/148/2023)",
145
+ regulator: "NDMO (National Data Management Office / SDAIA)",
146
+ },
147
+ ];
148
+ export function getCountryByCode(code) {
149
+ return PRIVACY_COUNTRIES.find(c => c.code.toUpperCase() === code.toUpperCase());
150
+ }
151
+ export function getCountryPackId(code) {
152
+ return getCountryByCode(code)?.packId;
153
+ }
154
+ export function getCountriesByRegion(region) {
155
+ return PRIVACY_COUNTRIES.filter(c => c.region === region);
156
+ }
@@ -0,0 +1,4 @@
1
+ import type { PolicyPack } from "@greenarmor/ges-core";
2
+ export declare function createSouthAfricaPOPIAPolicyPack(): PolicyPack;
3
+ export declare function createUAEPDPLPolicyPack(): PolicyPack;
4
+ export declare function createSaudiArabiaPDPLPolicyPack(): PolicyPack;
@@ -0,0 +1,369 @@
1
+ // ============================================================
2
+ // SOUTH AFRICA — POPIA (Protection of Personal Information Act, 2013, Act No. 4 of 2013)
3
+ // Regulator: Information Regulator (established under POPIA)
4
+ // In effect: July 1, 2020 (fully enforced from July 1, 2021)
5
+ // ============================================================
6
+ export function createSouthAfricaPOPIAPolicyPack() {
7
+ const controls = [
8
+ // --- Information Officer & Governance ---
9
+ {
10
+ id: "POPIA-01",
11
+ name: "Information Officer Designation",
12
+ description: "Designate an Information Officer and register their details with the Information Regulator.",
13
+ category: "privacy-governance",
14
+ framework: "POPIA",
15
+ status: "not-implemented",
16
+ severity: "critical",
17
+ implementation_guidance: "Designate the head of the organization as the Information Officer (IO). Register the IO's contact details with the Information Regulator. Ensure the IO's contact details are available on the organization's website and in official documentation. The IO is responsible for: encouraging compliance, dealing with information requests, cooperating with the Regulator, and ensuring compliance audits. Deputy IOs may be designated for specific business units. [Ref: POPIA Section 17; Information Regulator Guidelines on IO Designation]",
18
+ checks: [
19
+ { id: "POPIA-01-C1", description: "Information Officer designated and registered with Regulator", status: "not-implemented" },
20
+ { id: "POPIA-01-C2", description: "IO contact details published on website", status: "not-implemented" },
21
+ { id: "POPIA-01-C3", description: "Deputy IOs designated if needed", status: "not-implemented" },
22
+ ],
23
+ },
24
+ // --- Processing Conditions ---
25
+ {
26
+ id: "POPIA-02",
27
+ name: "Lawfulness of Processing (Section 10)",
28
+ description: "Process personal information lawfully and only if specific conditions are met.",
29
+ category: "consent-management",
30
+ framework: "POPIA",
31
+ status: "not-implemented",
32
+ severity: "critical",
33
+ implementation_guidance: "Process PI only if: (1) the data subject/competent person consents, (2) necessary for contract performance, (3) compliance with legal obligation, (4) protects a legitimate interest, (5) necessary for public law duty, (6) performed by public body, or (7) the information is public. Consent must be voluntary, specific, informed, and unambiguous. [Ref: POPIA Sections 10-11]",
34
+ checks: [
35
+ { id: "POPIA-02-C1", description: "Processing basis documented per processing activity", status: "not-implemented" },
36
+ { id: "POPIA-02-C2", description: "Consent obtained (voluntary, specific, informed, unambiguous)", status: "not-implemented" },
37
+ ],
38
+ },
39
+ {
40
+ id: "POPIA-03",
41
+ name: "Purpose Specification and Retention",
42
+ description: "Limit processing to specified purposes and delete/deidentify data when purpose is achieved.",
43
+ category: "data-retention",
44
+ framework: "POPIA",
45
+ status: "not-implemented",
46
+ severity: "high",
47
+ implementation_guidance: "Do not process PI for purposes incompatible with the purpose for which it was obtained. Retain PI no longer than necessary to achieve the purpose. Destroy or deidentify records once the responsible party is no longer authorized to retain them, unless retention is required by law or contract. Record the destruction. Retain personal information only for historical, statistical, or research purposes with adequate safeguards. [Ref: POPIA Section 14; Sections 18-19]",
48
+ checks: [
49
+ { id: "POPIA-03-C1", description: "Purpose compatibility assessed for each processing", status: "not-implemented" },
50
+ { id: "POPIA-03-C2", description: "Retention periods defined and documented", status: "not-implemented" },
51
+ { id: "POPIA-03-C3", description: "Deletion/deidentification records maintained", status: "not-implemented" },
52
+ ],
53
+ },
54
+ {
55
+ id: "POPIA-04",
56
+ name: "Further Processing Limitation",
57
+ description: "Ensure further processing of personal information is compatible with the original collection purpose.",
58
+ category: "data-inventory",
59
+ framework: "POPIA",
60
+ status: "not-implemented",
61
+ severity: "medium",
62
+ implementation_guidance: "Further processing is compatible if: it is connected to the original purpose, consent has been obtained, the data has been made public, the processing is necessary for compliance, or it protects legitimate interests. Conduct compatibility assessments considering: the purpose of the intended further processing, the nature of the information, the consequences for the data subject, and contractual or other rights. [Ref: POPIA Section 15]",
63
+ checks: [
64
+ { id: "POPIA-04-C1", description: "Compatibility assessment conducted for further processing", status: "not-implemented" },
65
+ { id: "POPIA-04-C2", description: "Further processing register maintained", status: "not-implemented" },
66
+ ],
67
+ },
68
+ // --- Information Quality & Security ---
69
+ {
70
+ id: "POPIA-05",
71
+ name: "Information Quality (Section 16)",
72
+ description: "Take reasonably practicable steps to ensure personal information is complete, accurate, and not misleading.",
73
+ category: "data-inventory",
74
+ framework: "POPIA",
75
+ status: "not-implemented",
76
+ severity: "medium",
77
+ implementation_guidance: "Ensure data quality at collection and before use. Verify data against reliable sources. Provide correction mechanisms for data subjects. Document data quality control processes. Consider the purpose of processing when assessing quality requirements. [Ref: POPIA Section 16]",
78
+ checks: [
79
+ { id: "POPIA-05-C1", description: "Data quality verification procedures implemented", status: "not-implemented" },
80
+ { id: "POPIA-05-C2", description: "Correction mechanism available for data subjects", status: "not-implemented" },
81
+ ],
82
+ },
83
+ {
84
+ id: "POPIA-06",
85
+ name: "Security Safeguards (Section 19)",
86
+ description: "Implement appropriate, reasonable technical and organizational security measures to secure personal information.",
87
+ category: "security-controls",
88
+ framework: "POPIA",
89
+ status: "not-implemented",
90
+ severity: "critical",
91
+ implementation_guidance: "Identify all reasonably foreseeable internal and external risks. Establish and maintain appropriate safeguards against identified risks. Regularly verify that safeguards are effectively implemented and updated. Safeguards must address: data loss, damage, unauthorized access, and unauthorized destruction. Safeguards include: access controls, encryption, firewalls, security software, physical access control, and incident response. [Ref: POPIA Section 19; Information Regulator Security Guidance]",
92
+ checks: [
93
+ { id: "POPIA-06-C1", description: "Risk assessment conducted for identified risks", status: "not-implemented" },
94
+ { id: "POPIA-06-C2", description: "Safeguards implemented and regularly verified", status: "not-implemented" },
95
+ { id: "POPIA-06-C3", description: "Encryption and access controls in place", status: "not-implemented" },
96
+ ],
97
+ },
98
+ // --- Data Subject Rights ---
99
+ {
100
+ id: "POPIA-07",
101
+ name: "Data Subject Rights (Section 23-25)",
102
+ description: "Implement data subject rights: notification, access, correction, objection, and destruction.",
103
+ category: "data-subject-rights",
104
+ framework: "POPIA",
105
+ status: "not-implemented",
106
+ severity: "high",
107
+ implementation_guidance: "Implement rights: (1) right to be notified when PI is collected, (2) right to establish whether the responsible party holds PI, (3) right to request correction/destruction of PI, (4) right to object to processing on reasonable grounds. Respond to requests within a reasonable time (generally within 30 days). Charge no fee for the initial request. Maintain documentation of requests and responses. [Ref: POPIA Sections 23-25]",
108
+ checks: [
109
+ { id: "POPIA-07-C1", description: "All POPIA data subject rights implemented", status: "not-implemented" },
110
+ { id: "POPIA-07-C2", description: "Requests responded to within reasonable time", status: "not-implemented" },
111
+ { id: "POPIA-07-C3", description: "Request documentation maintained", status: "not-implemented" },
112
+ ],
113
+ },
114
+ // --- Breach Notification ---
115
+ {
116
+ id: "POPIA-08",
117
+ name: "Compromise Notification (Section 22)",
118
+ description: "Notify the Information Regulator and affected data subjects of security compromises.",
119
+ category: "incident-management",
120
+ framework: "POPIA",
121
+ status: "not-implemented",
122
+ severity: "critical",
123
+ implementation_guidance: "When there are reasonable grounds to believe PI has been accessed or acquired by unauthorized persons, notify: (1) the Information Regulator, and (2) affected data subjects (unless exceptions apply). Notification must include: possible identity of unauthorized person, date of compromise, PI potentially compromised, possible harm, and steps taken/being taken. The Regulator may direct the responsible party to notify or publish notification if it hasn't been done. Maintain a compromise register. [Ref: POPIA Section 22; Information Regulator Breach Notification Regulations]",
124
+ checks: [
125
+ { id: "POPIA-08-C1", description: "Regulator notification procedure for compromises", status: "not-implemented" },
126
+ { id: "POPIA-08-C2", description: "Individual notification with required details", status: "not-implemented" },
127
+ { id: "POPIA-08-C3", description: "Compromise register maintained", status: "not-implemented" },
128
+ ],
129
+ },
130
+ ];
131
+ return {
132
+ id: "za-popia",
133
+ name: "South Africa POPIA Pack (Act 4 of 2013)",
134
+ description: "Comprehensive South African POPIA controls: Information Officer designation (Sec. 17), lawful processing conditions (Sec. 10-11), purpose specification and retention (Sec. 14/18-19), further processing limitation (Sec. 15), information quality (Sec. 16), security safeguards (Sec. 19), data subject rights (Sec. 23-25), and compromise notification (Sec. 22).",
135
+ version: "1.0.0",
136
+ project_types: ["saas", "generic-web-application", "api-backend", "mobile-application"],
137
+ controls,
138
+ frameworks: ["POPIA"],
139
+ };
140
+ }
141
+ // ============================================================
142
+ // UAE — PDPL (Federal Decree-Law No. 45 of 2021 on the Protection of Personal Data)
143
+ // Regulator: UAE Data Office (established under Federal Law by decree)
144
+ // Implementing Regulation: Cabinet Decision No. 93 of 2021
145
+ // ============================================================
146
+ export function createUAEPDPLPolicyPack() {
147
+ const controls = [
148
+ // --- Data Protection Officer ---
149
+ {
150
+ id: "PDPL-UAE-01",
151
+ name: "Data Protection Officer (UAE)",
152
+ description: "Appoint a Data Protection Officer for processing that requires systematic monitoring or large-scale sensitive data.",
153
+ category: "privacy-governance",
154
+ framework: "PDPL-UAE",
155
+ status: "not-implemented",
156
+ severity: "high",
157
+ implementation_guidance: "Appoint a DPO when processing involves: large-scale processing of sensitive personal data, systematic monitoring of data subjects on a large scale, or cases specified by the UAE Data Office. The DPO must: advise on PDPL compliance, cooperate with the UAE Data Office, and act as contact point. Publish DPO contact details. Ensure DPO independence and no conflict of interest. [Ref: PDPL Article 10-11; Cabinet Decision No. 93/2021]",
158
+ checks: [
159
+ { id: "PDPL-UAE-01-C1", description: "DPO appointed where required", status: "not-implemented" },
160
+ { id: "PDPL-UAE-01-C2", description: "DPO contact details published", status: "not-implemented" },
161
+ { id: "PDPL-UAE-01-C3", description: "DPO independence ensured", status: "not-implemented" },
162
+ ],
163
+ },
164
+ // --- Consent & Legal Basis ---
165
+ {
166
+ id: "PDPL-UAE-02",
167
+ name: "Consent and Legal Basis (UAE)",
168
+ description: "Obtain clear, unambiguous consent or identify alternative legal basis for processing.",
169
+ category: "consent-management",
170
+ framework: "PDPL-UAE",
171
+ status: "not-implemented",
172
+ severity: "critical",
173
+ implementation_guidance: "Obtain clear and unambiguous consent for processing. Alternatively, process based on: contract performance, legal obligation, vital interests, public interest, legitimate interests assessed against data subject rights, or other lawful bases specified in the law. For sensitive personal data (health, biometric, racial, religious, criminal), obtain explicit consent unless an exception applies. Consent must be free, specific, informed, and unambiguous. [Ref: PDPL Articles 4-5, 7-9]",
174
+ checks: [
175
+ { id: "PDPL-UAE-02-C1", description: "Clear, unambiguous consent obtained per purpose", status: "not-implemented" },
176
+ { id: "PDPL-UAE-02-C2", description: "Explicit consent for sensitive data", status: "not-implemented" },
177
+ { id: "PDPL-UAE-02-C3", description: "Legal basis documented per processing activity", status: "not-implemented" },
178
+ ],
179
+ },
180
+ // --- Privacy Notice ---
181
+ {
182
+ id: "PDPL-UAE-03",
183
+ name: "Privacy Notice and Transparency",
184
+ description: "Provide clear privacy notices at the time of collection with all PDPL-required information.",
185
+ category: "privacy-governance",
186
+ framework: "PDPL-UAE",
187
+ status: "not-implemented",
188
+ severity: "high",
189
+ implementation_guidance: "Provide a privacy notice including: controller identity and contact details, DPO contact, processing purposes, legal basis, data categories, recipients, cross-border transfers, retention period, data subject rights, and complaint mechanisms. Present in clear and understandable language (Arabic and/or English as appropriate). Make the notice available at or before collection. Update when processing purposes change. [Ref: PDPL Article 6]",
190
+ checks: [
191
+ { id: "PDPL-UAE-03-C1", description: "Privacy notice includes all PDPL-required items", status: "not-implemented" },
192
+ { id: "PDPL-UAE-03-C2", description: "Notice provided at or before collection", status: "not-implemented" },
193
+ { id: "PDPL-UAE-03-C3", description: "Notice in appropriate language(s)", status: "not-implemented" },
194
+ ],
195
+ },
196
+ // --- Personal Data Protection Impact Assessment ---
197
+ {
198
+ id: "PDPL-UAE-04",
199
+ name: "Personal Data Protection Impact Assessment",
200
+ description: "Conduct DPIAs for processing activities that may pose high risks to data subjects.",
201
+ category: "privacy-governance",
202
+ framework: "PDPL-UAE",
203
+ status: "not-implemented",
204
+ severity: "high",
205
+ implementation_guidance: "Conduct a DPIA before processing that may result in a high risk to data subject rights, particularly when using new technologies. The DPIA must include: systematic description of processing, necessity and proportionality assessment, risk identification and assessment, and mitigation measures. Consult the DPO. Submit DPIA results to the UAE Data Office when requested. For Mainland UAE, specific DPIA requirements apply under Cabinet Decision No. 93/2021. [Ref: PDPL Article 20-21; Cabinet Decision No. 93/2021]",
206
+ checks: [
207
+ { id: "PDPL-UAE-04-C1", description: "DPIA criteria for high-risk processing established", status: "not-implemented" },
208
+ { id: "PDPL-UAE-04-C2", description: "DPIAs conducted with required documentation", status: "not-implemented" },
209
+ { id: "PDPL-UAE-04-C3", description: "Results submitted to UAE Data Office when required", status: "not-implemented" },
210
+ ],
211
+ },
212
+ // --- Cross-Border Data Transfers ---
213
+ {
214
+ id: "PDPL-UAE-05",
215
+ name: "Cross-Border Data Transfer (UAE)",
216
+ description: "Ensure personal data transferred outside the UAE receives an adequate level of protection.",
217
+ category: "cross-border-transfers",
218
+ framework: "PDPL-UAE",
219
+ status: "not-implemented",
220
+ severity: "critical",
221
+ implementation_guidance: "Transfer personal data outside the UAE only when: the destination country provides adequate protection (UAE Data Office adequacy decision), appropriate safeguards are in place (SCCs, BCRs), or specific exceptions apply (explicit consent, contract performance, public interest). Assess destination country's legal framework. Use UAE Data Office-approved transfer mechanisms. Maintain transfer documentation. Special rules apply to transfers within UAE Free Zones (DIFC, ADGM) which have their own data protection regimes. [Ref: PDPL Article 22-25; Cabinet Decision No. 93/2021]",
222
+ checks: [
223
+ { id: "PDPL-UAE-05-C1", description: "Adequacy assessment conducted per destination country", status: "not-implemented" },
224
+ { id: "PDPL-UAE-05-C2", description: "SCCs or BCRs for non-adequate transfers", status: "not-implemented" },
225
+ { id: "PDPL-UAE-05-C3", description: "Free Zone (DIFC/ADGM) rules assessed if applicable", status: "not-implemented" },
226
+ ],
227
+ },
228
+ // --- Breach Notification & Security ---
229
+ {
230
+ id: "PDPL-UAE-06",
231
+ name: "Breach Notification and Security (UAE)",
232
+ description: "Implement security measures and notify the UAE Data Office of personal data breaches.",
233
+ category: "incident-management",
234
+ framework: "PDPL-UAE",
235
+ status: "not-implemented",
236
+ severity: "critical",
237
+ implementation_guidance: "Implement appropriate technical and organizational measures to protect personal data. When a personal data breach occurs, notify the UAE Data Office as soon as possible and within the timeframe specified by regulation. If the breach poses high risk to data subjects, notify them without undue delay. The notification must include: nature of the breach, affected data categories, approximate number of affected individuals, measures taken, and contact details for further information. Maintain an internal breach register. [Ref: PDPL Article 15, 33-34; Cabinet Decision No. 93/2021]",
238
+ checks: [
239
+ { id: "PDPL-UAE-06-C1", description: "Security measures documented and implemented", status: "not-implemented" },
240
+ { id: "PDPL-UAE-06-C2", description: "UAE Data Office notification procedure established", status: "not-implemented" },
241
+ { id: "PDPL-UAE-06-C3", description: "Individual notification for high-risk breaches", status: "not-implemented" },
242
+ ],
243
+ },
244
+ ];
245
+ return {
246
+ id: "ae-pdpl",
247
+ name: "UAE PDPL Pack (Federal Decree-Law No. 45 of 2021)",
248
+ description: "Comprehensive UAE personal data protection controls: DPO appointment (Art. 10-11), consent and legal basis (Art. 4-9), privacy notice requirements (Art. 6), DPIA for high-risk processing (Art. 20-21), cross-border transfers with Free Zone awareness (Art. 22-25), and breach notification with security measures (Art. 15/33-34).",
249
+ version: "1.0.0",
250
+ project_types: ["saas", "generic-web-application", "api-backend", "mobile-application"],
251
+ controls,
252
+ frameworks: ["PDPL-UAE"],
253
+ };
254
+ }
255
+ // ============================================================
256
+ // SAUDI ARABIA — PDPL (Personal Data Protection Law, Royal Decree No. M/19)
257
+ // As amended September 2023 (Amending Law No. M/148)
258
+ // Regulator: National Data Management Office (NDMO) / SDAIA
259
+ // Fully in effect: September 14, 2023
260
+ // ============================================================
261
+ export function createSaudiArabiaPDPLPolicyPack() {
262
+ const controls = [
263
+ // --- Consent & Legal Basis ---
264
+ {
265
+ id: "PDPL-SA-01",
266
+ name: "Consent and Legal Basis",
267
+ description: "Obtain valid consent or identify alternative legal basis for processing personal data under the PDPL.",
268
+ category: "consent-management",
269
+ framework: "PDPL-SA",
270
+ status: "not-implemented",
271
+ severity: "critical",
272
+ implementation_guidance: "Obtain consent that is: specific, informed, and unambiguous, indicating the data subject's clear will. Alternatively, process based on: contract performance, legal obligation, vital interests, public task, legitimate interests (assessed against data subject rights and freedoms). For sensitive data (health, genetic, racial, ethnic, religious, biometric, criminal), obtain explicit consent unless an exception applies. Consent must be documented. [Ref: PDPL Articles 5-6, 9; Amending Law M/148/2023]",
273
+ checks: [
274
+ { id: "PDPL-SA-01-C1", description: "Specific, informed, unambiguous consent obtained", status: "not-implemented" },
275
+ { id: "PDPL-SA-01-C2", description: "Explicit consent for sensitive data", status: "not-implemented" },
276
+ { id: "PDPL-SA-01-C3", description: "Legal basis documented per processing activity", status: "not-implemented" },
277
+ ],
278
+ },
279
+ // --- Privacy Notice ---
280
+ {
281
+ id: "PDPL-SA-02",
282
+ name: "Privacy Notice (Arabic Language)",
283
+ description: "Provide clear privacy notices in Arabic with all PDPL-required disclosures.",
284
+ category: "privacy-governance",
285
+ framework: "PDPL-SA",
286
+ status: "not-implemented",
287
+ severity: "high",
288
+ implementation_guidance: "Provide a privacy notice including: controller identity, contact details, processing purposes, legal basis, data categories, recipients, retention period, cross-border transfers, data subject rights (amendment, withdrawal of consent, destruction), and complaint mechanisms. The notice must be in clear Arabic language. Present before or at the time of collection. Update when processing purposes change. [Ref: PDPL Article 8; Amending Law M/148/2023]",
289
+ checks: [
290
+ { id: "PDPL-SA-02-C1", description: "Privacy notice in Arabic with all required items", status: "not-implemented" },
291
+ { id: "PDPL-SA-02-C2", description: "Notice provided before/at collection", status: "not-implemented" },
292
+ ],
293
+ },
294
+ // --- Data Subject Rights ---
295
+ {
296
+ id: "PDPL-SA-03",
297
+ name: "Data Subject Rights",
298
+ description: "Implement data subject rights including access, correction, destruction, and objection.",
299
+ category: "data-subject-rights",
300
+ framework: "PDPL-SA",
301
+ status: "not-implemented",
302
+ severity: "high",
303
+ implementation_guidance: "Implement rights: (1) right to be informed of processing, (2) right to access personal data and related information, (3) right to correct/update incomplete or inaccurate data, (4) right to destruction of data processed in violation, (5) right to withdraw consent, (6) right to lodge a complaint. Respond to requests within a reasonable period. Enable rights through accessible means (including the organization's website or app). [Ref: PDPL Articles 16-18; Amending Law M/148/2023]",
304
+ checks: [
305
+ { id: "PDPL-SA-03-C1", description: "All PDPL rights implemented and accessible", status: "not-implemented" },
306
+ { id: "PDPL-SA-03-C2", description: "Requests processed within reasonable period", status: "not-implemented" },
307
+ ],
308
+ },
309
+ // --- Data Localization & Cross-Border Transfer ---
310
+ {
311
+ id: "PDPL-SA-04",
312
+ name: "Data Localization and Cross-Border Transfer",
313
+ description: "Comply with Saudi data localization requirements and cross-border transfer regulations.",
314
+ category: "cross-border-transfers",
315
+ framework: "PDPL-SA",
316
+ status: "not-implemented",
317
+ severity: "critical",
318
+ implementation_guidance: "The amended PDPL requires that personal data be processed in Saudi Arabia. Cross-border transfer is permitted only when: the destination provides an adequate level of protection (per NDMO assessment), appropriate safeguards are in place (SCCs, BCRs approved by NDMO), or specific exceptions apply (explicit consent, contract performance, public interest). Assess the legal framework of the destination country. Maintain a transfer register. Obtain NDMO approval where required for specific transfers. Monitor NDMO transfer regulations and guidelines. [Ref: PDPL Article 29; Amending Law M/148/2023; NDMO Transfer Regulations]",
319
+ checks: [
320
+ { id: "PDPL-SA-04-C1", description: "Data localization requirement assessed and implemented", status: "not-implemented" },
321
+ { id: "PDPL-SA-04-C2", description: "NDMO adequacy assessment for destination countries", status: "not-implemented" },
322
+ { id: "PDPL-SA-04-C3", description: "SCCs/BCRs approved by NDMO for non-adequate transfers", status: "not-implemented" },
323
+ { id: "PDPL-SA-04-C4", description: "Transfer register maintained", status: "not-implemented" },
324
+ ],
325
+ },
326
+ // --- Security & Breach Notification ---
327
+ {
328
+ id: "PDPL-SA-05",
329
+ name: "Security Measures and Breach Notification",
330
+ description: "Implement appropriate security safeguards and notify NDMO and affected individuals of data breaches.",
331
+ category: "incident-management",
332
+ framework: "PDPL-SA",
333
+ status: "not-implemented",
334
+ severity: "critical",
335
+ implementation_guidance: "Implement appropriate technical and organizational measures to protect personal data considering: the nature of data, processing methods, and risk levels. Notify NDMO of any personal data breach within 72 hours of becoming aware of it (or immediately if high risk). If the breach poses a high risk to data subjects, notify them without undue delay. The notification must include: nature of breach, affected data categories, number of affected individuals, potential consequences, and measures taken. Maintain a breach register. [Ref: PDPL Articles 20, 30; Amending Law M/148/2023; NDMO Breach Regulations]",
336
+ checks: [
337
+ { id: "PDPL-SA-05-C1", description: "Security measures documented and risk-assessed", status: "not-implemented" },
338
+ { id: "PDPL-SA-05-C2", description: "NDMO notification within 72 hours", status: "not-implemented" },
339
+ { id: "PDPL-SA-05-C3", description: "Individual notification for high-risk breaches", status: "not-implemented" },
340
+ { id: "PDPL-SA-05-C4", description: "Breach register maintained", status: "not-implemented" },
341
+ ],
342
+ },
343
+ // --- NDMO Registration & Oversight ---
344
+ {
345
+ id: "PDPL-SA-06",
346
+ name: "NDMO Registration and Compliance",
347
+ description: "Register with NDMO as required and comply with NDMO oversight obligations.",
348
+ category: "privacy-governance",
349
+ framework: "PDPL-SA",
350
+ status: "not-implemented",
351
+ severity: "high",
352
+ implementation_guidance: "Register with the National Data Management Office (NDMO) when required by regulation. Appoint a Data Protection Officer to liaise with NDMO. Maintain records of processing activities. Cooperate with NDMO audits and investigations. Implement NDMO-issued guidelines and policies. Submit annual compliance reports if required. For government entities, comply with NDMO National Data Governance policies. [Ref: PDPL Article 40; Amending Law M/148/2023; NDMO National Data Governance Interim Regulations]",
353
+ checks: [
354
+ { id: "PDPL-SA-06-C1", description: "NDMO registration completed where required", status: "not-implemented" },
355
+ { id: "PDPL-SA-06-C2", description: "Processing records maintained for NDMO oversight", status: "not-implemented" },
356
+ { id: "PDPL-SA-06-C3", description: "NDMO guidelines and policies implemented", status: "not-implemented" },
357
+ ],
358
+ },
359
+ ];
360
+ return {
361
+ id: "sa-pdpl",
362
+ name: "Saudi Arabia PDPL Pack (Royal Decree M/19 as amended M/148/2023)",
363
+ description: "Comprehensive Saudi PDPL controls: consent and legal basis (Art. 5-9), Arabic privacy notice (Art. 8), data subject rights (Art. 16-18), data localization and cross-border transfer with NDMO approval (Art. 29), 72-hour breach notification (Art. 30), and NDMO registration and oversight (Art. 40).",
364
+ version: "1.0.0",
365
+ project_types: ["saas", "generic-web-application", "api-backend", "mobile-application"],
366
+ controls,
367
+ frameworks: ["PDPL-SA"],
368
+ };
369
+ }
@@ -0,0 +1,4 @@
1
+ import type { PolicyPack } from "@greenarmor/ges-core";
2
+ export declare function createBrazilLGPDPolicyPack(): PolicyPack;
3
+ export declare function createCanadaPIPEDAPolicyPack(): PolicyPack;
4
+ export declare function createCaliforniaCRPAPolicyPack(): PolicyPack;