Clang Project

clang_source_code/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-diagnostics-taint-test.c.sarif
1{
2  "$schema": "http://json.schemastore.org/sarif-2.0.0-csd.2.beta.2018-11-28",
3  "runs": [
4    {
5      "files": [
6        {
7          "fileLocation": {
8            "uri": "file:sarif-diagnostics-taint-test.c"
9          },
10          "length": 415,
11          "mimeType": "text/plain",
12          "roles": [
13            "resultFile"
14          ]
15        }
16      ],
17      "resources": {
18        "rules": [
19          {
20            "fullDescription": {
21              "text": "Mark tainted symbols as such."
22            },
23            "id": "debug.TaintTest",
24            "name": {
25              "text": "debug.TaintTest"
26            }
27          }
28        ]
29      },      
30      "results": [
31        {
32          "codeFlows": [
33            {
34              "threadFlows": [
35                {
36                  "locations": [
37                    {
38                      "importance": "essential",
39                      "location": {
40                        "message": {
41                          "text": "Calling 'f'"
42                        },
43                        "physicalLocation": {
44                          "fileLocation": {
45                            "fileIndex": 0,
46                            "uri": "file:sarif-diagnostics-taint-test.c"
47                          },
48                          "region": {
49                            "endColumn": 5,
50                            "endLine": 13,
51                            "startColumn": 3,
52                            "startLine": 13
53                          }
54                        }
55                      }
56                    },
57                    {
58                      "importance": "essential",
59                      "location": {
60                        "message": {
61                          "text": "tainted"
62                        },
63                        "physicalLocation": {
64                          "fileLocation": {
65                            "fileIndex": 0,
66                            "uri": "file:sarif-diagnostics-taint-test.c"
67                          },
68                          "region": {
69                            "endColumn": 17,
70                            "endLine": 9,
71                            "startColumn": 11,
72                            "startLine": 9
73                          }
74                        }
75                      }
76                    }
77                  ]
78                }
79              ]
80            }
81          ],
82          "locations": [
83            {
84              "physicalLocation": {
85                "fileLocation": {
86                  "fileIndex": 0,
87                  "uri": "file:sarif-diagnostics-taint-test.c"
88                },
89                "region": {
90                  "endColumn": 17,
91                  "endLine": 9,
92                  "startColumn": 11,
93                  "startLine": 9
94                }
95              }
96            }
97          ],
98          "message": {
99            "text": "tainted"
100          },
101          "ruleId": "debug.TaintTest",
102          "ruleIndex": 0
103        }
104      ],
105      "tool": {
106        "fullName": "clang static analyzer",
107        "language": "en-US",
108        "name": "clang",
109        "version": "clang version 8.0.0"
110      }
111    }
112  ],
113  "version": "2.0.0-csd.2.beta.2018-11-28"
114}
115