import requests
url = "https://platform.ankra.app/org/security/findings/{finding_id}/rebuild-plan"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/org/security/findings/{finding_id}/rebuild-plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/security/findings/{finding_id}/rebuild-plan \
--header 'Authorization: Bearer <token>'{
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refusals": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"image_repository": "<string>",
"occurrences": 123,
"reason": "<string>",
"repository": "<string>"
}
],
"repositories": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"base_images": [
"<string>"
],
"branch": "<string>",
"bumps": [
{
"fixed_version": "<string>",
"installed_version": "<string>"
}
],
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"default_branch": "<string>",
"dockerfiles": [
{
"changes": [
{
"after": "<string>",
"base_image": "<string>",
"before": "<string>",
"digest_pin_dropped": true,
"from_tag": "<string>",
"line": 123,
"to_tag": "<string>"
}
],
"component": "<string>",
"path": "<string>"
}
],
"existing_pull_request_url": "<string>",
"images": [
"<string>"
],
"occurrences": 123,
"repository": "<string>"
}
]
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Plan base-image bump pull requests for a security finding
Plans the base-image bump pull requests for a finding whose occurrences are application container images (the image_rebuild fix route): per affected application repository, the Dockerfile FROM lines that would move from the installed version to the advisory’s fixed version, the branch and credential the pull request would use, and the open Ankra pull request already there, if any; per image the lane cannot act on, the refusal and its reason (no application builds it, the application has no repository or GitHub credential, the credential cannot read the repository, no Dockerfile, no FROM line pins the installed version). A read: nothing is opened.
import requests
url = "https://platform.ankra.app/org/security/findings/{finding_id}/rebuild-plan"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/org/security/findings/{finding_id}/rebuild-plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/org/security/findings/{finding_id}/rebuild-plan \
--header 'Authorization: Bearer <token>'{
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"refusals": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"image_repository": "<string>",
"occurrences": 123,
"reason": "<string>",
"repository": "<string>"
}
],
"repositories": [
{
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"base_images": [
"<string>"
],
"branch": "<string>",
"bumps": [
{
"fixed_version": "<string>",
"installed_version": "<string>"
}
],
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"default_branch": "<string>",
"dockerfiles": [
{
"changes": [
{
"after": "<string>",
"base_image": "<string>",
"before": "<string>",
"digest_pin_dropped": true,
"from_tag": "<string>",
"line": 123,
"to_tag": "<string>"
}
],
"component": "<string>",
"path": "<string>"
}
],
"existing_pull_request_url": "<string>",
"images": [
"<string>"
],
"occurrences": 123,
"repository": "<string>"
}
]
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful response
The base-image bump pull requests a finding's image occurrences call for: one entry per application repository the lane can act on, and one refusal per image it cannot, with the reason.