-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathTypeRanges.json
More file actions
224 lines (224 loc) · 7.9 KB
/
TypeRanges.json
File metadata and controls
224 lines (224 loc) · 7.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
{
"AUTOSAR": {
"A0-4-4": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "partially automated",
"obligation": "required"
},
"queries": [
{
"description": "Range, domain or pole errors in math functions may return unexpected values, trigger floating-point exceptions or set unexpected error modes.",
"kind": "problem",
"name": "Range, domain and pole errors shall be checked when using math functions",
"precision": "high",
"severity": "error",
"short_name": "UncheckedRangeDomainPoleErrors",
"shared_implementation_short_name": "UncheckedRangeDomainPoleErrors",
"tags": [
"correctness"
]
}
],
"title": "Range, domain and pole errors shall be checked when using math functions."
},
"A18-0-2": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "A string-to-number conversion may fail if the input string is not a number or is out of range, which may lead to inconsistent program behavior if not caught.",
"kind": "problem",
"name": "The error state of a conversion from string to a numeric value shall be checked",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "StringNumberConversionMissingErrorCheck",
"short_name": "StringNumberConversionMissingErrorCheck",
"tags": [
"correctness"
]
},
{
"description": "Some functions for string-to-number conversions in the C Standard library have undefined behavior when a string cannot be converted to a number.",
"kind": "problem",
"name": "Use of unsafe C string to number conversion routine",
"precision": "very-high",
"severity": "warning",
"short_name": "UseOfUnsafeCStringToNumberConversion",
"tags": [
"correctness"
]
}
],
"title": "The error state of a conversion from string to a numeric value shall be checked."
},
"A21-8-1": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "Passing values which are not unsigned chars to character-handling functions can result in undefined behavior.",
"kind": "problem",
"name": "Arguments to character-handling functions shall be representable as an unsigned char",
"precision": "high",
"severity": "error",
"short_name": "SignedValPassedToChar",
"tags": [
"correctness"
]
}
],
"title": "Arguments to character-handling functions shall be representable as an unsigned char."
},
"A27-0-1": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "non-automated",
"obligation": "required"
},
"queries": [
{
"description": "Inputs from independent components is not validated.",
"kind": "problem",
"name": "Inputs from independent components shall be validated",
"precision": "high",
"severity": "error",
"short_name": "InputsFromIndependentComponentsNotValidated",
"shared_implementation_short_name": "NonConstantFormat",
"tags": [
"correctness",
"security"
],
"implementation_scope": {
"description": "The query is limited to the case of user input in format strings."
}
}
],
"title": "Inputs from independent components shall be validated."
},
"A7-2-1": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "An expression with enum underlying type shall only have values corresponding to the enumerators of the enumeration.",
"kind": "problem",
"name": "An expression with enum underlying type shall only have values corresponding to the enumerators of the enumeration",
"precision": "high",
"severity": "error",
"short_name": "NonEnumeratorEnumValue",
"tags": [
"correctness"
]
}
],
"title": "An expression with enum underlying type shall only have values corresponding to the enumerators of the enumeration."
},
"A7-2-5": {
"properties": {
"allocated-target": [
"design"
],
"enforcement": "non-automated",
"obligation": "advisory"
},
"queries": [
{
"description": "An enumeration should only be used to represent a set of related, named constants.",
"kind": "problem",
"name": "(Audit) Enumerations should be used to represent sets of related named constants",
"precision": "low",
"severity": "recommendation",
"short_name": "UseOfEnumForRelatedConstants",
"tags": [
"external/autosar/audit"
]
},
{
"description": "Enumeration types should be used instead of integer types (and constants) to select from a limited series of choices.",
"kind": "problem",
"name": "Enumerations should be used to represent sets of related named constants",
"precision": "high",
"severity": "recommendation",
"short_name": "IntegerUsedForEnum",
"tags": [
"maintainability",
"readability"
]
}
],
"title": "Enumerations should be used to represent sets of related named constants."
}
},
"CERT-C++": {
"ERR62-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "A string-to-number conversion may fail if the input string is not a number or is out of range, which may lead to inconsistent program behavior if not caught.",
"kind": "problem",
"name": "Detect errors when converting a string to a number",
"precision": "high",
"severity": "error",
"short_name": "DetectErrorsWhenConvertingAStringToANumber",
"shared_implementation_short_name": "StringNumberConversionMissingErrorCheck",
"tags": [
"correctness",
"external/cert/severity/medium",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/medium",
"external/cert/priority/p4",
"external/cert/level/l3"
]
}
],
"title": "Detect errors when converting a string to a number"
},
"INT50-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "Casting to an out-of-range enumeration value leads to unspecified or undefined behavior.",
"kind": "problem",
"name": "Do not cast to an out-of-range enumeration value",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "DoNotCastToAnOutOfRangeEnumerationValueShared",
"short_name": "DoNotCastToAnOutOfRangeEnumerationValue",
"tags": [
"correctness",
"external/cert/severity/medium",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/medium",
"external/cert/priority/p4",
"external/cert/level/l3"
]
}
],
"title": "Do not cast to an out-of-range enumeration value"
}
}
}