@zerothreatai/vulnerability-registry 5.0.0 → 7.0.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.
Files changed (42) hide show
  1. package/dist/compliance-codes.d.ts +207 -0
  2. package/dist/compliance-codes.js +213 -0
  3. package/dist/compliances/gdpr.d.ts +2 -0
  4. package/dist/compliances/gdpr.js +252 -0
  5. package/dist/compliances/helpers.d.ts +6 -0
  6. package/dist/compliances/helpers.js +12 -0
  7. package/dist/compliances/hipaa.d.ts +2 -0
  8. package/dist/compliances/hipaa.js +187 -0
  9. package/dist/compliances/index.d.ts +5 -0
  10. package/dist/compliances/index.js +5 -0
  11. package/dist/compliances/owasp.d.ts +2 -0
  12. package/dist/compliances/owasp.js +127 -0
  13. package/dist/compliances/pci-dss.d.ts +2 -0
  14. package/dist/compliances/pci-dss.js +260 -0
  15. package/dist/compliances/sans-top-25.d.ts +2 -0
  16. package/dist/compliances/sans-top-25.js +242 -0
  17. package/dist/index.d.ts +7 -1
  18. package/dist/index.js +7 -1
  19. package/dist/types.d.ts +33 -0
  20. package/dist/types.js +11 -1
  21. package/dist-cjs/compliance-codes.js +216 -0
  22. package/dist-cjs/compliances/gdpr.js +255 -0
  23. package/dist-cjs/compliances/helpers.js +20 -0
  24. package/dist-cjs/compliances/hipaa.js +190 -0
  25. package/dist-cjs/compliances/index.js +13 -0
  26. package/dist-cjs/compliances/owasp.js +130 -0
  27. package/dist-cjs/compliances/pci-dss.js +263 -0
  28. package/dist-cjs/compliances/sans-top-25.js +245 -0
  29. package/dist-cjs/index.js +12 -1
  30. package/dist-cjs/types.js +12 -0
  31. package/package.json +6 -1
  32. package/src/compliance-codes.ts +216 -0
  33. package/src/compliances/README.md +82 -0
  34. package/src/compliances/gdpr.ts +258 -0
  35. package/src/compliances/helpers.ts +31 -0
  36. package/src/compliances/hipaa.ts +193 -0
  37. package/src/compliances/index.ts +5 -0
  38. package/src/compliances/owasp.ts +133 -0
  39. package/src/compliances/pci-dss.ts +266 -0
  40. package/src/compliances/sans-top-25.ts +246 -0
  41. package/src/index.ts +12 -1
  42. package/src/types.ts +40 -4
