Skip to content

Commit 2036600

Browse files
committed
Add example SARIF report
1 parent 9f408f9 commit 2036600

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

example.sarif.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"version": "2.1.0",
3+
"$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.4",
4+
"runs": [
5+
{
6+
"tool": {
7+
"driver": {
8+
"name": "ESLint",
9+
"informationUri": "https://eslint.org",
10+
"rules": [
11+
{
12+
"id": "no-unused-vars",
13+
"shortDescription": {
14+
"text": "disallow unused variables"
15+
},
16+
"helpUri": "https://eslint.org/docs/rules/no-unused-vars",
17+
"properties": {
18+
"category": "Variables"
19+
}
20+
}
21+
]
22+
}
23+
},
24+
"artifacts": [
25+
{
26+
"location": {
27+
"uri": "file:///home/runner/work/code-scanning-playground/code-scanning-playground/index.js"
28+
}
29+
}
30+
],
31+
"results": [
32+
{
33+
"level": "error",
34+
"message": {
35+
"text": "'x' is assigned a value but never used."
36+
},
37+
"locations": [
38+
{
39+
"physicalLocation": {
40+
"artifactLocation": {
41+
"uri": "file:///home/runner/work/code-scanning-playground/code-scanning-playground/index.js",
42+
"index": 0
43+
},
44+
"region": {
45+
"startLine": 1,
46+
"startColumn": 5
47+
}
48+
}
49+
}
50+
],
51+
"ruleId": "no-unused-vars",
52+
"ruleIndex": 0
53+
}
54+
]
55+
}
56+
]
57+
}

0 commit comments

Comments
 (0)