-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathNotifications.sarif
167 lines (167 loc) · 5.52 KB
/
Notifications.sarif
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
{
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"version": "2.1.0",
"properties": {
"comment": "This sample illustrates tool configuration and execution notifications."
},
"runs": [
{
"tool": {
"driver": {
"name": "SarifSamples",
"version": "1.0",
"rules": [
{
"id": "TUT1201",
"name": "MissingSemicolon",
"defaultConfiguration": {
"level": "error"
},
"messageStrings": {
"default": {
"text": "The statement does not end with a semicolon."
}
}
}
],
"notifications": [
{
"id": "TUTN9001",
"name": "unknown-rule",
"defaultConfiguration": {
"level": "warning"
},
"shortDescription": {
"text": "This notification is triggered when the user supplies a command line argument to enable or disable a rule that does not exist."
},
"messageStrings": {
"disabled": {
"text": "'{0}' cannot be disabled because this rule does not exist."
},
"enabled": {
"text": "'{0}' cannot be enabled because this rule does not exist."
}
}
},
{
"id": "TUTN9002",
"name": "rule-threw-exception",
"defaultConfiguration": {
"level": "error"
},
"shortDescription": {
"text": "This notification is triggered when an analysis rule throws an exception."
},
"fullDescription": {
"text": "This notification is triggered when an analysis rule throws an exception while analyzing a file. Depending on the command line options, the rule might either be disabled, or it might continue to run on subsequent files."
},
"messageStrings": {
"disable": {
"text": "'{0}' threw a '{1}' exception while analyzing file '{2}'. The rule has been disabled."
},
"continue": {
"text": "'{0}' threw a '{1}' exception while analyzing file '{2}'. The rule will continue to be run on subsequent files."
}
}
}
]
}
},
"results": [],
"invocations": [
{
"executionSuccessful": false,
"toolConfigurationNotifications": [
{
"descriptor": {
"id": "TUTN9001",
"index": 0
},
"message": {
"id": "disabled",
"arguments": [
"UNK1001"
]
}
}
],
"toolExecutionNotifications": [
{
"descriptor": {
"id": "TUTN9002",
"index": 1
},
"message": {
"id": "continue",
"arguments": [
"TUT1201",
"NullReferenceException",
"example.c"
]
},
"exception": {
"kind": "System.NullReferenceException",
"message": "Object reference not set to an instance of an object.",
"stack": {
"frames": [
{
"location": {
"physicalLocation": {
"artifactLocation": {
"uri": "rules/MissingSemicolon.cs"
},
"region": {
"startLine": 42
}
},
"logicalLocations": [
{
"fullyQualifiedName": "SarifSample.Rules.MissingSemicolon.Execute()"
}
]
}
},
{
"location": {
"physicalLocation": {
"artifactLocation": {
"uri": "EvaluationEngine.cs"
},
"region": {
"startLine": 104
}
},
"logicalLocations": [
{
"fullyQualifiedName": "SarifSample.EvaluationEngine.Run()"
}
]
}
},
{
"location": {
"physicalLocation": {
"artifactLocation": {
"uri": "Program.cs"
},
"region": {
"startLine": 25
}
},
"logicalLocations": [
{
"fullyQualifiedName": "SarifSample.Program.Main(string[])"
}
]
}
}
]
}
}
}
]
}
]
}
]
}