Export a scan's findings as SARIF 2.1.0
curl --request GET \
--url https://app.trustivan.com/api/v1/scans/{id}/sarif \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/scans/{id}/sarif"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/scans/{id}/sarif', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/scans/{id}/sarif"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"version": "2.1.0",
"runs": [
{}
],
"$schema": "<string>"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Export a scan's findings as SARIF 2.1.0
The findings this scan observed, as a SARIF 2.1.0 log: the format
GitHub code scanning, GitLab and Azure DevOps ingest to annotate a
pull request. Needs findings:read.
The log holds the scan’s findings that are not suppressed or resolved,
worst first, capped at 5,000 results. runs[0].properties.truncated
says whether the cap was hit and omittedSuppressedOrResolved counts
what was left out. A finding with no file, such as a package in an
image, is located on the scan target at line 1, because a code host
shows nothing for a result without a location.
A scan that is still queued or running answers 409: a partial log
uploaded to a code host closes every alert it does not mention.
GET
/
scans
/
{id}
/
sarif
Export a scan's findings as SARIF 2.1.0
curl --request GET \
--url https://app.trustivan.com/api/v1/scans/{id}/sarif \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/scans/{id}/sarif"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/scans/{id}/sarif', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/scans/{id}/sarif"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"version": "2.1.0",
"runs": [
{}
],
"$schema": "<string>"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}