import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security \
--cookie ankra_session={
"status": "connected",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"stack_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scanner": {
"fresh_clusters": 123,
"last_scan": "2023-11-07T05:31:56Z",
"stale_after_seconds": 123,
"stale_clusters": 123,
"status": "fresh",
"unscanned_clusters": 123,
"endpoint_scanner": {
"present": true,
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z"
}
]
}
},
"intelligence": {
"epss_synced_at": "2023-11-07T05:31:56Z",
"kev_listed": 123,
"kev_synced_at": "2023-11-07T05:31:56Z"
},
"scope": {
"addons": 123,
"manifests": 123,
"declared_objects": 123,
"matched_workloads": 123,
"unmatched_members": 123
},
"findings": {
"observed": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"acknowledged": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"accepted_risk": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"findings": 123,
"fixable_severe": 123,
"known_exploited": 123,
"known_exploited_findings": 123,
"affected_images": 123,
"affected_workloads": 123,
"last_scan": "2023-11-07T05:31:56Z"
},
"known_exploited": [
{
"actionable_count": 123,
"affected_clusters": 123,
"affected_workloads": 123,
"cve_id": "<string>",
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fix_routes": {
"addon_upgrade_occurrences": 123,
"addons": [
{
"addon_slug": "<string>",
"clusters": 123,
"named_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>"
}
],
"occurrences": 123,
"target_chart_version": "<string>",
"target_scanned_at": "2023-11-07T05:31:56Z",
"target_verdict": "fixes",
"target_verdict_reason": "<string>"
}
],
"image_rebuild_occurrences": 123,
"no_fix_occurrences": 123,
"platform_occurrences": 123,
"platform_addons": [
{
"addon_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"stack_name": "<string>",
"addon_name": "<string>",
"chart_name": "<string>",
"installed_chart_version": "<string>",
"occurrences": 123,
"target_chart_version": "<string>",
"target_source": "advisory",
"upgrade": "verified",
"kubernetes": {
"verdict": "compatible",
"server_version": "<string>",
"chart_constraint": "<string>",
"needs_cluster_upgrade": true,
"reason": "<string>"
},
"offer": "one_click",
"offer_reason": "<string>"
}
],
"platform_addon_count": 123,
"platform_unlinked_occurrences": 123,
"held_platform_updates": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"notification_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"occurrences": 123,
"offer": "one_click",
"offer_reason": "<string>",
"taken_by": "<string>",
"taken_at": "2023-11-07T05:31:56Z",
"moves": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
],
"kept": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
]
}
],
"held_platform_update_count": 123,
"route": "addon_upgrade"
},
"fixable_occurrences": 123,
"last_seen_at": "2023-11-07T05:31:56Z",
"package_name": "<string>",
"package_type": "<string>",
"severity": "<string>",
"title": "<string>",
"known_exploited": true,
"kev_date_added": "<string>",
"kev_due_date": "<string>",
"kev_ransomware_use": true,
"epss_score": 123,
"epss_percentile": 123,
"kev_vendor_project": "<string>",
"kev_product": "<string>",
"kev_vulnerability_name": "<string>",
"kev_required_action": "<string>"
}
],
"top_actionable_findings": [
{
"actionable_count": 123,
"affected_clusters": 123,
"affected_workloads": 123,
"cve_id": "<string>",
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fix_routes": {
"addon_upgrade_occurrences": 123,
"addons": [
{
"addon_slug": "<string>",
"clusters": 123,
"named_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>"
}
],
"occurrences": 123,
"target_chart_version": "<string>",
"target_scanned_at": "2023-11-07T05:31:56Z",
"target_verdict": "fixes",
"target_verdict_reason": "<string>"
}
],
"image_rebuild_occurrences": 123,
"no_fix_occurrences": 123,
"platform_occurrences": 123,
"platform_addons": [
{
"addon_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"stack_name": "<string>",
"addon_name": "<string>",
"chart_name": "<string>",
"installed_chart_version": "<string>",
"occurrences": 123,
"target_chart_version": "<string>",
"target_source": "advisory",
"upgrade": "verified",
"kubernetes": {
"verdict": "compatible",
"server_version": "<string>",
"chart_constraint": "<string>",
"needs_cluster_upgrade": true,
"reason": "<string>"
},
"offer": "one_click",
"offer_reason": "<string>"
}
],
"platform_addon_count": 123,
"platform_unlinked_occurrences": 123,
"held_platform_updates": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"notification_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"occurrences": 123,
"offer": "one_click",
"offer_reason": "<string>",
"taken_by": "<string>",
"taken_at": "2023-11-07T05:31:56Z",
"moves": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
],
"kept": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
]
}
],
"held_platform_update_count": 123,
"route": "addon_upgrade"
},
"fixable_occurrences": 123,
"last_seen_at": "2023-11-07T05:31:56Z",
"package_name": "<string>",
"package_type": "<string>",
"severity": "<string>",
"title": "<string>",
"known_exploited": true,
"kev_date_added": "<string>",
"kev_due_date": "<string>",
"kev_ransomware_use": true,
"epss_score": 123,
"epss_percentile": 123,
"kev_vendor_project": "<string>",
"kev_product": "<string>",
"kev_vulnerability_name": "<string>",
"kev_required_action": "<string>"
}
],
"sbom": {
"containers": 123,
"containers_with_sbom": 123,
"containers_without_sbom": 123,
"pods": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_generated_at": "2023-11-07T05:31:56Z",
"coverage": {
"scanned_clusters": 123,
"clusters_with_sbom": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_generated_at": "2023-11-07T05:31:56Z"
}
},
"members": [
{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "addon",
"name": "<string>",
"namespace": "<string>",
"release_name": "<string>",
"chart_name": "<string>",
"declared_objects": 123,
"workloads": 123,
"observed": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"fixable_severe": 123,
"known_exploited": 123,
"affected_images": 123,
"containers": 123,
"containers_with_sbom": 123,
"containers_without_sbom": 123,
"sbom_images": 123,
"sbom_components": 123,
"last_scan": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Get imported cluster stack security posture (browser session)
Returns the security summary of one stack on an imported cluster: its CVE posture, the CISA known-exploited findings among them, the bill-of-materials inventory of its running containers, and the same figures per stack member. Requires security.read.
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/stacks/{stack_name}/security \
--cookie ankra_session={
"status": "connected",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"stack_name": "<string>",
"stack_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"scanner": {
"fresh_clusters": 123,
"last_scan": "2023-11-07T05:31:56Z",
"stale_after_seconds": 123,
"stale_clusters": 123,
"status": "fresh",
"unscanned_clusters": 123,
"endpoint_scanner": {
"present": true,
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z",
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"targets": 123,
"reports": 123,
"last_success_at": "2023-11-07T05:31:56Z"
}
]
}
},
"intelligence": {
"epss_synced_at": "2023-11-07T05:31:56Z",
"kev_listed": 123,
"kev_synced_at": "2023-11-07T05:31:56Z"
},
"scope": {
"addons": 123,
"manifests": 123,
"declared_objects": 123,
"matched_workloads": 123,
"unmatched_members": 123
},
"findings": {
"observed": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"acknowledged": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"accepted_risk": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"findings": 123,
"fixable_severe": 123,
"known_exploited": 123,
"known_exploited_findings": 123,
"affected_images": 123,
"affected_workloads": 123,
"last_scan": "2023-11-07T05:31:56Z"
},
"known_exploited": [
{
"actionable_count": 123,
"affected_clusters": 123,
"affected_workloads": 123,
"cve_id": "<string>",
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fix_routes": {
"addon_upgrade_occurrences": 123,
"addons": [
{
"addon_slug": "<string>",
"clusters": 123,
"named_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>"
}
],
"occurrences": 123,
"target_chart_version": "<string>",
"target_scanned_at": "2023-11-07T05:31:56Z",
"target_verdict": "fixes",
"target_verdict_reason": "<string>"
}
],
"image_rebuild_occurrences": 123,
"no_fix_occurrences": 123,
"platform_occurrences": 123,
"platform_addons": [
{
"addon_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"stack_name": "<string>",
"addon_name": "<string>",
"chart_name": "<string>",
"installed_chart_version": "<string>",
"occurrences": 123,
"target_chart_version": "<string>",
"target_source": "advisory",
"upgrade": "verified",
"kubernetes": {
"verdict": "compatible",
"server_version": "<string>",
"chart_constraint": "<string>",
"needs_cluster_upgrade": true,
"reason": "<string>"
},
"offer": "one_click",
"offer_reason": "<string>"
}
],
"platform_addon_count": 123,
"platform_unlinked_occurrences": 123,
"held_platform_updates": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"notification_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"occurrences": 123,
"offer": "one_click",
"offer_reason": "<string>",
"taken_by": "<string>",
"taken_at": "2023-11-07T05:31:56Z",
"moves": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
],
"kept": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
]
}
],
"held_platform_update_count": 123,
"route": "addon_upgrade"
},
"fixable_occurrences": 123,
"last_seen_at": "2023-11-07T05:31:56Z",
"package_name": "<string>",
"package_type": "<string>",
"severity": "<string>",
"title": "<string>",
"known_exploited": true,
"kev_date_added": "<string>",
"kev_due_date": "<string>",
"kev_ransomware_use": true,
"epss_score": 123,
"epss_percentile": 123,
"kev_vendor_project": "<string>",
"kev_product": "<string>",
"kev_vulnerability_name": "<string>",
"kev_required_action": "<string>"
}
],
"top_actionable_findings": [
{
"actionable_count": 123,
"affected_clusters": 123,
"affected_workloads": 123,
"cve_id": "<string>",
"finding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fix_routes": {
"addon_upgrade_occurrences": 123,
"addons": [
{
"addon_slug": "<string>",
"clusters": 123,
"named_clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>"
}
],
"occurrences": 123,
"target_chart_version": "<string>",
"target_scanned_at": "2023-11-07T05:31:56Z",
"target_verdict": "fixes",
"target_verdict_reason": "<string>"
}
],
"image_rebuild_occurrences": 123,
"no_fix_occurrences": 123,
"platform_occurrences": 123,
"platform_addons": [
{
"addon_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"stack_name": "<string>",
"addon_name": "<string>",
"chart_name": "<string>",
"installed_chart_version": "<string>",
"occurrences": 123,
"target_chart_version": "<string>",
"target_source": "advisory",
"upgrade": "verified",
"kubernetes": {
"verdict": "compatible",
"server_version": "<string>",
"chart_constraint": "<string>",
"needs_cluster_upgrade": true,
"reason": "<string>"
},
"offer": "one_click",
"offer_reason": "<string>"
}
],
"platform_addon_count": 123,
"platform_unlinked_occurrences": 123,
"held_platform_updates": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"notification_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fingerprint": "<string>",
"occurrences": 123,
"offer": "one_click",
"offer_reason": "<string>",
"taken_by": "<string>",
"taken_at": "2023-11-07T05:31:56Z",
"moves": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
],
"kept": [
{
"stack": "<string>",
"member_kind": "addon",
"member": "<string>",
"pin_kind": "image",
"image": "<string>",
"running": "<string>",
"pinned": "<string>",
"reason": "production",
"covers_finding": true
}
]
}
],
"held_platform_update_count": 123,
"route": "addon_upgrade"
},
"fixable_occurrences": 123,
"last_seen_at": "2023-11-07T05:31:56Z",
"package_name": "<string>",
"package_type": "<string>",
"severity": "<string>",
"title": "<string>",
"known_exploited": true,
"kev_date_added": "<string>",
"kev_due_date": "<string>",
"kev_ransomware_use": true,
"epss_score": 123,
"epss_percentile": 123,
"kev_vendor_project": "<string>",
"kev_product": "<string>",
"kev_vulnerability_name": "<string>",
"kev_required_action": "<string>"
}
],
"sbom": {
"containers": 123,
"containers_with_sbom": 123,
"containers_without_sbom": 123,
"pods": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_generated_at": "2023-11-07T05:31:56Z",
"coverage": {
"scanned_clusters": 123,
"clusters_with_sbom": 123,
"images": 123,
"components": 123,
"workloads": 123,
"latest_generated_at": "2023-11-07T05:31:56Z"
}
},
"members": [
{
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "addon",
"name": "<string>",
"namespace": "<string>",
"release_name": "<string>",
"chart_name": "<string>",
"declared_objects": 123,
"workloads": 123,
"observed": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"fixable_severe": 123,
"known_exploited": 123,
"affected_images": 123,
"containers": 123,
"containers_with_sbom": 123,
"containers_without_sbom": 123,
"sbom_images": 123,
"sbom_components": 123,
"last_scan": "2023-11-07T05:31:56Z"
}
]
}{
"detail": "<string>"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}Authorizations
Response
Successful response
The security summary of one stack of an imported cluster: CVEs, CISA-listed exploited vulnerabilities and bills of materials across every workload its add-ons and manifests deploy.
connected: the figures describe scanned workloads. stale: the newest report is older than the scanner's freshness window. no_reports: workloads were attributed but none carries a report or a bill of materials yet. unmatched: no member resolved to an object in the resource cache. unscanned: the scanner has never reported on this cluster. empty: the stack has no add-on or manifest members.
connected, stale, no_reports, unmatched, unscanned, empty