curl --request POST \
--url https://app.trustivan.com/api/v1/findings/{id}/fix-pr \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/findings/{id}/fix-pr"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/findings/{id}/fix-pr', 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/findings/{id}/fix-pr"
req, _ := http.NewRequest("POST", 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))
}{
"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"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Open a dependency fix pull request for a finding
Requires findings:write. One pull request per package, bumped to the
highest fixed version the package’s open findings on this repository
need, on branch trustivan/fix/<ecosystem>/<package>-<version> created
from the default branch. 200 with the existing one when it was
already opened; an existing branch is never moved (409). npm
(package.json), Go modules (go.mod) and pip (requirements*.txt
exact pins, refused when pinned with --hash) only. package-lock.json
and go.sum are updated too when that is provably coherent, and nothing
is ever run. Otherwise lockfile_follow_up on the result is the sentence
the pull request also carries: which file, why, and the command to run.
Empty means nothing is left to run; absent means a pull request opened
before this was recorded.
curl --request POST \
--url https://app.trustivan.com/api/v1/findings/{id}/fix-pr \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/findings/{id}/fix-pr"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/findings/{id}/fix-pr', 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/findings/{id}/fix-pr"
req, _ := http.NewRequest("POST", 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))
}{
"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"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
{fix_pull_request}, already open.