owasp-depscan 4.2.8__py3-none-any.whl → 4.3.0__py3-none-any.whl
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.
- depscan/cli.py +81 -21
- depscan/lib/bom.py +1 -1
- depscan/lib/csaf.py +1680 -0
- {owasp_depscan-4.2.8.dist-info → owasp_depscan-4.3.0.dist-info}/METADATA +30 -8
- {owasp_depscan-4.2.8.dist-info → owasp_depscan-4.3.0.dist-info}/RECORD +9 -8
- {owasp_depscan-4.2.8.dist-info → owasp_depscan-4.3.0.dist-info}/LICENSE +0 -0
- {owasp_depscan-4.2.8.dist-info → owasp_depscan-4.3.0.dist-info}/WHEEL +0 -0
- {owasp_depscan-4.2.8.dist-info → owasp_depscan-4.3.0.dist-info}/entry_points.txt +0 -0
- {owasp_depscan-4.2.8.dist-info → owasp_depscan-4.3.0.dist-info}/top_level.txt +0 -0
depscan/lib/csaf.py
ADDED
|
@@ -0,0 +1,1680 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import logging
|
|
3
|
+
import os
|
|
4
|
+
import re
|
|
5
|
+
from copy import deepcopy
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from json import JSONDecodeError
|
|
8
|
+
|
|
9
|
+
import toml
|
|
10
|
+
from vdb.lib import convert_time
|
|
11
|
+
|
|
12
|
+
from depscan.lib.logger import LOG
|
|
13
|
+
from depscan.lib.utils import get_version
|
|
14
|
+
|
|
15
|
+
TIME_FMT = "%Y-%m-%dT%H:%M:%S"
|
|
16
|
+
|
|
17
|
+
CWE_MAP = {
|
|
18
|
+
"CWE-5": "J2EE Misconfiguration: Data Transmission Without Encryption",
|
|
19
|
+
"CWE-6": "J2EE Misconfiguration: Insufficient Session-ID Length",
|
|
20
|
+
"CWE-7": "J2EE Misconfiguration: Missing Custom Error Page",
|
|
21
|
+
"CWE-8": "J2EE Misconfiguration: Entity Bean Declared Remote",
|
|
22
|
+
"CWE-9": "J2EE Misconfiguration: Weak Access Permissions for EJB Methods",
|
|
23
|
+
"CWE-11": "ASP.NET Misconfiguration: Creating Debug Binary",
|
|
24
|
+
"CWE-12": "ASP.NET Misconfiguration: Missing Custom Error Page",
|
|
25
|
+
"CWE-13": "ASP.NET Misconfiguration: Password in Configuration File",
|
|
26
|
+
"CWE-14": "Compiler Removal of Code to Clear Buffers",
|
|
27
|
+
"CWE-15": "External Control of System or Configuration Setting",
|
|
28
|
+
"CWE-20": "Improper Input Validation",
|
|
29
|
+
"CWE-22": "Improper Limitation of a Pathname to a Restricted Directory",
|
|
30
|
+
"CWE-23": "Relative Path Traversal",
|
|
31
|
+
"CWE-24": "Path Traversal",
|
|
32
|
+
"CWE-25": "Path Traversal",
|
|
33
|
+
"CWE-26": "Path Traversal",
|
|
34
|
+
"CWE-27": "Path Traversal",
|
|
35
|
+
"CWE-28": "Path Traversal",
|
|
36
|
+
"CWE-29": "Path Traversal",
|
|
37
|
+
"CWE-30": "Path Traversal",
|
|
38
|
+
"CWE-31": "Path Traversal",
|
|
39
|
+
"CWE-32": "Path Traversal",
|
|
40
|
+
"CWE-33": "Path Traversal",
|
|
41
|
+
"CWE-34": "Path Traversal",
|
|
42
|
+
"CWE-35": "Path Traversal",
|
|
43
|
+
"CWE-36": "Absolute Path Traversal",
|
|
44
|
+
"CWE-37": "Path Traversal",
|
|
45
|
+
"CWE-38": "Path Traversal",
|
|
46
|
+
"CWE-39": "Path Traversal",
|
|
47
|
+
"CWE-40": "Path Traversal",
|
|
48
|
+
"CWE-41": "Improper Resolution of Path Equivalence",
|
|
49
|
+
"CWE-42": "Path Equivalence",
|
|
50
|
+
"CWE-43": "Path Equivalence",
|
|
51
|
+
"CWE-44": "Path Equivalence",
|
|
52
|
+
"CWE-45": "Path Equivalence",
|
|
53
|
+
"CWE-46": "Path Equivalence",
|
|
54
|
+
"CWE-47": "Path Equivalence",
|
|
55
|
+
"CWE-48": "Path Equivalence",
|
|
56
|
+
"CWE-49": "Path Equivalence",
|
|
57
|
+
"CWE-50": "Path Equivalence",
|
|
58
|
+
"CWE-51": "Path Equivalence",
|
|
59
|
+
"CWE-52": "Path Equivalence",
|
|
60
|
+
"CWE-53": "Path Equivalence",
|
|
61
|
+
"CWE-54": "Path Equivalence",
|
|
62
|
+
"CWE-55": "Path Equivalence",
|
|
63
|
+
"CWE-56": "Path Equivalence",
|
|
64
|
+
"CWE-57": "Path Equivalence",
|
|
65
|
+
"CWE-58": "Path Equivalence",
|
|
66
|
+
"CWE-59": "Improper Link Resolution Before File Access",
|
|
67
|
+
"CWE-61": "UNIX Symbolic Link",
|
|
68
|
+
"CWE-62": "UNIX Hard Link",
|
|
69
|
+
"CWE-64": "Windows Shortcut Following",
|
|
70
|
+
"CWE-65": "Windows Hard Link",
|
|
71
|
+
"CWE-66": "Improper Handling of File Names that Identify Virtual Resources",
|
|
72
|
+
"CWE-67": "Improper Handling of Windows Device Names",
|
|
73
|
+
"CWE-69": "Improper Handling of Windows ::DATA Alternate Data Stream",
|
|
74
|
+
"CWE-71": "DEPRECATED: Apple .DS_Store",
|
|
75
|
+
"CWE-72": "Improper Handling of Apple HFS+ Alternate Data Stream Path",
|
|
76
|
+
"CWE-73": "External Control of File Name or Path",
|
|
77
|
+
"CWE-74": "Improper Neutralization of Special Elements in Output Used by "
|
|
78
|
+
"a Downstream Component",
|
|
79
|
+
"CWE-75": "Failure to Sanitize Special Elements into a Different Plane",
|
|
80
|
+
"CWE-76": "Improper Neutralization of Equivalent Special Elements",
|
|
81
|
+
"CWE-77": "Improper Neutralization of Special Elements used in a Command",
|
|
82
|
+
"CWE-78": "Improper Neutralization of Special Elements used in an OS "
|
|
83
|
+
"Command",
|
|
84
|
+
"CWE-79": "Improper Neutralization of Input During Web Page Generation",
|
|
85
|
+
"CWE-80": "Improper Neutralization of Script-Related HTML Tags in a Web "
|
|
86
|
+
"Page",
|
|
87
|
+
"CWE-81": "Improper Neutralization of Script in an Error Message Web Page",
|
|
88
|
+
"CWE-82": "Improper Neutralization of Script in Attributes of IMG Tags in "
|
|
89
|
+
"a Web Page",
|
|
90
|
+
"CWE-83": "Improper Neutralization of Script in Attributes in a Web Page",
|
|
91
|
+
"CWE-84": "Improper Neutralization of Encoded URI Schemes in a Web Page",
|
|
92
|
+
"CWE-85": "Doubled Character XSS Manipulations",
|
|
93
|
+
"CWE-86": "Improper Neutralization of Invalid Characters in Identifiers "
|
|
94
|
+
"in Web Pages",
|
|
95
|
+
"CWE-87": "Improper Neutralization of Alternate XSS Syntax",
|
|
96
|
+
"CWE-88": "Improper Neutralization of Argument Delimiters in a Command",
|
|
97
|
+
"CWE-89": "Improper Neutralization of Special Elements used in an SQL "
|
|
98
|
+
"Command",
|
|
99
|
+
"CWE-90": "Improper Neutralization of Special Elements used in an LDAP "
|
|
100
|
+
"Query",
|
|
101
|
+
"CWE-91": "XML Injection",
|
|
102
|
+
"CWE-92": "DEPRECATED: Improper Sanitization of Custom Special Characters",
|
|
103
|
+
"CWE-93": "Improper Neutralization of CRLF Sequences",
|
|
104
|
+
"CWE-94": "Improper Control of Generation of Code",
|
|
105
|
+
"CWE-95": "Improper Neutralization of Directives in Dynamically Evaluated "
|
|
106
|
+
"Code",
|
|
107
|
+
"CWE-96": "Improper Neutralization of Directives in Statically Saved Code",
|
|
108
|
+
"CWE-97": "Improper Neutralization of Server-Side Includes",
|
|
109
|
+
"CWE-98": "Improper Control of Filename for Include/Require Statement in "
|
|
110
|
+
"PHP Program",
|
|
111
|
+
"CWE-99": "Improper Control of Resource Identifiers",
|
|
112
|
+
"CWE-102": "Struts: Duplicate Validation Forms",
|
|
113
|
+
"CWE-103": "Struts: Incomplete validate",
|
|
114
|
+
"CWE-104": "Struts: Form Bean Does Not Extend Validation Class",
|
|
115
|
+
"CWE-105": "Struts: Form Field Without Validator",
|
|
116
|
+
"CWE-106": "Struts: Plug-in Framework not in Use",
|
|
117
|
+
"CWE-107": "Struts: Unused Validation Form",
|
|
118
|
+
"CWE-108": "Struts: Unvalidated Action Form",
|
|
119
|
+
"CWE-109": "Struts: Validator Turned Off",
|
|
120
|
+
"CWE-110": "Struts: Validator Without Form Field",
|
|
121
|
+
"CWE-111": "Direct Use of Unsafe JNI",
|
|
122
|
+
"CWE-112": "Missing XML Validation",
|
|
123
|
+
"CWE-113": "Improper Neutralization of CRLF Sequences in HTTP Headers",
|
|
124
|
+
"CWE-114": "Process Control",
|
|
125
|
+
"CWE-115": "Misinterpretation of Input",
|
|
126
|
+
"CWE-116": "Improper Encoding or Escaping of Output",
|
|
127
|
+
"CWE-117": "Improper Output Neutralization for Logs",
|
|
128
|
+
"CWE-118": "Incorrect Access of Indexable Resource",
|
|
129
|
+
"CWE-119": "Improper Restriction of Operations within the Bounds of a "
|
|
130
|
+
"Memory Buffer",
|
|
131
|
+
"CWE-120": "Buffer Copy without Checking Size of Input",
|
|
132
|
+
"CWE-121": "Stack-based Buffer Overflow",
|
|
133
|
+
"CWE-122": "Heap-based Buffer Overflow",
|
|
134
|
+
"CWE-123": "Write-what-where Condition",
|
|
135
|
+
"CWE-124": "Buffer Underwrite",
|
|
136
|
+
"CWE-125": "Out-of-bounds Read",
|
|
137
|
+
"CWE-126": "Buffer Over-read",
|
|
138
|
+
"CWE-127": "Buffer Under-read",
|
|
139
|
+
"CWE-128": "Wrap-around Error",
|
|
140
|
+
"CWE-129": "Improper Validation of Array Index",
|
|
141
|
+
"CWE-130": "Improper Handling of Length Parameter Inconsistency",
|
|
142
|
+
"CWE-131": "Incorrect Calculation of Buffer Size",
|
|
143
|
+
"CWE-132": "DEPRECATED: Miscalculated Null Termination",
|
|
144
|
+
"CWE-134": "Use of Externally-Controlled Format String",
|
|
145
|
+
"CWE-135": "Incorrect Calculation of Multi-Byte String Length",
|
|
146
|
+
"CWE-138": "Improper Neutralization of Special Elements",
|
|
147
|
+
"CWE-140": "Improper Neutralization of Delimiters",
|
|
148
|
+
"CWE-141": "Improper Neutralization of Parameter/Argument Delimiters",
|
|
149
|
+
"CWE-142": "Improper Neutralization of Value Delimiters",
|
|
150
|
+
"CWE-143": "Improper Neutralization of Record Delimiters",
|
|
151
|
+
"CWE-144": "Improper Neutralization of Line Delimiters",
|
|
152
|
+
"CWE-145": "Improper Neutralization of Section Delimiters",
|
|
153
|
+
"CWE-146": "Improper Neutralization of Expression/Command Delimiters",
|
|
154
|
+
"CWE-147": "Improper Neutralization of Input Terminators",
|
|
155
|
+
"CWE-148": "Improper Neutralization of Input Leaders",
|
|
156
|
+
"CWE-149": "Improper Neutralization of Quoting Syntax",
|
|
157
|
+
"CWE-150": "Improper Neutralization of Escape, Meta, or Control Sequences",
|
|
158
|
+
"CWE-151": "Improper Neutralization of Comment Delimiters",
|
|
159
|
+
"CWE-152": "Improper Neutralization of Macro Symbols",
|
|
160
|
+
"CWE-153": "Improper Neutralization of Substitution Characters",
|
|
161
|
+
"CWE-154": "Improper Neutralization of Variable Name Delimiters",
|
|
162
|
+
"CWE-155": "Improper Neutralization of Wildcards or Matching Symbols",
|
|
163
|
+
"CWE-156": "Improper Neutralization of Whitespace",
|
|
164
|
+
"CWE-157": "Failure to Sanitize Paired Delimiters",
|
|
165
|
+
"CWE-158": "Improper Neutralization of Null Byte or NUL Character",
|
|
166
|
+
"CWE-159": "Improper Handling of Invalid Use of Special Elements",
|
|
167
|
+
"CWE-160": "Improper Neutralization of Leading Special Elements",
|
|
168
|
+
"CWE-161": "Improper Neutralization of Multiple Leading Special Elements",
|
|
169
|
+
"CWE-162": "Improper Neutralization of Trailing Special Elements",
|
|
170
|
+
"CWE-163": "Improper Neutralization of Multiple Trailing Special Elements",
|
|
171
|
+
"CWE-164": "Improper Neutralization of Internal Special Elements",
|
|
172
|
+
"CWE-165": "Improper Neutralization of Multiple Internal Special Elements",
|
|
173
|
+
"CWE-166": "Improper Handling of Missing Special Element",
|
|
174
|
+
"CWE-167": "Improper Handling of Additional Special Element",
|
|
175
|
+
"CWE-168": "Improper Handling of Inconsistent Special Elements",
|
|
176
|
+
"CWE-170": "Improper Null Termination",
|
|
177
|
+
"CWE-172": "Encoding Error",
|
|
178
|
+
"CWE-173": "Improper Handling of Alternate Encoding",
|
|
179
|
+
"CWE-174": "Double Decoding of the Same Data",
|
|
180
|
+
"CWE-175": "Improper Handling of Mixed Encoding",
|
|
181
|
+
"CWE-176": "Improper Handling of Unicode Encoding",
|
|
182
|
+
"CWE-177": "Improper Handling of URL Encoding",
|
|
183
|
+
"CWE-178": "Improper Handling of Case Sensitivity",
|
|
184
|
+
"CWE-179": "Incorrect Behavior Order: Early Validation",
|
|
185
|
+
"CWE-180": "Incorrect Behavior Order: Validate Before Canonicalize",
|
|
186
|
+
"CWE-181": "Incorrect Behavior Order: Validate Before Filter",
|
|
187
|
+
"CWE-182": "Collapse of Data into Unsafe Value",
|
|
188
|
+
"CWE-183": "Permissive List of Allowed Inputs",
|
|
189
|
+
"CWE-184": "Incomplete List of Disallowed Inputs",
|
|
190
|
+
"CWE-185": "Incorrect Regular Expression",
|
|
191
|
+
"CWE-186": "Overly Restrictive Regular Expression",
|
|
192
|
+
"CWE-187": "Partial String Comparison",
|
|
193
|
+
"CWE-188": "Reliance on Data/Memory Layout",
|
|
194
|
+
"CWE-190": "Integer Overflow or Wraparound",
|
|
195
|
+
"CWE-191": "Integer Underflow",
|
|
196
|
+
"CWE-192": "Integer Coercion Error",
|
|
197
|
+
"CWE-193": "Off-by-one Error",
|
|
198
|
+
"CWE-194": "Unexpected Sign Extension",
|
|
199
|
+
"CWE-195": "Signed to Unsigned Conversion Error",
|
|
200
|
+
"CWE-196": "Unsigned to Signed Conversion Error",
|
|
201
|
+
"CWE-197": "Numeric Truncation Error",
|
|
202
|
+
"CWE-198": "Use of Incorrect Byte Ordering",
|
|
203
|
+
"CWE-200": "Exposure of Sensitive Information to an Unauthorized Actor",
|
|
204
|
+
"CWE-201": "Insertion of Sensitive Information Into Sent Data",
|
|
205
|
+
"CWE-202": "Exposure of Sensitive Information Through Data Queries",
|
|
206
|
+
"CWE-203": "Observable Discrepancy",
|
|
207
|
+
"CWE-204": "Observable Response Discrepancy",
|
|
208
|
+
"CWE-205": "Observable Behavioral Discrepancy",
|
|
209
|
+
"CWE-206": "Observable Internal Behavioral Discrepancy",
|
|
210
|
+
"CWE-207": "Observable Behavioral Discrepancy With Equivalent Products",
|
|
211
|
+
"CWE-208": "Observable Timing Discrepancy",
|
|
212
|
+
"CWE-209": "Generation of Error Message Containing Sensitive Information",
|
|
213
|
+
"CWE-210": "Self-generated Error Message Containing Sensitive Information",
|
|
214
|
+
"CWE-211": "Externally-Generated Error Message Containing Sensitive "
|
|
215
|
+
"Information",
|
|
216
|
+
"CWE-212": "Improper Removal of Sensitive Information Before Storage or "
|
|
217
|
+
"Transfer",
|
|
218
|
+
"CWE-213": "Exposure of Sensitive Information Due to Incompatible Policies",
|
|
219
|
+
"CWE-214": "Invocation of Process Using Visible Sensitive Information",
|
|
220
|
+
"CWE-215": "Insertion of Sensitive Information Into Debugging Code",
|
|
221
|
+
"CWE-216": "DEPRECATED: Containment Errors",
|
|
222
|
+
"CWE-217": "DEPRECATED: Failure to Protect Stored Data from Modification",
|
|
223
|
+
"CWE-218": "DEPRECATED: Failure to provide confidentiality for stored data",
|
|
224
|
+
"CWE-219": "Storage of File with Sensitive Data Under Web Root",
|
|
225
|
+
"CWE-220": "Storage of File With Sensitive Data Under FTP Root",
|
|
226
|
+
"CWE-221": "Information Loss or Omission",
|
|
227
|
+
"CWE-222": "Truncation of Security-relevant Information",
|
|
228
|
+
"CWE-223": "Omission of Security-relevant Information",
|
|
229
|
+
"CWE-224": "Obscured Security-relevant Information by Alternate Name",
|
|
230
|
+
"CWE-225": "DEPRECATED: General Information Management Problems",
|
|
231
|
+
"CWE-226": "Sensitive Information in Resource Not Removed Before Reuse",
|
|
232
|
+
"CWE-228": "Improper Handling of Syntactically Invalid Structure",
|
|
233
|
+
"CWE-229": "Improper Handling of Values",
|
|
234
|
+
"CWE-230": "Improper Handling of Missing Values",
|
|
235
|
+
"CWE-231": "Improper Handling of Extra Values",
|
|
236
|
+
"CWE-232": "Improper Handling of Undefined Values",
|
|
237
|
+
"CWE-233": "Improper Handling of Parameters",
|
|
238
|
+
"CWE-234": "Failure to Handle Missing Parameter",
|
|
239
|
+
"CWE-235": "Improper Handling of Extra Parameters",
|
|
240
|
+
"CWE-236": "Improper Handling of Undefined Parameters",
|
|
241
|
+
"CWE-237": "Improper Handling of Structural Elements",
|
|
242
|
+
"CWE-238": "Improper Handling of Incomplete Structural Elements",
|
|
243
|
+
"CWE-239": "Failure to Handle Incomplete Element",
|
|
244
|
+
"CWE-240": "Improper Handling of Inconsistent Structural Elements",
|
|
245
|
+
"CWE-241": "Improper Handling of Unexpected Data Type",
|
|
246
|
+
"CWE-242": "Use of Inherently Dangerous Function",
|
|
247
|
+
"CWE-243": "Creation of chroot Jail Without Changing Working Directory",
|
|
248
|
+
"CWE-244": "Improper Clearing of Heap Memory Before Release",
|
|
249
|
+
"CWE-245": "J2EE Bad Practices: Direct Management of Connections",
|
|
250
|
+
"CWE-246": "J2EE Bad Practices: Direct Use of Sockets",
|
|
251
|
+
"CWE-247": "DEPRECATED: Reliance on DNS Lookups in a Security Decision",
|
|
252
|
+
"CWE-248": "Uncaught Exception",
|
|
253
|
+
"CWE-249": "DEPRECATED: Often Misused: Path Manipulation",
|
|
254
|
+
"CWE-250": "Execution with Unnecessary Privileges",
|
|
255
|
+
"CWE-252": "Unchecked Return Value",
|
|
256
|
+
"CWE-253": "Incorrect Check of Function Return Value",
|
|
257
|
+
"CWE-256": "Plaintext Storage of a Password",
|
|
258
|
+
"CWE-257": "Storing Passwords in a Recoverable Format",
|
|
259
|
+
"CWE-258": "Empty Password in Configuration File",
|
|
260
|
+
"CWE-259": "Use of Hard-coded Password",
|
|
261
|
+
"CWE-260": "Password in Configuration File",
|
|
262
|
+
"CWE-261": "Weak Encoding for Password",
|
|
263
|
+
"CWE-262": "Not Using Password Aging",
|
|
264
|
+
"CWE-263": "Password Aging with Long Expiration",
|
|
265
|
+
"CWE-266": "Incorrect Privilege Assignment",
|
|
266
|
+
"CWE-267": "Privilege Defined With Unsafe Actions",
|
|
267
|
+
"CWE-268": "Privilege Chaining",
|
|
268
|
+
"CWE-269": "Improper Privilege Management",
|
|
269
|
+
"CWE-270": "Privilege Context Switching Error",
|
|
270
|
+
"CWE-271": "Privilege Dropping / Lowering Errors",
|
|
271
|
+
"CWE-272": "Least Privilege Violation",
|
|
272
|
+
"CWE-273": "Improper Check for Dropped Privileges",
|
|
273
|
+
"CWE-274": "Improper Handling of Insufficient Privileges",
|
|
274
|
+
"CWE-276": "Incorrect Default Permissions",
|
|
275
|
+
"CWE-277": "Insecure Inherited Permissions",
|
|
276
|
+
"CWE-278": "Insecure Preserved Inherited Permissions",
|
|
277
|
+
"CWE-279": "Incorrect Execution-Assigned Permissions",
|
|
278
|
+
"CWE-280": "Improper Handling of Insufficient Permissions or Privileges ",
|
|
279
|
+
"CWE-281": "Improper Preservation of Permissions",
|
|
280
|
+
"CWE-282": "Improper Ownership Management",
|
|
281
|
+
"CWE-283": "Unverified Ownership",
|
|
282
|
+
"CWE-284": "Improper Access Control",
|
|
283
|
+
"CWE-285": "Improper Authorization",
|
|
284
|
+
"CWE-286": "Incorrect User Management",
|
|
285
|
+
"CWE-287": "Improper Authentication",
|
|
286
|
+
"CWE-288": "Authentication Bypass Using an Alternate Path or Channel",
|
|
287
|
+
"CWE-289": "Authentication Bypass by Alternate Name",
|
|
288
|
+
"CWE-290": "Authentication Bypass by Spoofing",
|
|
289
|
+
"CWE-291": "Reliance on IP Address for Authentication",
|
|
290
|
+
"CWE-292": "DEPRECATED: Trusting Self-reported DNS Name",
|
|
291
|
+
"CWE-293": "Using Referer Field for Authentication",
|
|
292
|
+
"CWE-294": "Authentication Bypass by Capture-replay",
|
|
293
|
+
"CWE-295": "Improper Certificate Validation",
|
|
294
|
+
"CWE-296": "Improper Following of a Certificates Chain of Trust",
|
|
295
|
+
"CWE-297": "Improper Validation of Certificate with Host Mismatch",
|
|
296
|
+
"CWE-298": "Improper Validation of Certificate Expiration",
|
|
297
|
+
"CWE-299": "Improper Check for Certificate Revocation",
|
|
298
|
+
"CWE-300": "Channel Accessible by Non-Endpoint",
|
|
299
|
+
"CWE-301": "Reflection Attack in an Authentication Protocol",
|
|
300
|
+
"CWE-302": "Authentication Bypass by Assumed-Immutable Data",
|
|
301
|
+
"CWE-303": "Incorrect Implementation of Authentication Algorithm",
|
|
302
|
+
"CWE-304": "Missing Critical Step in Authentication",
|
|
303
|
+
"CWE-305": "Authentication Bypass by Primary Weakness",
|
|
304
|
+
"CWE-306": "Missing Authentication for Critical Function",
|
|
305
|
+
"CWE-307": "Improper Restriction of Excessive Authentication Attempts",
|
|
306
|
+
"CWE-308": "Use of Single-factor Authentication",
|
|
307
|
+
"CWE-309": "Use of Password System for Primary Authentication",
|
|
308
|
+
"CWE-311": "Missing Encryption of Sensitive Data",
|
|
309
|
+
"CWE-312": "Cleartext Storage of Sensitive Information",
|
|
310
|
+
"CWE-313": "Cleartext Storage in a File or on Disk",
|
|
311
|
+
"CWE-314": "Cleartext Storage in the Registry",
|
|
312
|
+
"CWE-315": "Cleartext Storage of Sensitive Information in a Cookie",
|
|
313
|
+
"CWE-316": "Cleartext Storage of Sensitive Information in Memory",
|
|
314
|
+
"CWE-317": "Cleartext Storage of Sensitive Information in GUI",
|
|
315
|
+
"CWE-318": "Cleartext Storage of Sensitive Information in Executable",
|
|
316
|
+
"CWE-319": "Cleartext Transmission of Sensitive Information",
|
|
317
|
+
"CWE-321": "Use of Hard-coded Cryptographic Key",
|
|
318
|
+
"CWE-322": "Key Exchange without Entity Authentication",
|
|
319
|
+
"CWE-323": "Reusing a Nonce, Key Pair in Encryption",
|
|
320
|
+
"CWE-324": "Use of a Key Past its Expiration Date",
|
|
321
|
+
"CWE-325": "Missing Cryptographic Step",
|
|
322
|
+
"CWE-326": "Inadequate Encryption Strength",
|
|
323
|
+
"CWE-327": "Use of a Broken or Risky Cryptographic Algorithm",
|
|
324
|
+
"CWE-328": "Use of Weak Hash",
|
|
325
|
+
"CWE-329": "Generation of Predictable IV with CBC Mode",
|
|
326
|
+
"CWE-330": "Use of Insufficiently Random Values",
|
|
327
|
+
"CWE-331": "Insufficient Entropy",
|
|
328
|
+
"CWE-332": "Insufficient Entropy in PRNG",
|
|
329
|
+
"CWE-333": "Improper Handling of Insufficient Entropy in TRNG",
|
|
330
|
+
"CWE-334": "Small Space of Random Values",
|
|
331
|
+
"CWE-335": "Incorrect Usage of Seeds in Pseudo-Random Number Generator",
|
|
332
|
+
"CWE-336": "Same Seed in Pseudo-Random Number Generator",
|
|
333
|
+
"CWE-337": "Predictable Seed in Pseudo-Random Number Generator",
|
|
334
|
+
"CWE-338": "Use of Cryptographically Weak Pseudo-Random Number Generator",
|
|
335
|
+
"CWE-339": "Small Seed Space in PRNG",
|
|
336
|
+
"CWE-340": "Generation of Predictable Numbers or Identifiers",
|
|
337
|
+
"CWE-341": "Predictable from Observable State",
|
|
338
|
+
"CWE-342": "Predictable Exact Value from Previous Values",
|
|
339
|
+
"CWE-343": "Predictable Value Range from Previous Values",
|
|
340
|
+
"CWE-344": "Use of Invariant Value in Dynamically Changing Context",
|
|
341
|
+
"CWE-345": "Insufficient Verification of Data Authenticity",
|
|
342
|
+
"CWE-346": "Origin Validation Error",
|
|
343
|
+
"CWE-347": "Improper Verification of Cryptographic Signature",
|
|
344
|
+
"CWE-348": "Use of Less Trusted Source",
|
|
345
|
+
"CWE-349": "Acceptance of Extraneous Untrusted Data With Trusted Data",
|
|
346
|
+
"CWE-350": "Reliance on Reverse DNS Resolution for a Security-Critical "
|
|
347
|
+
"Action",
|
|
348
|
+
"CWE-351": "Insufficient Type Distinction",
|
|
349
|
+
"CWE-352": "Cross-Site Request Forgery",
|
|
350
|
+
"CWE-353": "Missing Support for Integrity Check",
|
|
351
|
+
"CWE-354": "Improper Validation of Integrity Check Value",
|
|
352
|
+
"CWE-356": "Product UI does not Warn User of Unsafe Actions",
|
|
353
|
+
"CWE-357": "Insufficient UI Warning of Dangerous Operations",
|
|
354
|
+
"CWE-358": "Improperly Implemented Security Check for Standard",
|
|
355
|
+
"CWE-359": "Exposure of Private Personal Information to an Unauthorized "
|
|
356
|
+
"Actor",
|
|
357
|
+
"CWE-360": "Trust of System Event Data",
|
|
358
|
+
"CWE-362": "Concurrent Execution using Shared Resource with Improper "
|
|
359
|
+
"Synchronization",
|
|
360
|
+
"CWE-363": "Race Condition Enabling Link Following",
|
|
361
|
+
"CWE-364": "Signal Handler Race Condition",
|
|
362
|
+
"CWE-365": "DEPRECATED: Race Condition in Switch",
|
|
363
|
+
"CWE-366": "Race Condition within a Thread",
|
|
364
|
+
"CWE-367": "Time-of-check Time-of-use",
|
|
365
|
+
"CWE-368": "Context Switching Race Condition",
|
|
366
|
+
"CWE-369": "Divide By Zero",
|
|
367
|
+
"CWE-370": "Missing Check for Certificate Revocation after Initial Check",
|
|
368
|
+
"CWE-372": "Incomplete Internal State Distinction",
|
|
369
|
+
"CWE-373": "DEPRECATED: State Synchronization Error",
|
|
370
|
+
"CWE-374": "Passing Mutable Objects to an Untrusted Method",
|
|
371
|
+
"CWE-375": "Returning a Mutable Object to an Untrusted Caller",
|
|
372
|
+
"CWE-377": "Insecure Temporary File",
|
|
373
|
+
"CWE-378": "Creation of Temporary File With Insecure Permissions",
|
|
374
|
+
"CWE-379": "Creation of Temporary File in Directory with Insecure "
|
|
375
|
+
"Permissions",
|
|
376
|
+
"CWE-382": "J2EE Bad Practices: Use of System.exit",
|
|
377
|
+
"CWE-383": "J2EE Bad Practices: Direct Use of Threads",
|
|
378
|
+
"CWE-384": "Session Fixation",
|
|
379
|
+
"CWE-385": "Covert Timing Channel",
|
|
380
|
+
"CWE-386": "Symbolic Name not Mapping to Correct Object",
|
|
381
|
+
"CWE-390": "Detection of Error Condition Without Action",
|
|
382
|
+
"CWE-391": "Unchecked Error Condition",
|
|
383
|
+
"CWE-392": "Missing Report of Error Condition",
|
|
384
|
+
"CWE-393": "Return of Wrong Status Code",
|
|
385
|
+
"CWE-394": "Unexpected Status Code or Return Value",
|
|
386
|
+
"CWE-395": "Use of NullPointerException Catch to Detect NULL Pointer "
|
|
387
|
+
"Dereference",
|
|
388
|
+
"CWE-396": "Declaration of Catch for Generic Exception",
|
|
389
|
+
"CWE-397": "Declaration of Throws for Generic Exception",
|
|
390
|
+
"CWE-400": "Uncontrolled Resource Consumption",
|
|
391
|
+
"CWE-401": "Missing Release of Memory after Effective Lifetime",
|
|
392
|
+
"CWE-402": "Transmission of Private Resources into a New Sphere",
|
|
393
|
+
"CWE-403": "Exposure of File Descriptor to Unintended Control Sphere",
|
|
394
|
+
"CWE-404": "Improper Resource Shutdown or Release",
|
|
395
|
+
"CWE-405": "Asymmetric Resource Consumption",
|
|
396
|
+
"CWE-406": "Insufficient Control of Network Message Volume",
|
|
397
|
+
"CWE-407": "Inefficient Algorithmic Complexity",
|
|
398
|
+
"CWE-408": "Incorrect Behavior Order: Early Amplification",
|
|
399
|
+
"CWE-409": "Improper Handling of Highly Compressed Data",
|
|
400
|
+
"CWE-410": "Insufficient Resource Pool",
|
|
401
|
+
"CWE-412": "Unrestricted Externally Accessible Lock",
|
|
402
|
+
"CWE-413": "Improper Resource Locking",
|
|
403
|
+
"CWE-414": "Missing Lock Check",
|
|
404
|
+
"CWE-415": "Double Free",
|
|
405
|
+
"CWE-416": "Use After Free",
|
|
406
|
+
"CWE-419": "Unprotected Primary Channel",
|
|
407
|
+
"CWE-420": "Unprotected Alternate Channel",
|
|
408
|
+
"CWE-421": "Race Condition During Access to Alternate Channel",
|
|
409
|
+
"CWE-422": "Unprotected Windows Messaging Channel",
|
|
410
|
+
"CWE-423": "DEPRECATED: Proxied Trusted Channel",
|
|
411
|
+
"CWE-424": "Improper Protection of Alternate Path",
|
|
412
|
+
"CWE-425": "Direct Request",
|
|
413
|
+
"CWE-426": "Untrusted Search Path",
|
|
414
|
+
"CWE-427": "Uncontrolled Search Path Element",
|
|
415
|
+
"CWE-428": "Unquoted Search Path or Element",
|
|
416
|
+
"CWE-430": "Deployment of Wrong Handler",
|
|
417
|
+
"CWE-431": "Missing Handler",
|
|
418
|
+
"CWE-432": "Dangerous Signal Handler not Disabled During Sensitive "
|
|
419
|
+
"Operations",
|
|
420
|
+
"CWE-433": "Unparsed Raw Web Content Delivery",
|
|
421
|
+
"CWE-434": "Unrestricted Upload of File with Dangerous Type",
|
|
422
|
+
"CWE-435": "Improper Interaction Between Multiple Correctly-Behaving "
|
|
423
|
+
"Entities",
|
|
424
|
+
"CWE-436": "Interpretation Conflict",
|
|
425
|
+
"CWE-437": "Incomplete Model of Endpoint Features",
|
|
426
|
+
"CWE-439": "Behavioral Change in New Version or Environment",
|
|
427
|
+
"CWE-440": "Expected Behavior Violation",
|
|
428
|
+
"CWE-441": "Unintended Proxy or Intermediary",
|
|
429
|
+
"CWE-443": "DEPRECATED: HTTP response splitting",
|
|
430
|
+
"CWE-444": "Inconsistent Interpretation of HTTP Requests",
|
|
431
|
+
"CWE-446": "UI Discrepancy for Security Feature",
|
|
432
|
+
"CWE-447": "Unimplemented or Unsupported Feature in UI",
|
|
433
|
+
"CWE-448": "Obsolete Feature in UI",
|
|
434
|
+
"CWE-449": "The UI Performs the Wrong Action",
|
|
435
|
+
"CWE-450": "Multiple Interpretations of UI Input",
|
|
436
|
+
"CWE-451": "User Interface",
|
|
437
|
+
"CWE-453": "Insecure Default Variable Initialization",
|
|
438
|
+
"CWE-454": "External Initialization of Trusted Variables or Data Stores",
|
|
439
|
+
"CWE-455": "Non-exit on Failed Initialization",
|
|
440
|
+
"CWE-456": "Missing Initialization of a Variable",
|
|
441
|
+
"CWE-457": "Use of Uninitialized Variable",
|
|
442
|
+
"CWE-458": "DEPRECATED: Incorrect Initialization",
|
|
443
|
+
"CWE-459": "Incomplete Cleanup",
|
|
444
|
+
"CWE-460": "Improper Cleanup on Thrown Exception",
|
|
445
|
+
"CWE-462": "Duplicate Key in Associative List",
|
|
446
|
+
"CWE-463": "Deletion of Data Structure Sentinel",
|
|
447
|
+
"CWE-464": "Addition of Data Structure Sentinel",
|
|
448
|
+
"CWE-466": "Return of Pointer Value Outside of Expected Range",
|
|
449
|
+
"CWE-467": "Use of sizeof",
|
|
450
|
+
"CWE-468": "Incorrect Pointer Scaling",
|
|
451
|
+
"CWE-469": "Use of Pointer Subtraction to Determine Size",
|
|
452
|
+
"CWE-470": "Use of Externally-Controlled Input to Select Classes or Code",
|
|
453
|
+
"CWE-471": "Modification of Assumed-Immutable Data",
|
|
454
|
+
"CWE-472": "External Control of Assumed-Immutable Web Parameter",
|
|
455
|
+
"CWE-473": "PHP External Variable Modification",
|
|
456
|
+
"CWE-474": "Use of Function with Inconsistent Implementations",
|
|
457
|
+
"CWE-475": "Undefined Behavior for Input to API",
|
|
458
|
+
"CWE-476": "NULL Pointer Dereference",
|
|
459
|
+
"CWE-477": "Use of Obsolete Function",
|
|
460
|
+
"CWE-478": "Missing Default Case in Multiple Condition Expression",
|
|
461
|
+
"CWE-479": "Signal Handler Use of a Non-reentrant Function",
|
|
462
|
+
"CWE-480": "Use of Incorrect Operator",
|
|
463
|
+
"CWE-481": "Assigning instead of Comparing",
|
|
464
|
+
"CWE-482": "Comparing instead of Assigning",
|
|
465
|
+
"CWE-483": "Incorrect Block Delimitation",
|
|
466
|
+
"CWE-484": "Omitted Break Statement in Switch",
|
|
467
|
+
"CWE-486": "Comparison of Classes by Name",
|
|
468
|
+
"CWE-487": "Reliance on Package-level Scope",
|
|
469
|
+
"CWE-488": "Exposure of Data Element to Wrong Session",
|
|
470
|
+
"CWE-489": "Active Debug Code",
|
|
471
|
+
"CWE-491": "Public cloneable",
|
|
472
|
+
"CWE-492": "Use of Inner Class Containing Sensitive Data",
|
|
473
|
+
"CWE-493": "Critical Public Variable Without Final Modifier",
|
|
474
|
+
"CWE-494": "Download of Code Without Integrity Check",
|
|
475
|
+
"CWE-495": "Private Data Structure Returned From A Public Method",
|
|
476
|
+
"CWE-496": "Public Data Assigned to Private Array-Typed Field",
|
|
477
|
+
"CWE-497": "Exposure of Sensitive System Information to an Unauthorized "
|
|
478
|
+
"Control Sphere",
|
|
479
|
+
"CWE-498": "Cloneable Class Containing Sensitive Information",
|
|
480
|
+
"CWE-499": "Serializable Class Containing Sensitive Data",
|
|
481
|
+
"CWE-500": "Public Static Field Not Marked Final",
|
|
482
|
+
"CWE-501": "Trust Boundary Violation",
|
|
483
|
+
"CWE-502": "Deserialization of Untrusted Data",
|
|
484
|
+
"CWE-506": "Embedded Malicious Code",
|
|
485
|
+
"CWE-507": "Trojan Horse",
|
|
486
|
+
"CWE-508": "Non-Replicating Malicious Code",
|
|
487
|
+
"CWE-509": "Replicating Malicious Code",
|
|
488
|
+
"CWE-510": "Trapdoor",
|
|
489
|
+
"CWE-511": "Logic/Time Bomb",
|
|
490
|
+
"CWE-512": "Spyware",
|
|
491
|
+
"CWE-514": "Covert Channel",
|
|
492
|
+
"CWE-515": "Covert Storage Channel",
|
|
493
|
+
"CWE-516": "DEPRECATED: Covert Timing Channel",
|
|
494
|
+
"CWE-520": ".NET Misconfiguration: Use of Impersonation",
|
|
495
|
+
"CWE-521": "Weak Password Requirements",
|
|
496
|
+
"CWE-522": "Insufficiently Protected Credentials",
|
|
497
|
+
"CWE-523": "Unprotected Transport of Credentials",
|
|
498
|
+
"CWE-524": "Use of Cache Containing Sensitive Information",
|
|
499
|
+
"CWE-525": "Use of Web Browser Cache Containing Sensitive Information",
|
|
500
|
+
"CWE-526": "Cleartext Storage of Sensitive Information in an Environment "
|
|
501
|
+
"Variable",
|
|
502
|
+
"CWE-527": "Exposure of Version-Control Repository to an Unauthorized "
|
|
503
|
+
"Control Sphere",
|
|
504
|
+
"CWE-528": "Exposure of Core Dump File to an Unauthorized Control Sphere",
|
|
505
|
+
"CWE-529": "Exposure of Access Control List Files to an Unauthorized "
|
|
506
|
+
"Control Sphere",
|
|
507
|
+
"CWE-530": "Exposure of Backup File to an Unauthorized Control Sphere",
|
|
508
|
+
"CWE-531": "Inclusion of Sensitive Information in Test Code",
|
|
509
|
+
"CWE-532": "Insertion of Sensitive Information into Log File",
|
|
510
|
+
"CWE-533": "DEPRECATED: Information Exposure Through Server Log Files",
|
|
511
|
+
"CWE-534": "DEPRECATED: Information Exposure Through Debug Log Files",
|
|
512
|
+
"CWE-535": "Exposure of Information Through Shell Error Message",
|
|
513
|
+
"CWE-536": "Servlet Runtime Error Message Containing Sensitive Information",
|
|
514
|
+
"CWE-537": "Java Runtime Error Message Containing Sensitive Information",
|
|
515
|
+
"CWE-538": "Insertion of Sensitive Information into Externally-Accessible "
|
|
516
|
+
"File or Directory",
|
|
517
|
+
"CWE-539": "Use of Persistent Cookies Containing Sensitive Information",
|
|
518
|
+
"CWE-540": "Inclusion of Sensitive Information in Source Code",
|
|
519
|
+
"CWE-541": "Inclusion of Sensitive Information in an Include File",
|
|
520
|
+
"CWE-542": "DEPRECATED: Information Exposure Through Cleanup Log Files",
|
|
521
|
+
"CWE-543": "Use of Singleton Pattern Without Synchronization in a "
|
|
522
|
+
"Multithreaded Context",
|
|
523
|
+
"CWE-544": "Missing Standardized Error Handling Mechanism",
|
|
524
|
+
"CWE-545": "DEPRECATED: Use of Dynamic Class Loading",
|
|
525
|
+
"CWE-546": "Suspicious Comment",
|
|
526
|
+
"CWE-547": "Use of Hard-coded, Security-relevant Constants",
|
|
527
|
+
"CWE-548": "Exposure of Information Through Directory Listing",
|
|
528
|
+
"CWE-549": "Missing Password Field Masking",
|
|
529
|
+
"CWE-550": "Server-generated Error Message Containing Sensitive "
|
|
530
|
+
"Information",
|
|
531
|
+
"CWE-551": "Incorrect Behavior Order: Authorization Before Parsing and "
|
|
532
|
+
"Canonicalization",
|
|
533
|
+
"CWE-552": "Files or Directories Accessible to External Parties",
|
|
534
|
+
"CWE-553": "Command Shell in Externally Accessible Directory",
|
|
535
|
+
"CWE-554": "ASP.NET Misconfiguration: Not Using Input Validation Framework",
|
|
536
|
+
"CWE-555": "J2EE Misconfiguration: Plaintext Password in Configuration "
|
|
537
|
+
"File",
|
|
538
|
+
"CWE-556": "ASP.NET Misconfiguration: Use of Identity Impersonation",
|
|
539
|
+
"CWE-558": "Use of getlogin",
|
|
540
|
+
"CWE-560": "Use of umask",
|
|
541
|
+
"CWE-561": "Dead Code",
|
|
542
|
+
"CWE-562": "Return of Stack Variable Address",
|
|
543
|
+
"CWE-563": "Assignment to Variable without Use",
|
|
544
|
+
"CWE-564": "SQL Injection: Hibernate",
|
|
545
|
+
"CWE-565": "Reliance on Cookies without Validation and Integrity Checking",
|
|
546
|
+
"CWE-566": "Authorization Bypass Through User-Controlled SQL Primary Key",
|
|
547
|
+
"CWE-567": "Unsynchronized Access to Shared Data in a Multithreaded "
|
|
548
|
+
"Context",
|
|
549
|
+
"CWE-568": "finalize",
|
|
550
|
+
"CWE-570": "Expression is Always False",
|
|
551
|
+
"CWE-571": "Expression is Always True",
|
|
552
|
+
"CWE-572": "Call to Thread run",
|
|
553
|
+
"CWE-573": "Improper Following of Specification by Caller",
|
|
554
|
+
"CWE-574": "EJB Bad Practices: Use of Synchronization Primitives",
|
|
555
|
+
"CWE-575": "EJB Bad Practices: Use of AWT Swing",
|
|
556
|
+
"CWE-576": "EJB Bad Practices: Use of Java I/O",
|
|
557
|
+
"CWE-577": "EJB Bad Practices: Use of Sockets",
|
|
558
|
+
"CWE-578": "EJB Bad Practices: Use of Class Loader",
|
|
559
|
+
"CWE-579": "J2EE Bad Practices: Non-serializable Object Stored in Session",
|
|
560
|
+
"CWE-580": "clone",
|
|
561
|
+
"CWE-581": "Object Model Violation: Just One of Equals and Hashcode "
|
|
562
|
+
"Defined",
|
|
563
|
+
"CWE-582": "Array Declared Public, Final, and Static",
|
|
564
|
+
"CWE-583": "finalize",
|
|
565
|
+
"CWE-584": "Return Inside Finally Block",
|
|
566
|
+
"CWE-585": "Empty Synchronized Block",
|
|
567
|
+
"CWE-586": "Explicit Call to Finalize",
|
|
568
|
+
"CWE-587": "Assignment of a Fixed Address to a Pointer",
|
|
569
|
+
"CWE-588": "Attempt to Access Child of a Non-structure Pointer",
|
|
570
|
+
"CWE-589": "Call to Non-ubiquitous API",
|
|
571
|
+
"CWE-590": "Free of Memory not on the Heap",
|
|
572
|
+
"CWE-591": "Sensitive Data Storage in Improperly Locked Memory",
|
|
573
|
+
"CWE-592": "DEPRECATED: Authentication Bypass Issues",
|
|
574
|
+
"CWE-593": "Authentication Bypass: OpenSSL CTX Object Modified after SSL "
|
|
575
|
+
"Objects are Created",
|
|
576
|
+
"CWE-594": "J2EE Framework: Saving Unserializable Objects to Disk",
|
|
577
|
+
"CWE-595": "Comparison of Object References Instead of Object Contents",
|
|
578
|
+
"CWE-596": "DEPRECATED: Incorrect Semantic Object Comparison",
|
|
579
|
+
"CWE-597": "Use of Wrong Operator in String Comparison",
|
|
580
|
+
"CWE-598": "Use of GET Request Method With Sensitive Query Strings",
|
|
581
|
+
"CWE-599": "Missing Validation of OpenSSL Certificate",
|
|
582
|
+
"CWE-600": "Uncaught Exception in Servlet ",
|
|
583
|
+
"CWE-601": "URL Redirection to Untrusted Site",
|
|
584
|
+
"CWE-602": "Client-Side Enforcement of Server-Side Security",
|
|
585
|
+
"CWE-603": "Use of Client-Side Authentication",
|
|
586
|
+
"CWE-605": "Multiple Binds to the Same Port",
|
|
587
|
+
"CWE-606": "Unchecked Input for Loop Condition",
|
|
588
|
+
"CWE-607": "Public Static Final Field References Mutable Object",
|
|
589
|
+
"CWE-608": "Struts: Non-private Field in ActionForm Class",
|
|
590
|
+
"CWE-609": "Double-Checked Locking",
|
|
591
|
+
"CWE-610": "Externally Controlled Reference to a Resource in Another "
|
|
592
|
+
"Sphere",
|
|
593
|
+
"CWE-611": "Improper Restriction of XML External Entity Reference",
|
|
594
|
+
"CWE-612": "Improper Authorization of Index Containing Sensitive "
|
|
595
|
+
"Information",
|
|
596
|
+
"CWE-613": "Insufficient Session Expiration",
|
|
597
|
+
"CWE-614": "Sensitive Cookie in HTTPS Session Without Secure Attribute",
|
|
598
|
+
"CWE-615": "Inclusion of Sensitive Information in Source Code Comments",
|
|
599
|
+
"CWE-616": "Incomplete Identification of Uploaded File Variables",
|
|
600
|
+
"CWE-617": "Reachable Assertion",
|
|
601
|
+
"CWE-618": "Exposed Unsafe ActiveX Method",
|
|
602
|
+
"CWE-619": "Dangling Database Cursor",
|
|
603
|
+
"CWE-620": "Unverified Password Change",
|
|
604
|
+
"CWE-621": "Variable Extraction Error",
|
|
605
|
+
"CWE-622": "Improper Validation of Function Hook Arguments",
|
|
606
|
+
"CWE-623": "Unsafe ActiveX Control Marked Safe For Scripting",
|
|
607
|
+
"CWE-624": "Executable Regular Expression Error",
|
|
608
|
+
"CWE-625": "Permissive Regular Expression",
|
|
609
|
+
"CWE-626": "Null Byte Interaction Error",
|
|
610
|
+
"CWE-627": "Dynamic Variable Evaluation",
|
|
611
|
+
"CWE-628": "Function Call with Incorrectly Specified Arguments",
|
|
612
|
+
"CWE-636": "Not Failing Securely",
|
|
613
|
+
"CWE-637": "Unnecessary Complexity in Protection Mechanism",
|
|
614
|
+
"CWE-638": "Not Using Complete Mediation",
|
|
615
|
+
"CWE-639": "Authorization Bypass Through User-Controlled Key",
|
|
616
|
+
"CWE-640": "Weak Password Recovery Mechanism for Forgotten Password",
|
|
617
|
+
"CWE-641": "Improper Restriction of Names for Files and Other Resources",
|
|
618
|
+
"CWE-642": "External Control of Critical State Data",
|
|
619
|
+
"CWE-643": "Improper Neutralization of Data within XPath Expressions",
|
|
620
|
+
"CWE-644": "Improper Neutralization of HTTP Headers for Scripting Syntax",
|
|
621
|
+
"CWE-645": "Overly Restrictive Account Lockout Mechanism",
|
|
622
|
+
"CWE-646": "Reliance on File Name or Extension of Externally-Supplied File",
|
|
623
|
+
"CWE-647": "Use of Non-Canonical URL Paths for Authorization Decisions",
|
|
624
|
+
"CWE-648": "Incorrect Use of Privileged APIs",
|
|
625
|
+
"CWE-649": "Reliance on Obfuscation or Encryption of Security-Relevant "
|
|
626
|
+
"Inputs without Integrity Checking",
|
|
627
|
+
"CWE-650": "Trusting HTTP Permission Methods on the Server Side",
|
|
628
|
+
"CWE-651": "Exposure of WSDL File Containing Sensitive Information",
|
|
629
|
+
"CWE-652": "Improper Neutralization of Data within XQuery Expressions",
|
|
630
|
+
"CWE-653": "Improper Isolation or Compartmentalization",
|
|
631
|
+
"CWE-654": "Reliance on a Single Factor in a Security Decision",
|
|
632
|
+
"CWE-655": "Insufficient Psychological Acceptability",
|
|
633
|
+
"CWE-656": "Reliance on Security Through Obscurity",
|
|
634
|
+
"CWE-657": "Violation of Secure Design Principles",
|
|
635
|
+
"CWE-662": "Improper Synchronization",
|
|
636
|
+
"CWE-663": "Use of a Non-reentrant Function in a Concurrent Context",
|
|
637
|
+
"CWE-664": "Improper Control of a Resource Through its Lifetime",
|
|
638
|
+
"CWE-665": "Improper Initialization",
|
|
639
|
+
"CWE-666": "Operation on Resource in Wrong Phase of Lifetime",
|
|
640
|
+
"CWE-667": "Improper Locking",
|
|
641
|
+
"CWE-668": "Exposure of Resource to Wrong Sphere",
|
|
642
|
+
"CWE-669": "Incorrect Resource Transfer Between Spheres",
|
|
643
|
+
"CWE-670": "Always-Incorrect Control Flow Implementation",
|
|
644
|
+
"CWE-671": "Lack of Administrator Control over Security",
|
|
645
|
+
"CWE-672": "Operation on a Resource after Expiration or Release",
|
|
646
|
+
"CWE-673": "External Influence of Sphere Definition",
|
|
647
|
+
"CWE-674": "Uncontrolled Recursion",
|
|
648
|
+
"CWE-675": "Multiple Operations on Resource in Single-Operation Context",
|
|
649
|
+
"CWE-676": "Use of Potentially Dangerous Function",
|
|
650
|
+
"CWE-680": "Integer Overflow to Buffer Overflow",
|
|
651
|
+
"CWE-681": "Incorrect Conversion between Numeric Types",
|
|
652
|
+
"CWE-682": "Incorrect Calculation",
|
|
653
|
+
"CWE-683": "Function Call With Incorrect Order of Arguments",
|
|
654
|
+
"CWE-684": "Incorrect Provision of Specified Functionality",
|
|
655
|
+
"CWE-685": "Function Call With Incorrect Number of Arguments",
|
|
656
|
+
"CWE-686": "Function Call With Incorrect Argument Type",
|
|
657
|
+
"CWE-687": "Function Call With Incorrectly Specified Argument Value",
|
|
658
|
+
"CWE-688": "Function Call With Incorrect Variable or Reference as Argument",
|
|
659
|
+
"CWE-689": "Permission Race Condition During Resource Copy",
|
|
660
|
+
"CWE-690": "Unchecked Return Value to NULL Pointer Dereference",
|
|
661
|
+
"CWE-691": "Insufficient Control Flow Management",
|
|
662
|
+
"CWE-692": "Incomplete Denylist to Cross-Site Scripting",
|
|
663
|
+
"CWE-693": "Protection Mechanism Failure",
|
|
664
|
+
"CWE-694": "Use of Multiple Resources with Duplicate Identifier",
|
|
665
|
+
"CWE-695": "Use of Low-Level Functionality",
|
|
666
|
+
"CWE-696": "Incorrect Behavior Order",
|
|
667
|
+
"CWE-697": "Incorrect Comparison",
|
|
668
|
+
"CWE-698": "Execution After Redirect",
|
|
669
|
+
"CWE-703": "Improper Check or Handling of Exceptional Conditions",
|
|
670
|
+
"CWE-704": "Incorrect Type Conversion or Cast",
|
|
671
|
+
"CWE-705": "Incorrect Control Flow Scoping",
|
|
672
|
+
"CWE-706": "Use of Incorrectly-Resolved Name or Reference",
|
|
673
|
+
"CWE-707": "Improper Neutralization",
|
|
674
|
+
"CWE-708": "Incorrect Ownership Assignment",
|
|
675
|
+
"CWE-710": "Improper Adherence to Coding Standards",
|
|
676
|
+
"CWE-732": "Incorrect Permission Assignment for Critical Resource",
|
|
677
|
+
"CWE-733": "Compiler Optimization Removal or Modification of "
|
|
678
|
+
"Security-critical Code",
|
|
679
|
+
"CWE-749": "Exposed Dangerous Method or Function",
|
|
680
|
+
"CWE-754": "Improper Check for Unusual or Exceptional Conditions",
|
|
681
|
+
"CWE-755": "Improper Handling of Exceptional Conditions",
|
|
682
|
+
"CWE-756": "Missing Custom Error Page",
|
|
683
|
+
"CWE-757": "Selection of Less-Secure Algorithm During Negotiation",
|
|
684
|
+
"CWE-758": "Reliance on Undefined, Unspecified, or Implementation-Defined "
|
|
685
|
+
"Behavior",
|
|
686
|
+
"CWE-759": "Use of a One-Way Hash without a Salt",
|
|
687
|
+
"CWE-760": "Use of a One-Way Hash with a Predictable Salt",
|
|
688
|
+
"CWE-761": "Free of Pointer not at Start of Buffer",
|
|
689
|
+
"CWE-762": "Mismatched Memory Management Routines",
|
|
690
|
+
"CWE-763": "Release of Invalid Pointer or Reference",
|
|
691
|
+
"CWE-764": "Multiple Locks of a Critical Resource",
|
|
692
|
+
"CWE-765": "Multiple Unlocks of a Critical Resource",
|
|
693
|
+
"CWE-766": "Critical Data Element Declared Public",
|
|
694
|
+
"CWE-767": "Access to Critical Private Variable via Public Method",
|
|
695
|
+
"CWE-768": "Incorrect Short Circuit Evaluation",
|
|
696
|
+
"CWE-769": "DEPRECATED: Uncontrolled File Descriptor Consumption",
|
|
697
|
+
"CWE-770": "Allocation of Resources Without Limits or Throttling",
|
|
698
|
+
"CWE-771": "Missing Reference to Active Allocated Resource",
|
|
699
|
+
"CWE-772": "Missing Release of Resource after Effective Lifetime",
|
|
700
|
+
"CWE-773": "Missing Reference to Active File Descriptor or Handle",
|
|
701
|
+
"CWE-774": "Allocation of File Descriptors or Handles Without Limits or "
|
|
702
|
+
"Throttling",
|
|
703
|
+
"CWE-775": "Missing Release of File Descriptor or Handle after Effective "
|
|
704
|
+
"Lifetime",
|
|
705
|
+
"CWE-776": "Improper Restriction of Recursive Entity References in DTDs",
|
|
706
|
+
"CWE-777": "Regular Expression without Anchors",
|
|
707
|
+
"CWE-778": "Insufficient Logging",
|
|
708
|
+
"CWE-779": "Logging of Excessive Data",
|
|
709
|
+
"CWE-780": "Use of RSA Algorithm without OAEP",
|
|
710
|
+
"CWE-781": "Improper Address Validation in IOCTL with METHOD_NEITHER I/O "
|
|
711
|
+
"Control Code",
|
|
712
|
+
"CWE-782": "Exposed IOCTL with Insufficient Access Control",
|
|
713
|
+
"CWE-783": "Operator Precedence Logic Error",
|
|
714
|
+
"CWE-784": "Reliance on Cookies without Validation and Integrity Checking "
|
|
715
|
+
"in a Security Decision",
|
|
716
|
+
"CWE-785": "Use of Path Manipulation Function without Maximum-sized Buffer",
|
|
717
|
+
"CWE-786": "Access of Memory Location Before Start of Buffer",
|
|
718
|
+
"CWE-787": "Out-of-bounds Write",
|
|
719
|
+
"CWE-788": "Access of Memory Location After End of Buffer",
|
|
720
|
+
"CWE-789": "Memory Allocation with Excessive Size Value",
|
|
721
|
+
"CWE-790": "Improper Filtering of Special Elements",
|
|
722
|
+
"CWE-791": "Incomplete Filtering of Special Elements",
|
|
723
|
+
"CWE-792": "Incomplete Filtering of One or More Instances of Special "
|
|
724
|
+
"Elements",
|
|
725
|
+
"CWE-793": "Only Filtering One Instance of a Special Element",
|
|
726
|
+
"CWE-794": "Incomplete Filtering of Multiple Instances of Special Elements",
|
|
727
|
+
"CWE-795": "Only Filtering Special Elements at a Specified Location",
|
|
728
|
+
"CWE-796": "Only Filtering Special Elements Relative to a Marker",
|
|
729
|
+
"CWE-797": "Only Filtering Special Elements at an Absolute Position",
|
|
730
|
+
"CWE-798": "Use of Hard-coded Credentials",
|
|
731
|
+
"CWE-799": "Improper Control of Interaction Frequency",
|
|
732
|
+
"CWE-804": "Guessable CAPTCHA",
|
|
733
|
+
"CWE-805": "Buffer Access with Incorrect Length Value",
|
|
734
|
+
"CWE-806": "Buffer Access Using Size of Source Buffer",
|
|
735
|
+
"CWE-807": "Reliance on Untrusted Inputs in a Security Decision",
|
|
736
|
+
"CWE-820": "Missing Synchronization",
|
|
737
|
+
"CWE-821": "Incorrect Synchronization",
|
|
738
|
+
"CWE-822": "Untrusted Pointer Dereference",
|
|
739
|
+
"CWE-823": "Use of Out-of-range Pointer Offset",
|
|
740
|
+
"CWE-824": "Access of Uninitialized Pointer",
|
|
741
|
+
"CWE-825": "Expired Pointer Dereference",
|
|
742
|
+
"CWE-826": "Premature Release of Resource During Expected Lifetime",
|
|
743
|
+
"CWE-827": "Improper Control of Document Type Definition",
|
|
744
|
+
"CWE-828": "Signal Handler with Functionality that is not "
|
|
745
|
+
"Asynchronous-Safe",
|
|
746
|
+
"CWE-829": "Inclusion of Functionality from Untrusted Control Sphere",
|
|
747
|
+
"CWE-830": "Inclusion of Web Functionality from an Untrusted Source",
|
|
748
|
+
"CWE-831": "Signal Handler Function Associated with Multiple Signals",
|
|
749
|
+
"CWE-832": "Unlock of a Resource that is not Locked",
|
|
750
|
+
"CWE-833": "Deadlock",
|
|
751
|
+
"CWE-834": "Excessive Iteration",
|
|
752
|
+
"CWE-835": "Loop with Unreachable Exit Condition",
|
|
753
|
+
"CWE-836": "Use of Password Hash Instead of Password for Authentication",
|
|
754
|
+
"CWE-837": "Improper Enforcement of a Single, Unique Action",
|
|
755
|
+
"CWE-838": "Inappropriate Encoding for Output Context",
|
|
756
|
+
"CWE-839": "Numeric Range Comparison Without Minimum Check",
|
|
757
|
+
"CWE-841": "Improper Enforcement of Behavioral Workflow",
|
|
758
|
+
"CWE-842": "Placement of User into Incorrect Group",
|
|
759
|
+
"CWE-843": "Access of Resource Using Incompatible Type",
|
|
760
|
+
"CWE-862": "Missing Authorization",
|
|
761
|
+
"CWE-863": "Incorrect Authorization",
|
|
762
|
+
"CWE-908": "Use of Uninitialized Resource",
|
|
763
|
+
"CWE-909": "Missing Initialization of Resource",
|
|
764
|
+
"CWE-910": "Use of Expired File Descriptor",
|
|
765
|
+
"CWE-911": "Improper Update of Reference Count",
|
|
766
|
+
"CWE-912": "Hidden Functionality",
|
|
767
|
+
"CWE-913": "Improper Control of Dynamically-Managed Code Resources",
|
|
768
|
+
"CWE-914": "Improper Control of Dynamically-Identified Variables",
|
|
769
|
+
"CWE-915": "Improperly Controlled Modification of Dynamically-Determined "
|
|
770
|
+
"Object Attributes",
|
|
771
|
+
"CWE-916": "Use of Password Hash With Insufficient Computational Effort",
|
|
772
|
+
"CWE-917": "Improper Neutralization of Special Elements used in an "
|
|
773
|
+
"Expression Language Statement",
|
|
774
|
+
"CWE-918": "Server-Side Request Forgery",
|
|
775
|
+
"CWE-920": "Improper Restriction of Power Consumption",
|
|
776
|
+
"CWE-921": "Storage of Sensitive Data in a Mechanism without Access "
|
|
777
|
+
"Control",
|
|
778
|
+
"CWE-922": "Insecure Storage of Sensitive Information",
|
|
779
|
+
"CWE-923": "Improper Restriction of Communication Channel to Intended "
|
|
780
|
+
"Endpoints",
|
|
781
|
+
"CWE-924": "Improper Enforcement of Message Integrity During Transmission "
|
|
782
|
+
"in a Communication Channel",
|
|
783
|
+
"CWE-925": "Improper Verification of Intent by Broadcast Receiver",
|
|
784
|
+
"CWE-926": "Improper Export of Android Application Components",
|
|
785
|
+
"CWE-927": "Use of Implicit Intent for Sensitive Communication",
|
|
786
|
+
"CWE-939": "Improper Authorization in Handler for Custom URL Scheme",
|
|
787
|
+
"CWE-940": "Improper Verification of Source of a Communication Channel",
|
|
788
|
+
"CWE-941": "Incorrectly Specified Destination in a Communication Channel",
|
|
789
|
+
"CWE-942": "Permissive Cross-domain Policy with Untrusted Domains",
|
|
790
|
+
"CWE-943": "Improper Neutralization of Special Elements in Data Query "
|
|
791
|
+
"Logic",
|
|
792
|
+
"CWE-1004": "Sensitive Cookie Without HttpOnly Flag",
|
|
793
|
+
"CWE-1007": "Insufficient Visual Distinction of Homoglyphs Presented to "
|
|
794
|
+
"User",
|
|
795
|
+
"CWE-1021": "Improper Restriction of Rendered UI Layers or Frames",
|
|
796
|
+
"CWE-1022": "Use of Web Link to Untrusted Target with window.opener Access",
|
|
797
|
+
"CWE-1023": "Incomplete Comparison with Missing Factors",
|
|
798
|
+
"CWE-1024": "Comparison of Incompatible Types",
|
|
799
|
+
"CWE-1025": "Comparison Using Wrong Factors",
|
|
800
|
+
"CWE-1037": "Processor Optimization Removal or Modification of "
|
|
801
|
+
"Security-critical Code",
|
|
802
|
+
"CWE-1038": "Insecure Automated Optimizations",
|
|
803
|
+
"CWE-1039": "Automated Recognition Mechanism with Inadequate Detection or "
|
|
804
|
+
"Handling of Adversarial Input Perturbations",
|
|
805
|
+
"CWE-1041": "Use of Redundant Code",
|
|
806
|
+
"CWE-1042": "Static Member Data Element outside of a Singleton Class "
|
|
807
|
+
"Element",
|
|
808
|
+
"CWE-1043": "Data Element Aggregating an Excessively Large Number of "
|
|
809
|
+
"Non-Primitive Elements",
|
|
810
|
+
"CWE-1044": "Architecture with Number of Horizontal Layers Outside of "
|
|
811
|
+
"Expected Range",
|
|
812
|
+
"CWE-1045": "Parent Class with a Virtual Destructor and a Child Class "
|
|
813
|
+
"without a Virtual Destructor",
|
|
814
|
+
"CWE-1046": "Creation of Immutable Text Using String Concatenation",
|
|
815
|
+
"CWE-1047": "Modules with Circular Dependencies",
|
|
816
|
+
"CWE-1048": "Invokable Control Element with Large Number of Outward Calls",
|
|
817
|
+
"CWE-1049": "Excessive Data Query Operations in a Large Data Table",
|
|
818
|
+
"CWE-1050": "Excessive Platform Resource Consumption within a Loop",
|
|
819
|
+
"CWE-1051": "Initialization with Hard-Coded Network Resource "
|
|
820
|
+
"Configuration Data",
|
|
821
|
+
"CWE-1052": "Excessive Use of Hard-Coded Literals in Initialization",
|
|
822
|
+
"CWE-1053": "Missing Documentation for Design",
|
|
823
|
+
"CWE-1054": "Invocation of a Control Element at an Unnecessarily Deep "
|
|
824
|
+
"Horizontal Layer",
|
|
825
|
+
"CWE-1055": "Multiple Inheritance from Concrete Classes",
|
|
826
|
+
"CWE-1056": "Invokable Control Element with Variadic Parameters",
|
|
827
|
+
"CWE-1057": "Data Access Operations Outside of Expected Data Manager "
|
|
828
|
+
"Component",
|
|
829
|
+
"CWE-1058": "Invokable Control Element in Multi-Thread Context with "
|
|
830
|
+
"non-Final Static Storable or Member Element",
|
|
831
|
+
"CWE-1059": "Insufficient Technical Documentation",
|
|
832
|
+
"CWE-1060": "Excessive Number of Inefficient Server-Side Data Accesses",
|
|
833
|
+
"CWE-1061": "Insufficient Encapsulation",
|
|
834
|
+
"CWE-1062": "Parent Class with References to Child Class",
|
|
835
|
+
"CWE-1063": "Creation of Class Instance within a Static Code Block",
|
|
836
|
+
"CWE-1064": "Invokable Control Element with Signature Containing an "
|
|
837
|
+
"Excessive Number of Parameters",
|
|
838
|
+
"CWE-1065": "Runtime Resource Management Control Element in a Component "
|
|
839
|
+
"Built to Run on Application Servers",
|
|
840
|
+
"CWE-1066": "Missing Serialization Control Element",
|
|
841
|
+
"CWE-1067": "Excessive Execution of Sequential Searches of Data Resource",
|
|
842
|
+
"CWE-1068": "Inconsistency Between Implementation and Documented Design",
|
|
843
|
+
"CWE-1069": "Empty Exception Block",
|
|
844
|
+
"CWE-1070": "Serializable Data Element Containing non-Serializable Item "
|
|
845
|
+
"Elements",
|
|
846
|
+
"CWE-1071": "Empty Code Block",
|
|
847
|
+
"CWE-1072": "Data Resource Access without Use of Connection Pooling",
|
|
848
|
+
"CWE-1073": "Non-SQL Invokable Control Element with Excessive Number of "
|
|
849
|
+
"Data Resource Accesses",
|
|
850
|
+
"CWE-1074": "Class with Excessively Deep Inheritance",
|
|
851
|
+
"CWE-1075": "Unconditional Control Flow Transfer outside of Switch Block",
|
|
852
|
+
"CWE-1076": "Insufficient Adherence to Expected Conventions",
|
|
853
|
+
"CWE-1077": "Floating Point Comparison with Incorrect Operator",
|
|
854
|
+
"CWE-1078": "Inappropriate Source Code Style or Formatting",
|
|
855
|
+
"CWE-1079": "Parent Class without Virtual Destructor Method",
|
|
856
|
+
"CWE-1080": "Source Code File with Excessive Number of Lines of Code",
|
|
857
|
+
"CWE-1082": "Class Instance Self Destruction Control Element",
|
|
858
|
+
"CWE-1083": "Data Access from Outside Expected Data Manager Component",
|
|
859
|
+
"CWE-1084": "Invokable Control Element with Excessive File or Data Access "
|
|
860
|
+
"Operations",
|
|
861
|
+
"CWE-1085": "Invokable Control Element with Excessive Volume of "
|
|
862
|
+
"Commented-out Code",
|
|
863
|
+
"CWE-1086": "Class with Excessive Number of Child Classes",
|
|
864
|
+
"CWE-1087": "Class with Virtual Method without a Virtual Destructor",
|
|
865
|
+
"CWE-1088": "Synchronous Access of Remote Resource without Timeout",
|
|
866
|
+
"CWE-1089": "Large Data Table with Excessive Number of Indices",
|
|
867
|
+
"CWE-1090": "Method Containing Access of a Member Element from Another "
|
|
868
|
+
"Class",
|
|
869
|
+
"CWE-1091": "Use of Object without Invoking Destructor Method",
|
|
870
|
+
"CWE-1092": "Use of Same Invokable Control Element in Multiple "
|
|
871
|
+
"Architectural Layers",
|
|
872
|
+
"CWE-1093": "Excessively Complex Data Representation",
|
|
873
|
+
"CWE-1094": "Excessive Index Range Scan for a Data Resource",
|
|
874
|
+
"CWE-1095": "Loop Condition Value Update within the Loop",
|
|
875
|
+
"CWE-1096": "Singleton Class Instance Creation without Proper Locking or "
|
|
876
|
+
"Synchronization",
|
|
877
|
+
"CWE-1097": "Persistent Storable Data Element without Associated "
|
|
878
|
+
"Comparison Control Element",
|
|
879
|
+
"CWE-1098": "Data Element containing Pointer Item without Proper Copy "
|
|
880
|
+
"Control Element",
|
|
881
|
+
"CWE-1099": "Inconsistent Naming Conventions for Identifiers",
|
|
882
|
+
"CWE-1100": "Insufficient Isolation of System-Dependent Functions",
|
|
883
|
+
"CWE-1101": "Reliance on Runtime Component in Generated Code",
|
|
884
|
+
"CWE-1102": "Reliance on Machine-Dependent Data Representation",
|
|
885
|
+
"CWE-1103": "Use of Platform-Dependent Third Party Components",
|
|
886
|
+
"CWE-1104": "Use of Unmaintained Third Party Components",
|
|
887
|
+
"CWE-1105": "Insufficient Encapsulation of Machine-Dependent Functionality",
|
|
888
|
+
"CWE-1106": "Insufficient Use of Symbolic Constants",
|
|
889
|
+
"CWE-1107": "Insufficient Isolation of Symbolic Constant Definitions",
|
|
890
|
+
"CWE-1108": "Excessive Reliance on Global Variables",
|
|
891
|
+
"CWE-1109": "Use of Same Variable for Multiple Purposes",
|
|
892
|
+
"CWE-1110": "Incomplete Design Documentation",
|
|
893
|
+
"CWE-1111": "Incomplete I/O Documentation",
|
|
894
|
+
"CWE-1112": "Incomplete Documentation of Program Execution",
|
|
895
|
+
"CWE-1113": "Inappropriate Comment Style",
|
|
896
|
+
"CWE-1114": "Inappropriate Whitespace Style",
|
|
897
|
+
"CWE-1115": "Source Code Element without Standard Prologue",
|
|
898
|
+
"CWE-1116": "Inaccurate Comments",
|
|
899
|
+
"CWE-1117": "Callable with Insufficient Behavioral Summary",
|
|
900
|
+
"CWE-1118": "Insufficient Documentation of Error Handling Techniques",
|
|
901
|
+
"CWE-1119": "Excessive Use of Unconditional Branching",
|
|
902
|
+
"CWE-1120": "Excessive Code Complexity",
|
|
903
|
+
"CWE-1121": "Excessive McCabe Cyclomatic Complexity",
|
|
904
|
+
"CWE-1122": "Excessive Halstead Complexity",
|
|
905
|
+
"CWE-1123": "Excessive Use of Self-Modifying Code",
|
|
906
|
+
"CWE-1124": "Excessively Deep Nesting",
|
|
907
|
+
"CWE-1125": "Excessive Attack Surface",
|
|
908
|
+
"CWE-1126": "Declaration of Variable with Unnecessarily Wide Scope",
|
|
909
|
+
"CWE-1127": "Compilation with Insufficient Warnings or Errors",
|
|
910
|
+
"CWE-1164": "Irrelevant Code",
|
|
911
|
+
"CWE-1173": "Improper Use of Validation Framework",
|
|
912
|
+
"CWE-1174": "ASP.NET Misconfiguration: Improper Model Validation",
|
|
913
|
+
"CWE-1176": "Inefficient CPU Computation",
|
|
914
|
+
"CWE-1177": "Use of Prohibited Code",
|
|
915
|
+
"CWE-1187": "DEPRECATED: Use of Uninitialized Resource",
|
|
916
|
+
"CWE-1188": "Insecure Default Initialization of Resource",
|
|
917
|
+
"CWE-1189": "Improper Isolation of Shared Resources on System-on-a-Chip",
|
|
918
|
+
"CWE-1190": "DMA Device Enabled Too Early in Boot Phase",
|
|
919
|
+
"CWE-1191": "On-Chip Debug and Test Interface With Improper Access Control",
|
|
920
|
+
"CWE-1192": "System-on-Chip",
|
|
921
|
+
"CWE-1193": "Power-On of Untrusted Execution Core Before Enabling Fabric "
|
|
922
|
+
"Access Control",
|
|
923
|
+
"CWE-1204": "Generation of Weak Initialization Vector",
|
|
924
|
+
"CWE-1209": "Failure to Disable Reserved Bits",
|
|
925
|
+
"CWE-1220": "Insufficient Granularity of Access Control",
|
|
926
|
+
"CWE-1221": "Incorrect Register Defaults or Module Parameters",
|
|
927
|
+
"CWE-1222": "Insufficient Granularity of Address Regions Protected by "
|
|
928
|
+
"Register Locks",
|
|
929
|
+
"CWE-1223": "Race Condition for Write-Once Attributes",
|
|
930
|
+
"CWE-1224": "Improper Restriction of Write-Once Bit Fields",
|
|
931
|
+
"CWE-1229": "Creation of Emergent Resource",
|
|
932
|
+
"CWE-1230": "Exposure of Sensitive Information Through Metadata",
|
|
933
|
+
"CWE-1231": "Improper Prevention of Lock Bit Modification",
|
|
934
|
+
"CWE-1232": "Improper Lock Behavior After Power State Transition",
|
|
935
|
+
"CWE-1233": "Security-Sensitive Hardware Controls with Missing Lock Bit "
|
|
936
|
+
"Protection",
|
|
937
|
+
"CWE-1234": "Hardware Internal or Debug Modes Allow Override of Locks",
|
|
938
|
+
"CWE-1235": "Incorrect Use of Autoboxing and Unboxing for Performance "
|
|
939
|
+
"Critical Operations",
|
|
940
|
+
"CWE-1236": "Improper Neutralization of Formula Elements in a CSV File",
|
|
941
|
+
"CWE-1239": "Improper Zeroization of Hardware Register",
|
|
942
|
+
"CWE-1240": "Use of a Cryptographic Primitive with a Risky Implementation",
|
|
943
|
+
"CWE-1241": "Use of Predictable Algorithm in Random Number Generator",
|
|
944
|
+
"CWE-1242": "Inclusion of Undocumented Features or Chicken Bits",
|
|
945
|
+
"CWE-1243": "Sensitive Non-Volatile Information Not Protected During Debug",
|
|
946
|
+
"CWE-1244": "Internal Asset Exposed to Unsafe Debug Access Level or State",
|
|
947
|
+
"CWE-1245": "Improper Finite State Machines",
|
|
948
|
+
"CWE-1246": "Improper Write Handling in Limited-write Non-Volatile "
|
|
949
|
+
"Memories",
|
|
950
|
+
"CWE-1247": "Improper Protection Against Voltage and Clock Glitches",
|
|
951
|
+
"CWE-1248": "Semiconductor Defects in Hardware Logic with "
|
|
952
|
+
"Security-Sensitive Implications",
|
|
953
|
+
"CWE-1249": "Application-Level Admin Tool with Inconsistent View of "
|
|
954
|
+
"Underlying Operating System",
|
|
955
|
+
"CWE-1250": "Improper Preservation of Consistency Between Independent "
|
|
956
|
+
"Representations of Shared State",
|
|
957
|
+
"CWE-1251": "Mirrored Regions with Different Values",
|
|
958
|
+
"CWE-1252": "CPU Hardware Not Configured to Support Exclusivity of Write "
|
|
959
|
+
"and Execute Operations",
|
|
960
|
+
"CWE-1253": "Incorrect Selection of Fuse Values",
|
|
961
|
+
"CWE-1254": "Incorrect Comparison Logic Granularity",
|
|
962
|
+
"CWE-1255": "Comparison Logic is Vulnerable to Power Side-Channel Attacks",
|
|
963
|
+
"CWE-1256": "Improper Restriction of Software Interfaces to Hardware "
|
|
964
|
+
"Features",
|
|
965
|
+
"CWE-1257": "Improper Access Control Applied to Mirrored or Aliased "
|
|
966
|
+
"Memory Regions",
|
|
967
|
+
"CWE-1258": "Exposure of Sensitive System Information Due to Uncleared "
|
|
968
|
+
"Debug Information",
|
|
969
|
+
"CWE-1259": "Improper Restriction of Security Token Assignment",
|
|
970
|
+
"CWE-1260": "Improper Handling of Overlap Between Protected Memory Ranges",
|
|
971
|
+
"CWE-1261": "Improper Handling of Single Event Upsets",
|
|
972
|
+
"CWE-1262": "Improper Access Control for Register Interface",
|
|
973
|
+
"CWE-1263": "Improper Physical Access Control",
|
|
974
|
+
"CWE-1264": "Hardware Logic with Insecure De-Synchronization between "
|
|
975
|
+
"Control and Data Channels",
|
|
976
|
+
"CWE-1265": "Unintended Reentrant Invocation of Non-reentrant Code Via "
|
|
977
|
+
"Nested Calls",
|
|
978
|
+
"CWE-1266": "Improper Scrubbing of Sensitive Data from Decommissioned "
|
|
979
|
+
"Device",
|
|
980
|
+
"CWE-1267": "Policy Uses Obsolete Encoding",
|
|
981
|
+
"CWE-1268": "Policy Privileges are not Assigned Consistently Between "
|
|
982
|
+
"Control and Data Agents",
|
|
983
|
+
"CWE-1269": "Product Released in Non-Release Configuration",
|
|
984
|
+
"CWE-1270": "Generation of Incorrect Security Tokens",
|
|
985
|
+
"CWE-1271": "Uninitialized Value on Reset for Registers Holding Security "
|
|
986
|
+
"Settings",
|
|
987
|
+
"CWE-1272": "Sensitive Information Uncleared Before Debug/Power State "
|
|
988
|
+
"Transition",
|
|
989
|
+
"CWE-1273": "Device Unlock Credential Sharing",
|
|
990
|
+
"CWE-1274": "Improper Access Control for Volatile Memory Containing Boot "
|
|
991
|
+
"Code",
|
|
992
|
+
"CWE-1275": "Sensitive Cookie with Improper SameSite Attribute",
|
|
993
|
+
"CWE-1276": "Hardware Child Block Incorrectly Connected to Parent System",
|
|
994
|
+
"CWE-1277": "Firmware Not Updateable",
|
|
995
|
+
"CWE-1278": "Missing Protection Against Hardware Reverse Engineering "
|
|
996
|
+
"Using Integrated Circuit",
|
|
997
|
+
"CWE-1279": "Cryptographic Operations are run Before Supporting Units are "
|
|
998
|
+
"Ready",
|
|
999
|
+
"CWE-1280": "Access Control Check Implemented After Asset is Accessed",
|
|
1000
|
+
"CWE-1281": "Sequence of Processor Instructions Leads to Unexpected "
|
|
1001
|
+
"Behavior",
|
|
1002
|
+
"CWE-1282": "Assumed-Immutable Data is Stored in Writable Memory",
|
|
1003
|
+
"CWE-1283": "Mutable Attestation or Measurement Reporting Data",
|
|
1004
|
+
"CWE-1284": "Improper Validation of Specified Quantity in Input",
|
|
1005
|
+
"CWE-1285": "Improper Validation of Specified Index, Position, or Offset "
|
|
1006
|
+
"in Input",
|
|
1007
|
+
"CWE-1286": "Improper Validation of Syntactic Correctness of Input",
|
|
1008
|
+
"CWE-1287": "Improper Validation of Specified Type of Input",
|
|
1009
|
+
"CWE-1288": "Improper Validation of Consistency within Input",
|
|
1010
|
+
"CWE-1289": "Improper Validation of Unsafe Equivalence in Input",
|
|
1011
|
+
"CWE-1290": "Incorrect Decoding of Security Identifiers ",
|
|
1012
|
+
"CWE-1291": "Public Key Re-Use for Signing both Debug and Production Code",
|
|
1013
|
+
"CWE-1292": "Incorrect Conversion of Security Identifiers",
|
|
1014
|
+
"CWE-1293": "Missing Source Correlation of Multiple Independent Data",
|
|
1015
|
+
"CWE-1294": "Insecure Security Identifier Mechanism",
|
|
1016
|
+
"CWE-1295": "Debug Messages Revealing Unnecessary Information",
|
|
1017
|
+
"CWE-1296": "Incorrect Chaining or Granularity of Debug Components",
|
|
1018
|
+
"CWE-1297": "Unprotected Confidential Information on Device is Accessible "
|
|
1019
|
+
"by OSAT Vendors",
|
|
1020
|
+
"CWE-1298": "Hardware Logic Contains Race Conditions",
|
|
1021
|
+
"CWE-1299": "Missing Protection Mechanism for Alternate Hardware Interface",
|
|
1022
|
+
"CWE-1300": "Improper Protection of Physical Side Channels",
|
|
1023
|
+
"CWE-1301": "Insufficient or Incomplete Data Removal within Hardware "
|
|
1024
|
+
"Component",
|
|
1025
|
+
"CWE-1302": "Missing Security Identifier",
|
|
1026
|
+
"CWE-1303": "Non-Transparent Sharing of Microarchitectural Resources",
|
|
1027
|
+
"CWE-1304": "Improperly Preserved Integrity of Hardware Configuration "
|
|
1028
|
+
"State During a Power Save/Restore Operation",
|
|
1029
|
+
"CWE-1310": "Missing Ability to Patch ROM Code",
|
|
1030
|
+
"CWE-1311": "Improper Translation of Security Attributes by Fabric Bridge",
|
|
1031
|
+
"CWE-1312": "Missing Protection for Mirrored Regions in On-Chip Fabric "
|
|
1032
|
+
"Firewall",
|
|
1033
|
+
"CWE-1313": "Hardware Allows Activation of Test or Debug Logic at Runtime",
|
|
1034
|
+
"CWE-1314": "Missing Write Protection for Parametric Data Values",
|
|
1035
|
+
"CWE-1315": "Improper Setting of Bus Controlling Capability in Fabric "
|
|
1036
|
+
"End-point",
|
|
1037
|
+
"CWE-1316": "Fabric-Address Map Allows Programming of Unwarranted "
|
|
1038
|
+
"Overlaps of Protected and Unprotected Ranges",
|
|
1039
|
+
"CWE-1317": "Improper Access Control in Fabric Bridge",
|
|
1040
|
+
"CWE-1318": "Missing Support for Security Features in On-chip Fabrics or "
|
|
1041
|
+
"Buses",
|
|
1042
|
+
"CWE-1319": "Improper Protection against Electromagnetic Fault Injection",
|
|
1043
|
+
"CWE-1320": "Improper Protection for Outbound Error Messages and Alert "
|
|
1044
|
+
"Signals",
|
|
1045
|
+
"CWE-1321": "Improperly Controlled Modification of Object Prototype "
|
|
1046
|
+
"Attributes",
|
|
1047
|
+
"CWE-1322": "Use of Blocking Code in Single-threaded, Non-blocking Context",
|
|
1048
|
+
"CWE-1323": "Improper Management of Sensitive Trace Data",
|
|
1049
|
+
"CWE-1324": "DEPRECATED: Sensitive Information Accessible by Physical "
|
|
1050
|
+
"Probing of JTAG Interface",
|
|
1051
|
+
"CWE-1325": "Improperly Controlled Sequential Memory Allocation",
|
|
1052
|
+
"CWE-1326": "Missing Immutable Root of Trust in Hardware",
|
|
1053
|
+
"CWE-1327": "Binding to an Unrestricted IP Address",
|
|
1054
|
+
"CWE-1328": "Security Version Number Mutable to Older Versions",
|
|
1055
|
+
"CWE-1329": "Reliance on Component That is Not Updateable",
|
|
1056
|
+
"CWE-1330": "Remanent Data Readable after Memory Erase",
|
|
1057
|
+
"CWE-1331": "Improper Isolation of Shared Resources in Network On Chip",
|
|
1058
|
+
"CWE-1332": "Improper Handling of Faults that Lead to Instruction Skips",
|
|
1059
|
+
"CWE-1333": "Inefficient Regular Expression Complexity",
|
|
1060
|
+
"CWE-1334": "Unauthorized Error Injection Can Degrade Hardware Redundancy",
|
|
1061
|
+
"CWE-1335": "Incorrect Bitwise Shift of Integer",
|
|
1062
|
+
"CWE-1336": "Improper Neutralization of Special Elements Used in a "
|
|
1063
|
+
"Template Engine",
|
|
1064
|
+
"CWE-1338": "Improper Protections Against Hardware Overheating",
|
|
1065
|
+
"CWE-1339": "Insufficient Precision or Accuracy of a Real Number",
|
|
1066
|
+
"CWE-1341": "Multiple Releases of Same Resource or Handle",
|
|
1067
|
+
"CWE-1342": "Information Exposure through Microarchitectural State after "
|
|
1068
|
+
"Transient Execution",
|
|
1069
|
+
"CWE-1351": "Improper Handling of Hardware Behavior in Exceptionally Cold "
|
|
1070
|
+
"Environments",
|
|
1071
|
+
"CWE-1357": "Reliance on Insufficiently Trustworthy Component",
|
|
1072
|
+
"CWE-1384": "Improper Handling of Physical or Environmental Conditions",
|
|
1073
|
+
"CWE-1385": "Missing Origin Validation in WebSockets",
|
|
1074
|
+
"CWE-1386": "Insecure Operation on Windows Junction / Mount Point",
|
|
1075
|
+
"CWE-1389": "Incorrect Parsing of Numbers with Different Radices",
|
|
1076
|
+
"CWE-1390": "Weak Authentication",
|
|
1077
|
+
"CWE-1391": "Use of Weak Credentials",
|
|
1078
|
+
"CWE-1392": "Use of Default Credentials",
|
|
1079
|
+
"CWE-1393": "Use of Default Password",
|
|
1080
|
+
"CWE-1394": "Use of Default Cryptographic Key",
|
|
1081
|
+
"CWE-1395": "Dependency on Vulnerable Third-Party Component",
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
TOML_TEMPLATE = {
|
|
1085
|
+
"depscan_version": get_version(),
|
|
1086
|
+
"note": [
|
|
1087
|
+
{"audience": "", "category": "", "text": "", "title": ""},
|
|
1088
|
+
{"audience": "", "category": "", "text": "", "title": ""},
|
|
1089
|
+
],
|
|
1090
|
+
"reference": [
|
|
1091
|
+
{"category": "", "summary": "", "url": ""},
|
|
1092
|
+
{"category": "", "summary": "", "url": ""},
|
|
1093
|
+
],
|
|
1094
|
+
"distribution": {"label": "", "text": "", "url": ""},
|
|
1095
|
+
"document": {"category": "csaf_vex", "title": "Your Title"},
|
|
1096
|
+
"product_tree": {"easy_import": ""},
|
|
1097
|
+
"publisher": {
|
|
1098
|
+
"category": "vendor",
|
|
1099
|
+
"contact_details": "vendor@mcvendorson.com",
|
|
1100
|
+
"name": "Vendor McVendorson",
|
|
1101
|
+
"namespace": "https://appthreat.com",
|
|
1102
|
+
},
|
|
1103
|
+
"tracking": {
|
|
1104
|
+
"current_release_date": "",
|
|
1105
|
+
"id": "",
|
|
1106
|
+
"initial_release_date": "",
|
|
1107
|
+
"status": "draft",
|
|
1108
|
+
"version": "",
|
|
1109
|
+
"revision": [{"date": "", "number": "", "summary": ""}],
|
|
1110
|
+
},
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
ref_map = {
|
|
1114
|
+
r"cve-[0-9]{4,}-[0-9]{4,}$": "CVE Record",
|
|
1115
|
+
r"(?<=bugzilla.)\S+(?=.\w{3}/show_bug.cgi\?id=)": "Bugzilla",
|
|
1116
|
+
r"https://github.com/([\w\d\-.]+/[\w\d\-.]+/security/)?advisories":
|
|
1117
|
+
"GitHub Advisory",
|
|
1118
|
+
r"https://github.com/[\w\d\-.]+/[\w\d\-.]+/pull/\d+": "GitHub Pull Request",
|
|
1119
|
+
r"https://github.com/[\w\d\-.]+/[\w\d\-.]+/commit": "GitHub Commit",
|
|
1120
|
+
r"https://github.com/[\w\d\-.]+/[\w\d\-.]+/release": "GitHub Repository "
|
|
1121
|
+
"Release",
|
|
1122
|
+
r"https://github.com/[\w\d\-.]+/[\w\d\-.]+/issues/?": "GitHub Issue",
|
|
1123
|
+
r"https://github.com/[\w\d\-.]+/[\w\d\-.]+/blob": "GitHub Blob Reference",
|
|
1124
|
+
r"https://github.com/[\w\d\-.]+/[\w\d\-.]+/?$": "GitHub Repository",
|
|
1125
|
+
"https://gist.github.com": "GitHub Gist",
|
|
1126
|
+
r"https://github.com/": "GitHub Other",
|
|
1127
|
+
r"https://access.redhat.com/errata/rhba-\d{4}:\d{4}": "Red Hat Bug Fix "
|
|
1128
|
+
"Advisory",
|
|
1129
|
+
r"https://access.redhat.com/errata/rhsa-\d{4}:\d{4}": "Red Hat Security "
|
|
1130
|
+
"Advisory",
|
|
1131
|
+
"https://www.npmjs.com/advisories/": "NPM Advisory",
|
|
1132
|
+
r"https://www.npmjs.com/package/@?\w+/?\w+": "NPM Package Page",
|
|
1133
|
+
"https://www.oracle.com/security-alerts": "Oracle Security Alert",
|
|
1134
|
+
"https://security.netapp.com/advisory": "NetApp Security Advisory",
|
|
1135
|
+
"https://security.snyk.io/vuln": "Snyk Vulnerability Database Entry",
|
|
1136
|
+
"https://snyk.io/vuln/": "Snyk Vulnerability Database Entry",
|
|
1137
|
+
"https://www.debian.org/security": "Debian Security Advisory",
|
|
1138
|
+
"https://security.gentoo.org/glsa": "Gentoo Security Advisory",
|
|
1139
|
+
".+advisory.?": "Advisory",
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
sorted_ref_map = sorted(ref_map.items(), key=lambda x: len(x[0]), reverse=True)
|
|
1143
|
+
sorted_ref_map = dict(sorted_ref_map)
|
|
1144
|
+
|
|
1145
|
+
compiled_patterns = {
|
|
1146
|
+
re.compile(pattern): value for pattern, value in sorted_ref_map.items()
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
class CsafOccurence:
|
|
1151
|
+
def __init__(self, res):
|
|
1152
|
+
self.cve = res["id"]
|
|
1153
|
+
[self.cwe, self.notes] = parse_cwe(res["problem_type"])
|
|
1154
|
+
self.score = res["cvss_score"]
|
|
1155
|
+
self.cvss_v3 = parse_cvss(res)
|
|
1156
|
+
self.package_issue = res["package_issue"]
|
|
1157
|
+
[self.pkg, self.product_status] = get_product_status(
|
|
1158
|
+
res["package_issue"], res["matched_by"]
|
|
1159
|
+
)
|
|
1160
|
+
self.description = (
|
|
1161
|
+
res["short_description"]
|
|
1162
|
+
.replace("\\n", " ")
|
|
1163
|
+
.replace("\\t", " ")
|
|
1164
|
+
.replace("\n", " ")
|
|
1165
|
+
.replace("\t", " ")
|
|
1166
|
+
)
|
|
1167
|
+
self.references = res["related_urls"]
|
|
1168
|
+
self.type = (res["type"],)
|
|
1169
|
+
self.severity = res["severity"]
|
|
1170
|
+
self.orig_date = res["source_orig_time"] or None
|
|
1171
|
+
self.update_date = res["source_update_time"] or None
|
|
1172
|
+
|
|
1173
|
+
def to_dict(self):
|
|
1174
|
+
vuln = {}
|
|
1175
|
+
if self.cve.startswith("CVE"):
|
|
1176
|
+
vuln["cve"] = self.cve
|
|
1177
|
+
vuln["cwe"] = self.cwe
|
|
1178
|
+
vuln["discovery_date"] = str(self.orig_date) or str(self.update_date)
|
|
1179
|
+
vuln["product_status"] = self.product_status
|
|
1180
|
+
[ids, vuln["references"]] = format_references(self.references)
|
|
1181
|
+
vuln["ids"] = ids
|
|
1182
|
+
vuln["scores"] = [{"cvss_v3": self.cvss_v3, "products": [self.pkg]}]
|
|
1183
|
+
self.notes.append(
|
|
1184
|
+
{
|
|
1185
|
+
"category": "general",
|
|
1186
|
+
"text": self.description,
|
|
1187
|
+
"details": "Vulnerability Description",
|
|
1188
|
+
}
|
|
1189
|
+
)
|
|
1190
|
+
vuln["notes"] = self.notes
|
|
1191
|
+
return vuln
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
def get_product_status(issue, matched_by):
|
|
1195
|
+
"""
|
|
1196
|
+
Generates the product status based on the given response and package.
|
|
1197
|
+
|
|
1198
|
+
Args:
|
|
1199
|
+
issue (dict): The response dictionary of information about the product.
|
|
1200
|
+
matched_by (str): The location data
|
|
1201
|
+
|
|
1202
|
+
Returns: dict: A dictionary containing the product status. The keys
|
|
1203
|
+
represent different statuses, while the values represent the corresponding
|
|
1204
|
+
locations. If the product has a fixed location, the key "fixed" will be
|
|
1205
|
+
present with the fixed location as its value. If the product has an affected
|
|
1206
|
+
location, the key "known_affected" will be present with the affected
|
|
1207
|
+
location as its value.
|
|
1208
|
+
|
|
1209
|
+
"""
|
|
1210
|
+
product_status = {}
|
|
1211
|
+
pkg = matched_by.split("|")
|
|
1212
|
+
if len(pkg) == 3:
|
|
1213
|
+
pkg = matched_by.split("|")[1]
|
|
1214
|
+
elif len(pkg) == 4:
|
|
1215
|
+
pkg = matched_by.split("|")[2]
|
|
1216
|
+
if issue.get("fixed_location"):
|
|
1217
|
+
product_status["fixed"] = [f"{pkg}:{issue.get('fixed_location')}"]
|
|
1218
|
+
if issue.get("affected_location"):
|
|
1219
|
+
try:
|
|
1220
|
+
loc_dict = issue.get("affected_location")
|
|
1221
|
+
product_status["known_affected"] = [
|
|
1222
|
+
f'{loc_dict.get("package")}:{loc_dict.get("version")}'
|
|
1223
|
+
]
|
|
1224
|
+
except json.JSONDecodeError:
|
|
1225
|
+
logging.warning("Invalid JSON string for affected_location")
|
|
1226
|
+
return pkg, product_status
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
def parse_cwe(cwe):
|
|
1230
|
+
fmt_cwe = None
|
|
1231
|
+
new_notes = []
|
|
1232
|
+
|
|
1233
|
+
if not cwe or cwe in ["UNKNOWN", [], "[]"]:
|
|
1234
|
+
return fmt_cwe, new_notes
|
|
1235
|
+
|
|
1236
|
+
cwe_ids = re.findall(r"CWE-[1-9]\d{0,5}", cwe)
|
|
1237
|
+
for i in range(len(cwe_ids)):
|
|
1238
|
+
cwe_name = CWE_MAP.get(cwe_ids[i], "UNABLE TO LOCATE CWE NAME")
|
|
1239
|
+
if not cwe_name:
|
|
1240
|
+
LOG.warning(
|
|
1241
|
+
f"We couldn't locate the name of the CWE with the following "
|
|
1242
|
+
f"id: {cwe_ids[i]}. Help us out by reporting the id at "
|
|
1243
|
+
f"https://github.com/owasp-dep-scan/dep-scan/issues."
|
|
1244
|
+
)
|
|
1245
|
+
if i == 0:
|
|
1246
|
+
fmt_cwe = {
|
|
1247
|
+
"id": cwe_ids[i],
|
|
1248
|
+
"name": cwe_name,
|
|
1249
|
+
}
|
|
1250
|
+
# CSAF 2.0 only allows a single CWE per vulnerability, so we add
|
|
1251
|
+
# any additional CWEs to a note entry.
|
|
1252
|
+
else:
|
|
1253
|
+
new_notes.append(
|
|
1254
|
+
{
|
|
1255
|
+
"title": f"Additional CWE: {cwe_ids[i]}",
|
|
1256
|
+
"audience": "developers",
|
|
1257
|
+
"category": "other",
|
|
1258
|
+
"text": cwe_name,
|
|
1259
|
+
}
|
|
1260
|
+
)
|
|
1261
|
+
|
|
1262
|
+
return fmt_cwe, new_notes
|
|
1263
|
+
|
|
1264
|
+
|
|
1265
|
+
def parse_cvss(res):
|
|
1266
|
+
"""
|
|
1267
|
+
Parses the CVSS information from the given response.
|
|
1268
|
+
|
|
1269
|
+
Parameters:
|
|
1270
|
+
res (dict): The response containing the CVSS information.
|
|
1271
|
+
|
|
1272
|
+
Returns:
|
|
1273
|
+
dict or None: The parsed CVSS information as a dictionary, or None if
|
|
1274
|
+
the CVSS vector string is empty as it is required for cvss v3.
|
|
1275
|
+
The dictionary contains the following keys:
|
|
1276
|
+
- baseScore (float): The base score of the CVSS.
|
|
1277
|
+
- attackVector (str): The attack vector of the CVSS.
|
|
1278
|
+
- privilegesRequired (str): Privileges required for the CVSS.
|
|
1279
|
+
- userInteraction (str): User interaction required for the CVSS.
|
|
1280
|
+
- scope (str): The scope of the CVSS.
|
|
1281
|
+
- impactScore (str): The impact score of the CVSS.
|
|
1282
|
+
- baseSeverity (str): The base severity of the CVSS.
|
|
1283
|
+
- version (str): The version of the CVSS.
|
|
1284
|
+
- vectorString (str): The vector string of the CVSS.
|
|
1285
|
+
If the vector string or base score are missing, or the CVSS
|
|
1286
|
+
version is not 3.0 or 3.1, None is returned.
|
|
1287
|
+
"""
|
|
1288
|
+
cvss_v3 = res.get("cvss_v3")
|
|
1289
|
+
version = re.findall(r"3.0|3.1", cvss_v3["vector_string"])
|
|
1290
|
+
# baseScore, vectorString, and version are required for a valid score
|
|
1291
|
+
if (
|
|
1292
|
+
not cvss_v3
|
|
1293
|
+
or not cvss_v3.get("vector_string")
|
|
1294
|
+
or not version
|
|
1295
|
+
or not cvss_v3.get("base_score")
|
|
1296
|
+
):
|
|
1297
|
+
return None
|
|
1298
|
+
version = version[0]
|
|
1299
|
+
return {
|
|
1300
|
+
"baseScore": cvss_v3["base_score"],
|
|
1301
|
+
"attackVector": cvss_v3["attack_vector"],
|
|
1302
|
+
"privilegesRequired": cvss_v3["privileges_required"],
|
|
1303
|
+
"userInteraction": cvss_v3["user_interaction"],
|
|
1304
|
+
"scope": cvss_v3["scope"],
|
|
1305
|
+
"baseSeverity": res["severity"],
|
|
1306
|
+
"version": version,
|
|
1307
|
+
"vectorString": cvss_v3["vector_string"],
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
def format_references(ref):
|
|
1312
|
+
"""
|
|
1313
|
+
Formats the given references.
|
|
1314
|
+
|
|
1315
|
+
Args:
|
|
1316
|
+
ref (list): A list of references.
|
|
1317
|
+
|
|
1318
|
+
Returns:
|
|
1319
|
+
list: A list of dictionaries with the formatted references.
|
|
1320
|
+
"""
|
|
1321
|
+
fmt_refs = [{"summary": get_ref_summary(r), "url": r} for r in ref]
|
|
1322
|
+
ids = []
|
|
1323
|
+
github_advisory_regex = re.compile(r"GHSA-\w{4}-\w{4}-\w{4}$")
|
|
1324
|
+
github_issue_regex = re.compile(r"(?<=issues/)\d+")
|
|
1325
|
+
bugzilla_regex = re.compile(
|
|
1326
|
+
r"(?<=bugzilla.)\S+(?=.\w{3}/show_bug.cgi\?id=)"
|
|
1327
|
+
)
|
|
1328
|
+
bugzilla_id_regex = re.compile(r"(?<=show_bug.cgi\?id=)\d+")
|
|
1329
|
+
redhat_advisory_regex = re.compile(r"RH[BS]A-\d{4}:\d+")
|
|
1330
|
+
refs = []
|
|
1331
|
+
for reference in fmt_refs:
|
|
1332
|
+
r = reference["url"]
|
|
1333
|
+
summary = reference["summary"]
|
|
1334
|
+
if summary == "GitHub Advisory":
|
|
1335
|
+
ids.append(
|
|
1336
|
+
{
|
|
1337
|
+
"system_name": summary,
|
|
1338
|
+
"text": github_advisory_regex.findall(r)[0],
|
|
1339
|
+
}
|
|
1340
|
+
)
|
|
1341
|
+
elif summary == "GitHub Issue":
|
|
1342
|
+
ids.append(
|
|
1343
|
+
{
|
|
1344
|
+
"system_name": summary,
|
|
1345
|
+
"text": github_issue_regex.findall(r)[0],
|
|
1346
|
+
}
|
|
1347
|
+
)
|
|
1348
|
+
elif summary == "Bugzilla":
|
|
1349
|
+
new_id = {
|
|
1350
|
+
"system_name": f"{bugzilla_regex.findall(r)[0].capitalize()}"
|
|
1351
|
+
f" Bugzilla ID",
|
|
1352
|
+
"text": bugzilla_id_regex.findall(r)[0],
|
|
1353
|
+
}
|
|
1354
|
+
if new_id["system_name"] == "Redhat Bugzilla ID":
|
|
1355
|
+
new_id["system_name"] = "Red Hat Bugzilla ID"
|
|
1356
|
+
ids.append(new_id)
|
|
1357
|
+
elif summary in [
|
|
1358
|
+
"Red Hat Security Advisory",
|
|
1359
|
+
"Red Hat Bug Fix Advisory",
|
|
1360
|
+
]:
|
|
1361
|
+
ids.append(
|
|
1362
|
+
{
|
|
1363
|
+
"system_name": summary,
|
|
1364
|
+
"text": redhat_advisory_regex.findall(r)[0],
|
|
1365
|
+
}
|
|
1366
|
+
)
|
|
1367
|
+
refs.append(reference)
|
|
1368
|
+
return ids, refs
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
def get_ref_summary(url):
|
|
1372
|
+
"""
|
|
1373
|
+
Returns the summary string associated with a given URL.
|
|
1374
|
+
|
|
1375
|
+
Parameters:
|
|
1376
|
+
url (str): The URL to match against the patterns in the REF_MAP.
|
|
1377
|
+
|
|
1378
|
+
Returns:
|
|
1379
|
+
str: The summary string corresponding to the matched pattern in REF_MAP.
|
|
1380
|
+
If no match is found, an exception is raised.
|
|
1381
|
+
"""
|
|
1382
|
+
if type(url) is not str:
|
|
1383
|
+
raise TypeError("url must be a string")
|
|
1384
|
+
|
|
1385
|
+
return next(
|
|
1386
|
+
(
|
|
1387
|
+
value
|
|
1388
|
+
for pattern, value in compiled_patterns.items()
|
|
1389
|
+
if pattern.search(url.lower())
|
|
1390
|
+
),
|
|
1391
|
+
"Other",
|
|
1392
|
+
)
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
def parse_revision_history(tracking):
|
|
1396
|
+
"""
|
|
1397
|
+
Parses the revision history of a tracking object.
|
|
1398
|
+
|
|
1399
|
+
Args:
|
|
1400
|
+
tracking (dict): The tracking object containing the revision history.
|
|
1401
|
+
|
|
1402
|
+
Returns:
|
|
1403
|
+
dict: The updated tracking object with the parsed revision history.
|
|
1404
|
+
"""
|
|
1405
|
+
hx = deepcopy(tracking.get("revision", []))
|
|
1406
|
+
if len(hx) > 0:
|
|
1407
|
+
hx = cleanup_list(hx)
|
|
1408
|
+
status = tracking.get("status")
|
|
1409
|
+
if not status or len(status) == 0:
|
|
1410
|
+
status = "draft"
|
|
1411
|
+
dt = datetime.now().strftime(TIME_FMT)
|
|
1412
|
+
tracking = cleanup_dict(tracking)
|
|
1413
|
+
# Format dates
|
|
1414
|
+
try:
|
|
1415
|
+
|
|
1416
|
+
tracking["initial_release_date"] = (
|
|
1417
|
+
convert_time(tracking.get("initial_release_date", tracking.get(
|
|
1418
|
+
"current_release_date", dt)))
|
|
1419
|
+
).strftime(TIME_FMT)
|
|
1420
|
+
tracking["current_release_date"] = (
|
|
1421
|
+
convert_time(tracking.get("current_release_date", tracking.get(
|
|
1422
|
+
"initial_release_date")))
|
|
1423
|
+
).strftime(TIME_FMT)
|
|
1424
|
+
except AttributeError:
|
|
1425
|
+
LOG.warning("Your dates don't appear to be in ISO format.")
|
|
1426
|
+
if status == "final" and len(hx) == 0:
|
|
1427
|
+
hx.append(
|
|
1428
|
+
{
|
|
1429
|
+
"date": tracking["initial_release_date"],
|
|
1430
|
+
"number": "1",
|
|
1431
|
+
"summary": "Initial",
|
|
1432
|
+
}
|
|
1433
|
+
)
|
|
1434
|
+
elif status == "final" and len(hx) > 0:
|
|
1435
|
+
hx = sorted(hx, key=lambda x: x["number"])
|
|
1436
|
+
tracking["initial_release_date"] = hx[0]["date"]
|
|
1437
|
+
if tracking["current_release_date"] == hx[-1]["date"]:
|
|
1438
|
+
tracking["current_release_date"] = dt
|
|
1439
|
+
hx.append(
|
|
1440
|
+
{
|
|
1441
|
+
"date": tracking["current_release_date"],
|
|
1442
|
+
"number": str(len(hx) + 1),
|
|
1443
|
+
"summary": "Update",
|
|
1444
|
+
}
|
|
1445
|
+
)
|
|
1446
|
+
if len(hx) > 0:
|
|
1447
|
+
tracking["version"] = str(
|
|
1448
|
+
max(int(tracking.get("version", 0)), int(hx[-1]["number"]))
|
|
1449
|
+
)
|
|
1450
|
+
else:
|
|
1451
|
+
tracking["version"] = "1"
|
|
1452
|
+
if not tracking.get("id") or len(tracking.get("id")) == 0:
|
|
1453
|
+
LOG.info("No tracking id, generating one.")
|
|
1454
|
+
tracking["id"] = f"{dt}_v{tracking['version']}"
|
|
1455
|
+
if (tracking["initial_release_date"]) > (tracking["current_release_date"]):
|
|
1456
|
+
LOG.warning(
|
|
1457
|
+
"Your initial release date is later than the current release date."
|
|
1458
|
+
)
|
|
1459
|
+
tracking["revision"] = hx
|
|
1460
|
+
tracking["status"] = status
|
|
1461
|
+
return tracking
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
def import_product_tree(tree):
|
|
1465
|
+
"""
|
|
1466
|
+
Set the product tree by loading it from a file.
|
|
1467
|
+
|
|
1468
|
+
Parameters:
|
|
1469
|
+
tree (dict): The dictionary representing the tree.
|
|
1470
|
+
|
|
1471
|
+
Returns:
|
|
1472
|
+
dict: The product tree loaded from the file, or None if file is empty.
|
|
1473
|
+
"""
|
|
1474
|
+
product_tree = None
|
|
1475
|
+
if len(tree["easy_import"]) > 0:
|
|
1476
|
+
try:
|
|
1477
|
+
with open(tree["easy_import"], "r") as f:
|
|
1478
|
+
product_tree = json.load(f)
|
|
1479
|
+
except JSONDecodeError:
|
|
1480
|
+
LOG.warning(
|
|
1481
|
+
"Unable to load product tree file. Please verify that your "
|
|
1482
|
+
"product tree is a valid json file. Visit "
|
|
1483
|
+
"https://github.com/owasp-dep-scan/dep-scan/blob/master/test"
|
|
1484
|
+
"/data/product_tree.json for an example."
|
|
1485
|
+
)
|
|
1486
|
+
except FileNotFoundError:
|
|
1487
|
+
LOG.warning(
|
|
1488
|
+
"Cannot locate product tree at %s. Please verify you "
|
|
1489
|
+
"have entered the correct filepath in your csaf.toml.",
|
|
1490
|
+
tree["easy_import"],
|
|
1491
|
+
)
|
|
1492
|
+
return product_tree
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
def parse_toml(metadata):
|
|
1496
|
+
"""
|
|
1497
|
+
Parses the given metadata in TOML format and generates an output dictionary.
|
|
1498
|
+
|
|
1499
|
+
Args:
|
|
1500
|
+
metadata (dict): A dictionary containing the metadata in TOML format.
|
|
1501
|
+
|
|
1502
|
+
Returns:
|
|
1503
|
+
dict: The generated output dictionary.
|
|
1504
|
+
|
|
1505
|
+
Raises:
|
|
1506
|
+
Exception: If the 'product_tree' entry is missing in the TOML file.
|
|
1507
|
+
Exception: If the 'initial_release_date' is later than the
|
|
1508
|
+
'current_release_date'.
|
|
1509
|
+
"""
|
|
1510
|
+
tracking = parse_revision_history(metadata.get("tracking"))
|
|
1511
|
+
refs = []
|
|
1512
|
+
[refs.append(v) for v in metadata.get("reference")]
|
|
1513
|
+
notes = []
|
|
1514
|
+
[notes.append(v) for v in metadata.get("note")]
|
|
1515
|
+
product_tree = import_product_tree(metadata["product_tree"])
|
|
1516
|
+
return {
|
|
1517
|
+
"document": {
|
|
1518
|
+
"aggregate_severity": {},
|
|
1519
|
+
"category": metadata["document"]["category"],
|
|
1520
|
+
"title": metadata["document"]["title"] or "Test",
|
|
1521
|
+
"csaf_version": "2.0",
|
|
1522
|
+
"distribution": metadata.get("distribution"),
|
|
1523
|
+
"lang": "en",
|
|
1524
|
+
"notes": notes,
|
|
1525
|
+
"publisher": {
|
|
1526
|
+
"category": metadata["publisher"]["category"],
|
|
1527
|
+
"contact_details": metadata["publisher"].get("contact_details"),
|
|
1528
|
+
"name": metadata["publisher"]["name"],
|
|
1529
|
+
"namespace": metadata["publisher"]["namespace"],
|
|
1530
|
+
},
|
|
1531
|
+
"references": refs,
|
|
1532
|
+
"tracking": tracking,
|
|
1533
|
+
},
|
|
1534
|
+
"product_tree": product_tree,
|
|
1535
|
+
"vulnerabilities": [],
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
def export_csaf(results, src_dir, reports_dir):
|
|
1540
|
+
"""
|
|
1541
|
+
Generates a CSAF JSON template from the given results.
|
|
1542
|
+
|
|
1543
|
+
Parameters:
|
|
1544
|
+
results (list): A list of results obtained from the analysis.
|
|
1545
|
+
src_dir (str): The source directory.
|
|
1546
|
+
reports_dir (str): The reports directory.
|
|
1547
|
+
|
|
1548
|
+
Returns:
|
|
1549
|
+
None
|
|
1550
|
+
"""
|
|
1551
|
+
toml_file_path = os.path.join(src_dir, "csaf.toml")
|
|
1552
|
+
metadata = import_csaf_toml(toml_file_path)
|
|
1553
|
+
template = parse_toml(metadata)
|
|
1554
|
+
agg_score = set()
|
|
1555
|
+
severity_ref = {
|
|
1556
|
+
"CRITICAL": 1,
|
|
1557
|
+
"HIGH": 2,
|
|
1558
|
+
"MEDIUM": 3,
|
|
1559
|
+
"LOW": 4,
|
|
1560
|
+
}
|
|
1561
|
+
for r in results:
|
|
1562
|
+
c = CsafOccurence(r)
|
|
1563
|
+
new_vuln = c.to_dict()
|
|
1564
|
+
template["vulnerabilities"].append(new_vuln)
|
|
1565
|
+
agg_score.add(severity_ref.get(c.severity))
|
|
1566
|
+
if agg_score := list(agg_score):
|
|
1567
|
+
agg_score.sort()
|
|
1568
|
+
severity_ref = {v: k for k, v in severity_ref.items()}
|
|
1569
|
+
agg_severity = (
|
|
1570
|
+
severity_ref[agg_score[0]][0]
|
|
1571
|
+
+ severity_ref[agg_score[0]][1:].lower()
|
|
1572
|
+
)
|
|
1573
|
+
template["document"]["aggregate_severity"]["text"] = agg_severity
|
|
1574
|
+
new_results = cleanup_dict(template)
|
|
1575
|
+
metadata["tracking"] = deepcopy(new_results["document"]["tracking"])
|
|
1576
|
+
# Reset the id if it's one we've generated
|
|
1577
|
+
if re.match(
|
|
1578
|
+
r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}_v", metadata["tracking"]["id"]
|
|
1579
|
+
):
|
|
1580
|
+
metadata["tracking"]["id"] = ""
|
|
1581
|
+
outfile = os.path.join(
|
|
1582
|
+
reports_dir,
|
|
1583
|
+
f"csaf_v{new_results['document']['tracking']['version']}.json",
|
|
1584
|
+
)
|
|
1585
|
+
json.dump(new_results, open(outfile, "w"), indent=4)
|
|
1586
|
+
LOG.info("CSAF report written to %s", outfile)
|
|
1587
|
+
write_toml(toml_file_path, metadata)
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
def import_csaf_toml(toml_file_path):
|
|
1591
|
+
"""
|
|
1592
|
+
Reads the contents of the "csaf.toml" file, parses it as TOML, and converts
|
|
1593
|
+
it to JSON format.
|
|
1594
|
+
|
|
1595
|
+
Returns:
|
|
1596
|
+
dict: A dictionary containing the parsed contents of the csaf.toml
|
|
1597
|
+
|
|
1598
|
+
Raises:
|
|
1599
|
+
TOMLDecodeError: If the TOML file contains duplicate keys or is invalid.
|
|
1600
|
+
"""
|
|
1601
|
+
try:
|
|
1602
|
+
with open(toml_file_path, "r") as f:
|
|
1603
|
+
try:
|
|
1604
|
+
return toml.load(f)
|
|
1605
|
+
except toml.TomlDecodeError:
|
|
1606
|
+
LOG.error(
|
|
1607
|
+
"Invalid TOML. Please make sure you do not have any "
|
|
1608
|
+
"duplicate keys and that any filepaths are properly escaped"
|
|
1609
|
+
"if using Windows."
|
|
1610
|
+
)
|
|
1611
|
+
exit(1)
|
|
1612
|
+
except FileNotFoundError:
|
|
1613
|
+
write_toml(toml_file_path)
|
|
1614
|
+
return import_csaf_toml(toml_file_path)
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
def write_toml(toml_file_path, metadata=None):
|
|
1618
|
+
"""
|
|
1619
|
+
Retrieves the TOML template file from the given URL and saves it to the
|
|
1620
|
+
specified file name.
|
|
1621
|
+
|
|
1622
|
+
Parameters:
|
|
1623
|
+
toml_file_path (str): The filepath to save the TOML template to.
|
|
1624
|
+
|
|
1625
|
+
metadata (dict): A dictionary containing the TOML metadata.
|
|
1626
|
+
|
|
1627
|
+
"""
|
|
1628
|
+
if not metadata:
|
|
1629
|
+
metadata = TOML_TEMPLATE
|
|
1630
|
+
metadata["depscan_version"] = get_version()
|
|
1631
|
+
with open(toml_file_path, "w") as f:
|
|
1632
|
+
toml.dump(metadata, f)
|
|
1633
|
+
LOG.info("The csaf.toml has been updated at %s", toml_file_path)
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
def cleanup_list(d):
|
|
1637
|
+
"""
|
|
1638
|
+
Removes empty entries from the input list
|
|
1639
|
+
|
|
1640
|
+
Parameters:
|
|
1641
|
+
- d (list): The input list to be cleaned up.
|
|
1642
|
+
|
|
1643
|
+
Returns:
|
|
1644
|
+
- new_lst (list): The cleaned up list, containing only valid entries from
|
|
1645
|
+
the input list.
|
|
1646
|
+
"""
|
|
1647
|
+
new_lst = []
|
|
1648
|
+
for i in range(len(d)):
|
|
1649
|
+
if isinstance(d[i], dict):
|
|
1650
|
+
if entry := cleanup_dict(d[i]):
|
|
1651
|
+
new_lst.append(entry)
|
|
1652
|
+
elif isinstance(d[i], str):
|
|
1653
|
+
new_lst.append(d[i])
|
|
1654
|
+
return new_lst
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
def cleanup_dict(d):
|
|
1658
|
+
"""
|
|
1659
|
+
Cleans up a dictionary by removing empty or None values recursively.
|
|
1660
|
+
|
|
1661
|
+
Parameters:
|
|
1662
|
+
- d (dict): The dictionary to be cleaned up.
|
|
1663
|
+
|
|
1664
|
+
Returns:
|
|
1665
|
+
- dict or None: The cleaned up dictionary. If the resulting dictionary is
|
|
1666
|
+
empty, returns None.
|
|
1667
|
+
"""
|
|
1668
|
+
new_dict = {}
|
|
1669
|
+
for key, value in d.items():
|
|
1670
|
+
entry = None
|
|
1671
|
+
if value and str(value) != "":
|
|
1672
|
+
if isinstance(value, list):
|
|
1673
|
+
entry = cleanup_list(value)
|
|
1674
|
+
elif isinstance(value, dict):
|
|
1675
|
+
entry = cleanup_dict(value)
|
|
1676
|
+
else:
|
|
1677
|
+
entry = value
|
|
1678
|
+
if entry:
|
|
1679
|
+
new_dict[key] = entry
|
|
1680
|
+
return new_dict
|