@zerothreatai/vulnerability-registry 5.0.0 → 6.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 +11 -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 +19 -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 +29 -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,260 @@
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 misconfigIds = mergeIds(configIds, disclosureIds);
30
+ const accessControlIds = mergeIds(authIds, cookieIds, dirbrowseIds, disclosureIds);
31
+ const cryptoIds = mergeIds(jwtIds, hstsIds, cookieSecureIds);
32
+ const injectionAndXssIds = mergeIds(injectionIds, xssIds);
33
+ const authAndCookieIds = mergeIds(authIds, cookieIds);
34
+ export const PCI_DSS_COMPLIANCE = {
35
+ [ComplianceCode.PCI_REQ_1_INSTALL_FIREWALL]: {
36
+ id: 74,
37
+ code: ComplianceCode.PCI_REQ_1_INSTALL_FIREWALL,
38
+ title: 'Requirement 1 Install and Maintain a Firewall Configuration',
39
+ description: 'Set up and maintain a firewall to create a secure barrier between cardholder data and any external threats. This protects sensitive information from unauthorized access by controlling the incoming and outgoing network traffic.',
40
+ complianceStandard: ComplianceCategory.PCIDSS,
41
+ relatedVulnerabilityIds: [],
42
+ isNotApplicable: true,
43
+ },
44
+ [ComplianceCode.PCI_REQ_2_1_CHANGE_DEFAULT_PASSWORDS]: {
45
+ id: 75,
46
+ code: ComplianceCode.PCI_REQ_2_1_CHANGE_DEFAULT_PASSWORDS,
47
+ title: 'Requirement 2.1 Change Vendor-Supplied Default Passwords',
48
+ description: 'Always replace default passwords and remove or disable default accounts provided by vendors before setting up a system. This applies to all types of default passwords, such as those for operating systems, security software, point-of-sale terminals, and other system services, to prevent unauthorized access.',
49
+ complianceStandard: ComplianceCategory.PCIDSS,
50
+ relatedVulnerabilityIds: authAndCookieIds,
51
+ isNotApplicable: true,
52
+ },
53
+ [ComplianceCode.PCI_REQ_2_2_1_ONE_PRIMARY_FUNCTION]: {
54
+ id: 76,
55
+ code: ComplianceCode.PCI_REQ_2_2_1_ONE_PRIMARY_FUNCTION,
56
+ title: 'Requirement 2.2.1 One Primary Function Per Server',
57
+ description: 'Implement only one primary function per server (e.g., web server, database server, DNS) to avoid coexisting functions with different security levels. If using virtualization, ensure each virtual system component performs a single function.',
58
+ complianceStandard: ComplianceCategory.PCIDSS,
59
+ relatedVulnerabilityIds: [],
60
+ isNotApplicable: true,
61
+ },
62
+ [ComplianceCode.PCI_REQ_2_2_2_ENABLE_NECESSARY_SERVICES]: {
63
+ id: 77,
64
+ code: ComplianceCode.PCI_REQ_2_2_2_ENABLE_NECESSARY_SERVICES,
65
+ title: 'Requirement 2.2.2 Enable Only Necessary Services and Protocols',
66
+ description: 'Activate only the essential services, protocols, and daemons needed for the system to function. This minimizes potential vulnerabilities by reducing the number of unnecessary services that could be exploited by attackers.',
67
+ complianceStandard: ComplianceCategory.PCIDSS,
68
+ relatedVulnerabilityIds: misconfigIds,
69
+ isNotApplicable: false,
70
+ },
71
+ [ComplianceCode.PCI_REQ_2_2_3_SECURE_INSECURE_SERVICES]: {
72
+ id: 78,
73
+ code: ComplianceCode.PCI_REQ_2_2_3_SECURE_INSECURE_SERVICES,
74
+ title: 'Requirement 2.2.3 Implement Additional Security Features for Insecure Services',
75
+ description: 'Apply extra security measures to secure any necessary services, protocols, or daemons identified as insecure. For environments using SSL/early TLS, adhere to the requirements specified in Appendix A2 to mitigate vulnerabilities.',
76
+ complianceStandard: ComplianceCategory.PCIDSS,
77
+ relatedVulnerabilityIds: cryptoIds,
78
+ isNotApplicable: false,
79
+ },
80
+ [ComplianceCode.PCI_REQ_2_2_4_CONFIGURE_SYSTEM_PARAMETERS]: {
81
+ id: 79,
82
+ code: ComplianceCode.PCI_REQ_2_2_4_CONFIGURE_SYSTEM_PARAMETERS,
83
+ title: 'Requirement 2.2.4 Configure System Security Parameters',
84
+ description: 'Configure system security parameters to prevent misuse, ensuring systems are protected from unauthorized actions.',
85
+ complianceStandard: ComplianceCategory.PCIDSS,
86
+ relatedVulnerabilityIds: misconfigIds,
87
+ isNotApplicable: false,
88
+ },
89
+ [ComplianceCode.PCI_REQ_2_2_5_STRENGTHEN_INSECURE_SERVICES]: {
90
+ id: 80,
91
+ code: ComplianceCode.PCI_REQ_2_2_5_STRENGTHEN_INSECURE_SERVICES,
92
+ title: 'Requirement 2.2.5 Strengthen Security for Insecure Services',
93
+ description: 'For services, protocols, or daemons that are deemed insecure, extra security features should be added to protect them. This is particularly important when using SSL or early TLS; specific guidelines from Appendix A2 must be followed to ensure proper security.',
94
+ complianceStandard: ComplianceCategory.PCIDSS,
95
+ relatedVulnerabilityIds: cryptoIds,
96
+ isNotApplicable: false,
97
+ },
98
+ [ComplianceCode.PCI_REQ_2_3_ENCRYPT_NON_CONSOLE_ADMIN]: {
99
+ id: 81,
100
+ code: ComplianceCode.PCI_REQ_2_3_ENCRYPT_NON_CONSOLE_ADMIN,
101
+ title: 'Requirement 2.3 Encrypt Non-Console Administrative Access',
102
+ description: 'Use strong encryption to secure all administrative access, especially when accessing systems remotely. If SSL or early TLS is used, follow the additional requirements in Appendix A2 to ensure secure communication.',
103
+ complianceStandard: ComplianceCategory.PCIDSS,
104
+ relatedVulnerabilityIds: cryptoIds,
105
+ isNotApplicable: false,
106
+ },
107
+ [ComplianceCode.PCI_REQ_3_1_MINIMIZE_DATA_STORAGE]: {
108
+ id: 86,
109
+ code: ComplianceCode.PCI_REQ_3_1_MINIMIZE_DATA_STORAGE,
110
+ title: 'Requirement 3.1 Minimize Cardholder Data Storage',
111
+ description: 'Implement policies and procedures to store only the necessary cardholder data and securely dispose of it when no longer needed, to reduce risk and ensure compliance with data retention standards.',
112
+ complianceStandard: ComplianceCategory.PCIDSS,
113
+ relatedVulnerabilityIds: disclosureIds,
114
+ isNotApplicable: true,
115
+ },
116
+ [ComplianceCode.PCI_REQ_4_1_STRONG_CRYPTO_TRANSMISSION]: {
117
+ id: 95,
118
+ code: ComplianceCode.PCI_REQ_4_1_STRONG_CRYPTO_TRANSMISSION,
119
+ title: 'Requirement 4.1 Use Strong Cryptography for Cardholder Data Transmission',
120
+ description: 'Ensure the use of strong cryptography and secure protocols to protect cardholder data during transmission over open, public networks. Only trusted keys and certificates should be used, and the protocol must support secure configurations with appropriate encryption strength.',
121
+ complianceStandard: ComplianceCategory.PCIDSS,
122
+ relatedVulnerabilityIds: cryptoIds,
123
+ isNotApplicable: false,
124
+ },
125
+ [ComplianceCode.PCI_REQ_6_1_IDENTIFY_RANK_VULNERABILITIES]: {
126
+ id: 99,
127
+ code: ComplianceCode.PCI_REQ_6_1_IDENTIFY_RANK_VULNERABILITIES,
128
+ title: 'Requirement 6.1 Identify and Rank Security Vulnerabilities',
129
+ description: 'Establish a process to regularly identify security vulnerabilities in systems and applications, using trusted external sources for vulnerability information. Once identified, assign a risk ranking (e.g., high, medium, or low) to each vulnerability to prioritize remediation efforts based on potential impact. This helps ensure that the most critical security flaws are addressed first.',
130
+ complianceStandard: ComplianceCategory.PCIDSS,
131
+ relatedVulnerabilityIds: allAppSecIds,
132
+ isNotApplicable: true,
133
+ },
134
+ [ComplianceCode.PCI_REQ_6_2_INSTALL_SECURITY_PATCHES]: {
135
+ id: 100,
136
+ code: ComplianceCode.PCI_REQ_6_2_INSTALL_SECURITY_PATCHES,
137
+ title: 'Requirement 6.2 Install Vendor-Supplied Security Patches',
138
+ description: 'Protect all system components and software from known vulnerabilities by installing security patches provided by the vendor. Ensure that critical security patches are installed within one month of their release to minimize the risk of exploitation from known threats. This helps keep systems secure and up to date with the latest protections.',
139
+ complianceStandard: ComplianceCategory.PCIDSS,
140
+ relatedVulnerabilityIds: allAppSecIds,
141
+ isNotApplicable: false,
142
+ },
143
+ [ComplianceCode.PCI_REQ_6_3_1_SECURE_SOFTWARE_DEVELOPMENT]: {
144
+ id: 101,
145
+ code: ComplianceCode.PCI_REQ_6_3_1_SECURE_SOFTWARE_DEVELOPMENT,
146
+ title: 'Requirement 6.3.1 Secure Software Development Practices',
147
+ description: 'Develop and maintain secure software applications by following best practices for security throughout the development lifecycle. This applies to all software, whether created internally or custom-built by third parties, including securing web-based access and protecting against potential vulnerabilities.',
148
+ complianceStandard: ComplianceCategory.PCIDSS,
149
+ relatedVulnerabilityIds: injectionAndXssIds,
150
+ isNotApplicable: true,
151
+ },
152
+ [ComplianceCode.PCI_REQ_6_5_1_PREVENT_INJECTION]: {
153
+ id: 107,
154
+ code: ComplianceCode.PCI_REQ_6_5_1_PREVENT_INJECTION,
155
+ title: 'Requirement 6.5.1 Prevent Injection Flaws in Applications',
156
+ description: 'Ensure that applications are protected from injection attacks, such as SQL injection and other types like OS Command, LDAP, and XPath injection, by implementing proper input validation, escaping user inputs, and using parameterized queries to prevent malicious code from being executed.',
157
+ complianceStandard: ComplianceCategory.PCIDSS,
158
+ relatedVulnerabilityIds: injectionAndXssIds,
159
+ isNotApplicable: false,
160
+ },
161
+ [ComplianceCode.PCI_REQ_6_5_2_PREVENT_BUFFER_OVERFLOW]: {
162
+ id: 108,
163
+ code: ComplianceCode.PCI_REQ_6_5_2_PREVENT_BUFFER_OVERFLOW,
164
+ title: 'Requirement 6.5.2 Protect Against Buffer Overflow Vulnerabilities',
165
+ description: 'Safeguard applications from buffer overflow attacks by ensuring proper bounds checking and input validation, preventing attackers from writing data outside allocated memory spaces and exploiting vulnerabilities in software.',
166
+ complianceStandard: ComplianceCategory.PCIDSS,
167
+ relatedVulnerabilityIds: [],
168
+ isNotApplicable: true,
169
+ },
170
+ [ComplianceCode.PCI_REQ_6_5_3_SECURE_CRYPTOGRAPHIC_STORAGE]: {
171
+ id: 109,
172
+ code: ComplianceCode.PCI_REQ_6_5_3_SECURE_CRYPTOGRAPHIC_STORAGE,
173
+ title: 'Requirement 6.5.3 Secure Cryptographic Storage',
174
+ description: 'Ensure sensitive data is securely stored using strong encryption techniques to protect it from unauthorized access or disclosure, minimizing the risk of data breaches or misuse.',
175
+ complianceStandard: ComplianceCategory.PCIDSS,
176
+ relatedVulnerabilityIds: cryptoIds,
177
+ isNotApplicable: false,
178
+ },
179
+ [ComplianceCode.PCI_REQ_6_5_4_SECURE_COMM_CHANNELS]: {
180
+ id: 110,
181
+ code: ComplianceCode.PCI_REQ_6_5_4_SECURE_COMM_CHANNELS,
182
+ title: 'Requirement 6.5.4 Secure Communication Channels',
183
+ description: 'Use strong encryption protocols to protect sensitive data during transmission over networks, ensuring it cannot be intercepted or tampered with during communication.',
184
+ complianceStandard: ComplianceCategory.PCIDSS,
185
+ relatedVulnerabilityIds: cryptoIds,
186
+ isNotApplicable: false,
187
+ },
188
+ [ComplianceCode.PCI_REQ_6_5_5_PROPER_ERROR_HANDLING]: {
189
+ id: 111,
190
+ code: ComplianceCode.PCI_REQ_6_5_5_PROPER_ERROR_HANDLING,
191
+ title: 'Requirement 6.5.5 Proper Error Handling Practices',
192
+ description: 'Ensure that error messages do not reveal sensitive information that could be exploited by attackers. Implement secure error handling to log issues without exposing system details or data to unauthorized users.',
193
+ complianceStandard: ComplianceCategory.PCIDSS,
194
+ relatedVulnerabilityIds: injectionAndXssIds,
195
+ isNotApplicable: false,
196
+ },
197
+ [ComplianceCode.PCI_REQ_6_5_6_ADDRESS_HIGH_RISK_VULNS]: {
198
+ id: 112,
199
+ code: ComplianceCode.PCI_REQ_6_5_6_ADDRESS_HIGH_RISK_VULNS,
200
+ title: 'Requirement 6.5.6 Address High-Risk Vulnerabilities Promptly',
201
+ description: 'Identify and address all "high risk" vulnerabilities as part of the security vulnerability process to prevent potential breaches and protect sensitive data.',
202
+ complianceStandard: ComplianceCategory.PCIDSS,
203
+ relatedVulnerabilityIds: allAppSecIds,
204
+ isNotApplicable: true,
205
+ },
206
+ [ComplianceCode.PCI_REQ_6_5_7_PREVENT_XSS]: {
207
+ id: 113,
208
+ code: ComplianceCode.PCI_REQ_6_5_7_PREVENT_XSS,
209
+ title: 'Requirement 6.5.7 Prevent Cross-Site Scripting (XSS) Vulnerabilities',
210
+ description: 'Ensure that web applications are secure against XSS attacks, where attackers inject malicious scripts into web pages. Implement input validation and output encoding to prevent scripts from being executed in a user\'s browser.',
211
+ complianceStandard: ComplianceCategory.PCIDSS,
212
+ relatedVulnerabilityIds: xssIds,
213
+ isNotApplicable: false,
214
+ },
215
+ [ComplianceCode.PCI_REQ_6_5_8_PREVENT_ACCESS_CONTROL_VULNS]: {
216
+ id: 114,
217
+ code: ComplianceCode.PCI_REQ_6_5_8_PREVENT_ACCESS_CONTROL_VULNS,
218
+ title: 'Requirement 6.5.8 Prevent Improper Access Control Vulnerabilities',
219
+ description: 'Ensure that web applications properly control access to sensitive resources. Implement strong access control mechanisms to prevent unauthorized users from accessing or modifying data they shouldn t, and avoid vulnerabilities like insecure direct object references, directory traversal, or unrestricted URL access.',
220
+ complianceStandard: ComplianceCategory.PCIDSS,
221
+ relatedVulnerabilityIds: accessControlIds,
222
+ isNotApplicable: false,
223
+ },
224
+ [ComplianceCode.PCI_REQ_6_5_9_PREVENT_CSRF]: {
225
+ id: 115,
226
+ code: ComplianceCode.PCI_REQ_6_5_9_PREVENT_CSRF,
227
+ title: 'Requirement 6.5.9 Prevent Cross-Site Request Forgery (CSRF)',
228
+ description: 'Implement security measures to prevent CSRF attacks, where an attacker tricks a user into making unwanted requests to a website on which the user is authenticated. Use anti-CSRF tokens and ensure that user actions are properly validated and protected from being exploited through malicious requests.',
229
+ complianceStandard: ComplianceCategory.PCIDSS,
230
+ relatedVulnerabilityIds: [],
231
+ isNotApplicable: false,
232
+ },
233
+ [ComplianceCode.PCI_REQ_6_5_10_PREVENT_BROKEN_AUTH]: {
234
+ id: 116,
235
+ code: ComplianceCode.PCI_REQ_6_5_10_PREVENT_BROKEN_AUTH,
236
+ title: 'Requirement 6.5.10 Prevent Broken Authentication and Session Management',
237
+ description: 'Secure user authentication and session management processes to prevent unauthorized access. This includes using strong, multi-factor authentication methods, enforcing session timeouts, and ensuring that session identifiers are securely generated, stored, and invalidated after use.',
238
+ complianceStandard: ComplianceCategory.PCIDSS,
239
+ relatedVulnerabilityIds: authAndCookieIds,
240
+ isNotApplicable: false,
241
+ },
242
+ [ComplianceCode.PCI_REQ_7_RESTRICT_ACCESS_NEED_TO_KNOW]: {
243
+ id: 119,
244
+ code: ComplianceCode.PCI_REQ_7_RESTRICT_ACCESS_NEED_TO_KNOW,
245
+ title: 'Requirement 7 Restrict Access to System Components and Cardholder Data by Business Need-to-Know',
246
+ description: 'Access to sensitive system components and cardholder data should be limited only to those individuals whose job responsibilities require it. Permissions should be granted based on business needs, following the principle of least privilege to minimize security risks.',
247
+ complianceStandard: ComplianceCategory.PCIDSS,
248
+ relatedVulnerabilityIds: accessControlIds,
249
+ isNotApplicable: true,
250
+ },
251
+ [ComplianceCode.PCI_REQ_8_1_1_ASSIGN_UNIQUE_IDS]: {
252
+ id: 126,
253
+ code: ComplianceCode.PCI_REQ_8_1_1_ASSIGN_UNIQUE_IDS,
254
+ title: 'Requirement 8.1.1 Assign Unique IDs for All Users',
255
+ description: 'Ensure every user is assigned a unique identification (ID) before they are granted access to system components or cardholder data. This helps track user activities and ensures accountability.',
256
+ complianceStandard: ComplianceCategory.PCIDSS,
257
+ relatedVulnerabilityIds: authAndCookieIds,
258
+ isNotApplicable: true,
259
+ },
260
+ };
@@ -0,0 +1,2 @@
1
+ import { ComplianceRegistry } from '../types';
2
+ export declare const SANS_TOP_25_COMPLIANCE: ComplianceRegistry;
@@ -0,0 +1,242 @@
1
+ import { ComplianceCode } from '../compliance-codes';
2
+ import { ComplianceCategory } from '../types';
3
+ import { idsByCategory, 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 disclosureIds = idsByCategory('information_disclosure');
9
+ const accessControlIds = idsByCodePrefix(['BAC_', 'MASSASSIGN_']);
10
+ const sqliIds = idsByCodePrefix(['SQLI_']);
11
+ const cmdiIds = idsByCodePrefix(['CMDI_']);
12
+ const sstiIds = idsByCodePrefix(['SSTI_']);
13
+ const lfiIds = idsByCodePrefix(['LFI_']);
14
+ const deserializationIds = idsByCodePrefix(['DESER_']);
15
+ const inputValidationIds = mergeIds(injectionIds, xssIds, ssrfIds);
16
+ export const SANS_TOP_25_COMPLIANCE = {
17
+ [ComplianceCode.SANS_TOP_25_CWE_79_XSS]: {
18
+ id: 181,
19
+ code: ComplianceCode.SANS_TOP_25_CWE_79_XSS,
20
+ title: 'CWE-79 Cross-site Scripting',
21
+ description: 'Improper Neutralization of Input During Web Page Generation (Cross-site Scripting).',
22
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
23
+ relatedVulnerabilityIds: xssIds,
24
+ isNotApplicable: false,
25
+ },
26
+ [ComplianceCode.SANS_TOP_25_CWE_787_OOB_WRITE]: {
27
+ id: 182,
28
+ code: ComplianceCode.SANS_TOP_25_CWE_787_OOB_WRITE,
29
+ title: 'CWE-787 Out-of-bounds Write',
30
+ description: 'Out-of-bounds Write.',
31
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
32
+ relatedVulnerabilityIds: [],
33
+ isNotApplicable: true,
34
+ },
35
+ [ComplianceCode.SANS_TOP_25_CWE_89_SQLI]: {
36
+ id: 183,
37
+ code: ComplianceCode.SANS_TOP_25_CWE_89_SQLI,
38
+ title: 'CWE-89 SQL Injection',
39
+ description: 'Improper Neutralization of Special Elements used in an SQL Command (SQL Injection).',
40
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
41
+ relatedVulnerabilityIds: sqliIds,
42
+ isNotApplicable: false,
43
+ },
44
+ [ComplianceCode.SANS_TOP_25_CWE_352_CSRF]: {
45
+ id: 184,
46
+ code: ComplianceCode.SANS_TOP_25_CWE_352_CSRF,
47
+ title: 'CWE-352 Cross-Site Request Forgery',
48
+ description: 'Cross-Site Request Forgery (CSRF).',
49
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
50
+ relatedVulnerabilityIds: [],
51
+ isNotApplicable: true,
52
+ },
53
+ [ComplianceCode.SANS_TOP_25_CWE_22_PATH_TRAVERSAL]: {
54
+ id: 185,
55
+ code: ComplianceCode.SANS_TOP_25_CWE_22_PATH_TRAVERSAL,
56
+ title: 'CWE-22 Path Traversal',
57
+ description: 'Improper Limitation of a Pathname to a Restricted Directory (Path Traversal).',
58
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
59
+ relatedVulnerabilityIds: lfiIds,
60
+ isNotApplicable: false,
61
+ },
62
+ [ComplianceCode.SANS_TOP_25_CWE_125_OOB_READ]: {
63
+ id: 186,
64
+ code: ComplianceCode.SANS_TOP_25_CWE_125_OOB_READ,
65
+ title: 'CWE-125 Out-of-bounds Read',
66
+ description: 'Out-of-bounds Read.',
67
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
68
+ relatedVulnerabilityIds: [],
69
+ isNotApplicable: true,
70
+ },
71
+ [ComplianceCode.SANS_TOP_25_CWE_78_OS_COMMAND_INJECTION]: {
72
+ id: 187,
73
+ code: ComplianceCode.SANS_TOP_25_CWE_78_OS_COMMAND_INJECTION,
74
+ title: 'CWE-78 OS Command Injection',
75
+ description: 'Improper Neutralization of Special Elements used in an OS Command (OS Command Injection).',
76
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
77
+ relatedVulnerabilityIds: cmdiIds,
78
+ isNotApplicable: false,
79
+ },
80
+ [ComplianceCode.SANS_TOP_25_CWE_416_USE_AFTER_FREE]: {
81
+ id: 188,
82
+ code: ComplianceCode.SANS_TOP_25_CWE_416_USE_AFTER_FREE,
83
+ title: 'CWE-416 Use After Free',
84
+ description: 'Use After Free.',
85
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
86
+ relatedVulnerabilityIds: [],
87
+ isNotApplicable: true,
88
+ },
89
+ [ComplianceCode.SANS_TOP_25_CWE_862_MISSING_AUTHZ]: {
90
+ id: 189,
91
+ code: ComplianceCode.SANS_TOP_25_CWE_862_MISSING_AUTHZ,
92
+ title: 'CWE-862 Missing Authorization',
93
+ description: 'Missing Authorization.',
94
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
95
+ relatedVulnerabilityIds: accessControlIds,
96
+ isNotApplicable: false,
97
+ },
98
+ [ComplianceCode.SANS_TOP_25_CWE_434_UNRESTRICTED_UPLOAD]: {
99
+ id: 190,
100
+ code: ComplianceCode.SANS_TOP_25_CWE_434_UNRESTRICTED_UPLOAD,
101
+ title: 'CWE-434 Unrestricted File Upload',
102
+ description: 'Unrestricted Upload of File with Dangerous Type.',
103
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
104
+ relatedVulnerabilityIds: [],
105
+ isNotApplicable: true,
106
+ },
107
+ [ComplianceCode.SANS_TOP_25_CWE_94_CODE_INJECTION]: {
108
+ id: 191,
109
+ code: ComplianceCode.SANS_TOP_25_CWE_94_CODE_INJECTION,
110
+ title: 'CWE-94 Code Injection',
111
+ description: 'Improper Control of Generation of Code (Code Injection).',
112
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
113
+ relatedVulnerabilityIds: sstiIds,
114
+ isNotApplicable: false,
115
+ },
116
+ [ComplianceCode.SANS_TOP_25_CWE_20_INPUT_VALIDATION]: {
117
+ id: 192,
118
+ code: ComplianceCode.SANS_TOP_25_CWE_20_INPUT_VALIDATION,
119
+ title: 'CWE-20 Improper Input Validation',
120
+ description: 'Improper Input Validation.',
121
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
122
+ relatedVulnerabilityIds: inputValidationIds,
123
+ isNotApplicable: false,
124
+ },
125
+ [ComplianceCode.SANS_TOP_25_CWE_77_COMMAND_INJECTION]: {
126
+ id: 193,
127
+ code: ComplianceCode.SANS_TOP_25_CWE_77_COMMAND_INJECTION,
128
+ title: 'CWE-77 Command Injection',
129
+ description: 'Improper Neutralization of Special Elements used in a Command (Command Injection).',
130
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
131
+ relatedVulnerabilityIds: cmdiIds,
132
+ isNotApplicable: false,
133
+ },
134
+ [ComplianceCode.SANS_TOP_25_CWE_287_IMPROPER_AUTH]: {
135
+ id: 194,
136
+ code: ComplianceCode.SANS_TOP_25_CWE_287_IMPROPER_AUTH,
137
+ title: 'CWE-287 Improper Authentication',
138
+ description: 'Improper Authentication.',
139
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
140
+ relatedVulnerabilityIds: authIds,
141
+ isNotApplicable: false,
142
+ },
143
+ [ComplianceCode.SANS_TOP_25_CWE_269_PRIVILEGE_MGMT]: {
144
+ id: 195,
145
+ code: ComplianceCode.SANS_TOP_25_CWE_269_PRIVILEGE_MGMT,
146
+ title: 'CWE-269 Improper Privilege Management',
147
+ description: 'Improper Privilege Management.',
148
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
149
+ relatedVulnerabilityIds: accessControlIds,
150
+ isNotApplicable: false,
151
+ },
152
+ [ComplianceCode.SANS_TOP_25_CWE_502_UNTRUSTED_DESER]: {
153
+ id: 196,
154
+ code: ComplianceCode.SANS_TOP_25_CWE_502_UNTRUSTED_DESER,
155
+ title: 'CWE-502 Deserialization of Untrusted Data',
156
+ description: 'Deserialization of Untrusted Data.',
157
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
158
+ relatedVulnerabilityIds: deserializationIds,
159
+ isNotApplicable: false,
160
+ },
161
+ [ComplianceCode.SANS_TOP_25_CWE_200_INFO_EXPOSURE]: {
162
+ id: 197,
163
+ code: ComplianceCode.SANS_TOP_25_CWE_200_INFO_EXPOSURE,
164
+ title: 'CWE-200 Exposure of Sensitive Information',
165
+ description: 'Exposure of Sensitive Information to an Unauthorized Actor.',
166
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
167
+ relatedVulnerabilityIds: disclosureIds,
168
+ isNotApplicable: false,
169
+ },
170
+ [ComplianceCode.SANS_TOP_25_CWE_863_INCORRECT_AUTHZ]: {
171
+ id: 198,
172
+ code: ComplianceCode.SANS_TOP_25_CWE_863_INCORRECT_AUTHZ,
173
+ title: 'CWE-863 Incorrect Authorization',
174
+ description: 'Incorrect Authorization.',
175
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
176
+ relatedVulnerabilityIds: accessControlIds,
177
+ isNotApplicable: false,
178
+ },
179
+ [ComplianceCode.SANS_TOP_25_CWE_918_SSRF]: {
180
+ id: 199,
181
+ code: ComplianceCode.SANS_TOP_25_CWE_918_SSRF,
182
+ title: 'CWE-918 Server-Side Request Forgery',
183
+ description: 'Server-Side Request Forgery (SSRF).',
184
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
185
+ relatedVulnerabilityIds: ssrfIds,
186
+ isNotApplicable: false,
187
+ },
188
+ [ComplianceCode.SANS_TOP_25_CWE_119_MEMORY_BOUNDS]: {
189
+ id: 200,
190
+ code: ComplianceCode.SANS_TOP_25_CWE_119_MEMORY_BOUNDS,
191
+ title: 'CWE-119 Memory Buffer Bounds',
192
+ description: 'Improper Restriction of Operations within the Bounds of a Memory Buffer.',
193
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
194
+ relatedVulnerabilityIds: [],
195
+ isNotApplicable: true,
196
+ },
197
+ [ComplianceCode.SANS_TOP_25_CWE_476_NULL_DEREF]: {
198
+ id: 201,
199
+ code: ComplianceCode.SANS_TOP_25_CWE_476_NULL_DEREF,
200
+ title: 'CWE-476 NULL Pointer Dereference',
201
+ description: 'NULL Pointer Dereference.',
202
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
203
+ relatedVulnerabilityIds: [],
204
+ isNotApplicable: true,
205
+ },
206
+ [ComplianceCode.SANS_TOP_25_CWE_798_HARDCODED_CREDS]: {
207
+ id: 202,
208
+ code: ComplianceCode.SANS_TOP_25_CWE_798_HARDCODED_CREDS,
209
+ title: 'CWE-798 Use of Hard-coded Credentials',
210
+ description: 'Use of Hard-coded Credentials.',
211
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
212
+ relatedVulnerabilityIds: [],
213
+ isNotApplicable: true,
214
+ },
215
+ [ComplianceCode.SANS_TOP_25_CWE_190_INTEGER_OVERFLOW]: {
216
+ id: 203,
217
+ code: ComplianceCode.SANS_TOP_25_CWE_190_INTEGER_OVERFLOW,
218
+ title: 'CWE-190 Integer Overflow or Wraparound',
219
+ description: 'Integer Overflow or Wraparound.',
220
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
221
+ relatedVulnerabilityIds: [],
222
+ isNotApplicable: true,
223
+ },
224
+ [ComplianceCode.SANS_TOP_25_CWE_400_RESOURCE_CONSUMPTION]: {
225
+ id: 204,
226
+ code: ComplianceCode.SANS_TOP_25_CWE_400_RESOURCE_CONSUMPTION,
227
+ title: 'CWE-400 Uncontrolled Resource Consumption',
228
+ description: 'Uncontrolled Resource Consumption.',
229
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
230
+ relatedVulnerabilityIds: [],
231
+ isNotApplicable: true,
232
+ },
233
+ [ComplianceCode.SANS_TOP_25_CWE_306_MISSING_AUTH]: {
234
+ id: 205,
235
+ code: ComplianceCode.SANS_TOP_25_CWE_306_MISSING_AUTH,
236
+ title: 'CWE-306 Missing Authentication for Critical Function',
237
+ description: 'Missing Authentication for Critical Function.',
238
+ complianceStandard: ComplianceCategory.SANS_TOP_25,
239
+ relatedVulnerabilityIds: authIds,
240
+ isNotApplicable: true,
241
+ },
242
+ };
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ import { CONFIG_VULNERABILITIES } from './categories/configuration.js';
13
13
  import { SENSITIVE_PATH_VULNERABILITIES } from './categories/sensitive-paths.js';
14
14
  import { CATEGORY_REGISTRY } from './category.js';
15
15
  import { SCANNER_REGISTRY } from './scanner.js';
16
+ import { OWASP_COMPLIANCE, HIPAA_COMPLIANCE, GDPR_COMPLIANCE, PCI_DSS_COMPLIANCE, SANS_TOP_25_COMPLIANCE } from './compliances/index.js';
16
17
  /**
17
18
  * Complete vulnerability registry combining all categories
18
19
  */
@@ -47,7 +48,7 @@ export declare function getVulnerabilityCount(): number;
47
48
  export declare function createFinding(code: VulnerabilityCode | string, overrides?: Partial<VulnerabilityDefinition>): VulnerabilityDefinition | null;
48
49
  export { VulnerabilityCode } from './error-codes.js';
49
50
  export type { VulnerabilityDefinition, VulnerabilityLookup, CVSSProfile, CWEReference, OWASPReference, Severity, VulnerabilityCategory, } from './types.js';
50
- export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, CATEGORY_REGISTRY, SCANNER_REGISTRY, };
51
+ export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, OWASP_COMPLIANCE, HIPAA_COMPLIANCE, GDPR_COMPLIANCE, PCI_DSS_COMPLIANCE, SANS_TOP_25_COMPLIANCE, CATEGORY_REGISTRY, SCANNER_REGISTRY, };
51
52
  declare const _default: {
52
53
  VulnerabilityCode: typeof VulnerabilityCode;
53
54
  VULNERABILITY_REGISTRY: Record<string, VulnerabilityDefinition>;
@@ -58,6 +59,11 @@ declare const _default: {
58
59
  getAllVulnerabilityCodes: typeof getAllVulnerabilityCodes;
59
60
  getVulnerabilityCount: typeof getVulnerabilityCount;
60
61
  createFinding: typeof createFinding;
62
+ OWASP_COMPLIANCE: import("./types.js").ComplianceRegistry;
63
+ HIPAA_COMPLIANCE: import("./types.js").ComplianceRegistry;
64
+ GDPR_COMPLIANCE: import("./types.js").ComplianceRegistry;
65
+ PCI_DSS_COMPLIANCE: import("./types.js").ComplianceRegistry;
66
+ SANS_TOP_25_COMPLIANCE: import("./types.js").ComplianceRegistry;
61
67
  CATEGORY_REGISTRY: Record<string, {
62
68
  title: string;
63
69
  }>;
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ import { CONFIG_VULNERABILITIES } from './categories/configuration.js';
13
13
  import { SENSITIVE_PATH_VULNERABILITIES } from './categories/sensitive-paths.js';
14
14
  import { CATEGORY_REGISTRY } from './category.js';
15
15
  import { SCANNER_REGISTRY } from './scanner.js';
16
+ import { OWASP_COMPLIANCE, HIPAA_COMPLIANCE, GDPR_COMPLIANCE, PCI_DSS_COMPLIANCE, SANS_TOP_25_COMPLIANCE } from './compliances/index.js';
16
17
  /**
17
18
  * Complete vulnerability registry combining all categories
18
19
  */
@@ -80,7 +81,7 @@ export function createFinding(code, overrides) {
80
81
  // Re-export all types and enums
81
82
  export { VulnerabilityCode } from './error-codes.js';
82
83
  // Export category definitions for direct access
83
- export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, CATEGORY_REGISTRY, SCANNER_REGISTRY, };
84
+ export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, OWASP_COMPLIANCE, HIPAA_COMPLIANCE, GDPR_COMPLIANCE, PCI_DSS_COMPLIANCE, SANS_TOP_25_COMPLIANCE, CATEGORY_REGISTRY, SCANNER_REGISTRY, };
84
85
  export default {
85
86
  VulnerabilityCode,
86
87
  VULNERABILITY_REGISTRY,
@@ -91,6 +92,11 @@ export default {
91
92
  getAllVulnerabilityCodes,
92
93
  getVulnerabilityCount,
93
94
  createFinding,
95
+ OWASP_COMPLIANCE,
96
+ HIPAA_COMPLIANCE,
97
+ GDPR_COMPLIANCE,
98
+ PCI_DSS_COMPLIANCE,
99
+ SANS_TOP_25_COMPLIANCE,
94
100
  CATEGORY_REGISTRY,
95
101
  SCANNER_REGISTRY,
96
102
  };
package/dist/types.d.ts CHANGED
@@ -86,3 +86,36 @@ export interface VulnerabilityLookup {
86
86
  found: boolean;
87
87
  definition?: VulnerabilityDefinition;
88
88
  }
89
+ /**
90
+ * Compliance standards
91
+ */
92
+ export declare enum ComplianceCategory {
93
+ OWASP = "OWASP",
94
+ HIPAA = "HIPAA",
95
+ GDPR = "GDPR",
96
+ PCIDSS = "PCIDSS",
97
+ SANS_TOP_25 = "SANS_TOP_25"
98
+ }
99
+ /**
100
+ * Compliance rule definition
101
+ */
102
+ export interface ComplianceDefinition {
103
+ /** Unique numeric identifier */
104
+ id: number;
105
+ /** Unique compliance code */
106
+ code: string;
107
+ /** Human-readable title */
108
+ title: string;
109
+ /** Detailed description */
110
+ description: string;
111
+ /** Compliance standard family */
112
+ complianceStandard: ComplianceCategory;
113
+ /** Related vulnerability IDs from the registry */
114
+ relatedVulnerabilityIds: number[];
115
+ /** Whether the rule is out-of-scope for scanner evidence */
116
+ isNotApplicable: boolean;
117
+ }
118
+ /**
119
+ * Compliance registry lookup
120
+ */
121
+ export type ComplianceRegistry = Record<string, ComplianceDefinition>;
package/dist/types.js CHANGED
@@ -3,4 +3,14 @@
3
3
  *
4
4
  * Central type definitions for all vulnerability definitions.
5
5
  */
6
- export {};
6
+ /**
7
+ * Compliance standards
8
+ */
9
+ export var ComplianceCategory;
10
+ (function (ComplianceCategory) {
11
+ ComplianceCategory["OWASP"] = "OWASP";
12
+ ComplianceCategory["HIPAA"] = "HIPAA";
13
+ ComplianceCategory["GDPR"] = "GDPR";
14
+ ComplianceCategory["PCIDSS"] = "PCIDSS";
15
+ ComplianceCategory["SANS_TOP_25"] = "SANS_TOP_25";
16
+ })(ComplianceCategory || (ComplianceCategory = {}));