summaryrefslogtreecommitdiffstats
path: root/test/Analysis/diagnostics/Inputs/expected-sarif/sarif-diagnostics-taint-test.c.sarif
blob: 70efae4574d606b6635e8c86837dd379c9fc2a15 (plain)
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
{
  "$schema": "http://json.schemastore.org/sarif-2.0.0-csd.2.beta.2018-11-28",
  "runs": [
    {
      "files": [
        {
          "fileLocation": {
            "uri": "file:sarif-diagnostics-taint-test.c"
          },
          "length": 415,
          "mimeType": "text/plain",
          "roles": [
            "resultFile"
          ]
        }
      ],
      "resources": {
        "rules": [
          {
            "fullDescription": {
              "text": "Mark tainted symbols as such."
            },
            "id": "debug.TaintTest",
            "name": {
              "text": "debug.TaintTest"
            }
          }
        ]
      },      
      "results": [
        {
          "codeFlows": [
            {
              "threadFlows": [
                {
                  "locations": [
                    {
                      "importance": "essential",
                      "location": {
                        "message": {
                          "text": "Calling 'f'"
                        },
                        "physicalLocation": {
                          "fileLocation": {
                            "fileIndex": 0,
                            "uri": "file:sarif-diagnostics-taint-test.c"
                          },
                          "region": {
                            "endColumn": 5,
                            "endLine": 13,
                            "startColumn": 3,
                            "startLine": 13
                          }
                        }
                      }
                    },
                    {
                      "importance": "essential",
                      "location": {
                        "message": {
                          "text": "tainted"
                        },
                        "physicalLocation": {
                          "fileLocation": {
                            "fileIndex": 0,
                            "uri": "file:sarif-diagnostics-taint-test.c"
                          },
                          "region": {
                            "endColumn": 17,
                            "endLine": 9,
                            "startColumn": 11,
                            "startLine": 9
                          }
                        }
                      }
                    }
                  ]
                }
              ]
            }
          ],
          "locations": [
            {
              "physicalLocation": {
                "fileLocation": {
                  "fileIndex": 0,
                  "uri": "file:sarif-diagnostics-taint-test.c"
                },
                "region": {
                  "endColumn": 17,
                  "endLine": 9,
                  "startColumn": 11,
                  "startLine": 9
                }
              }
            }
          ],
          "message": {
            "text": "tainted"
          },
          "ruleId": "debug.TaintTest",
          "ruleIndex": 0
        }
      ],
      "tool": {
        "fullName": "clang static analyzer",
        "language": "en-US",
        "name": "clang",
        "version": "clang version 8.0.0"
      }
    }
  ],
  "version": "2.0.0-csd.2.beta.2018-11-28"
}