@@ -0,0 +1,252 @@
1
+ import { ComplianceCode } from '../compliance-codes';
2
+ import { ComplianceCategory } from '../types';
3
+ import { idsByCategory, idsByCodes, idsByCodePrefix, mergeIds } from './helpers.js';
4
+ const authIds = idsByCategory('authentication');
5
+ const injectionIds = idsByCategory('injection');
6
+ const xssIds = idsByCategory('xss');
7
+ const ssrfIds = idsByCategory('ssrf');
8
+ const configIds = idsByCategory('configuration');
9
+ const disclosureIds = idsByCategory('information_disclosure');
10
+ const cookieIds = idsByCodePrefix(['COOKIE_']);
11
+ const dirbrowseIds = idsByCodePrefix(['DIRBROWSE_']);
12
+ const jwtIds = idsByCodePrefix(['JWT_']);
13
+ const hstsIds = idsByCodes([
14
+ 'HEADER_MISSING_HSTS',
15
+ 'HEADER_HSTS_BAD_MAX_AGE',
16
+ 'HEADER_HSTS_SHORT_MAX_AGE',
17
+ 'HEADER_HSTS_NO_INCLUDESUBDOMAINS',
18
+ 'HEADER_HSTS_PRELOAD_LOW_MAX_AGE',
19
+ 'HEADER_DRIFT_HSTS',
20
+ ]);
21
+ const cookieSecureIds = idsByCodes([
22
+ 'COOKIE_SAMESITE_NONE_WITHOUT_SECURE',
23
+ 'COOKIE_SESSION_MISSING_SECURE',
24
+ 'COOKIE_MISSING_SECURE',
25
+ 'COOKIE_HOST_PREFIX_INVALID',
26
+ 'COOKIE_SECURE_PREFIX_INVALID',
27
+ ]);
28
+ const allAppSecIds = mergeIds(authIds, injectionIds, xssIds, ssrfIds, configIds, disclosureIds);
29
+ const authAndCookieIds = mergeIds(authIds, cookieIds);
30
+ const accessRestrictionIds = mergeIds(authIds, cookieIds, dirbrowseIds, disclosureIds);
31
+ const cryptoPolicyIds = mergeIds(jwtIds, hstsIds, cookieSecureIds);
32
+ const inputValidationIds = mergeIds(injectionIds, xssIds, ssrfIds);
33
+ const outputValidationIds = mergeIds(injectionIds, xssIds);
34
+ const infoLeakageIds = mergeIds(configIds, disclosureIds);
35
+ export const GDPR_COMPLIANCE = {
36
+ [ComplianceCode.GDPR_A_10_1_1_DOCUMENTED_OPERATING_PROCEDURES]: {
37
+ id: 1,
38
+ code: ComplianceCode.GDPR_A_10_1_1_DOCUMENTED_OPERATING_PROCEDURES,
39
+ title: 'A.10.1.1 Documented Operating Procedures',
40
+ description: 'Clear instructions for how systems and processes work should be written down, kept up to date, and shared with anyone who needs them.',
41
+ complianceStandard: ComplianceCategory.GDPR,
42
+ relatedVulnerabilityIds: [],
43
+ isNotApplicable: true,
44
+ },
45
+ [ComplianceCode.GDPR_A_10_1_2_CHANGE_MANAGEMENT]: {
46
+ id: 2,
47
+ code: ComplianceCode.GDPR_A_10_1_2_CHANGE_MANAGEMENT,
48
+ title: 'A.10.1.2 Change Management',
49
+ description: 'Any updates or changes to systems and IT infrastructure should be carefully managed and monitored to avoid problems.',
50
+ complianceStandard: ComplianceCategory.GDPR,
51
+ relatedVulnerabilityIds: [],
52
+ isNotApplicable: true,
53
+ },
54
+ [ComplianceCode.GDPR_A_10_1_3_SEGREGATION_OF_DUTIES]: {
55
+ id: 3,
56
+ code: ComplianceCode.GDPR_A_10_1_3_SEGREGATION_OF_DUTIES,
57
+ title: 'A.10.1.3 Segregation of Duties',
58
+ description: 'Responsibilities should be divided among different people to prevent unauthorized actions or mistakes that could harm the organization.',
59
+ complianceStandard: ComplianceCategory.GDPR,
60
+ relatedVulnerabilityIds: [],
61
+ isNotApplicable: true,
62
+ },
63
+ [ComplianceCode.GDPR_A_10_1_4_SEPARATION_DEV_TEST_OPS]: {
64
+ id: 4,
65
+ code: ComplianceCode.GDPR_A_10_1_4_SEPARATION_DEV_TEST_OPS,
66
+ title: 'A.10.1.4 Separation of Development, Testing, and Operations',
67
+ description: 'The environments for creating, testing, and running software should be kept separate to minimize risks like unauthorized access or accidental changes to live systems.',
68
+ complianceStandard: ComplianceCategory.GDPR,
69
+ relatedVulnerabilityIds: [],
70
+ isNotApplicable: true,
71
+ },
72
+ [ComplianceCode.GDPR_A_10_2_1_SERVICE_DELIVERY]: {
73
+ id: 5,
74
+ code: ComplianceCode.GDPR_A_10_2_1_SERVICE_DELIVERY,
75
+ title: 'A.10.2.1 Service delivery',
76
+ description: 'Make sure that any security rules, service standards, and delivery expectations agreed with a third party are followed and maintained by them.',
77
+ complianceStandard: ComplianceCategory.GDPR,
78
+ relatedVulnerabilityIds: [],
79
+ isNotApplicable: true,
80
+ },
81
+ [ComplianceCode.GDPR_A_10_3_2_SYSTEM_ACCEPTANCE]: {
82
+ id: 9,
83
+ code: ComplianceCode.GDPR_A_10_3_2_SYSTEM_ACCEPTANCE,
84
+ title: 'A.10.3.2 System acceptance',
85
+ description: 'Before fully using updated systems, ensure they meet security and performance standards through thorough testing.',
86
+ complianceStandard: ComplianceCategory.GDPR,
87
+ relatedVulnerabilityIds: allAppSecIds,
88
+ isNotApplicable: false,
89
+ },
90
+ [ComplianceCode.GDPR_A_11_2_3_USER_PASSWORD_MANAGEMENT]: {
91
+ id: 36,
92
+ code: ComplianceCode.GDPR_A_11_2_3_USER_PASSWORD_MANAGEMENT,
93
+ title: 'A.11.2.3 User Password Management',
94
+ description: 'Manage password distribution securely through a formal process.',
95
+ complianceStandard: ComplianceCategory.GDPR,
96
+ relatedVulnerabilityIds: authAndCookieIds,
97
+ isNotApplicable: true,
98
+ },
99
+ [ComplianceCode.GDPR_A_11_3_1_PASSWORD_USE]: {
100
+ id: 38,
101
+ code: ComplianceCode.GDPR_A_11_3_1_PASSWORD_USE,
102
+ title: 'A.11.3.1 Password Use',
103
+ description: 'Users must follow strong security practices when creating and using passwords.',
104
+ complianceStandard: ComplianceCategory.GDPR,
105
+ relatedVulnerabilityIds: authAndCookieIds,
106
+ isNotApplicable: true,
107
+ },
108
+ [ComplianceCode.GDPR_A_11_4_4_REMOTE_DIAGNOSTIC_PORT_PROTECTION]: {
109
+ id: 44,
110
+ code: ComplianceCode.GDPR_A_11_4_4_REMOTE_DIAGNOSTIC_PORT_PROTECTION,
111
+ title: 'A.11.4.4 Remote Diagnostic and Configuration Port Protection',
112
+ description: 'Control both physical and logical access to ports used for remote diagnostics and system configuration.',
113
+ complianceStandard: ComplianceCategory.GDPR,
114
+ relatedVulnerabilityIds: disclosureIds,
115
+ isNotApplicable: false,
116
+ },
117
+ [ComplianceCode.GDPR_A_11_5_3_PASSWORD_MANAGEMENT_SYSTEM]: {
118
+ id: 50,
119
+ code: ComplianceCode.GDPR_A_11_5_3_PASSWORD_MANAGEMENT_SYSTEM,
120
+ title: 'A.11.5.3 Password Management System',
121
+ description: 'Use an interactive system to manage passwords, ensuring they are strong and meet security standards.',
122
+ complianceStandard: ComplianceCategory.GDPR,
123
+ relatedVulnerabilityIds: authAndCookieIds,
124
+ isNotApplicable: true,
125
+ },
126
+ [ComplianceCode.GDPR_A_11_5_4_USE_OF_SYSTEM_UTILITIES]: {
127
+ id: 51,
128
+ code: ComplianceCode.GDPR_A_11_5_4_USE_OF_SYSTEM_UTILITIES,
129
+ title: 'A.11.5.4 Use of System Utilities',
130
+ description: 'Restrict and control the use of utility programs that can bypass system or application security.',
131
+ complianceStandard: ComplianceCategory.GDPR,
132
+ relatedVulnerabilityIds: accessRestrictionIds,
133
+ isNotApplicable: true,
134
+ },
135
+ [ComplianceCode.GDPR_A_11_5_5_SESSION_TIMEOUT]: {
136
+ id: 52,
137
+ code: ComplianceCode.GDPR_A_11_5_5_SESSION_TIMEOUT,
138
+ title: 'A.11.5.5 Session Time-out',
139
+ description: 'Automatically log users out after a period of inactivity to protect the system.',
140
+ complianceStandard: ComplianceCategory.GDPR,
141
+ relatedVulnerabilityIds: authAndCookieIds,
142
+ isNotApplicable: true,
143
+ },
144
+ [ComplianceCode.GDPR_A_11_5_6_LIMITATION_CONNECTION_TIME]: {
145
+ id: 53,
146
+ code: ComplianceCode.GDPR_A_11_5_6_LIMITATION_CONNECTION_TIME,
147
+ title: 'A.11.5.6 Limitation of Connection Time',
148
+ description: 'Limit connection times, especially for high-risk applications, to enhance security.',
149
+ complianceStandard: ComplianceCategory.GDPR,
150
+ relatedVulnerabilityIds: authAndCookieIds,
151
+ isNotApplicable: true,
152
+ },
153
+ [ComplianceCode.GDPR_A_11_6_1_INFORMATION_ACCESS_RESTRICTION]: {
154
+ id: 54,
155
+ code: ComplianceCode.GDPR_A_11_6_1_INFORMATION_ACCESS_RESTRICTION,
156
+ title: 'A.11.6.1 Information Access Restriction',
157
+ description: 'Limit access to information and system functions based on the access control policy for users and support staff.',
158
+ complianceStandard: ComplianceCategory.GDPR,
159
+ relatedVulnerabilityIds: accessRestrictionIds,
160
+ isNotApplicable: false,
161
+ },
162
+ [ComplianceCode.GDPR_A_12_1_1_SECURITY_REQUIREMENTS_ANALYSIS]: {
163
+ id: 58,
164
+ code: ComplianceCode.GDPR_A_12_1_1_SECURITY_REQUIREMENTS_ANALYSIS,
165
+ title: 'A.12.1.1 Security Requirements Analysis and Specification',
166
+ description: 'When defining business requirements for new or updated information systems, include specific security control requirements to ensure protection.',
167
+ complianceStandard: ComplianceCategory.GDPR,
168
+ relatedVulnerabilityIds: [],
169
+ isNotApplicable: true,
170
+ },
171
+ [ComplianceCode.GDPR_A_12_2_1_INPUT_DATA_VALIDATION]: {
172
+ id: 59,
173
+ code: ComplianceCode.GDPR_A_12_2_1_INPUT_DATA_VALIDATION,
174
+ title: 'A.12.2.1 Input Data Validation',
175
+ description: 'Validate all data entered into applications to ensure it\'s accurate and appropriate.',
176
+ complianceStandard: ComplianceCategory.GDPR,
177
+ relatedVulnerabilityIds: inputValidationIds,
178
+ isNotApplicable: false,
179
+ },
180
+ [ComplianceCode.GDPR_A_12_2_4_OUTPUT_DATA_VALIDATION]: {
181
+ id: 62,
182
+ code: ComplianceCode.GDPR_A_12_2_4_OUTPUT_DATA_VALIDATION,
183
+ title: 'A.12.2.4 Output Data Validation',
184
+ description: 'Validate the data output from applications to confirm that the processed information is correct and relevant.',
185
+ complianceStandard: ComplianceCategory.GDPR,
186
+ relatedVulnerabilityIds: outputValidationIds,
187
+ isNotApplicable: false,
188
+ },
189
+ [ComplianceCode.GDPR_A_12_3_1_POLICY_CRYPTOGRAPHIC_CONTROLS]: {
190
+ id: 63,
191
+ code: ComplianceCode.GDPR_A_12_3_1_POLICY_CRYPTOGRAPHIC_CONTROLS,
192
+ title: 'A.12.3.1 Policy on the Use of Cryptographic Controls',
193
+ description: 'Develop and implement a policy for using cryptographic methods to protect information.',
194
+ complianceStandard: ComplianceCategory.GDPR,
195
+ relatedVulnerabilityIds: cryptoPolicyIds,
196
+ isNotApplicable: false,
197
+ },
198
+ [ComplianceCode.GDPR_A_12_3_2_KEY_MANAGEMENT]: {
199
+ id: 64,
200
+ code: ComplianceCode.GDPR_A_12_3_2_KEY_MANAGEMENT,
201
+ title: 'A.12.3.2 Key Management',
202
+ description: 'Establish a key management system to support the organization\'s use of encryption and cryptographic techniques.',
203
+ complianceStandard: ComplianceCategory.GDPR,
204
+ relatedVulnerabilityIds: cryptoPolicyIds,
205
+ isNotApplicable: false,
206
+ },
207
+ [ComplianceCode.GDPR_A_12_4_3_ACCESS_CONTROL_SOURCE_CODE]: {
208
+ id: 67,
209
+ code: ComplianceCode.GDPR_A_12_4_3_ACCESS_CONTROL_SOURCE_CODE,
210
+ title: 'A.12.4.3 Access Control to Program Source Code',
211
+ description: 'Restrict access to the source code of programs to authorized personnel only.',
212
+ complianceStandard: ComplianceCategory.GDPR,
213
+ relatedVulnerabilityIds: accessRestrictionIds,
214
+ isNotApplicable: true,
215
+ },
216
+ [ComplianceCode.GDPR_A_12_5_3_RESTRICTIONS_CHANGES_SOFTWARE]: {
217
+ id: 70,
218
+ code: ComplianceCode.GDPR_A_12_5_3_RESTRICTIONS_CHANGES_SOFTWARE,
219
+ title: 'A.12.5.3 Restrictions on Changes to Software Packages',
220
+ description: 'Limit modifications to software packages to necessary changes only, and tightly control all adjustments.',
221
+ complianceStandard: ComplianceCategory.GDPR,
222
+ relatedVulnerabilityIds: accessRestrictionIds,
223
+ isNotApplicable: true,
224
+ },
225
+ [ComplianceCode.GDPR_A_12_5_4_INFORMATION_LEAKAGE]: {
226
+ id: 71,
227
+ code: ComplianceCode.GDPR_A_12_5_4_INFORMATION_LEAKAGE,
228
+ title: 'A.12.5.4 Information Leakage',
229
+ description: 'Prevent any opportunities that could lead to unauthorized information leakage.',
230
+ complianceStandard: ComplianceCategory.GDPR,
231
+ relatedVulnerabilityIds: infoLeakageIds,
232
+ isNotApplicable: true,
233
+ },
234
+ [ComplianceCode.GDPR_A_12_5_5_OUTSOURCED_SOFTWARE_DEV]: {
235
+ id: 72,
236
+ code: ComplianceCode.GDPR_A_12_5_5_OUTSOURCED_SOFTWARE_DEV,
237
+ title: 'A.12.5.5 Outsourced Software Development',
238
+ description: 'Supervise and monitor outsourced software development activities to ensure they meet the organization s security and quality standards.',
239
+ complianceStandard: ComplianceCategory.GDPR,
240
+ relatedVulnerabilityIds: [],
241
+ isNotApplicable: false,
242
+ },
243
+ [ComplianceCode.GDPR_A_12_6_1_CONTROL_TECHNICAL_VULNERABILITIES]: {
244
+ id: 73,
245
+ code: ComplianceCode.GDPR_A_12_6_1_CONTROL_TECHNICAL_VULNERABILITIES,
246
+ title: 'A.12.6.1 Control of Technical Vulnerabilities',
247
+ description: 'Stay informed about technical vulnerabilities in the systems being used, assess the organization\'s exposure to them, and take necessary actions to manage the associated risks.',
248
+ complianceStandard: ComplianceCategory.GDPR,
249
+ relatedVulnerabilityIds: allAppSecIds,
250
+ isNotApplicable: true,
251
+ },
252
+ };
@@ -0,0 +1,6 @@
1
+ import type { VulnerabilityCategory } from '../types.js';
2
+ export declare const allVulnerabilityIds: () => number[];
3
+ export declare const idsByCategory: (category: VulnerabilityCategory) => number[];
4
+ export declare const idsByCodes: (codes: string[]) => number[];
5
+ export declare const idsByCodePrefix: (prefixes: string[]) => number[];
6
+ export declare const mergeIds: (...lists: number[][]) => number[];
@@ -0,0 +1,12 @@
1
+ import { VULNERABILITY_REGISTRY } from '../index.js';
2
+ // Lazy getter to avoid circular dependency issues at module load time
3
+ const getAllVulnerabilities = () => Object.values(VULNERABILITY_REGISTRY);
4
+ const uniqueSorted = (ids) => Array.from(new Set(ids)).sort((a, b) => a - b);
5
+ export const allVulnerabilityIds = () => uniqueSorted(getAllVulnerabilities().map(v => v.id));
6
+ export const idsByCategory = (category) => uniqueSorted(getAllVulnerabilities().filter(v => v.category === category).map(v => v.id));
7
+ export const idsByCodes = (codes) => uniqueSorted(codes
8
+ .map(code => VULNERABILITY_REGISTRY[code]?.id)
9
+ .filter((id) => typeof id === 'number'));
10
+ export const idsByCodePrefix = (prefixes) => uniqueSorted(getAllVulnerabilities().filter(v => prefixes.some(prefix => v.code.startsWith(prefix)))
11
+ .map(v => v.id));
12
+ export const mergeIds = (...lists) => uniqueSorted(lists.flat());
@@ -0,0 +1,2 @@
1
+ import { ComplianceRegistry } from '../types';
2
+ export declare const HIPAA_COMPLIANCE: ComplianceRegistry;
@@ -0,0 +1,187 @@
1
+ import { ComplianceCode } from '../compliance-codes';
2
+ import { ComplianceCategory } from '../types';
3
+ import { idsByCategory, idsByCodes, idsByCodePrefix, mergeIds } from './helpers.js';
4
+ const authIds = idsByCategory('authentication');
5
+ const injectionIds = idsByCategory('injection');
6
+ const xssIds = idsByCategory('xss');
7
+ const ssrfIds = idsByCategory('ssrf');
8
+ const configIds = idsByCategory('configuration');
9
+ const disclosureIds = idsByCategory('information_disclosure');
10
+ const cookieIds = idsByCodePrefix(['COOKIE_']);
11
+ const dirbrowseIds = idsByCodePrefix(['DIRBROWSE_']);
12
+ const jwtIds = idsByCodePrefix(['JWT_']);
13
+ const hstsIds = idsByCodes([
14
+ 'HEADER_MISSING_HSTS',
15
+ 'HEADER_HSTS_BAD_MAX_AGE',
16
+ 'HEADER_HSTS_SHORT_MAX_AGE',
17
+ 'HEADER_HSTS_NO_INCLUDESUBDOMAINS',
18
+ 'HEADER_HSTS_PRELOAD_LOW_MAX_AGE',
19
+ 'HEADER_DRIFT_HSTS',
20
+ ]);
21
+ const cookieSecureIds = idsByCodes([
22
+ 'COOKIE_SAMESITE_NONE_WITHOUT_SECURE',
23
+ 'COOKIE_SESSION_MISSING_SECURE',
24
+ 'COOKIE_MISSING_SECURE',
25
+ 'COOKIE_HOST_PREFIX_INVALID',
26
+ 'COOKIE_SECURE_PREFIX_INVALID',
27
+ ]);
28
+ const allAppSecIds = mergeIds(authIds, injectionIds, xssIds, ssrfIds, configIds, disclosureIds);
29
+ const accessControlIds = mergeIds(authIds, cookieIds, dirbrowseIds, disclosureIds);
30
+ const authAndCookieIds = mergeIds(authIds, cookieIds);
31
+ const cryptoIds = mergeIds(jwtIds, hstsIds, cookieSecureIds);
32
+ const integrityIds = mergeIds(injectionIds, xssIds);
33
+ export const HIPAA_COMPLIANCE = {
34
+ [ComplianceCode.HIPAA_164_105_PROTECT_PRIVATE_HEALTH_INFO]: {
35
+ id: 164,
36
+ code: ComplianceCode.HIPAA_164_105_PROTECT_PRIVATE_HEALTH_INFO,
37
+ title: 'S.Rule - Part 164, Subpart A, 164.105 Protect Private Health Info',
38
+ description: 'Make sure private electronic health information is kept safe and secure from anyone who shouldn’t see it.',
39
+ complianceStandard: ComplianceCategory.HIPAA,
40
+ relatedVulnerabilityIds: allAppSecIds,
41
+ isNotApplicable: false,
42
+ },
43
+ [ComplianceCode.HIPAA_164_306_A_1_KEEP_INFO_SAFE]: {
44
+ id: 165,
45
+ code: ComplianceCode.HIPAA_164_306_A_1_KEEP_INFO_SAFE,
46
+ title: 'S.Rule - Part 164, Subpart C, 164.306(a)(1) Keep Info Safe and Available',
47
+ description: 'Make sure health info stays private, accurate, and ready to use when needed.',
48
+ complianceStandard: ComplianceCategory.HIPAA,
49
+ relatedVulnerabilityIds: allAppSecIds,
50
+ isNotApplicable: false,
51
+ },
52
+ [ComplianceCode.HIPAA_164_306_A_2_PROTECT_AGAINST_THREATS]: {
53
+ id: 166,
54
+ code: ComplianceCode.HIPAA_164_306_A_2_PROTECT_AGAINST_THREATS,
55
+ title: 'S.Rule - Part 164, Subpart C, 164.306(a)(2) Protect Against Threats',
56
+ description: 'Put systems in place to stop hackers or anything else that might harm the health info.',
57
+ complianceStandard: ComplianceCategory.HIPAA,
58
+ relatedVulnerabilityIds: allAppSecIds,
59
+ isNotApplicable: false,
60
+ },
61
+ [ComplianceCode.HIPAA_164_306_A_3_STOP_UNAUTHORIZED_ACCESS]: {
62
+ id: 167,
63
+ code: ComplianceCode.HIPAA_164_306_A_3_STOP_UNAUTHORIZED_ACCESS,
64
+ title: 'S.Rule - Part 164, Subpart C, 164.306(a)(3) Stop Unauthorized Access',
65
+ description: 'Make sure no one can use or see health info without permission.',
66
+ complianceStandard: ComplianceCategory.HIPAA,
67
+ relatedVulnerabilityIds: accessControlIds,
68
+ isNotApplicable: false,
69
+ },
70
+ [ComplianceCode.HIPAA_164_308_A_1_I_PREVENT_FIX_PROBLEMS]: {
71
+ id: 168,
72
+ code: ComplianceCode.HIPAA_164_308_A_1_I_PREVENT_FIX_PROBLEMS,
73
+ title: 'S.Rule - Part 164, Subpart C, 164.308(a)(1) (i) Prevent and Fix Problems',
74
+ description: 'Create rules to spot and fix security problems before they cause damage.',
75
+ complianceStandard: ComplianceCategory.HIPAA,
76
+ relatedVulnerabilityIds: allAppSecIds,
77
+ isNotApplicable: false,
78
+ },
79
+ [ComplianceCode.HIPAA_164_308_A_1_II_B_LOWER_SECURITY_RISKS]: {
80
+ id: 169,
81
+ code: ComplianceCode.HIPAA_164_308_A_1_II_B_LOWER_SECURITY_RISKS,
82
+ title: 'S.Rule - Part 164, Subpart C, 164.308(a)(1)(ii)(B) Lower Security Risks',
83
+ description: 'Take steps to make sure the risk of problems, like data leaks, is as low as possible.',
84
+ complianceStandard: ComplianceCategory.HIPAA,
85
+ relatedVulnerabilityIds: allAppSecIds,
86
+ isNotApplicable: false,
87
+ },
88
+ [ComplianceCode.HIPAA_164_308_A_5_II_B_BLOCK_MALWARE]: {
89
+ id: 170,
90
+ code: ComplianceCode.HIPAA_164_308_A_5_II_B_BLOCK_MALWARE,
91
+ title: 'S.Rule - Part 164, Subpart C, 164.308(a)(5)(ii)(B) Block Viruses and Malware',
92
+ description: 'Set up tools to block harmful software like viruses and ransomware.',
93
+ complianceStandard: ComplianceCategory.HIPAA,
94
+ relatedVulnerabilityIds: [],
95
+ isNotApplicable: true,
96
+ },
97
+ [ComplianceCode.HIPAA_164_308_A_5_II_C_WATCH_LOGINS]: {
98
+ id: 171,
99
+ code: ComplianceCode.HIPAA_164_308_A_5_II_C_WATCH_LOGINS,
100
+ title: 'S.Rule - Part 164, Subpart C, 164.308(a)(5)(ii)(C) Watch Logins',
101
+ description: 'Keep track of who’s logging in and report anything that seems suspicious.',
102
+ complianceStandard: ComplianceCategory.HIPAA,
103
+ relatedVulnerabilityIds: [],
104
+ isNotApplicable: true,
105
+ },
106
+ [ComplianceCode.HIPAA_164_308_A_5_II_D_PROTECT_PASSWORDS]: {
107
+ id: 172,
108
+ code: ComplianceCode.HIPAA_164_308_A_5_II_D_PROTECT_PASSWORDS,
109
+ title: 'S.Rule - Part 164, Subpart C, 164.308(a)(5)(ii)(D) Protect Passwords',
110
+ description: 'Make sure passwords are strong, secure, and regularly updated.',
111
+ complianceStandard: ComplianceCategory.HIPAA,
112
+ relatedVulnerabilityIds: authAndCookieIds,
113
+ isNotApplicable: true,
114
+ },
115
+ [ComplianceCode.HIPAA_164_308_A_7_I_PLAN_EMERGENCIES]: {
116
+ id: 173,
117
+ code: ComplianceCode.HIPAA_164_308_A_7_I_PLAN_EMERGENCIES,
118
+ title: 'S.Rule - Part 164, Subpart C, 164.308(a)(7)(i) Plan for Emergencies',
119
+ description: 'Have a backup plan ready if something happens, like a power outage or system crash, so health info stays safe.',
120
+ complianceStandard: ComplianceCategory.HIPAA,
121
+ relatedVulnerabilityIds: [],
122
+ isNotApplicable: true,
123
+ },
124
+ [ComplianceCode.HIPAA_164_312_A_1_CONTROL_ACCESS]: {
125
+ id: 174,
126
+ code: ComplianceCode.HIPAA_164_312_A_1_CONTROL_ACCESS,
127
+ title: 'S.Rule - Part 164, Subpart C, 164.312(a)(1) Control Who Can See Info',
128
+ description: 'Limit access to health info to only those who really need it.',
129
+ complianceStandard: ComplianceCategory.HIPAA,
130
+ relatedVulnerabilityIds: accessControlIds,
131
+ isNotApplicable: true,
132
+ },
133
+ [ComplianceCode.HIPAA_164_312_C_1_PREVENT_CHANGES]: {
134
+ id: 175,
135
+ code: ComplianceCode.HIPAA_164_312_C_1_PREVENT_CHANGES,
136
+ title: 'S.Rule - Part 164, Subpart C, 164.312(c)(1) Prevent Changes or Deletion',
137
+ description: 'Make sure no one can change or delete health info without permission.',
138
+ complianceStandard: ComplianceCategory.HIPAA,
139
+ relatedVulnerabilityIds: [],
140
+ isNotApplicable: true,
141
+ },
142
+ [ComplianceCode.HIPAA_164_312_D_VERIFY_IDENTITY]: {
143
+ id: 176,
144
+ code: ComplianceCode.HIPAA_164_312_D_VERIFY_IDENTITY,
145
+ title: 'S.Rule - Part 164, Subpart C, 164.312(d) Double-Check Who’s Asking for Access',
146
+ description: 'Confirm that anyone asking to see health info is who they say they are.',
147
+ complianceStandard: ComplianceCategory.HIPAA,
148
+ relatedVulnerabilityIds: authAndCookieIds,
149
+ isNotApplicable: true,
150
+ },
151
+ [ComplianceCode.HIPAA_164_312_E_1_PROTECT_ONLINE_INFO]: {
152
+ id: 177,
153
+ code: ComplianceCode.HIPAA_164_312_E_1_PROTECT_ONLINE_INFO,
154
+ title: 'S.Rule - Part 164, Subpart C, 164.312(e)(1) Protect Info Sent Online',
155
+ description: 'Make sure health info is safe when sent over the internet.',
156
+ complianceStandard: ComplianceCategory.HIPAA,
157
+ relatedVulnerabilityIds: cryptoIds,
158
+ isNotApplicable: false,
159
+ },
160
+ [ComplianceCode.HIPAA_164_312_E_2_I_PREVENT_UNAUTHORIZED_CHANGES]: {
161
+ id: 178,
162
+ code: ComplianceCode.HIPAA_164_312_E_2_I_PREVENT_UNAUTHORIZED_CHANGES,
163
+ title: 'S.Rule - Part 164, Subpart C, 164.312(e)(2)(i) Prevent Unauthorized Changes',
164
+ description: 'Ensure health info sent electronically isn’t changed without anyone knowing.',
165
+ complianceStandard: ComplianceCategory.HIPAA,
166
+ relatedVulnerabilityIds: integrityIds,
167
+ isNotApplicable: false,
168
+ },
169
+ [ComplianceCode.HIPAA_164_312_E_2_II_USE_ENCRYPTION]: {
170
+ id: 179,
171
+ code: ComplianceCode.HIPAA_164_312_E_2_II_USE_ENCRYPTION,
172
+ title: 'S.Rule - Part 164, Subpart C, 164.312(e)(2)(ii) Use Encryption to Keep Info Safe',
173
+ description: 'Encrypt health info when it’s sent online to keep it private.',
174
+ complianceStandard: ComplianceCategory.HIPAA,
175
+ relatedVulnerabilityIds: cryptoIds,
176
+ isNotApplicable: true,
177
+ },
178
+ [ComplianceCode.HIPAA_164_530_C_2_I_KEEP_INFO_SHARED]: {
179
+ id: 180,
180
+ code: ComplianceCode.HIPAA_164_530_C_2_I_KEEP_INFO_SHARED,
181
+ title: 'P.Rule - Part 164, Subpart E, 164.530(c)(2)(i) Keep Info From Being Shared',
182
+ description: 'Take care to stop health info from being shared accidentally or on purpose with the wrong people.',
183
+ complianceStandard: ComplianceCategory.HIPAA,
184
+ relatedVulnerabilityIds: mergeIds(disclosureIds, accessControlIds),
185
+ isNotApplicable: true,
186
+ },
187
+ };
@@ -0,0 +1,5 @@
1
+ export { OWASP_COMPLIANCE } from './owasp.js';
2
+ export { HIPAA_COMPLIANCE } from './hipaa.js';
3
+ export { GDPR_COMPLIANCE } from './gdpr.js';
4
+ export { PCI_DSS_COMPLIANCE } from './pci-dss.js';
5
+ export { SANS_TOP_25_COMPLIANCE } from './sans-top-25.js';
@@ -0,0 +1,5 @@
1
+ export { OWASP_COMPLIANCE } from './owasp.js';
2
+ export { HIPAA_COMPLIANCE } from './hipaa.js';
3
+ export { GDPR_COMPLIANCE } from './gdpr.js';
4
+ export { PCI_DSS_COMPLIANCE } from './pci-dss.js';
5
+ export { SANS_TOP_25_COMPLIANCE } from './sans-top-25.js';
@@ -0,0 +1,2 @@
1
+ import { ComplianceRegistry } from '../types';
2
+ export declare const OWASP_COMPLIANCE: ComplianceRegistry;
@@ -0,0 +1,127 @@
1
+ import { ComplianceCode } from '../compliance-codes';
2
+ import { ComplianceCategory } from '../types';
3
+ import { idsByCategory, idsByCodes, idsByCodePrefix, mergeIds } from './helpers.js';
4
+ const authIds = idsByCategory('authentication');
5
+ const injectionIds = idsByCategory('injection');
6
+ const xssIds = idsByCategory('xss');
7
+ const ssrfIds = idsByCategory('ssrf');
8
+ const configIds = idsByCategory('configuration');
9
+ const disclosureIds = idsByCategory('information_disclosure');
10
+ const accessControlIds = idsByCodePrefix(['BAC_', 'MASSASSIGN_']);
11
+ const dirbrowseIds = idsByCodePrefix(['DIRBROWSE_']);
12
+ const jwtIds = idsByCodePrefix(['JWT_']);
13
+ const cookieIds = idsByCodePrefix(['COOKIE_']);
14
+ const deserializationIds = idsByCodePrefix(['DESER_']);
15
+ const hstsIds = idsByCodes([
16
+ 'HEADER_MISSING_HSTS',
17
+ 'HEADER_HSTS_BAD_MAX_AGE',
18
+ 'HEADER_HSTS_SHORT_MAX_AGE',
19
+ 'HEADER_HSTS_NO_INCLUDESUBDOMAINS',
20
+ 'HEADER_HSTS_PRELOAD_LOW_MAX_AGE',
21
+ 'HEADER_DRIFT_HSTS',
22
+ ]);
23
+ const cookieSecureIds = idsByCodes([
24
+ 'COOKIE_SAMESITE_NONE_WITHOUT_SECURE',
25
+ 'COOKIE_SESSION_MISSING_SECURE',
26
+ 'COOKIE_MISSING_SECURE',
27
+ 'COOKIE_HOST_PREFIX_INVALID',
28
+ 'COOKIE_SECURE_PREFIX_INVALID',
29
+ ]);
30
+ const owaspA1Ids = mergeIds(accessControlIds, dirbrowseIds);
31
+ const owaspA2Ids = mergeIds(jwtIds, hstsIds, cookieSecureIds);
32
+ const owaspA3Ids = mergeIds(injectionIds, xssIds);
33
+ const owaspA5Ids = mergeIds(configIds, disclosureIds);
34
+ const owaspA7Ids = mergeIds(authIds, cookieIds);
35
+ const owaspA8Ids = deserializationIds;
36
+ export const OWASP_COMPLIANCE = {
37
+ [ComplianceCode.OWASP_A1_BROKEN_ACCESS_CONTROL]: {
38
+ id: 154,
39
+ code: ComplianceCode.OWASP_A1_BROKEN_ACCESS_CONTROL,
40
+ title: 'A1 Broken Access Control',
41
+ description: 'Many web applications fail to properly enforce rules on what authenticated users are allowed to access or do. This creates vulnerabilities where attackers can exploit the flaws to gain unauthorized access. For example, they might be able to log into someone else’s account, view sensitive files they shouldn’t have access to, modify other users\' data, or change their own access rights to gain additional privileges. To prevent these kinds of attacks, web applications must ensure that every user’s actions are carefully restricted based on their role and permission level, ensuring they can only interact with the parts of the system they are authorized to access.',
42
+ complianceStandard: ComplianceCategory.OWASP,
43
+ relatedVulnerabilityIds: owaspA1Ids,
44
+ isNotApplicable: false,
45
+ },
46
+ [ComplianceCode.OWASP_A2_CRYPTOGRAPHIC_FAILURES]: {
47
+ id: 155,
48
+ code: ComplianceCode.OWASP_A2_CRYPTOGRAPHIC_FAILURES,
49
+ title: 'A2 Cryptographic Failures',
50
+ description: 'Many web applications and APIs fail to properly protect sensitive information, like financial details, health records, or personal identification data. When this data isn’t secured correctly, attackers can steal or alter it, leading to crimes like credit card fraud or identity theft. Sensitive data should always be encrypted, whether it’s being stored (encryption at rest) or transferred over the internet (encryption in transit). Extra care must also be taken when this data is exchanged between the user and the browser to prevent it from being compromised.',
51
+ complianceStandard: ComplianceCategory.OWASP,
52
+ relatedVulnerabilityIds: owaspA2Ids,
53
+ isNotApplicable: false,
54
+ },
55
+ [ComplianceCode.OWASP_A3_INJECTION_FLAWS]: {
56
+ id: 156,
57
+ code: ComplianceCode.OWASP_A3_INJECTION_FLAWS,
58
+ title: 'A3 Injection Flaws',
59
+ description: 'Injection flaws happen when untrusted or harmful data is sent to a system as part of a command or query. This can occur with different types of data, like SQL (used for databases), NoSQL, OS (operating system commands), or LDAP (used for directory services). Attackers can exploit these flaws by sending malicious data that tricks the system into executing commands it wasn’t supposed to, or accessing data without permission. This can allow attackers to gain unauthorized control or information from the system.',
60
+ complianceStandard: ComplianceCategory.OWASP,
61
+ relatedVulnerabilityIds: owaspA3Ids,
62
+ isNotApplicable: false,
63
+ },
64
+ [ComplianceCode.OWASP_A4_INSECURE_DESIGN]: {
65
+ id: 157,
66
+ code: ComplianceCode.OWASP_A4_INSECURE_DESIGN,
67
+ title: 'A4 Insecure Design',
68
+ description: 'Insecure design refers to weaknesses in the overall design of a system or software, where essential security controls are missing or not effective. This is different from implementation flaws, which are mistakes made while building the system. A system with insecure design has security gaps from the start, which can’t be fully fixed later, no matter how well the system is built. For example, if the system wasn’t designed with proper security in mind, even a perfect implementation won’t fix it. A key factor in insecure design is not properly assessing the risks the software or system might face, which leads to a failure in designing the necessary security protections.',
69
+ complianceStandard: ComplianceCategory.OWASP,
70
+ relatedVulnerabilityIds: [],
71
+ isNotApplicable: true,
72
+ },
73
+ [ComplianceCode.OWASP_A5_SECURITY_MISCONFIGURATION]: {
74
+ id: 158,
75
+ code: ComplianceCode.OWASP_A5_SECURITY_MISCONFIGURATION,
76
+ title: 'A5 Security Misconfiguration',
77
+ description: 'Security misconfiguration is one of the most common issues found in web applications and systems. It happens when systems are not set up securely or configured properly. This can include things like using insecure default settings, incomplete configurations, or leaving cloud storage open to the public. Other examples include misconfigured security settings like HTTP headers and error messages that reveal sensitive information about the system. To protect against these risks, all components—such as operating systems, frameworks, libraries, and applications—must be securely configured from the beginning. Additionally, they need to be regularly updated and patched to fix any vulnerabilities and ensure they remain secure over time.',
78
+ complianceStandard: ComplianceCategory.OWASP,
79
+ relatedVulnerabilityIds: owaspA5Ids,
80
+ isNotApplicable: false,
81
+ },
82
+ [ComplianceCode.OWASP_A6_VULNERABLE_OUTDATED_COMPONENTS]: {
83
+ id: 159,
84
+ code: ComplianceCode.OWASP_A6_VULNERABLE_OUTDATED_COMPONENTS,
85
+ title: 'A6 Vulnerable and Outdated Components',
86
+ description: 'Many web applications rely on components like libraries, frameworks, or other software modules to run. These components operate with the same permissions as the rest of the application. If any of these components have known security weaknesses, attackers can exploit them to cause serious issues, such as data loss or taking control of the server. Using outdated components with known vulnerabilities can undermine the security of the entire application, making it easier for attackers to launch attacks or cause other damage. To avoid this, it’s important to regularly update and patch these components to keep the application secure.',
87
+ complianceStandard: ComplianceCategory.OWASP,
88
+ relatedVulnerabilityIds: [],
89
+ isNotApplicable: true,
90
+ },
91
+ [ComplianceCode.OWASP_A7_IDENTIFICATION_AUTH_FAILURE]: {
92
+ id: 160,
93
+ code: ComplianceCode.OWASP_A7_IDENTIFICATION_AUTH_FAILURE,
94
+ title: 'A7 Identification and Authentication Failure',
95
+ description: 'Many applications have weaknesses in how they handle user login and session management. These flaws can allow attackers to steal or guess passwords, keys, or session tokens, and use them to impersonate other users. In some cases, attackers might be able to take over someone’s account temporarily or permanently. Properly securing authentication processes and session management is crucial to prevent unauthorized access and protect user identities.',
96
+ complianceStandard: ComplianceCategory.OWASP,
97
+ relatedVulnerabilityIds: owaspA7Ids,
98
+ isNotApplicable: false,
99
+ },
100
+ [ComplianceCode.OWASP_A8_SOFTWARE_DATA_INTEGRITY_FAILURE]: {
101
+ id: 161,
102
+ code: ComplianceCode.OWASP_A8_SOFTWARE_DATA_INTEGRITY_FAILURE,
103
+ title: 'A8 Software and Data Integrity Failure',
104
+ description: 'Software and data integrity failures occur when code or systems aren’t protected from changes that could compromise their security. For example, if an application uses plugins, libraries, or modules from untrusted sources or repositories, attackers could introduce malicious code. Insecure continuous integration/continuous deployment (CI/CD) pipelines also pose a risk, as they could allow unauthorized access or introduce harmful code. Many apps also have auto-update features, but if the updates aren’t properly verified, attackers could upload malicious updates that get applied to all users’ installations. Another risk is when data is encoded or serialized in a way that attackers can manipulate, which could lead to vulnerabilities like insecure deserialization.',
105
+ complianceStandard: ComplianceCategory.OWASP,
106
+ relatedVulnerabilityIds: owaspA8Ids,
107
+ isNotApplicable: false,
108
+ },
109
+ [ComplianceCode.OWASP_A9_LOGGING_MONITORING_FAILURES]: {
110
+ id: 162,
111
+ code: ComplianceCode.OWASP_A9_LOGGING_MONITORING_FAILURES,
112
+ title: 'A9 Security Logging and Monitoring Failures',
113
+ description: 'When an application or system doesn’t properly log or monitor activity, it becomes easier for attackers to continue their attacks unnoticed. Without effective monitoring, attackers can maintain access, move through different systems, and tamper with or steal data. Studies of security breaches show that it often takes over 200 days to detect a breach, and many breaches are first discovered by external parties, not by the system’s internal monitoring. Proper logging and real-time monitoring are crucial for detecting and responding to attacks before they cause significant damage.',
114
+ complianceStandard: ComplianceCategory.OWASP,
115
+ relatedVulnerabilityIds: [],
116
+ isNotApplicable: true,
117
+ },
118
+ [ComplianceCode.OWASP_A10_SSRF]: {
119
+ id: 163,
120
+ code: ComplianceCode.OWASP_A10_SSRF,
121
+ title: 'A10 Server-Side Request Forgery (SSRF)',
122
+ description: 'SSRF flaws happen when a web application accepts a user-supplied URL to fetch a remote resource but doesn’t properly validate it. This allows attackers to trick the application into sending a request to an unexpected destination, even if there are security measures like firewalls, VPNs, or network access controls in place. As a result, attackers can target internal systems or services that would normally be protected from external access.',
123
+ complianceStandard: ComplianceCategory.OWASP,
124
+ relatedVulnerabilityIds: ssrfIds,
125
+ isNotApplicable: false,
126
+ },
127
+ };
@@ -0,0 +1,2 @@
1
+ import { ComplianceRegistry } from '../types';
2
+ export declare const PCI_DSS_COMPLIANCE: ComplianceRegistry;