@zerothreatai/vulnerability-registry 4.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.
- package/dist/categories/authentication.js +17 -17
- package/dist/categories/configuration.js +80 -80
- package/dist/categories/injection.js +34 -34
- package/dist/categories/sensitive-paths.js +84 -84
- package/dist/categories/ssrf.js +11 -11
- package/dist/categories/xss.js +15 -15
- package/dist/compliance-codes.d.ts +207 -0
- package/dist/compliance-codes.js +213 -0
- package/dist/compliances/gdpr.d.ts +2 -0
- package/dist/compliances/gdpr.js +252 -0
- package/dist/compliances/helpers.d.ts +6 -0
- package/dist/compliances/helpers.js +11 -0
- package/dist/compliances/hipaa.d.ts +2 -0
- package/dist/compliances/hipaa.js +187 -0
- package/dist/compliances/index.d.ts +5 -0
- package/dist/compliances/index.js +5 -0
- package/dist/compliances/owasp.d.ts +2 -0
- package/dist/compliances/owasp.js +127 -0
- package/dist/compliances/pci-dss.d.ts +2 -0
- package/dist/compliances/pci-dss.js +260 -0
- package/dist/compliances/sans-top-25.d.ts +2 -0
- package/dist/compliances/sans-top-25.js +242 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +7 -1
- package/dist/types.d.ts +33 -0
- package/dist/types.js +11 -1
- package/dist-cjs/categories/authentication.js +17 -17
- package/dist-cjs/categories/configuration.js +80 -80
- package/dist-cjs/categories/injection.js +34 -34
- package/dist-cjs/categories/sensitive-paths.js +84 -84
- package/dist-cjs/categories/ssrf.js +11 -11
- package/dist-cjs/categories/xss.js +15 -15
- package/dist-cjs/compliance-codes.js +216 -0
- package/dist-cjs/compliances/gdpr.js +255 -0
- package/dist-cjs/compliances/helpers.js +19 -0
- package/dist-cjs/compliances/hipaa.js +190 -0
- package/dist-cjs/compliances/index.js +13 -0
- package/dist-cjs/compliances/owasp.js +130 -0
- package/dist-cjs/compliances/pci-dss.js +263 -0
- package/dist-cjs/compliances/sans-top-25.js +245 -0
- package/dist-cjs/index.js +12 -1
- package/dist-cjs/types.js +12 -0
- package/package.json +40 -32
- package/scripts/assign-ids.ts +105 -0
- package/scripts/check-duplicate-ids.ts +45 -0
- package/src/categories/authentication.ts +17 -17
- package/src/categories/configuration.ts +80 -80
- package/src/categories/injection.ts +34 -34
- package/src/categories/sensitive-paths.ts +84 -84
- package/src/categories/ssrf.ts +11 -11
- package/src/categories/xss.ts +15 -15
- package/src/compliance-codes.ts +216 -0
- package/src/compliances/README.md +82 -0
- package/src/compliances/gdpr.ts +258 -0
- package/src/compliances/helpers.ts +29 -0
- package/src/compliances/hipaa.ts +193 -0
- package/src/compliances/index.ts +5 -0
- package/src/compliances/owasp.ts +133 -0
- package/src/compliances/pci-dss.ts +266 -0
- package/src/compliances/sans-top-25.ts +246 -0
- package/src/id-registry.json +1235 -0
- package/src/index.ts +12 -1
- package/src/types.ts +40 -4
- package/src/categories/authentication.d.ts +0 -8
- package/src/categories/authentication.d.ts.map +0 -1
- package/src/categories/authentication.js +0 -392
- package/src/categories/authentication.js.map +0 -1
- package/src/categories/configuration.d.ts +0 -8
- package/src/categories/configuration.d.ts.map +0 -1
- package/src/categories/configuration.js +0 -1782
- package/src/categories/configuration.js.map +0 -1
- package/src/categories/injection.d.ts +0 -8
- package/src/categories/injection.d.ts.map +0 -1
- package/src/categories/injection.js +0 -781
- package/src/categories/injection.js.map +0 -1
- package/src/categories/sensitive-paths.d.ts +0 -9
- package/src/categories/sensitive-paths.d.ts.map +0 -1
- package/src/categories/sensitive-paths.js +0 -1872
- package/src/categories/sensitive-paths.js.map +0 -1
- package/src/categories/ssrf.d.ts +0 -8
- package/src/categories/ssrf.d.ts.map +0 -1
- package/src/categories/ssrf.js +0 -258
- package/src/categories/ssrf.js.map +0 -1
- package/src/categories/xss.d.ts +0 -7
- package/src/categories/xss.d.ts.map +0 -1
- package/src/categories/xss.js +0 -340
- package/src/categories/xss.js.map +0 -1
- package/src/error-codes.d.ts +0 -280
- package/src/error-codes.d.ts.map +0 -1
- package/src/error-codes.js +0 -350
- package/src/error-codes.js.map +0 -1
- package/src/index.d.ts +0 -60
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -92
- package/src/index.js.map +0 -1
- package/src/types.d.ts +0 -88
- package/src/types.d.ts.map +0 -1
- package/src/types.js +0 -6
- package/src/types.js.map +0 -1
|
@@ -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
|
-
|
|
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 = {}));
|
|
@@ -12,7 +12,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
12
12
|
// JWT VULNERABILITIES
|
|
13
13
|
// ========================================
|
|
14
14
|
[error_codes_js_1.VulnerabilityCode.JWT_NONE_ALGORITHM]: {
|
|
15
|
-
id:
|
|
15
|
+
id: 100,
|
|
16
16
|
code: error_codes_js_1.VulnerabilityCode.JWT_NONE_ALGORITHM,
|
|
17
17
|
title: 'JWT Vulnerability - None Algorithm Attack',
|
|
18
18
|
description: 'Critical JWT vulnerability where the server accepts tokens with "alg": "none" in the header, allowing attackers to forge valid tokens without knowing the secret key by simply removing the signature and modifying claims to impersonate any user including administrators.',
|
|
@@ -34,7 +34,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
34
34
|
remediation: 'Explicitly specify allowed algorithms during JWT verification and reject "none". Use libraries that do not support "none" algorithm. Always validate the algorithm header against expected values.',
|
|
35
35
|
},
|
|
36
36
|
[error_codes_js_1.VulnerabilityCode.JWT_WEAK_SECRET]: {
|
|
37
|
-
id:
|
|
37
|
+
id: 101,
|
|
38
38
|
code: error_codes_js_1.VulnerabilityCode.JWT_WEAK_SECRET,
|
|
39
39
|
title: 'JWT Vulnerability - Weak Secret Key',
|
|
40
40
|
description: 'JWT implementation using a weak or common secret key for HMAC signature verification that can be brute-forced or found in common secret dictionaries, allowing attackers to forge arbitrary valid tokens and bypass authentication to access any user account.',
|
|
@@ -56,7 +56,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
56
56
|
remediation: 'Use cryptographically strong random secrets of at least 256 bits. Consider using asymmetric algorithms (RS256, ES256) instead of HMAC. Rotate secrets periodically.',
|
|
57
57
|
},
|
|
58
58
|
[error_codes_js_1.VulnerabilityCode.JWT_KEY_CONFUSION]: {
|
|
59
|
-
id:
|
|
59
|
+
id: 102,
|
|
60
60
|
code: error_codes_js_1.VulnerabilityCode.JWT_KEY_CONFUSION,
|
|
61
61
|
title: 'JWT Vulnerability - Algorithm Confusion Attack',
|
|
62
62
|
description: 'JWT key confusion vulnerability where the server public key can be used as an HMAC secret by switching the algorithm from RS256 to HS256, allowing attackers to forge valid tokens using the publicly available key to generate valid HMAC signatures.',
|
|
@@ -81,7 +81,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
81
81
|
// BROKEN ACCESS CONTROL
|
|
82
82
|
// ========================================
|
|
83
83
|
[error_codes_js_1.VulnerabilityCode.BAC_ANONYMOUS_ACCESS]: {
|
|
84
|
-
id:
|
|
84
|
+
id: 103,
|
|
85
85
|
code: error_codes_js_1.VulnerabilityCode.BAC_ANONYMOUS_ACCESS,
|
|
86
86
|
title: 'Broken Access Control - Anonymous Access',
|
|
87
87
|
description: 'Critical broken access control vulnerability where authenticated endpoints can be accessed without any authentication by simply removing auth headers or cookies, exposing sensitive functionality and data to unauthenticated attackers without any credential requirement.',
|
|
@@ -103,7 +103,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
103
103
|
remediation: 'Enforce authentication checks on all protected endpoints. Implement deny-by-default access control. Verify authentication state server-side before processing any request.',
|
|
104
104
|
},
|
|
105
105
|
[error_codes_js_1.VulnerabilityCode.BAC_IDOR]: {
|
|
106
|
-
id:
|
|
106
|
+
id: 104,
|
|
107
107
|
code: error_codes_js_1.VulnerabilityCode.BAC_IDOR,
|
|
108
108
|
title: 'Broken Access Control - Insecure Direct Object Reference',
|
|
109
109
|
description: 'IDOR vulnerability where users can access or modify resources belonging to other users by manipulating predictable identifiers like sequential IDs in URLs or request parameters, without proper authorization checks verifying resource ownership.',
|
|
@@ -125,7 +125,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
125
125
|
remediation: 'Implement proper authorization checks verifying resource ownership. Use unpredictable identifiers (UUIDs). Apply consistent access control policies across all endpoints.',
|
|
126
126
|
},
|
|
127
127
|
[error_codes_js_1.VulnerabilityCode.BAC_VERTICAL_PRIVILEGE]: {
|
|
128
|
-
id:
|
|
128
|
+
id: 105,
|
|
129
129
|
code: error_codes_js_1.VulnerabilityCode.BAC_VERTICAL_PRIVILEGE,
|
|
130
130
|
title: 'Broken Access Control - Vertical Privilege Escalation',
|
|
131
131
|
description: 'Vertical privilege escalation vulnerability allowing regular users to access or perform administrative functions by directly accessing admin endpoints or manipulating role/permission parameters, bypassing role-based access controls to gain elevated privileges.',
|
|
@@ -150,7 +150,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
150
150
|
// MASS ASSIGNMENT
|
|
151
151
|
// ========================================
|
|
152
152
|
[error_codes_js_1.VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION]: {
|
|
153
|
-
id:
|
|
153
|
+
id: 106,
|
|
154
154
|
code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION,
|
|
155
155
|
title: 'Mass Assignment - Role Escalation',
|
|
156
156
|
description: 'Mass assignment vulnerability allowing attackers to escalate privileges by including additional parameters like "role", "isAdmin", or "permissions" in requests that the application binds to user objects without proper allowlist filtering of settable fields.',
|
|
@@ -172,7 +172,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
172
172
|
remediation: 'Use allowlist of permitted fields for each endpoint. Implement separate DTOs for input binding. Never auto-bind request data to domain objects without explicit field selection.',
|
|
173
173
|
},
|
|
174
174
|
[error_codes_js_1.VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION]: {
|
|
175
|
-
id:
|
|
175
|
+
id: 107,
|
|
176
176
|
code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION,
|
|
177
177
|
title: 'Mass Assignment - Prototype Pollution',
|
|
178
178
|
description: 'JavaScript prototype pollution vulnerability through mass assignment where attackers inject __proto__ or constructor.prototype properties that modify the Object prototype globally, potentially leading to denial of service, security bypass, or remote code execution.',
|
|
@@ -194,7 +194,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
194
194
|
remediation: 'Freeze Object.prototype. Use Object.create(null) for objects used as maps. Filter __proto__ and constructor properties from user input. Use --frozen-intrinsics Node.js flag.',
|
|
195
195
|
},
|
|
196
196
|
[error_codes_js_1.VulnerabilityCode.JWT_EXPIRED_TOKEN]: {
|
|
197
|
-
id:
|
|
197
|
+
id: 108,
|
|
198
198
|
code: error_codes_js_1.VulnerabilityCode.JWT_EXPIRED_TOKEN,
|
|
199
199
|
title: 'JWT Vulnerability - Expired Token Accepted',
|
|
200
200
|
description: 'JWT implementation does not properly validate token expiration (exp claim), accepting expired tokens that should be rejected. This allows attackers with previously captured tokens to reuse them indefinitely, maintaining unauthorized access without credential updates.',
|
|
@@ -216,7 +216,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
216
216
|
remediation: 'Always validate exp claim during token verification. Set appropriate token lifetimes. Implement token refresh mechanisms. Use server-side session invalidation for immediate revocation.',
|
|
217
217
|
},
|
|
218
218
|
[error_codes_js_1.VulnerabilityCode.JWT_MISSING_CLAIMS]: {
|
|
219
|
-
id:
|
|
219
|
+
id: 109,
|
|
220
220
|
code: error_codes_js_1.VulnerabilityCode.JWT_MISSING_CLAIMS,
|
|
221
221
|
title: 'JWT Vulnerability - Missing Required Claims',
|
|
222
222
|
description: 'JWT tokens are missing critical security claims like exp (expiration), iat (issued at), nbf (not before), or iss (issuer), reducing the security guarantees of the token system and potentially allowing token reuse, replay attacks, or cross-tenant access.',
|
|
@@ -238,7 +238,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
238
238
|
remediation: 'Include and validate all standard claims: exp, iat, nbf, iss, aud, sub. Define required claims for your application. Reject tokens missing mandatory claims.',
|
|
239
239
|
},
|
|
240
240
|
[error_codes_js_1.VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE]: {
|
|
241
|
-
id:
|
|
241
|
+
id: 110,
|
|
242
242
|
code: error_codes_js_1.VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE,
|
|
243
243
|
title: 'Broken Access Control - Horizontal Privilege Escalation',
|
|
244
244
|
description: 'Horizontal privilege escalation vulnerability where authenticated users can access data or perform actions belonging to other users at the same privilege level by manipulating user identifiers, object references, or session parameters without ownership verification.',
|
|
@@ -260,7 +260,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
260
260
|
remediation: 'Implement record-level authorization checks. Verify resource ownership against the authenticated user session. Use indirect references that map to actual resources server-side.',
|
|
261
261
|
},
|
|
262
262
|
[error_codes_js_1.VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD]: {
|
|
263
|
-
id:
|
|
263
|
+
id: 111,
|
|
264
264
|
code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD,
|
|
265
265
|
title: 'Mass Assignment - Hidden Field Manipulation',
|
|
266
266
|
description: 'Mass assignment vulnerability where attackers can modify hidden form fields or server-side computed values like price, discount, userId, or timestamp by including them in request bodies, bypassing UI restrictions to manipulate business logic or data integrity.',
|
|
@@ -282,7 +282,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
282
282
|
remediation: 'Never trust client-provided values for server-computed fields. Use explicit DTOs with allowlisted fields. Recompute amounts, timestamps, and IDs server-side.',
|
|
283
283
|
},
|
|
284
284
|
[error_codes_js_1.VulnerabilityCode.JWT_CLAIM_TAMPERING]: {
|
|
285
|
-
id:
|
|
285
|
+
id: 112,
|
|
286
286
|
code: error_codes_js_1.VulnerabilityCode.JWT_CLAIM_TAMPERING,
|
|
287
287
|
title: 'JWT - Claim Tampering',
|
|
288
288
|
description: 'JWT claim tampering vulnerability where attackers can modify token claims such as roles, user IDs, or permissions and the server accepts the tampered token, enabling privilege escalation or unauthorized access.',
|
|
@@ -304,7 +304,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
304
304
|
remediation: 'Validate JWT signatures using strong algorithms and trusted keys. Reject unsigned or weakly signed tokens. Enforce claim validation and server-side authorization checks.',
|
|
305
305
|
},
|
|
306
306
|
[error_codes_js_1.VulnerabilityCode.JWT_KID_INJECTION]: {
|
|
307
|
-
id:
|
|
307
|
+
id: 113,
|
|
308
308
|
code: error_codes_js_1.VulnerabilityCode.JWT_KID_INJECTION,
|
|
309
309
|
title: 'JWT - KID Header Injection',
|
|
310
310
|
description: 'JWT key identifier (kid) injection vulnerability where attackers manipulate the kid header to influence key selection or file paths, potentially bypassing signature verification or loading attacker-controlled keys.',
|
|
@@ -326,7 +326,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
326
326
|
remediation: 'Avoid direct use of kid as a file path or URL. Use a strict allowlist of key IDs and map to known keys in configuration. Reject unexpected or oversized kid values.',
|
|
327
327
|
},
|
|
328
328
|
[error_codes_js_1.VulnerabilityCode.JWT_JKU_INJECTION]: {
|
|
329
|
-
id:
|
|
329
|
+
id: 114,
|
|
330
330
|
code: error_codes_js_1.VulnerabilityCode.JWT_JKU_INJECTION,
|
|
331
331
|
title: 'JWT - JKU Header Injection',
|
|
332
332
|
description: 'JWT JKU (JWK Set URL) header injection vulnerability where attackers can control the URL used to fetch signing keys, allowing them to supply their own keys and forge valid tokens.',
|
|
@@ -348,7 +348,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
348
348
|
remediation: 'Ignore untrusted JKU values or restrict to a strict allowlist of trusted JWKS endpoints. Pin keys or use local key material where possible.',
|
|
349
349
|
},
|
|
350
350
|
[error_codes_js_1.VulnerabilityCode.JWT_EMBEDDED_JWK]: {
|
|
351
|
-
id:
|
|
351
|
+
id: 115,
|
|
352
352
|
code: error_codes_js_1.VulnerabilityCode.JWT_EMBEDDED_JWK,
|
|
353
353
|
title: 'JWT - Embedded JWK Injection',
|
|
354
354
|
description: 'JWT embedded JWK vulnerability where attackers include their own JWK in the token header and the server accepts it as a trusted signing key, enabling forged tokens and authentication bypass.',
|
|
@@ -370,7 +370,7 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
370
370
|
remediation: 'Reject embedded JWKs from tokens unless explicitly required and validated against a trusted key set. Use pinned keys and strict header validation.',
|
|
371
371
|
},
|
|
372
372
|
[error_codes_js_1.VulnerabilityCode.JWT_X5C_INJECTION]: {
|
|
373
|
-
id:
|
|
373
|
+
id: 116,
|
|
374
374
|
code: error_codes_js_1.VulnerabilityCode.JWT_X5C_INJECTION,
|
|
375
375
|
title: 'JWT - X5C Header Injection',
|
|
376
376
|
description: 'JWT x5c header injection vulnerability where attackers provide an untrusted certificate chain, allowing them to influence key selection or bypass signature validation if certificate trust is not strictly enforced.',
|