| 1 | // This file was generated from JSON Schema using quicktype, do not modify it directly. |
| 2 | // To parse and unparse this JSON data, add this code to your project and do: |
| 3 | // |
| 4 | // sarif, err := UnmarshalSarif(bytes) |
| 5 | // bytes, err = sarif.Marshal() |
| 6 | |
| 7 | package sarif |
| 8 | |
| 9 | import "time" |
| 10 | |
| 11 | import "encoding/json" |
| 12 | |
| 13 | func UnmarshalSarif(data []byte) (Sarif, error) { |
| 14 | var r Sarif |
| 15 | err := json.Unmarshal(data, &r) |
| 16 | return r, err |
| 17 | } |
| 18 | |
| 19 | func (r *Sarif) Marshal() ([]byte, error) { |
| 20 | return json.Marshal(r) |
| 21 | } |
| 22 | |
| 23 | // Static Analysis Results Format (SARIF) Version 2.1.0 JSON Schema: a standard format for |
| 24 | // the output of static analysis tools. |
| 25 | type Sarif struct { |
| 26 | // The URI of the JSON schema corresponding to the version. |
| 27 | Schema *string `json:"$schema,omitempty"` |
| 28 | // References to external property files that share data between runs. |
| 29 | InlineExternalProperties []ExternalProperties `json:"inlineExternalProperties,omitempty"` |
| 30 | // Key/value pairs that provide additional information about the log file. |
| 31 | Properties *PropertyBag `json:"properties,omitempty"` |
| 32 | // The set of runs contained in this log file. |
| 33 | Runs []Run `json:"runs"` |
| 34 | // The SARIF format version of this log file. |
| 35 | Version Version `json:"version"` |
| 36 | } |
| 37 | |
| 38 | // The top-level element of an external property file. |
| 39 | type ExternalProperties struct { |
| 40 | // Addresses that will be merged with a separate run. |
| 41 | Addresses []Address `json:"addresses,omitempty"` |
| 42 | // An array of artifact objects that will be merged with a separate run. |
| 43 | Artifacts []Artifact `json:"artifacts,omitempty"` |
| 44 | // A conversion object that will be merged with a separate run. |
| 45 | Conversion *Conversion `json:"conversion,omitempty"` |
| 46 | // The analysis tool object that will be merged with a separate run. |
| 47 | Driver *ToolComponent `json:"driver,omitempty"` |
| 48 | // Tool extensions that will be merged with a separate run. |
| 49 | Extensions []ToolComponent `json:"extensions,omitempty"` |
| 50 | // Key/value pairs that provide additional information that will be merged with a separate |
| 51 | // run. |
| 52 | ExternalizedProperties *PropertyBag `json:"externalizedProperties,omitempty"` |
| 53 | // An array of graph objects that will be merged with a separate run. |
| 54 | Graphs []Graph `json:"graphs,omitempty"` |
| 55 | // A stable, unique identifier for this external properties object, in the form of a GUID. |
| 56 | GUID *string `json:"guid,omitempty"` |
| 57 | // Describes the invocation of the analysis tool that will be merged with a separate run. |
| 58 | Invocations []Invocation `json:"invocations,omitempty"` |
| 59 | // An array of logical locations such as namespaces, types or functions that will be merged |
| 60 | // with a separate run. |
| 61 | LogicalLocations []LogicalLocation `json:"logicalLocations,omitempty"` |
| 62 | // Tool policies that will be merged with a separate run. |
| 63 | Policies []ToolComponent `json:"policies,omitempty"` |
| 64 | // Key/value pairs that provide additional information about the external properties. |
| 65 | Properties *PropertyBag `json:"properties,omitempty"` |
| 66 | // An array of result objects that will be merged with a separate run. |
| 67 | Results []Result `json:"results,omitempty"` |
| 68 | // A stable, unique identifier for the run associated with this external properties object, |
| 69 | // in the form of a GUID. |
| 70 | RunGUID *string `json:"runGuid,omitempty"` |
| 71 | // The URI of the JSON schema corresponding to the version of the external property file |
| 72 | // format. |
| 73 | Schema *string `json:"schema,omitempty"` |
| 74 | // Tool taxonomies that will be merged with a separate run. |
| 75 | Taxonomies []ToolComponent `json:"taxonomies,omitempty"` |
| 76 | // An array of threadFlowLocation objects that will be merged with a separate run. |
| 77 | ThreadFlowLocations []ThreadFlowLocation `json:"threadFlowLocations,omitempty"` |
| 78 | // Tool translations that will be merged with a separate run. |
| 79 | Translations []ToolComponent `json:"translations,omitempty"` |
| 80 | // The SARIF format version of this external properties object. |
| 81 | Version *Version `json:"version,omitempty"` |
| 82 | // Requests that will be merged with a separate run. |
| 83 | WebRequests []WebRequest `json:"webRequests,omitempty"` |
| 84 | // Responses that will be merged with a separate run. |
| 85 | WebResponses []WebResponse `json:"webResponses,omitempty"` |
| 86 | } |
| 87 | |
| 88 | // A physical or virtual address, or a range of addresses, in an 'addressable region' |
| 89 | // (memory or a binary file). |
| 90 | // |
| 91 | // The address of the location. |
| 92 | type Address struct { |
| 93 | // The address expressed as a byte offset from the start of the addressable region. |
| 94 | AbsoluteAddress *int64 `json:"absoluteAddress,omitempty"` |
| 95 | // A human-readable fully qualified name that is associated with the address. |
| 96 | FullyQualifiedName *string `json:"fullyQualifiedName,omitempty"` |
| 97 | // The index within run.addresses of the cached object for this address. |
| 98 | Index *int64 `json:"index,omitempty"` |
| 99 | // An open-ended string that identifies the address kind. 'data', 'function', |
| 100 | // 'header','instruction', 'module', 'page', 'section', 'segment', 'stack', 'stackFrame', |
| 101 | // 'table' are well-known values. |
| 102 | Kind *string `json:"kind,omitempty"` |
| 103 | // The number of bytes in this range of addresses. |
| 104 | Length *int64 `json:"length,omitempty"` |
| 105 | // A name that is associated with the address, e.g., '.text'. |
| 106 | Name *string `json:"name,omitempty"` |
| 107 | // The byte offset of this address from the absolute or relative address of the parent |
| 108 | // object. |
| 109 | OffsetFromParent *int64 `json:"offsetFromParent,omitempty"` |
| 110 | // The index within run.addresses of the parent object. |
| 111 | ParentIndex *int64 `json:"parentIndex,omitempty"` |
| 112 | // Key/value pairs that provide additional information about the address. |
| 113 | Properties *PropertyBag `json:"properties,omitempty"` |
| 114 | // The address expressed as a byte offset from the absolute address of the top-most parent |
| 115 | // object. |
| 116 | RelativeAddress *int64 `json:"relativeAddress,omitempty"` |
| 117 | } |
| 118 | |
| 119 | // Key/value pairs that provide additional information about the address. |
| 120 | // |
| 121 | // Key/value pairs that provide additional information about the object. |
| 122 | // |
| 123 | // Key/value pairs that provide additional information about the artifact content. |
| 124 | // |
| 125 | // Key/value pairs that provide additional information about the message. |
| 126 | // |
| 127 | // Key/value pairs that provide additional information about the artifact location. |
| 128 | // |
| 129 | // Key/value pairs that provide additional information about the artifact. |
| 130 | // |
| 131 | // Contains configuration information specific to a report. |
| 132 | // |
| 133 | // Key/value pairs that provide additional information about the reporting configuration. |
| 134 | // |
| 135 | // Key/value pairs that provide additional information about the reporting descriptor |
| 136 | // reference. |
| 137 | // |
| 138 | // Key/value pairs that provide additional information about the toolComponentReference. |
| 139 | // |
| 140 | // Key/value pairs that provide additional information about the configuration override. |
| 141 | // |
| 142 | // Key/value pairs that provide additional information about the invocation. |
| 143 | // |
| 144 | // Key/value pairs that provide additional information about the exception. |
| 145 | // |
| 146 | // Key/value pairs that provide additional information about the region. |
| 147 | // |
| 148 | // Key/value pairs that provide additional information about the logical location. |
| 149 | // |
| 150 | // Key/value pairs that provide additional information about the physical location. |
| 151 | // |
| 152 | // Key/value pairs that provide additional information about the location. |
| 153 | // |
| 154 | // Key/value pairs that provide additional information about the location relationship. |
| 155 | // |
| 156 | // Key/value pairs that provide additional information about the stack frame. |
| 157 | // |
| 158 | // Key/value pairs that provide additional information about the stack. |
| 159 | // |
| 160 | // Key/value pairs that provide additional information about the notification. |
| 161 | // |
| 162 | // Key/value pairs that provide additional information about the conversion. |
| 163 | // |
| 164 | // Key/value pairs that provide additional information about the report. |
| 165 | // |
| 166 | // Key/value pairs that provide additional information about the tool component. |
| 167 | // |
| 168 | // Key/value pairs that provide additional information about the translation metadata. |
| 169 | // |
| 170 | // Key/value pairs that provide additional information about the tool. |
| 171 | // |
| 172 | // Key/value pairs that provide additional information that will be merged with a separate |
| 173 | // run. |
| 174 | // |
| 175 | // Key/value pairs that provide additional information about the edge. |
| 176 | // |
| 177 | // Key/value pairs that provide additional information about the node. |
| 178 | // |
| 179 | // Key/value pairs that provide additional information about the graph. |
| 180 | // |
| 181 | // Key/value pairs that provide additional information about the external properties. |
| 182 | // |
| 183 | // Key/value pairs that provide additional information about the attachment. |
| 184 | // |
| 185 | // Key/value pairs that provide additional information about the rectangle. |
| 186 | // |
| 187 | // Key/value pairs that provide additional information about the code flow. |
| 188 | // |
| 189 | // Key/value pairs that provide additional information about the threadflow location. |
| 190 | // |
| 191 | // Key/value pairs that provide additional information about the request. |
| 192 | // |
| 193 | // Key/value pairs that provide additional information about the response. |
| 194 | // |
| 195 | // Key/value pairs that provide additional information about the thread flow. |
| 196 | // |
| 197 | // Key/value pairs that provide additional information about the change. |
| 198 | // |
| 199 | // Key/value pairs that provide additional information about the replacement. |
| 200 | // |
| 201 | // Key/value pairs that provide additional information about the fix. |
| 202 | // |
| 203 | // Key/value pairs that provide additional information about the edge traversal. |
| 204 | // |
| 205 | // Key/value pairs that provide additional information about the graph traversal. |
| 206 | // |
| 207 | // Key/value pairs that provide additional information about the result. |
| 208 | // |
| 209 | // Key/value pairs that provide additional information about the suppression. |
| 210 | // |
| 211 | // Key/value pairs that provide additional information about the log file. |
| 212 | // |
| 213 | // Key/value pairs that provide additional information about the run automation details. |
| 214 | // |
| 215 | // Key/value pairs that provide additional information about the external property file. |
| 216 | // |
| 217 | // Key/value pairs that provide additional information about the external property files. |
| 218 | // |
| 219 | // Key/value pairs that provide additional information about the run. |
| 220 | // |
| 221 | // Key/value pairs that provide additional information about the special locations. |
| 222 | // |
| 223 | // Key/value pairs that provide additional information about the version control details. |
| 224 | type PropertyBag struct { |
| 225 | // A set of distinct strings that provide additional information. |
| 226 | Tags []string `json:"tags,omitempty"` |
| 227 | } |
| 228 | |
| 229 | // A single artifact. In some cases, this artifact might be nested within another artifact. |
| 230 | type Artifact struct { |
| 231 | // The contents of the artifact. |
| 232 | Contents *ArtifactContent `json:"contents,omitempty"` |
| 233 | // A short description of the artifact. |
| 234 | Description *Message `json:"description,omitempty"` |
| 235 | // Specifies the encoding for an artifact object that refers to a text file. |
| 236 | Encoding *string `json:"encoding,omitempty"` |
| 237 | // A dictionary, each of whose keys is the name of a hash function and each of whose values |
| 238 | // is the hashed value of the artifact produced by the specified hash function. |
| 239 | Hashes map[string]string `json:"hashes,omitempty"` |
| 240 | // The Coordinated Universal Time (UTC) date and time at which the artifact was most |
| 241 | // recently modified. See "Date/time properties" in the SARIF spec for the required format. |
| 242 | LastModifiedTimeUTC *time.Time `json:"lastModifiedTimeUtc,omitempty"` |
| 243 | // The length of the artifact in bytes. |
| 244 | Length *int64 `json:"length,omitempty"` |
| 245 | // The location of the artifact. |
| 246 | Location *ArtifactLocation `json:"location,omitempty"` |
| 247 | // The MIME type (RFC 2045) of the artifact. |
| 248 | MIMEType *string `json:"mimeType,omitempty"` |
| 249 | // The offset in bytes of the artifact within its containing artifact. |
| 250 | Offset *int64 `json:"offset,omitempty"` |
| 251 | // Identifies the index of the immediate parent of the artifact, if this artifact is nested. |
| 252 | ParentIndex *int64 `json:"parentIndex,omitempty"` |
| 253 | // Key/value pairs that provide additional information about the artifact. |
| 254 | Properties *PropertyBag `json:"properties,omitempty"` |
| 255 | // The role or roles played by the artifact in the analysis. |
| 256 | Roles []Role `json:"roles,omitempty"` |
| 257 | // Specifies the source language for any artifact object that refers to a text file that |
| 258 | // contains source code. |
| 259 | SourceLanguage *string `json:"sourceLanguage,omitempty"` |
| 260 | } |
| 261 | |
| 262 | // The contents of the artifact. |
| 263 | // |
| 264 | // Represents the contents of an artifact. |
| 265 | // |
| 266 | // The portion of the artifact contents within the specified region. |
| 267 | // |
| 268 | // The body of the request. |
| 269 | // |
| 270 | // The body of the response. |
| 271 | // |
| 272 | // The content to insert at the location specified by the 'deletedRegion' property. |
| 273 | type ArtifactContent struct { |
| 274 | // MIME Base64-encoded content from a binary artifact, or from a text artifact in its |
| 275 | // original encoding. |
| 276 | Binary *string `json:"binary,omitempty"` |
| 277 | // Key/value pairs that provide additional information about the artifact content. |
| 278 | Properties *PropertyBag `json:"properties,omitempty"` |
| 279 | // An alternate rendered representation of the artifact (e.g., a decompiled representation |
| 280 | // of a binary region). |
| 281 | Rendered *MultiformatMessageString `json:"rendered,omitempty"` |
| 282 | // UTF-8-encoded content from a text artifact. |
| 283 | Text *string `json:"text,omitempty"` |
| 284 | } |
| 285 | |
| 286 | // An alternate rendered representation of the artifact (e.g., a decompiled representation |
| 287 | // of a binary region). |
| 288 | // |
| 289 | // A message string or message format string rendered in multiple formats. |
| 290 | // |
| 291 | // A comprehensive description of the tool component. |
| 292 | // |
| 293 | // A description of the report. Should, as far as possible, provide details sufficient to |
| 294 | // enable resolution of any problem indicated by the result. |
| 295 | // |
| 296 | // Provides the primary documentation for the report, useful when there is no online |
| 297 | // documentation. |
| 298 | // |
| 299 | // A concise description of the report. Should be a single sentence that is understandable |
| 300 | // when visible space is limited to a single line of text. |
| 301 | // |
| 302 | // A brief description of the tool component. |
| 303 | // |
| 304 | // A comprehensive description of the translation metadata. |
| 305 | // |
| 306 | // A brief description of the translation metadata. |
| 307 | type MultiformatMessageString struct { |
| 308 | // A Markdown message string or format string. |
| 309 | Markdown *string `json:"markdown,omitempty"` |
| 310 | // Key/value pairs that provide additional information about the message. |
| 311 | Properties *PropertyBag `json:"properties,omitempty"` |
| 312 | // A plain text message string or format string. |
| 313 | Text string `json:"text"` |
| 314 | } |
| 315 | |
| 316 | // A short description of the artifact. |
| 317 | // |
| 318 | // A short description of the artifact location. |
| 319 | // |
| 320 | // A message relevant to the region. |
| 321 | // |
| 322 | // A message relevant to the location. |
| 323 | // |
| 324 | // A description of the location relationship. |
| 325 | // |
| 326 | // A message relevant to this call stack. |
| 327 | // |
| 328 | // A message that describes the condition that was encountered. |
| 329 | // |
| 330 | // A description of the reporting descriptor relationship. |
| 331 | // |
| 332 | // A description of the graph. |
| 333 | // |
| 334 | // A short description of the edge. |
| 335 | // |
| 336 | // A short description of the node. |
| 337 | // |
| 338 | // A message describing the role played by the attachment. |
| 339 | // |
| 340 | // A message relevant to the rectangle. |
| 341 | // |
| 342 | // A message relevant to the code flow. |
| 343 | // |
| 344 | // A message relevant to the thread flow. |
| 345 | // |
| 346 | // A message that describes the proposed fix, enabling viewers to present the proposed |
| 347 | // change to an end user. |
| 348 | // |
| 349 | // A description of this graph traversal. |
| 350 | // |
| 351 | // A message to display to the user as the edge is traversed. |
| 352 | // |
| 353 | // A message that describes the result. The first sentence of the message only will be |
| 354 | // displayed when visible space is limited. |
| 355 | // |
| 356 | // A description of the identity and role played within the engineering system by this |
| 357 | // object's containing run object. |
| 358 | // |
| 359 | // Encapsulates a message intended to be read by the end user. |
| 360 | type Message struct { |
| 361 | // An array of strings to substitute into the message string. |
| 362 | Arguments []string `json:"arguments,omitempty"` |
| 363 | // The identifier for this message. |
| 364 | ID *string `json:"id,omitempty"` |
| 365 | // A Markdown message string. |
| 366 | Markdown *string `json:"markdown,omitempty"` |
| 367 | // Key/value pairs that provide additional information about the message. |
| 368 | Properties *PropertyBag `json:"properties,omitempty"` |
| 369 | // A plain text message string. |
| 370 | Text *string `json:"text,omitempty"` |
| 371 | } |
| 372 | |
| 373 | // The location of the artifact. |
| 374 | // |
| 375 | // Specifies the location of an artifact. |
| 376 | // |
| 377 | // An absolute URI specifying the location of the executable that was invoked. |
| 378 | // |
| 379 | // A file containing the standard error stream from the process that was invoked. |
| 380 | // |
| 381 | // A file containing the standard input stream to the process that was invoked. |
| 382 | // |
| 383 | // A file containing the standard output stream from the process that was invoked. |
| 384 | // |
| 385 | // A file containing the interleaved standard output and standard error stream from the |
| 386 | // process that was invoked. |
| 387 | // |
| 388 | // The working directory for the invocation. |
| 389 | // |
| 390 | // Identifies the artifact that the analysis tool was instructed to scan. This need not be |
| 391 | // the same as the artifact where the result actually occurred. |
| 392 | // |
| 393 | // The location of the attachment. |
| 394 | // |
| 395 | // The location of the artifact to change. |
| 396 | // |
| 397 | // The location of the external property file. |
| 398 | // |
| 399 | // Provides a suggestion to SARIF consumers to display file paths relative to the specified |
| 400 | // location. |
| 401 | // |
| 402 | // The location in the local file system to which the root of the repository was mapped at |
| 403 | // the time of the analysis. |
| 404 | type ArtifactLocation struct { |
| 405 | // A short description of the artifact location. |
| 406 | Description *Message `json:"description,omitempty"` |
| 407 | // The index within the run artifacts array of the artifact object associated with the |
| 408 | // artifact location. |
| 409 | Index *int64 `json:"index,omitempty"` |
| 410 | // Key/value pairs that provide additional information about the artifact location. |
| 411 | Properties *PropertyBag `json:"properties,omitempty"` |
| 412 | // A string containing a valid relative or absolute URI. |
| 413 | URI *string `json:"uri,omitempty"` |
| 414 | // A string which indirectly specifies the absolute URI with respect to which a relative URI |
| 415 | // in the "uri" property is interpreted. |
| 416 | URIBaseID *string `json:"uriBaseId,omitempty"` |
| 417 | } |
| 418 | |
| 419 | // A conversion object that will be merged with a separate run. |
| 420 | // |
| 421 | // Describes how a converter transformed the output of a static analysis tool from the |
| 422 | // analysis tool's native output format into the SARIF format. |
| 423 | // |
| 424 | // A conversion object that describes how a converter transformed an analysis tool's native |
| 425 | // reporting format into the SARIF format. |
| 426 | type Conversion struct { |
| 427 | // The locations of the analysis tool's per-run log files. |
| 428 | AnalysisToolLogFiles []ArtifactLocation `json:"analysisToolLogFiles,omitempty"` |
| 429 | // An invocation object that describes the invocation of the converter. |
| 430 | Invocation *Invocation `json:"invocation,omitempty"` |
| 431 | // Key/value pairs that provide additional information about the conversion. |
| 432 | Properties *PropertyBag `json:"properties,omitempty"` |
| 433 | // A tool object that describes the converter. |
| 434 | Tool Tool `json:"tool"` |
| 435 | } |
| 436 | |
| 437 | // An invocation object that describes the invocation of the converter. |
| 438 | // |
| 439 | // The runtime environment of the analysis tool run. |
| 440 | type Invocation struct { |
| 441 | // The account under which the invocation occurred. |
| 442 | Account *string `json:"account,omitempty"` |
| 443 | // An array of strings, containing in order the command line arguments passed to the tool |
| 444 | // from the operating system. |
| 445 | Arguments []string `json:"arguments,omitempty"` |
| 446 | // The command line used to invoke the tool. |
| 447 | CommandLine *string `json:"commandLine,omitempty"` |
| 448 | // The Coordinated Universal Time (UTC) date and time at which the invocation ended. See |
| 449 | // "Date/time properties" in the SARIF spec for the required format. |
| 450 | EndTimeUTC *time.Time `json:"endTimeUtc,omitempty"` |
| 451 | // The environment variables associated with the analysis tool process, expressed as |
| 452 | // key/value pairs. |
| 453 | EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` |
| 454 | // An absolute URI specifying the location of the executable that was invoked. |
| 455 | ExecutableLocation *ArtifactLocation `json:"executableLocation,omitempty"` |
| 456 | // Specifies whether the tool's execution completed successfully. |
| 457 | ExecutionSuccessful bool `json:"executionSuccessful"` |
| 458 | // The process exit code. |
| 459 | ExitCode *int64 `json:"exitCode,omitempty"` |
| 460 | // The reason for the process exit. |
| 461 | ExitCodeDescription *string `json:"exitCodeDescription,omitempty"` |
| 462 | // The name of the signal that caused the process to exit. |
| 463 | ExitSignalName *string `json:"exitSignalName,omitempty"` |
| 464 | // The numeric value of the signal that caused the process to exit. |
| 465 | ExitSignalNumber *int64 `json:"exitSignalNumber,omitempty"` |
| 466 | // The machine on which the invocation occurred. |
| 467 | Machine *string `json:"machine,omitempty"` |
| 468 | // An array of configurationOverride objects that describe notifications related runtime |
| 469 | // overrides. |
| 470 | NotificationConfigurationOverrides []ConfigurationOverride `json:"notificationConfigurationOverrides,omitempty"` |
| 471 | // The id of the process in which the invocation occurred. |
| 472 | ProcessID *int64 `json:"processId,omitempty"` |
| 473 | // The reason given by the operating system that the process failed to start. |
| 474 | ProcessStartFailureMessage *string `json:"processStartFailureMessage,omitempty"` |
| 475 | // Key/value pairs that provide additional information about the invocation. |
| 476 | Properties *PropertyBag `json:"properties,omitempty"` |
| 477 | // The locations of any response files specified on the tool's command line. |
| 478 | ResponseFiles []ArtifactLocation `json:"responseFiles,omitempty"` |
| 479 | // An array of configurationOverride objects that describe rules related runtime overrides. |
| 480 | RuleConfigurationOverrides []ConfigurationOverride `json:"ruleConfigurationOverrides,omitempty"` |
| 481 | // The Coordinated Universal Time (UTC) date and time at which the invocation started. See |
| 482 | // "Date/time properties" in the SARIF spec for the required format. |
| 483 | StartTimeUTC *time.Time `json:"startTimeUtc,omitempty"` |
| 484 | // A file containing the standard error stream from the process that was invoked. |
| 485 | Stderr *ArtifactLocation `json:"stderr,omitempty"` |
| 486 | // A file containing the standard input stream to the process that was invoked. |
| 487 | Stdin *ArtifactLocation `json:"stdin,omitempty"` |
| 488 | // A file containing the standard output stream from the process that was invoked. |
| 489 | Stdout *ArtifactLocation `json:"stdout,omitempty"` |
| 490 | // A file containing the interleaved standard output and standard error stream from the |
| 491 | // process that was invoked. |
| 492 | StdoutStderr *ArtifactLocation `json:"stdoutStderr,omitempty"` |
| 493 | // A list of conditions detected by the tool that are relevant to the tool's configuration. |
| 494 | ToolConfigurationNotifications []Notification `json:"toolConfigurationNotifications,omitempty"` |
| 495 | // A list of runtime conditions detected by the tool during the analysis. |
| 496 | ToolExecutionNotifications []Notification `json:"toolExecutionNotifications,omitempty"` |
| 497 | // The working directory for the invocation. |
| 498 | WorkingDirectory *ArtifactLocation `json:"workingDirectory,omitempty"` |
| 499 | } |
| 500 | |
| 501 | // Information about how a specific rule or notification was reconfigured at runtime. |
| 502 | type ConfigurationOverride struct { |
| 503 | // Specifies how the rule or notification was configured during the scan. |
| 504 | Configuration ReportingConfiguration `json:"configuration"` |
| 505 | // A reference used to locate the descriptor whose configuration was overridden. |
| 506 | Descriptor ReportingDescriptorReference `json:"descriptor"` |
| 507 | // Key/value pairs that provide additional information about the configuration override. |
| 508 | Properties *PropertyBag `json:"properties,omitempty"` |
| 509 | } |
| 510 | |
| 511 | // Specifies how the rule or notification was configured during the scan. |
| 512 | // |
| 513 | // Information about a rule or notification that can be configured at runtime. |
| 514 | // |
| 515 | // Default reporting configuration information. |
| 516 | type ReportingConfiguration struct { |
| 517 | // Specifies whether the report may be produced during the scan. |
| 518 | Enabled *bool `json:"enabled,omitempty"` |
| 519 | // Specifies the failure level for the report. |
| 520 | Level *Level `json:"level,omitempty"` |
| 521 | // Contains configuration information specific to a report. |
| 522 | Parameters *PropertyBag `json:"parameters,omitempty"` |
| 523 | // Key/value pairs that provide additional information about the reporting configuration. |
| 524 | Properties *PropertyBag `json:"properties,omitempty"` |
| 525 | // Specifies the relative priority of the report. Used for analysis output only. |
| 526 | Rank *float64 `json:"rank,omitempty"` |
| 527 | } |
| 528 | |
| 529 | // A reference used to locate the descriptor whose configuration was overridden. |
| 530 | // |
| 531 | // A reference used to locate the rule descriptor associated with this notification. |
| 532 | // |
| 533 | // A reference used to locate the descriptor relevant to this notification. |
| 534 | // |
| 535 | // A reference to the related reporting descriptor. |
| 536 | // |
| 537 | // A reference used to locate the rule descriptor relevant to this result. |
| 538 | // |
| 539 | // Information about how to locate a relevant reporting descriptor. |
| 540 | type ReportingDescriptorReference struct { |
| 541 | // A guid that uniquely identifies the descriptor. |
| 542 | GUID *string `json:"guid,omitempty"` |
| 543 | // The id of the descriptor. |
| 544 | ID *string `json:"id,omitempty"` |
| 545 | // The index into an array of descriptors in toolComponent.ruleDescriptors, |
| 546 | // toolComponent.notificationDescriptors, or toolComponent.taxonomyDescriptors, depending on |
| 547 | // context. |
| 548 | Index *int64 `json:"index,omitempty"` |
| 549 | // Key/value pairs that provide additional information about the reporting descriptor |
| 550 | // reference. |
| 551 | Properties *PropertyBag `json:"properties,omitempty"` |
| 552 | // A reference used to locate the toolComponent associated with the descriptor. |
| 553 | ToolComponent *ToolComponentReference `json:"toolComponent,omitempty"` |
| 554 | } |
| 555 | |
| 556 | // A reference used to locate the toolComponent associated with the descriptor. |
| 557 | // |
| 558 | // Identifies a particular toolComponent object, either the driver or an extension. |
| 559 | // |
| 560 | // The component which is strongly associated with this component. For a translation, this |
| 561 | // refers to the component which has been translated. For an extension, this is the driver |
| 562 | // that provides the extension's plugin model. |
| 563 | type ToolComponentReference struct { |
| 564 | // The 'guid' property of the referenced toolComponent. |
| 565 | GUID *string `json:"guid,omitempty"` |
| 566 | // An index into the referenced toolComponent in tool.extensions. |
| 567 | Index *int64 `json:"index,omitempty"` |
| 568 | // The 'name' property of the referenced toolComponent. |
| 569 | Name *string `json:"name,omitempty"` |
| 570 | // Key/value pairs that provide additional information about the toolComponentReference. |
| 571 | Properties *PropertyBag `json:"properties,omitempty"` |
| 572 | } |
| 573 | |
| 574 | // Describes a condition relevant to the tool itself, as opposed to being relevant to a |
| 575 | // target being analyzed by the tool. |
| 576 | type Notification struct { |
| 577 | // A reference used to locate the rule descriptor associated with this notification. |
| 578 | AssociatedRule *ReportingDescriptorReference `json:"associatedRule,omitempty"` |
| 579 | // A reference used to locate the descriptor relevant to this notification. |
| 580 | Descriptor *ReportingDescriptorReference `json:"descriptor,omitempty"` |
| 581 | // The runtime exception, if any, relevant to this notification. |
| 582 | Exception *Exception `json:"exception,omitempty"` |
| 583 | // A value specifying the severity level of the notification. |
| 584 | Level *Level `json:"level,omitempty"` |
| 585 | // The locations relevant to this notification. |
| 586 | Locations []Location `json:"locations,omitempty"` |
| 587 | // A message that describes the condition that was encountered. |
| 588 | Message Message `json:"message"` |
| 589 | // Key/value pairs that provide additional information about the notification. |
| 590 | Properties *PropertyBag `json:"properties,omitempty"` |
| 591 | // The thread identifier of the code that generated the notification. |
| 592 | ThreadID *int64 `json:"threadId,omitempty"` |
| 593 | // The Coordinated Universal Time (UTC) date and time at which the analysis tool generated |
| 594 | // the notification. |
| 595 | TimeUTC *time.Time `json:"timeUtc,omitempty"` |
| 596 | } |
| 597 | |
| 598 | // The runtime exception, if any, relevant to this notification. |
| 599 | // |
| 600 | // Describes a runtime exception encountered during the execution of an analysis tool. |
| 601 | type Exception struct { |
| 602 | // An array of exception objects each of which is considered a cause of this exception. |
| 603 | InnerExceptions []Exception `json:"innerExceptions,omitempty"` |
| 604 | // A string that identifies the kind of exception, for example, the fully qualified type |
| 605 | // name of an object that was thrown, or the symbolic name of a signal. |
| 606 | Kind *string `json:"kind,omitempty"` |
| 607 | // A message that describes the exception. |
| 608 | Message *string `json:"message,omitempty"` |
| 609 | // Key/value pairs that provide additional information about the exception. |
| 610 | Properties *PropertyBag `json:"properties,omitempty"` |
| 611 | // The sequence of function calls leading to the exception. |
| 612 | Stack *Stack `json:"stack,omitempty"` |
| 613 | } |
| 614 | |
| 615 | // The sequence of function calls leading to the exception. |
| 616 | // |
| 617 | // A call stack that is relevant to a result. |
| 618 | // |
| 619 | // The call stack leading to this location. |
| 620 | type Stack struct { |
| 621 | // An array of stack frames that represents a sequence of calls, rendered in reverse |
| 622 | // chronological order, that comprise the call stack. |
| 623 | Frames []StackFrame `json:"frames"` |
| 624 | // A message relevant to this call stack. |
| 625 | Message *Message `json:"message,omitempty"` |
| 626 | // Key/value pairs that provide additional information about the stack. |
| 627 | Properties *PropertyBag `json:"properties,omitempty"` |
| 628 | } |
| 629 | |
| 630 | // A function call within a stack trace. |
| 631 | type StackFrame struct { |
| 632 | // The location to which this stack frame refers. |
| 633 | Location *Location `json:"location,omitempty"` |
| 634 | // The name of the module that contains the code of this stack frame. |
| 635 | Module *string `json:"module,omitempty"` |
| 636 | // The parameters of the call that is executing. |
| 637 | Parameters []string `json:"parameters,omitempty"` |
| 638 | // Key/value pairs that provide additional information about the stack frame. |
| 639 | Properties *PropertyBag `json:"properties,omitempty"` |
| 640 | // The thread identifier of the stack frame. |
| 641 | ThreadID *int64 `json:"threadId,omitempty"` |
| 642 | } |
| 643 | |
| 644 | // The location to which this stack frame refers. |
| 645 | // |
| 646 | // A location within a programming artifact. |
| 647 | // |
| 648 | // A code location associated with the node. |
| 649 | // |
| 650 | // The code location. |
| 651 | // |
| 652 | // Identifies the location associated with the suppression. |
| 653 | type Location struct { |
| 654 | // A set of regions relevant to the location. |
| 655 | Annotations []Region `json:"annotations,omitempty"` |
| 656 | // Value that distinguishes this location from all other locations within a single result |
| 657 | // object. |
| 658 | ID *int64 `json:"id,omitempty"` |
| 659 | // The logical locations associated with the result. |
| 660 | LogicalLocations []LogicalLocation `json:"logicalLocations,omitempty"` |
| 661 | // A message relevant to the location. |
| 662 | Message *Message `json:"message,omitempty"` |
| 663 | // Identifies the artifact and region. |
| 664 | PhysicalLocation *PhysicalLocation `json:"physicalLocation,omitempty"` |
| 665 | // Key/value pairs that provide additional information about the location. |
| 666 | Properties *PropertyBag `json:"properties,omitempty"` |
| 667 | // An array of objects that describe relationships between this location and others. |
| 668 | Relationships []LocationRelationship `json:"relationships,omitempty"` |
| 669 | } |
| 670 | |
| 671 | // Specifies a portion of the artifact that encloses the region. Allows a viewer to display |
| 672 | // additional context around the region. |
| 673 | // |
| 674 | // Specifies a portion of the artifact. |
| 675 | // |
| 676 | // The region of the artifact to delete. |
| 677 | // |
| 678 | // A region within an artifact where a result was detected. |
| 679 | type Region struct { |
| 680 | // The length of the region in bytes. |
| 681 | ByteLength *int64 `json:"byteLength,omitempty"` |
| 682 | // The zero-based offset from the beginning of the artifact of the first byte in the region. |
| 683 | ByteOffset *int64 `json:"byteOffset,omitempty"` |
| 684 | // The length of the region in characters. |
| 685 | CharLength *int64 `json:"charLength,omitempty"` |
| 686 | // The zero-based offset from the beginning of the artifact of the first character in the |
| 687 | // region. |
| 688 | CharOffset *int64 `json:"charOffset,omitempty"` |
| 689 | // The column number of the character following the end of the region. |
| 690 | EndColumn *int64 `json:"endColumn,omitempty"` |
| 691 | // The line number of the last character in the region. |
| 692 | EndLine *int64 `json:"endLine,omitempty"` |
| 693 | // A message relevant to the region. |
| 694 | Message *Message `json:"message,omitempty"` |
| 695 | // Key/value pairs that provide additional information about the region. |
| 696 | Properties *PropertyBag `json:"properties,omitempty"` |
| 697 | // The portion of the artifact contents within the specified region. |
| 698 | Snippet *ArtifactContent `json:"snippet,omitempty"` |
| 699 | // Specifies the source language, if any, of the portion of the artifact specified by the |
| 700 | // region object. |
| 701 | SourceLanguage *string `json:"sourceLanguage,omitempty"` |
| 702 | // The column number of the first character in the region. |
| 703 | StartColumn *int64 `json:"startColumn,omitempty"` |
| 704 | // The line number of the first character in the region. |
| 705 | StartLine *int64 `json:"startLine,omitempty"` |
| 706 | } |
| 707 | |
| 708 | // A logical location of a construct that produced a result. |
| 709 | type LogicalLocation struct { |
| 710 | // The machine-readable name for the logical location, such as a mangled function name |
| 711 | // provided by a C++ compiler that encodes calling convention, return type and other details |
| 712 | // along with the function name. |
| 713 | DecoratedName *string `json:"decoratedName,omitempty"` |
| 714 | // The human-readable fully qualified name of the logical location. |
| 715 | FullyQualifiedName *string `json:"fullyQualifiedName,omitempty"` |
| 716 | // The index within the logical locations array. |
| 717 | Index *int64 `json:"index,omitempty"` |
| 718 | // The type of construct this logical location component refers to. Should be one of |
| 719 | // 'function', 'member', 'module', 'namespace', 'parameter', 'resource', 'returnType', |
| 720 | // 'type', 'variable', 'object', 'array', 'property', 'value', 'element', 'text', |
| 721 | // 'attribute', 'comment', 'declaration', 'dtd' or 'processingInstruction', if any of those |
| 722 | // accurately describe the construct. |
| 723 | Kind *string `json:"kind,omitempty"` |
| 724 | // Identifies the construct in which the result occurred. For example, this property might |
| 725 | // contain the name of a class or a method. |
| 726 | Name *string `json:"name,omitempty"` |
| 727 | // Identifies the index of the immediate parent of the construct in which the result was |
| 728 | // detected. For example, this property might point to a logical location that represents |
| 729 | // the namespace that holds a type. |
| 730 | ParentIndex *int64 `json:"parentIndex,omitempty"` |
| 731 | // Key/value pairs that provide additional information about the logical location. |
| 732 | Properties *PropertyBag `json:"properties,omitempty"` |
| 733 | } |
| 734 | |
| 735 | // Identifies the artifact and region. |
| 736 | // |
| 737 | // A physical location relevant to a result. Specifies a reference to a programming artifact |
| 738 | // together with a range of bytes or characters within that artifact. |
| 739 | type PhysicalLocation struct { |
| 740 | // The address of the location. |
| 741 | Address *Address `json:"address,omitempty"` |
| 742 | // The location of the artifact. |
| 743 | ArtifactLocation *ArtifactLocation `json:"artifactLocation,omitempty"` |
| 744 | // Specifies a portion of the artifact that encloses the region. Allows a viewer to display |
| 745 | // additional context around the region. |
| 746 | ContextRegion *Region `json:"contextRegion,omitempty"` |
| 747 | // Key/value pairs that provide additional information about the physical location. |
| 748 | Properties *PropertyBag `json:"properties,omitempty"` |
| 749 | // Specifies a portion of the artifact. |
| 750 | Region *Region `json:"region,omitempty"` |
| 751 | } |
| 752 | |
| 753 | // Information about the relation of one location to another. |
| 754 | type LocationRelationship struct { |
| 755 | // A description of the location relationship. |
| 756 | Description *Message `json:"description,omitempty"` |
| 757 | // A set of distinct strings that categorize the relationship. Well-known kinds include |
| 758 | // 'includes', 'isIncludedBy' and 'relevant'. |
| 759 | Kinds []string `json:"kinds,omitempty"` |
| 760 | // Key/value pairs that provide additional information about the location relationship. |
| 761 | Properties *PropertyBag `json:"properties,omitempty"` |
| 762 | // A reference to the related location. |
| 763 | Target int64 `json:"target"` |
| 764 | } |
| 765 | |
| 766 | // A tool object that describes the converter. |
| 767 | // |
| 768 | // The analysis tool that was run. |
| 769 | // |
| 770 | // Information about the tool or tool pipeline that generated the results in this run. A run |
| 771 | // can only contain results produced by a single tool or tool pipeline. A run can aggregate |
| 772 | // results from multiple log files, as long as context around the tool run (tool |
| 773 | // command-line arguments and the like) is identical for all aggregated files. |
| 774 | type Tool struct { |
| 775 | // The analysis tool that was run. |
| 776 | Driver ToolComponent `json:"driver"` |
| 777 | // Tool extensions that contributed to or reconfigured the analysis tool that was run. |
| 778 | Extensions []ToolComponent `json:"extensions,omitempty"` |
| 779 | // Key/value pairs that provide additional information about the tool. |
| 780 | Properties *PropertyBag `json:"properties,omitempty"` |
| 781 | } |
| 782 | |
| 783 | // The analysis tool that was run. |
| 784 | // |
| 785 | // A component, such as a plug-in or the driver, of the analysis tool that was run. |
| 786 | // |
| 787 | // The analysis tool object that will be merged with a separate run. |
| 788 | type ToolComponent struct { |
| 789 | // The component which is strongly associated with this component. For a translation, this |
| 790 | // refers to the component which has been translated. For an extension, this is the driver |
| 791 | // that provides the extension's plugin model. |
| 792 | AssociatedComponent *ToolComponentReference `json:"associatedComponent,omitempty"` |
| 793 | // The kinds of data contained in this object. |
| 794 | Contents []Content `json:"contents,omitempty"` |
| 795 | // The binary version of the tool component's primary executable file expressed as four |
| 796 | // non-negative integers separated by a period (for operating systems that express file |
| 797 | // versions in this way). |
| 798 | DottedQuadFileVersion *string `json:"dottedQuadFileVersion,omitempty"` |
| 799 | // The absolute URI from which the tool component can be downloaded. |
| 800 | DownloadURI *string `json:"downloadUri,omitempty"` |
| 801 | // A comprehensive description of the tool component. |
| 802 | FullDescription *MultiformatMessageString `json:"fullDescription,omitempty"` |
| 803 | // The name of the tool component along with its version and any other useful identifying |
| 804 | // information, such as its locale. |
| 805 | FullName *string `json:"fullName,omitempty"` |
| 806 | // A dictionary, each of whose keys is a resource identifier and each of whose values is a |
| 807 | // multiformatMessageString object, which holds message strings in plain text and |
| 808 | // (optionally) Markdown format. The strings can include placeholders, which can be used to |
| 809 | // construct a message in combination with an arbitrary number of additional string |
| 810 | // arguments. |
| 811 | GlobalMessageStrings map[string]MultiformatMessageString `json:"globalMessageStrings,omitempty"` |
| 812 | // A unique identifier for the tool component in the form of a GUID. |
| 813 | GUID *string `json:"guid,omitempty"` |
| 814 | // The absolute URI at which information about this version of the tool component can be |
| 815 | // found. |
| 816 | InformationURI *string `json:"informationUri,omitempty"` |
| 817 | // Specifies whether this object contains a complete definition of the localizable and/or |
| 818 | // non-localizable data for this component, as opposed to including only data that is |
| 819 | // relevant to the results persisted to this log file. |
| 820 | IsComprehensive *bool `json:"isComprehensive,omitempty"` |
| 821 | // The language of the messages emitted into the log file during this run (expressed as an |
| 822 | // ISO 639-1 two-letter lowercase language code) and an optional region (expressed as an ISO |
| 823 | // 3166-1 two-letter uppercase subculture code associated with a country or region). The |
| 824 | // casing is recommended but not required (in order for this data to conform to RFC5646). |
| 825 | Language *string `json:"language,omitempty"` |
| 826 | // The semantic version of the localized strings defined in this component; maintained by |
| 827 | // components that provide translations. |
| 828 | LocalizedDataSemanticVersion *string `json:"localizedDataSemanticVersion,omitempty"` |
| 829 | // An array of the artifactLocation objects associated with the tool component. |
| 830 | Locations []ArtifactLocation `json:"locations,omitempty"` |
| 831 | // The minimum value of localizedDataSemanticVersion required in translations consumed by |
| 832 | // this component; used by components that consume translations. |
| 833 | MinimumRequiredLocalizedDataSemanticVersion *string `json:"minimumRequiredLocalizedDataSemanticVersion,omitempty"` |
| 834 | // The name of the tool component. |
| 835 | Name string `json:"name"` |
| 836 | // An array of reportingDescriptor objects relevant to the notifications related to the |
| 837 | // configuration and runtime execution of the tool component. |
| 838 | Notifications []ReportingDescriptor `json:"notifications,omitempty"` |
| 839 | // The organization or company that produced the tool component. |
| 840 | Organization *string `json:"organization,omitempty"` |
| 841 | // A product suite to which the tool component belongs. |
| 842 | Product *string `json:"product,omitempty"` |
| 843 | // A localizable string containing the name of the suite of products to which the tool |
| 844 | // component belongs. |
| 845 | ProductSuite *string `json:"productSuite,omitempty"` |
| 846 | // Key/value pairs that provide additional information about the tool component. |
| 847 | Properties *PropertyBag `json:"properties,omitempty"` |
| 848 | // A string specifying the UTC date (and optionally, the time) of the component's release. |
| 849 | ReleaseDateUTC *string `json:"releaseDateUtc,omitempty"` |
| 850 | // An array of reportingDescriptor objects relevant to the analysis performed by the tool |
| 851 | // component. |
| 852 | Rules []ReportingDescriptor `json:"rules,omitempty"` |
| 853 | // The tool component version in the format specified by Semantic Versioning 2.0. |
| 854 | SemanticVersion *string `json:"semanticVersion,omitempty"` |
| 855 | // A brief description of the tool component. |
| 856 | ShortDescription *MultiformatMessageString `json:"shortDescription,omitempty"` |
| 857 | // An array of toolComponentReference objects to declare the taxonomies supported by the |
| 858 | // tool component. |
| 859 | SupportedTaxonomies []ToolComponentReference `json:"supportedTaxonomies,omitempty"` |
| 860 | // An array of reportingDescriptor objects relevant to the definitions of both standalone |
| 861 | // and tool-defined taxonomies. |
| 862 | Taxa []ReportingDescriptor `json:"taxa,omitempty"` |
| 863 | // Translation metadata, required for a translation, not populated by other component types. |
| 864 | TranslationMetadata *TranslationMetadata `json:"translationMetadata,omitempty"` |
| 865 | // The tool component version, in whatever format the component natively provides. |
| 866 | Version *string `json:"version,omitempty"` |
| 867 | } |
| 868 | |
| 869 | // Metadata that describes a specific report produced by the tool, as part of the analysis |
| 870 | // it provides or its runtime reporting. |
| 871 | type ReportingDescriptor struct { |
| 872 | // Default reporting configuration information. |
| 873 | DefaultConfiguration *ReportingConfiguration `json:"defaultConfiguration,omitempty"` |
| 874 | // An array of unique identifies in the form of a GUID by which this report was known in |
| 875 | // some previous version of the analysis tool. |
| 876 | DeprecatedGuids []string `json:"deprecatedGuids,omitempty"` |
| 877 | // An array of stable, opaque identifiers by which this report was known in some previous |
| 878 | // version of the analysis tool. |
| 879 | DeprecatedIDS []string `json:"deprecatedIds,omitempty"` |
| 880 | // An array of readable identifiers by which this report was known in some previous version |
| 881 | // of the analysis tool. |
| 882 | DeprecatedNames []string `json:"deprecatedNames,omitempty"` |
| 883 | // A description of the report. Should, as far as possible, provide details sufficient to |
| 884 | // enable resolution of any problem indicated by the result. |
| 885 | FullDescription *MultiformatMessageString `json:"fullDescription,omitempty"` |
| 886 | // A unique identifier for the reporting descriptor in the form of a GUID. |
| 887 | GUID *string `json:"guid,omitempty"` |
| 888 | // Provides the primary documentation for the report, useful when there is no online |
| 889 | // documentation. |
| 890 | Help *MultiformatMessageString `json:"help,omitempty"` |
| 891 | // A URI where the primary documentation for the report can be found. |
| 892 | HelpURI *string `json:"helpUri,omitempty"` |
| 893 | // A stable, opaque identifier for the report. |
| 894 | ID string `json:"id"` |
| 895 | // A set of name/value pairs with arbitrary names. Each value is a multiformatMessageString |
| 896 | // object, which holds message strings in plain text and (optionally) Markdown format. The |
| 897 | // strings can include placeholders, which can be used to construct a message in combination |
| 898 | // with an arbitrary number of additional string arguments. |
| 899 | MessageStrings map[string]MultiformatMessageString `json:"messageStrings,omitempty"` |
| 900 | // A report identifier that is understandable to an end user. |
| 901 | Name *string `json:"name,omitempty"` |
| 902 | // Key/value pairs that provide additional information about the report. |
| 903 | Properties *PropertyBag `json:"properties,omitempty"` |
| 904 | // An array of objects that describe relationships between this reporting descriptor and |
| 905 | // others. |
| 906 | Relationships []ReportingDescriptorRelationship `json:"relationships,omitempty"` |
| 907 | // A concise description of the report. Should be a single sentence that is understandable |
| 908 | // when visible space is limited to a single line of text. |
| 909 | ShortDescription *MultiformatMessageString `json:"shortDescription,omitempty"` |
| 910 | } |
| 911 | |
| 912 | // Information about the relation of one reporting descriptor to another. |
| 913 | type ReportingDescriptorRelationship struct { |
| 914 | // A description of the reporting descriptor relationship. |
| 915 | Description *Message `json:"description,omitempty"` |
| 916 | // A set of distinct strings that categorize the relationship. Well-known kinds include |
| 917 | // 'canPrecede', 'canFollow', 'willPrecede', 'willFollow', 'superset', 'subset', 'equal', |
| 918 | // 'disjoint', 'relevant', and 'incomparable'. |
| 919 | Kinds []string `json:"kinds,omitempty"` |
| 920 | // Key/value pairs that provide additional information about the reporting descriptor |
| 921 | // reference. |
| 922 | Properties *PropertyBag `json:"properties,omitempty"` |
| 923 | // A reference to the related reporting descriptor. |
| 924 | Target ReportingDescriptorReference `json:"target"` |
| 925 | } |
| 926 | |
| 927 | // Translation metadata, required for a translation, not populated by other component |
| 928 | // types. |
| 929 | // |
| 930 | // Provides additional metadata related to translation. |
| 931 | type TranslationMetadata struct { |
| 932 | // The absolute URI from which the translation metadata can be downloaded. |
| 933 | DownloadURI *string `json:"downloadUri,omitempty"` |
| 934 | // A comprehensive description of the translation metadata. |
| 935 | FullDescription *MultiformatMessageString `json:"fullDescription,omitempty"` |
| 936 | // The full name associated with the translation metadata. |
| 937 | FullName *string `json:"fullName,omitempty"` |
| 938 | // The absolute URI from which information related to the translation metadata can be |
| 939 | // downloaded. |
| 940 | InformationURI *string `json:"informationUri,omitempty"` |
| 941 | // The name associated with the translation metadata. |
| 942 | Name string `json:"name"` |
| 943 | // Key/value pairs that provide additional information about the translation metadata. |
| 944 | Properties *PropertyBag `json:"properties,omitempty"` |
| 945 | // A brief description of the translation metadata. |
| 946 | ShortDescription *MultiformatMessageString `json:"shortDescription,omitempty"` |
| 947 | } |
| 948 | |
| 949 | // A network of nodes and directed edges that describes some aspect of the structure of the |
| 950 | // code (for example, a call graph). |
| 951 | type Graph struct { |
| 952 | // A description of the graph. |
| 953 | Description *Message `json:"description,omitempty"` |
| 954 | // An array of edge objects representing the edges of the graph. |
| 955 | Edges []Edge `json:"edges,omitempty"` |
| 956 | // An array of node objects representing the nodes of the graph. |
| 957 | Nodes []Node `json:"nodes,omitempty"` |
| 958 | // Key/value pairs that provide additional information about the graph. |
| 959 | Properties *PropertyBag `json:"properties,omitempty"` |
| 960 | } |
| 961 | |
| 962 | // Represents a directed edge in a graph. |
| 963 | type Edge struct { |
| 964 | // A string that uniquely identifies the edge within its graph. |
| 965 | ID string `json:"id"` |
| 966 | // A short description of the edge. |
| 967 | Label *Message `json:"label,omitempty"` |
| 968 | // Key/value pairs that provide additional information about the edge. |
| 969 | Properties *PropertyBag `json:"properties,omitempty"` |
| 970 | // Identifies the source node (the node at which the edge starts). |
| 971 | SourceNodeID string `json:"sourceNodeId"` |
| 972 | // Identifies the target node (the node at which the edge ends). |
| 973 | TargetNodeID string `json:"targetNodeId"` |
| 974 | } |
| 975 | |
| 976 | // Represents a node in a graph. |
| 977 | type Node struct { |
| 978 | // Array of child nodes. |
| 979 | Children []Node `json:"children,omitempty"` |
| 980 | // A string that uniquely identifies the node within its graph. |
| 981 | ID string `json:"id"` |
| 982 | // A short description of the node. |
| 983 | Label *Message `json:"label,omitempty"` |
| 984 | // A code location associated with the node. |
| 985 | Location *Location `json:"location,omitempty"` |
| 986 | // Key/value pairs that provide additional information about the node. |
| 987 | Properties *PropertyBag `json:"properties,omitempty"` |
| 988 | } |
| 989 | |
| 990 | // A result produced by an analysis tool. |
| 991 | type Result struct { |
| 992 | // Identifies the artifact that the analysis tool was instructed to scan. This need not be |
| 993 | // the same as the artifact where the result actually occurred. |
| 994 | AnalysisTarget *ArtifactLocation `json:"analysisTarget,omitempty"` |
| 995 | // A set of artifacts relevant to the result. |
| 996 | Attachments []AttachmentElement `json:"attachments,omitempty"` |
| 997 | // The state of a result relative to a baseline of a previous run. |
| 998 | BaselineState *BaselineState `json:"baselineState,omitempty"` |
| 999 | // An array of 'codeFlow' objects relevant to the result. |
| 1000 | CodeFlows []CodeFlow `json:"codeFlows,omitempty"` |
| 1001 | // A stable, unique identifier for the equivalence class of logically identical results to |
| 1002 | // which this result belongs, in the form of a GUID. |
| 1003 | CorrelationGUID *string `json:"correlationGuid,omitempty"` |
| 1004 | // A set of strings each of which individually defines a stable, unique identity for the |
| 1005 | // result. |
| 1006 | Fingerprints map[string]string `json:"fingerprints,omitempty"` |
| 1007 | // An array of 'fix' objects, each of which represents a proposed fix to the problem |
| 1008 | // indicated by the result. |
| 1009 | Fixes []Fix `json:"fixes,omitempty"` |
| 1010 | // An array of zero or more unique graph objects associated with the result. |
| 1011 | Graphs []Graph `json:"graphs,omitempty"` |
| 1012 | // An array of one or more unique 'graphTraversal' objects. |
| 1013 | GraphTraversals []GraphTraversal `json:"graphTraversals,omitempty"` |
| 1014 | // A stable, unique identifier for the result in the form of a GUID. |
| 1015 | GUID *string `json:"guid,omitempty"` |
| 1016 | // An absolute URI at which the result can be viewed. |
| 1017 | HostedViewerURI *string `json:"hostedViewerUri,omitempty"` |
| 1018 | // A value that categorizes results by evaluation state. |
| 1019 | Kind *ResultKind `json:"kind,omitempty"` |
| 1020 | // A value specifying the severity level of the result. |
| 1021 | Level *Level `json:"level,omitempty"` |
| 1022 | // The set of locations where the result was detected. Specify only one location unless the |
| 1023 | // problem indicated by the result can only be corrected by making a change at every |
| 1024 | // specified location. |
| 1025 | Locations []Location `json:"locations,omitempty"` |
| 1026 | // A message that describes the result. The first sentence of the message only will be |
| 1027 | // displayed when visible space is limited. |
| 1028 | Message Message `json:"message"` |
| 1029 | // A positive integer specifying the number of times this logically unique result was |
| 1030 | // observed in this run. |
| 1031 | OccurrenceCount *int64 `json:"occurrenceCount,omitempty"` |
| 1032 | // A set of strings that contribute to the stable, unique identity of the result. |
| 1033 | PartialFingerprints map[string]string `json:"partialFingerprints,omitempty"` |
| 1034 | // Key/value pairs that provide additional information about the result. |
| 1035 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1036 | // Information about how and when the result was detected. |
| 1037 | Provenance *ResultProvenance `json:"provenance,omitempty"` |
| 1038 | // A number representing the priority or importance of the result. |
| 1039 | Rank *float64 `json:"rank,omitempty"` |
| 1040 | // A set of locations relevant to this result. |
| 1041 | RelatedLocations []Location `json:"relatedLocations,omitempty"` |
| 1042 | // A reference used to locate the rule descriptor relevant to this result. |
| 1043 | Rule *ReportingDescriptorReference `json:"rule,omitempty"` |
| 1044 | // The stable, unique identifier of the rule, if any, to which this result is relevant. |
| 1045 | RuleID *string `json:"ruleId,omitempty"` |
| 1046 | // The index within the tool component rules array of the rule object associated with this |
| 1047 | // result. |
| 1048 | RuleIndex *int64 `json:"ruleIndex,omitempty"` |
| 1049 | // An array of 'stack' objects relevant to the result. |
| 1050 | Stacks []Stack `json:"stacks,omitempty"` |
| 1051 | // A set of suppressions relevant to this result. |
| 1052 | Suppressions []Suppression `json:"suppressions,omitempty"` |
| 1053 | // An array of references to taxonomy reporting descriptors that are applicable to the |
| 1054 | // result. |
| 1055 | Taxa []ReportingDescriptorReference `json:"taxa,omitempty"` |
| 1056 | // A web request associated with this result. |
| 1057 | WebRequest *WebRequest `json:"webRequest,omitempty"` |
| 1058 | // A web response associated with this result. |
| 1059 | WebResponse *WebResponse `json:"webResponse,omitempty"` |
| 1060 | // The URIs of the work items associated with this result. |
| 1061 | WorkItemUris []string `json:"workItemUris,omitempty"` |
| 1062 | } |
| 1063 | |
| 1064 | // An artifact relevant to a result. |
| 1065 | type AttachmentElement struct { |
| 1066 | // The location of the attachment. |
| 1067 | ArtifactLocation ArtifactLocation `json:"artifactLocation"` |
| 1068 | // A message describing the role played by the attachment. |
| 1069 | Description *Message `json:"description,omitempty"` |
| 1070 | // Key/value pairs that provide additional information about the attachment. |
| 1071 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1072 | // An array of rectangles specifying areas of interest within the image. |
| 1073 | Rectangles []Rectangle `json:"rectangles,omitempty"` |
| 1074 | // An array of regions of interest within the attachment. |
| 1075 | Regions []Region `json:"regions,omitempty"` |
| 1076 | } |
| 1077 | |
| 1078 | // An area within an image. |
| 1079 | type Rectangle struct { |
| 1080 | // The Y coordinate of the bottom edge of the rectangle, measured in the image's natural |
| 1081 | // units. |
| 1082 | Bottom *float64 `json:"bottom,omitempty"` |
| 1083 | // The X coordinate of the left edge of the rectangle, measured in the image's natural units. |
| 1084 | Left *float64 `json:"left,omitempty"` |
| 1085 | // A message relevant to the rectangle. |
| 1086 | Message *Message `json:"message,omitempty"` |
| 1087 | // Key/value pairs that provide additional information about the rectangle. |
| 1088 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1089 | // The X coordinate of the right edge of the rectangle, measured in the image's natural |
| 1090 | // units. |
| 1091 | Right *float64 `json:"right,omitempty"` |
| 1092 | // The Y coordinate of the top edge of the rectangle, measured in the image's natural units. |
| 1093 | Top *float64 `json:"top,omitempty"` |
| 1094 | } |
| 1095 | |
| 1096 | // A set of threadFlows which together describe a pattern of code execution relevant to |
| 1097 | // detecting a result. |
| 1098 | type CodeFlow struct { |
| 1099 | // A message relevant to the code flow. |
| 1100 | Message *Message `json:"message,omitempty"` |
| 1101 | // Key/value pairs that provide additional information about the code flow. |
| 1102 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1103 | // An array of one or more unique threadFlow objects, each of which describes the progress |
| 1104 | // of a program through a thread of execution. |
| 1105 | ThreadFlows []ThreadFlow `json:"threadFlows"` |
| 1106 | } |
| 1107 | |
| 1108 | // Describes a sequence of code locations that specify a path through a single thread of |
| 1109 | // execution such as an operating system or fiber. |
| 1110 | type ThreadFlow struct { |
| 1111 | // An string that uniquely identifies the threadFlow within the codeFlow in which it occurs. |
| 1112 | ID *string `json:"id,omitempty"` |
| 1113 | // Values of relevant expressions at the start of the thread flow that remain constant. |
| 1114 | ImmutableState map[string]MultiformatMessageString `json:"immutableState,omitempty"` |
| 1115 | // Values of relevant expressions at the start of the thread flow that may change during |
| 1116 | // thread flow execution. |
| 1117 | InitialState map[string]MultiformatMessageString `json:"initialState,omitempty"` |
| 1118 | // A temporally ordered array of 'threadFlowLocation' objects, each of which describes a |
| 1119 | // location visited by the tool while producing the result. |
| 1120 | Locations []ThreadFlowLocation `json:"locations"` |
| 1121 | // A message relevant to the thread flow. |
| 1122 | Message *Message `json:"message,omitempty"` |
| 1123 | // Key/value pairs that provide additional information about the thread flow. |
| 1124 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1125 | } |
| 1126 | |
| 1127 | // A location visited by an analysis tool while simulating or monitoring the execution of a |
| 1128 | // program. |
| 1129 | type ThreadFlowLocation struct { |
| 1130 | // An integer representing the temporal order in which execution reached this location. |
| 1131 | ExecutionOrder *int64 `json:"executionOrder,omitempty"` |
| 1132 | // The Coordinated Universal Time (UTC) date and time at which this location was executed. |
| 1133 | ExecutionTimeUTC *time.Time `json:"executionTimeUtc,omitempty"` |
| 1134 | // Specifies the importance of this location in understanding the code flow in which it |
| 1135 | // occurs. The order from most to least important is "essential", "important", |
| 1136 | // "unimportant". Default: "important". |
| 1137 | Importance *Importance `json:"importance,omitempty"` |
| 1138 | // The index within the run threadFlowLocations array. |
| 1139 | Index *int64 `json:"index,omitempty"` |
| 1140 | // A set of distinct strings that categorize the thread flow location. Well-known kinds |
| 1141 | // include 'acquire', 'release', 'enter', 'exit', 'call', 'return', 'branch', 'implicit', |
| 1142 | // 'false', 'true', 'caution', 'danger', 'unknown', 'unreachable', 'taint', 'function', |
| 1143 | // 'handler', 'lock', 'memory', 'resource', 'scope' and 'value'. |
| 1144 | Kinds []string `json:"kinds,omitempty"` |
| 1145 | // The code location. |
| 1146 | Location *Location `json:"location,omitempty"` |
| 1147 | // The name of the module that contains the code that is executing. |
| 1148 | Module *string `json:"module,omitempty"` |
| 1149 | // An integer representing a containment hierarchy within the thread flow. |
| 1150 | NestingLevel *int64 `json:"nestingLevel,omitempty"` |
| 1151 | // Key/value pairs that provide additional information about the threadflow location. |
| 1152 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1153 | // The call stack leading to this location. |
| 1154 | Stack *Stack `json:"stack,omitempty"` |
| 1155 | // A dictionary, each of whose keys specifies a variable or expression, the associated value |
| 1156 | // of which represents the variable or expression value. For an annotation of kind |
| 1157 | // 'continuation', for example, this dictionary might hold the current assumed values of a |
| 1158 | // set of global variables. |
| 1159 | State map[string]MultiformatMessageString `json:"state,omitempty"` |
| 1160 | // An array of references to rule or taxonomy reporting descriptors that are applicable to |
| 1161 | // the thread flow location. |
| 1162 | Taxa []ReportingDescriptorReference `json:"taxa,omitempty"` |
| 1163 | // A web request associated with this thread flow location. |
| 1164 | WebRequest *WebRequest `json:"webRequest,omitempty"` |
| 1165 | // A web response associated with this thread flow location. |
| 1166 | WebResponse *WebResponse `json:"webResponse,omitempty"` |
| 1167 | } |
| 1168 | |
| 1169 | // A web request associated with this thread flow location. |
| 1170 | // |
| 1171 | // Describes an HTTP request. |
| 1172 | // |
| 1173 | // A web request associated with this result. |
| 1174 | type WebRequest struct { |
| 1175 | // The body of the request. |
| 1176 | Body *ArtifactContent `json:"body,omitempty"` |
| 1177 | // The request headers. |
| 1178 | Headers map[string]string `json:"headers,omitempty"` |
| 1179 | // The index within the run.webRequests array of the request object associated with this |
| 1180 | // result. |
| 1181 | Index *int64 `json:"index,omitempty"` |
| 1182 | // The HTTP method. Well-known values are 'GET', 'PUT', 'POST', 'DELETE', 'PATCH', 'HEAD', |
| 1183 | // 'OPTIONS', 'TRACE', 'CONNECT'. |
| 1184 | Method *string `json:"method,omitempty"` |
| 1185 | // The request parameters. |
| 1186 | Parameters map[string]string `json:"parameters,omitempty"` |
| 1187 | // Key/value pairs that provide additional information about the request. |
| 1188 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1189 | // The request protocol. Example: 'http'. |
| 1190 | Protocol *string `json:"protocol,omitempty"` |
| 1191 | // The target of the request. |
| 1192 | Target *string `json:"target,omitempty"` |
| 1193 | // The request version. Example: '1.1'. |
| 1194 | Version *string `json:"version,omitempty"` |
| 1195 | } |
| 1196 | |
| 1197 | // A web response associated with this thread flow location. |
| 1198 | // |
| 1199 | // Describes the response to an HTTP request. |
| 1200 | // |
| 1201 | // A web response associated with this result. |
| 1202 | type WebResponse struct { |
| 1203 | // The body of the response. |
| 1204 | Body *ArtifactContent `json:"body,omitempty"` |
| 1205 | // The response headers. |
| 1206 | Headers map[string]string `json:"headers,omitempty"` |
| 1207 | // The index within the run.webResponses array of the response object associated with this |
| 1208 | // result. |
| 1209 | Index *int64 `json:"index,omitempty"` |
| 1210 | // Specifies whether a response was received from the server. |
| 1211 | NoResponseReceived *bool `json:"noResponseReceived,omitempty"` |
| 1212 | // Key/value pairs that provide additional information about the response. |
| 1213 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1214 | // The response protocol. Example: 'http'. |
| 1215 | Protocol *string `json:"protocol,omitempty"` |
| 1216 | // The response reason. Example: 'Not found'. |
| 1217 | ReasonPhrase *string `json:"reasonPhrase,omitempty"` |
| 1218 | // The response status code. Example: 451. |
| 1219 | StatusCode *int64 `json:"statusCode,omitempty"` |
| 1220 | // The response version. Example: '1.1'. |
| 1221 | Version *string `json:"version,omitempty"` |
| 1222 | } |
| 1223 | |
| 1224 | // A proposed fix for the problem represented by a result object. A fix specifies a set of |
| 1225 | // artifacts to modify. For each artifact, it specifies a set of bytes to remove, and |
| 1226 | // provides a set of new bytes to replace them. |
| 1227 | type Fix struct { |
| 1228 | // One or more artifact changes that comprise a fix for a result. |
| 1229 | ArtifactChanges []ArtifactChange `json:"artifactChanges"` |
| 1230 | // A message that describes the proposed fix, enabling viewers to present the proposed |
| 1231 | // change to an end user. |
| 1232 | Description *Message `json:"description,omitempty"` |
| 1233 | // Key/value pairs that provide additional information about the fix. |
| 1234 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1235 | } |
| 1236 | |
| 1237 | // A change to a single artifact. |
| 1238 | type ArtifactChange struct { |
| 1239 | // The location of the artifact to change. |
| 1240 | ArtifactLocation ArtifactLocation `json:"artifactLocation"` |
| 1241 | // Key/value pairs that provide additional information about the change. |
| 1242 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1243 | // An array of replacement objects, each of which represents the replacement of a single |
| 1244 | // region in a single artifact specified by 'artifactLocation'. |
| 1245 | Replacements []Replacement `json:"replacements"` |
| 1246 | } |
| 1247 | |
| 1248 | // The replacement of a single region of an artifact. |
| 1249 | type Replacement struct { |
| 1250 | // The region of the artifact to delete. |
| 1251 | DeletedRegion Region `json:"deletedRegion"` |
| 1252 | // The content to insert at the location specified by the 'deletedRegion' property. |
| 1253 | InsertedContent *ArtifactContent `json:"insertedContent,omitempty"` |
| 1254 | // Key/value pairs that provide additional information about the replacement. |
| 1255 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1256 | } |
| 1257 | |
| 1258 | // Represents a path through a graph. |
| 1259 | type GraphTraversal struct { |
| 1260 | // A description of this graph traversal. |
| 1261 | Description *Message `json:"description,omitempty"` |
| 1262 | // The sequences of edges traversed by this graph traversal. |
| 1263 | EdgeTraversals []EdgeTraversal `json:"edgeTraversals,omitempty"` |
| 1264 | // Values of relevant expressions at the start of the graph traversal that remain constant |
| 1265 | // for the graph traversal. |
| 1266 | ImmutableState map[string]MultiformatMessageString `json:"immutableState,omitempty"` |
| 1267 | // Values of relevant expressions at the start of the graph traversal that may change during |
| 1268 | // graph traversal. |
| 1269 | InitialState map[string]MultiformatMessageString `json:"initialState,omitempty"` |
| 1270 | // Key/value pairs that provide additional information about the graph traversal. |
| 1271 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1272 | // The index within the result.graphs to be associated with the result. |
| 1273 | ResultGraphIndex *int64 `json:"resultGraphIndex,omitempty"` |
| 1274 | // The index within the run.graphs to be associated with the result. |
| 1275 | RunGraphIndex *int64 `json:"runGraphIndex,omitempty"` |
| 1276 | } |
| 1277 | |
| 1278 | // Represents the traversal of a single edge during a graph traversal. |
| 1279 | type EdgeTraversal struct { |
| 1280 | // Identifies the edge being traversed. |
| 1281 | EdgeID string `json:"edgeId"` |
| 1282 | // The values of relevant expressions after the edge has been traversed. |
| 1283 | FinalState map[string]MultiformatMessageString `json:"finalState,omitempty"` |
| 1284 | // A message to display to the user as the edge is traversed. |
| 1285 | Message *Message `json:"message,omitempty"` |
| 1286 | // Key/value pairs that provide additional information about the edge traversal. |
| 1287 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1288 | // The number of edge traversals necessary to return from a nested graph. |
| 1289 | StepOverEdgeCount *int64 `json:"stepOverEdgeCount,omitempty"` |
| 1290 | } |
| 1291 | |
| 1292 | // Information about how and when the result was detected. |
| 1293 | // |
| 1294 | // Contains information about how and when a result was detected. |
| 1295 | type ResultProvenance struct { |
| 1296 | // An array of physicalLocation objects which specify the portions of an analysis tool's |
| 1297 | // output that a converter transformed into the result. |
| 1298 | ConversionSources []PhysicalLocation `json:"conversionSources,omitempty"` |
| 1299 | // A GUID-valued string equal to the automationDetails.guid property of the run in which the |
| 1300 | // result was first detected. |
| 1301 | FirstDetectionRunGUID *string `json:"firstDetectionRunGuid,omitempty"` |
| 1302 | // The Coordinated Universal Time (UTC) date and time at which the result was first |
| 1303 | // detected. See "Date/time properties" in the SARIF spec for the required format. |
| 1304 | FirstDetectionTimeUTC *time.Time `json:"firstDetectionTimeUtc,omitempty"` |
| 1305 | // The index within the run.invocations array of the invocation object which describes the |
| 1306 | // tool invocation that detected the result. |
| 1307 | InvocationIndex *int64 `json:"invocationIndex,omitempty"` |
| 1308 | // A GUID-valued string equal to the automationDetails.guid property of the run in which the |
| 1309 | // result was most recently detected. |
| 1310 | LastDetectionRunGUID *string `json:"lastDetectionRunGuid,omitempty"` |
| 1311 | // The Coordinated Universal Time (UTC) date and time at which the result was most recently |
| 1312 | // detected. See "Date/time properties" in the SARIF spec for the required format. |
| 1313 | LastDetectionTimeUTC *time.Time `json:"lastDetectionTimeUtc,omitempty"` |
| 1314 | // Key/value pairs that provide additional information about the result. |
| 1315 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1316 | } |
| 1317 | |
| 1318 | // A suppression that is relevant to a result. |
| 1319 | type Suppression struct { |
| 1320 | // A stable, unique identifier for the suprression in the form of a GUID. |
| 1321 | GUID *string `json:"guid,omitempty"` |
| 1322 | // A string representing the justification for the suppression. |
| 1323 | Justification *string `json:"justification,omitempty"` |
| 1324 | // A string that indicates where the suppression is persisted. |
| 1325 | Kind SuppressionKind `json:"kind"` |
| 1326 | // Identifies the location associated with the suppression. |
| 1327 | Location *Location `json:"location,omitempty"` |
| 1328 | // Key/value pairs that provide additional information about the suppression. |
| 1329 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1330 | // A string that indicates the review status of the suppression. |
| 1331 | Status *Status `json:"status,omitempty"` |
| 1332 | } |
| 1333 | |
| 1334 | // Describes a single run of an analysis tool, and contains the reported output of that run. |
| 1335 | type Run struct { |
| 1336 | // Addresses associated with this run instance, if any. |
| 1337 | Addresses []Address `json:"addresses,omitempty"` |
| 1338 | // An array of artifact objects relevant to the run. |
| 1339 | Artifacts []Artifact `json:"artifacts,omitempty"` |
| 1340 | // Automation details that describe this run. |
| 1341 | AutomationDetails *RunAutomationDetails `json:"automationDetails,omitempty"` |
| 1342 | // The 'guid' property of a previous SARIF 'run' that comprises the baseline that was used |
| 1343 | // to compute result 'baselineState' properties for the run. |
| 1344 | BaselineGUID *string `json:"baselineGuid,omitempty"` |
| 1345 | // Specifies the unit in which the tool measures columns. |
| 1346 | ColumnKind *ColumnKind `json:"columnKind,omitempty"` |
| 1347 | // A conversion object that describes how a converter transformed an analysis tool's native |
| 1348 | // reporting format into the SARIF format. |
| 1349 | Conversion *Conversion `json:"conversion,omitempty"` |
| 1350 | // Specifies the default encoding for any artifact object that refers to a text file. |
| 1351 | DefaultEncoding *string `json:"defaultEncoding,omitempty"` |
| 1352 | // Specifies the default source language for any artifact object that refers to a text file |
| 1353 | // that contains source code. |
| 1354 | DefaultSourceLanguage *string `json:"defaultSourceLanguage,omitempty"` |
| 1355 | // References to external property files that should be inlined with the content of a root |
| 1356 | // log file. |
| 1357 | ExternalPropertyFileReferences *ExternalPropertyFileReferences `json:"externalPropertyFileReferences,omitempty"` |
| 1358 | // An array of zero or more unique graph objects associated with the run. |
| 1359 | Graphs []Graph `json:"graphs,omitempty"` |
| 1360 | // Describes the invocation of the analysis tool. |
| 1361 | Invocations []Invocation `json:"invocations,omitempty"` |
| 1362 | // The language of the messages emitted into the log file during this run (expressed as an |
| 1363 | // ISO 639-1 two-letter lowercase culture code) and an optional region (expressed as an ISO |
| 1364 | // 3166-1 two-letter uppercase subculture code associated with a country or region). The |
| 1365 | // casing is recommended but not required (in order for this data to conform to RFC5646). |
| 1366 | Language *string `json:"language,omitempty"` |
| 1367 | // An array of logical locations such as namespaces, types or functions. |
| 1368 | LogicalLocations []LogicalLocation `json:"logicalLocations,omitempty"` |
| 1369 | // An ordered list of character sequences that were treated as line breaks when computing |
| 1370 | // region information for the run. |
| 1371 | NewlineSequences []string `json:"newlineSequences,omitempty"` |
| 1372 | // The artifact location specified by each uriBaseId symbol on the machine where the tool |
| 1373 | // originally ran. |
| 1374 | OriginalURIBaseIDS map[string]ArtifactLocation `json:"originalUriBaseIds,omitempty"` |
| 1375 | // Contains configurations that may potentially override both |
| 1376 | // reportingDescriptor.defaultConfiguration (the tool's default severities) and |
| 1377 | // invocation.configurationOverrides (severities established at run-time from the command |
| 1378 | // line). |
| 1379 | Policies []ToolComponent `json:"policies,omitempty"` |
| 1380 | // Key/value pairs that provide additional information about the run. |
| 1381 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1382 | // An array of strings used to replace sensitive information in a redaction-aware property. |
| 1383 | RedactionTokens []string `json:"redactionTokens,omitempty"` |
| 1384 | // The set of results contained in an SARIF log. The results array can be omitted when a run |
| 1385 | // is solely exporting rules metadata. It must be present (but may be empty) if a log file |
| 1386 | // represents an actual scan. |
| 1387 | Results []Result `json:"results,omitempty"` |
| 1388 | // Automation details that describe the aggregate of runs to which this run belongs. |
| 1389 | RunAggregates []RunAutomationDetails `json:"runAggregates,omitempty"` |
| 1390 | // A specialLocations object that defines locations of special significance to SARIF |
| 1391 | // consumers. |
| 1392 | SpecialLocations *SpecialLocations `json:"specialLocations,omitempty"` |
| 1393 | // An array of toolComponent objects relevant to a taxonomy in which results are categorized. |
| 1394 | Taxonomies []ToolComponent `json:"taxonomies,omitempty"` |
| 1395 | // An array of threadFlowLocation objects cached at run level. |
| 1396 | ThreadFlowLocations []ThreadFlowLocation `json:"threadFlowLocations,omitempty"` |
| 1397 | // Information about the tool or tool pipeline that generated the results in this run. A run |
| 1398 | // can only contain results produced by a single tool or tool pipeline. A run can aggregate |
| 1399 | // results from multiple log files, as long as context around the tool run (tool |
| 1400 | // command-line arguments and the like) is identical for all aggregated files. |
| 1401 | Tool Tool `json:"tool"` |
| 1402 | // The set of available translations of the localized data provided by the tool. |
| 1403 | Translations []ToolComponent `json:"translations,omitempty"` |
| 1404 | // Specifies the revision in version control of the artifacts that were scanned. |
| 1405 | VersionControlProvenance []VersionControlDetails `json:"versionControlProvenance,omitempty"` |
| 1406 | // An array of request objects cached at run level. |
| 1407 | WebRequests []WebRequest `json:"webRequests,omitempty"` |
| 1408 | // An array of response objects cached at run level. |
| 1409 | WebResponses []WebResponse `json:"webResponses,omitempty"` |
| 1410 | } |
| 1411 | |
| 1412 | // Automation details that describe this run. |
| 1413 | // |
| 1414 | // Information that describes a run's identity and role within an engineering system process. |
| 1415 | type RunAutomationDetails struct { |
| 1416 | // A stable, unique identifier for the equivalence class of runs to which this object's |
| 1417 | // containing run object belongs in the form of a GUID. |
| 1418 | CorrelationGUID *string `json:"correlationGuid,omitempty"` |
| 1419 | // A description of the identity and role played within the engineering system by this |
| 1420 | // object's containing run object. |
| 1421 | Description *Message `json:"description,omitempty"` |
| 1422 | // A stable, unique identifier for this object's containing run object in the form of a GUID. |
| 1423 | GUID *string `json:"guid,omitempty"` |
| 1424 | // A hierarchical string that uniquely identifies this object's containing run object. |
| 1425 | ID *string `json:"id,omitempty"` |
| 1426 | // Key/value pairs that provide additional information about the run automation details. |
| 1427 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1428 | } |
| 1429 | |
| 1430 | // References to external property files that should be inlined with the content of a root |
| 1431 | // log file. |
| 1432 | type ExternalPropertyFileReferences struct { |
| 1433 | // An array of external property files containing run.addresses arrays to be merged with the |
| 1434 | // root log file. |
| 1435 | Addresses []ExternalPropertyFileReference `json:"addresses,omitempty"` |
| 1436 | // An array of external property files containing run.artifacts arrays to be merged with the |
| 1437 | // root log file. |
| 1438 | Artifacts []ExternalPropertyFileReference `json:"artifacts,omitempty"` |
| 1439 | // An external property file containing a run.conversion object to be merged with the root |
| 1440 | // log file. |
| 1441 | Conversion *ExternalPropertyFileReference `json:"conversion,omitempty"` |
| 1442 | // An external property file containing a run.driver object to be merged with the root log |
| 1443 | // file. |
| 1444 | Driver *ExternalPropertyFileReference `json:"driver,omitempty"` |
| 1445 | // An array of external property files containing run.extensions arrays to be merged with |
| 1446 | // the root log file. |
| 1447 | Extensions []ExternalPropertyFileReference `json:"extensions,omitempty"` |
| 1448 | // An external property file containing a run.properties object to be merged with the root |
| 1449 | // log file. |
| 1450 | ExternalizedProperties *ExternalPropertyFileReference `json:"externalizedProperties,omitempty"` |
| 1451 | // An array of external property files containing a run.graphs object to be merged with the |
| 1452 | // root log file. |
| 1453 | Graphs []ExternalPropertyFileReference `json:"graphs,omitempty"` |
| 1454 | // An array of external property files containing run.invocations arrays to be merged with |
| 1455 | // the root log file. |
| 1456 | Invocations []ExternalPropertyFileReference `json:"invocations,omitempty"` |
| 1457 | // An array of external property files containing run.logicalLocations arrays to be merged |
| 1458 | // with the root log file. |
| 1459 | LogicalLocations []ExternalPropertyFileReference `json:"logicalLocations,omitempty"` |
| 1460 | // An array of external property files containing run.policies arrays to be merged with the |
| 1461 | // root log file. |
| 1462 | Policies []ExternalPropertyFileReference `json:"policies,omitempty"` |
| 1463 | // Key/value pairs that provide additional information about the external property files. |
| 1464 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1465 | // An array of external property files containing run.results arrays to be merged with the |
| 1466 | // root log file. |
| 1467 | Results []ExternalPropertyFileReference `json:"results,omitempty"` |
| 1468 | // An array of external property files containing run.taxonomies arrays to be merged with |
| 1469 | // the root log file. |
| 1470 | Taxonomies []ExternalPropertyFileReference `json:"taxonomies,omitempty"` |
| 1471 | // An array of external property files containing run.threadFlowLocations arrays to be |
| 1472 | // merged with the root log file. |
| 1473 | ThreadFlowLocations []ExternalPropertyFileReference `json:"threadFlowLocations,omitempty"` |
| 1474 | // An array of external property files containing run.translations arrays to be merged with |
| 1475 | // the root log file. |
| 1476 | Translations []ExternalPropertyFileReference `json:"translations,omitempty"` |
| 1477 | // An array of external property files containing run.requests arrays to be merged with the |
| 1478 | // root log file. |
| 1479 | WebRequests []ExternalPropertyFileReference `json:"webRequests,omitempty"` |
| 1480 | // An array of external property files containing run.responses arrays to be merged with the |
| 1481 | // root log file. |
| 1482 | WebResponses []ExternalPropertyFileReference `json:"webResponses,omitempty"` |
| 1483 | } |
| 1484 | |
| 1485 | // An external property file containing a run.conversion object to be merged with the root |
| 1486 | // log file. |
| 1487 | // |
| 1488 | // An external property file containing a run.driver object to be merged with the root log |
| 1489 | // file. |
| 1490 | // |
| 1491 | // An external property file containing a run.properties object to be merged with the root |
| 1492 | // log file. |
| 1493 | // |
| 1494 | // Contains information that enables a SARIF consumer to locate the external property file |
| 1495 | // that contains the value of an externalized property associated with the run. |
| 1496 | type ExternalPropertyFileReference struct { |
| 1497 | // A stable, unique identifier for the external property file in the form of a GUID. |
| 1498 | GUID *string `json:"guid,omitempty"` |
| 1499 | // A non-negative integer specifying the number of items contained in the external property |
| 1500 | // file. |
| 1501 | ItemCount *int64 `json:"itemCount,omitempty"` |
| 1502 | // The location of the external property file. |
| 1503 | Location *ArtifactLocation `json:"location,omitempty"` |
| 1504 | // Key/value pairs that provide additional information about the external property file. |
| 1505 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1506 | } |
| 1507 | |
| 1508 | // A specialLocations object that defines locations of special significance to SARIF |
| 1509 | // consumers. |
| 1510 | // |
| 1511 | // Defines locations of special significance to SARIF consumers. |
| 1512 | type SpecialLocations struct { |
| 1513 | // Provides a suggestion to SARIF consumers to display file paths relative to the specified |
| 1514 | // location. |
| 1515 | DisplayBase *ArtifactLocation `json:"displayBase,omitempty"` |
| 1516 | // Key/value pairs that provide additional information about the special locations. |
| 1517 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1518 | } |
| 1519 | |
| 1520 | // Specifies the information necessary to retrieve a desired revision from a version control |
| 1521 | // system. |
| 1522 | type VersionControlDetails struct { |
| 1523 | // A Coordinated Universal Time (UTC) date and time that can be used to synchronize an |
| 1524 | // enlistment to the state of the repository at that time. |
| 1525 | AsOfTimeUTC *time.Time `json:"asOfTimeUtc,omitempty"` |
| 1526 | // The name of a branch containing the revision. |
| 1527 | Branch *string `json:"branch,omitempty"` |
| 1528 | // The location in the local file system to which the root of the repository was mapped at |
| 1529 | // the time of the analysis. |
| 1530 | MappedTo *ArtifactLocation `json:"mappedTo,omitempty"` |
| 1531 | // Key/value pairs that provide additional information about the version control details. |
| 1532 | Properties *PropertyBag `json:"properties,omitempty"` |
| 1533 | // The absolute URI of the repository. |
| 1534 | RepositoryURI string `json:"repositoryUri"` |
| 1535 | // A string that uniquely and permanently identifies the revision within the repository. |
| 1536 | RevisionID *string `json:"revisionId,omitempty"` |
| 1537 | // A tag that has been applied to the revision. |
| 1538 | RevisionTag *string `json:"revisionTag,omitempty"` |
| 1539 | } |
| 1540 | |
| 1541 | type Role string |
| 1542 | |
| 1543 | const ( |
| 1544 | Added Role = "added" |
| 1545 | AnalysisTarget Role = "analysisTarget" |
| 1546 | Attachment Role = "attachment" |
| 1547 | DebugOutputFile Role = "debugOutputFile" |
| 1548 | Deleted Role = "deleted" |
| 1549 | Directory Role = "directory" |
| 1550 | Driver Role = "driver" |
| 1551 | Extension Role = "extension" |
| 1552 | MemoryContents Role = "memoryContents" |
| 1553 | Modified Role = "modified" |
| 1554 | Policy Role = "policy" |
| 1555 | ReferencedOnCommandLine Role = "referencedOnCommandLine" |
| 1556 | Renamed Role = "renamed" |
| 1557 | ResponseFile Role = "responseFile" |
| 1558 | ResultFile Role = "resultFile" |
| 1559 | StandardStream Role = "standardStream" |
| 1560 | Taxonomy Role = "taxonomy" |
| 1561 | ToolSpecifiedConfiguration Role = "toolSpecifiedConfiguration" |
| 1562 | TracedFile Role = "tracedFile" |
| 1563 | Translation Role = "translation" |
| 1564 | Uncontrolled Role = "uncontrolled" |
| 1565 | Unmodified Role = "unmodified" |
| 1566 | UserSpecifiedConfiguration Role = "userSpecifiedConfiguration" |
| 1567 | ) |
| 1568 | |
| 1569 | // Specifies the failure level for the report. |
| 1570 | // |
| 1571 | // A value specifying the severity level of the notification. |
| 1572 | // |
| 1573 | // A value specifying the severity level of the result. |
| 1574 | type Level string |
| 1575 | |
| 1576 | const ( |
| 1577 | Error Level = "error" |
| 1578 | None Level = "none" |
| 1579 | Note Level = "note" |
| 1580 | Warning Level = "warning" |
| 1581 | ) |
| 1582 | |
| 1583 | type Content string |
| 1584 | |
| 1585 | const ( |
| 1586 | LocalizedData Content = "localizedData" |
| 1587 | NonLocalizedData Content = "nonLocalizedData" |
| 1588 | ) |
| 1589 | |
| 1590 | // The state of a result relative to a baseline of a previous run. |
| 1591 | type BaselineState string |
| 1592 | |
| 1593 | const ( |
| 1594 | Absent BaselineState = "absent" |
| 1595 | New BaselineState = "new" |
| 1596 | Unchanged BaselineState = "unchanged" |
| 1597 | Updated BaselineState = "updated" |
| 1598 | ) |
| 1599 | |
| 1600 | // Specifies the importance of this location in understanding the code flow in which it |
| 1601 | // occurs. The order from most to least important is "essential", "important", |
| 1602 | // "unimportant". Default: "important". |
| 1603 | type Importance string |
| 1604 | |
| 1605 | const ( |
| 1606 | Essential Importance = "essential" |
| 1607 | Important Importance = "important" |
| 1608 | Unimportant Importance = "unimportant" |
| 1609 | ) |
| 1610 | |
| 1611 | // A value that categorizes results by evaluation state. |
| 1612 | type ResultKind string |
| 1613 | |
| 1614 | const ( |
| 1615 | Fail ResultKind = "fail" |
| 1616 | Informational ResultKind = "informational" |
| 1617 | NotApplicable ResultKind = "notApplicable" |
| 1618 | Open ResultKind = "open" |
| 1619 | Pass ResultKind = "pass" |
| 1620 | Review ResultKind = "review" |
| 1621 | ) |
| 1622 | |
| 1623 | // A string that indicates where the suppression is persisted. |
| 1624 | type SuppressionKind string |
| 1625 | |
| 1626 | const ( |
| 1627 | External SuppressionKind = "external" |
| 1628 | InSource SuppressionKind = "inSource" |
| 1629 | ) |
| 1630 | |
| 1631 | // A string that indicates the review status of the suppression. |
| 1632 | type Status string |
| 1633 | |
| 1634 | const ( |
| 1635 | Accepted Status = "accepted" |
| 1636 | Rejected Status = "rejected" |
| 1637 | UnderReview Status = "underReview" |
| 1638 | ) |
| 1639 | |
| 1640 | // The SARIF format version of this external properties object. |
| 1641 | // |
| 1642 | // The SARIF format version of this log file. |
| 1643 | type Version string |
| 1644 | |
| 1645 | const ( |
| 1646 | The210 Version = "2.1.0" |
| 1647 | ) |
| 1648 | |
| 1649 | // Specifies the unit in which the tool measures columns. |
| 1650 | type ColumnKind string |
| 1651 | |
| 1652 | const ( |
| 1653 | UnicodeCodePoints ColumnKind = "unicodeCodePoints" |
| 1654 | Utf16CodeUnits ColumnKind = "utf16CodeUnits" |
| 1655 | ) |