-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.sarif.json
172 lines (172 loc) · 5.64 KB
/
example.sarif.json
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
{
"version": "2.1.0",
"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json",
"runs": [
{
"automationDetails": {
"description": {
"text": "This is the October 10, 2018 nightly run of the CodeScanner tool on all product binaries in the 'master' branch of the 'sarif-sdk' repo"
},
"id": "Nightly CredScan run for sarif-sdk/master/2018-10-05",
"guid": "d541006e-582d-4600-a603-64925b7f7f35",
"correlationGuid": "53819b2e-a790-4f8b-b68f-a145c13b4f39"
},
"taxonomies": [
{
"guid": "1A567403-868F-405E-92CF-771A9ECB03A1",
"name": "Requirement levels",
"shortDescription": {
"text": "This taxonomy classifies rules according to whether their use is required or recommended by company policy."
},
"taxa": [
{
"id": "RQL1001",
"name": "Required",
"shortDescription": {
"text": "Rules in this category are required by company policy. All violations must be fixed unless an exemption is granted."
}
}
]
}
],
"tool": {
"driver": {
"name": "ESLint",
"semanticVersion": "5.0.0",
"informationUri": "https://eslint.org",
"rules": [
{
"id": "TUT1001",
"name": "InvalidUri",
"defaultConfiguration": {
"level": "error"
},
"shortDescription": {
"text": "Properties defined with the 'uri' or 'uri-reference' format must contain valid URIs.",
"markdown": "Properties defined with the `uri` or `uri-reference` format must contain valid URIs."
},
"fullDescription": {
"text": "Every JSON property whose value is defined by the schema to be a URI (with \"format\": \"uri\" or \"format\": \"uri-reference\") must contain a valid URI.",
"markdown": "Every JSON property whose value is defined by the schema to be a URI (with `\"format\": \"uri\"` or `\"format\": \"uri-reference\"`) must contain a valid URI."
},
"messageStrings": {
"default": {
"text": "The URI '{0}' is invalid.",
"markdown": "The URI `{0}` is invalid."
}
},
"relationships": [
{
"target": {
"id": "RQL1001",
"index": 0,
"toolComponent": {
"name": "Requirement levels",
"guid": "1A567403-868F-405E-92CF-771A9ECB03A1",
"index": 0
}
},
"kinds": [
"superset"
],
"description": {
"text": "This relationship specifies that this rule is classified as 'Required'."
}
}
]
}
]
}
},
"originalUriBaseIds": {
"REPOROOT": {
"description": {
"text": "The directory into which the repo was cloned."
},
"properties": {
"comment": "The SARIF producer has chosen not to specify a URI for REPOROOT. See §3.14.14, NOTE 1, for an explanation."
}
},
"SRCROOT": {
"uri": "src/",
"uriBaseId": "REPOROOT",
"description": {
"text": "The r."
},
"properties": {
"comment": "SRCROOT is expressed relative to REPOROOT."
}
}
},
"artifacts": [
{
"location": {
"uri": "sarif-tutorials/samples/Introduction/simple-example.js"
},
"length": 3444,
"sourceLanguage": "javascript",
"hashes": {
"sha-256": "b13ce2678a8807ba0765ab94a0ecd394f869bc81"
}
}
],
"results": [
{
"properties": {
"comment": "The ruleIndex property points into the array tool.driver.rules."
},
"ruleId": "TUT1001",
"level": "error",
"ruleIndex": 0,
"message": {
"id": "default",
"arguments": [
"//C:/code/dev"
]
},
"locations": [
{
"physicalLocation": {
"artifactLocation": {
"uri": "TextFile.txt",
"index": 0
},
"region": {
"charOffset": 1,
"charLength": 2
}
}
},
{
"physicalLocation": {
"artifactLocation": {
"uri": "README.md",
"uriBaseId": "REPOROOT",
"properties": {
"comment": "If REPOROOT is C:\\project, this file location resolves to C:\\project\\README.md"
}
},
"region": {
"startLine": 4,
"startColumn": 19,
"endColumn": 22,
"snippet": {
"text": "BAD"
}
},
"contextRegion": {
"startLine": 4,
"startColumn": 5,
"endColumn": 28,
"snippet": {
"text": "/// This is a BAD word."
}
}
}
}
]
}
]
}
]
}