import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name}"
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}/security/pods/{namespace}/{pod_name}', 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}/security/pods/{namespace}/{pod_name} \
--cookie ankra_session={
"status": "connected",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod_name": "<string>",
"pod_uid": "<string>",
"node": "<string>",
"phase": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"stack": {
"stack_name": "<string>",
"member_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_kind": "addon",
"member_name": "<string>"
},
"stack_attribution": "attributed",
"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"
},
"findings": {
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"containers": 123,
"scanned_containers": 123,
"unscanned_containers": [
"<string>"
],
"stale_containers": [
"<string>"
],
"scan_coverage": "full"
},
"sbom": {
"containers": 123,
"with_sbom": 123,
"without_sbom": 123,
"images": 123,
"components": 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"
}
},
"containers": [
{
"name": "<string>",
"kind": "app",
"image": "<string>",
"image_digest": "<string>",
"image_identity": "<string>",
"ready": true,
"restart_count": 123,
"scanned": true,
"scan_status": "scanned",
"match_basis": "workload_uid",
"stale_reason": "image_digest_mismatch",
"report_digest": "<string>",
"report_observed_at": "2023-11-07T05:31:56Z",
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"sbom_status": "present",
"component_count": 123,
"os_name": "<string>",
"generated_at": "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 pod security posture (browser session)
Returns the security summary of one running pod on an imported cluster: every container with its CVE posture and bill of materials. Requires security.read.
import requests
url = "https://api.platform.ankra.app/org/clusters/imported/{cluster_id}/security/pods/{namespace}/{pod_name}"
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}/security/pods/{namespace}/{pod_name}', 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}/security/pods/{namespace}/{pod_name} \
--cookie ankra_session={
"status": "connected",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"pod_name": "<string>",
"pod_uid": "<string>",
"node": "<string>",
"phase": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"owner_kind": "<string>",
"owner_name": "<string>",
"workload_kind": "<string>",
"workload_name": "<string>",
"stack": {
"stack_name": "<string>",
"member_resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_kind": "addon",
"member_name": "<string>"
},
"stack_attribution": "attributed",
"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"
},
"findings": {
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"containers": 123,
"scanned_containers": 123,
"unscanned_containers": [
"<string>"
],
"stale_containers": [
"<string>"
],
"scan_coverage": "full"
},
"sbom": {
"containers": 123,
"with_sbom": 123,
"without_sbom": 123,
"images": 123,
"components": 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"
}
},
"containers": [
{
"name": "<string>",
"kind": "app",
"image": "<string>",
"image_digest": "<string>",
"image_identity": "<string>",
"ready": true,
"restart_count": 123,
"scanned": true,
"scan_status": "scanned",
"match_basis": "workload_uid",
"stale_reason": "image_digest_mismatch",
"report_digest": "<string>",
"report_observed_at": "2023-11-07T05:31:56Z",
"observed": 123,
"actionable": {
"critical": 123,
"high": 123,
"low": 123,
"medium": 123,
"unknown": 123
},
"known_exploited": 123,
"fixable_severe": 123,
"sbom_status": "present",
"component_count": 123,
"os_name": "<string>",
"generated_at": "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 running pod of an imported cluster: every container with its CVE posture and bill of materials.
connected: the CVE figures describe at least one scanned container and no container's evidence is stale. stale: the cluster's newest report is older than the freshness window, or a container's only report describes another image or a replaced workload (stale_containers names them). no_reports: the pod was found but no vulnerability report covers any of its containers (a bill of materials alone does not make the CVE figures observed). unscanned: the scanner has never reported on this cluster.
connected, stale, no_reports, unscanned What stack means: attributed - the named member deploys the pod; none - the pod's whole owner chain is in the resource cache, every add-on and manifest member of the cluster's stacks was checked against it and none matched; unknown - part of the owner chain is not cached, or the members could not be read or decoded, so the null stack is not an answer.
attributed, none, unknown