Skip to main content

K8s scan

Kubernetes footprint scan is the Kubernetes Protection collection for this CID — TriggerScan (PEP 8 trigger_scan) and GetScan. The path is GET /kubernetes-protection/entities/scan/trigger/v1 (and POST on the same path). Remaining Kubernetes Protection mutations / Image assessment policies / remaining cloud are not implemented (not yet). ReadClusterCombinedV2 is not implemented. This is not Kubernetes integration API key RegenerateAPIKey / GetIntegrationAPIKey (/kubernetes-protection/entities/integration/api-key/v1): K8s API key. This is not Kubernetes vulnerable image counts ReadVulnerableContainerImageCount (/container-security/aggregates/containers/count-vulnerable-images/v1): K8s vuln images. This is not the HelloService template sample (GET /api/hello).

This collection is not CrowdStrike production. It does not call Falcon cloud. It is not CrowdStrike Kubernetes Protection cloud.

RPC field notes: KubernetesProtectionService. REST schemas: API reference. Kubernetes scans have no FQL (unlike Kubernetes vulnerable image counts). Extra unused query keys are ignored. GET ignores extra unused query keys including scan_type and does not trigger a scan.

These curls use Host: crowdstrike-api.localhost against Compose Traefik on :8088. If the hostname already resolves to Traefik, you can omit the Host header and call http://crowdstrike-api.localhost instead.

Auth​

Every call needs a console session or a Bearer token:

  • Cookie cs_console from CreateSession (POST /identity/entities/sessions/v1)
  • Authorization: Bearer with kubernetes-protection:write

GET and POST both require that write scope. A session cookie bypasses OAuth scopes. Seed client cs-local-hosts (hosts:read only) cannot get or trigger the scan (403). kubernetes-protection:read cannot get or trigger the scan (403). Unit tests use a client named cs-local-cimg with falcon-container-image:read; that client cannot get or trigger the scan (403). Unit tests use a client named cs-local-k8s with kubernetes-protection:read; that client cannot get or trigger the scan (403). Unit tests use a client named cs-local-k8sw with kubernetes-protection:write; that client can get and trigger the scan. It is not in the production seed. Use the console cookie, or a client you created with that scope. Missing or revoked token → 401.

HTTP paths​

MethodPathUse
GET/kubernetes-protection/entities/scan/trigger/v1Get the current scan. Extra unused query keys including scan_type are ignored. Does not trigger.
POST/kubernetes-protection/entities/scan/trigger/v1Trigger. Query: scan_type. Empty body. Success 200.

JSON is snake_case MSA with three fields: scan_id, scan_type, status. Clone success is 200 (not SOURCE 201 / 207). POST maps scan_type to a lab scan (idempotent per type):

scan_typescan_idstatus
cluster-refreshscan-lab-1complete
dry-runscan-lab-2complete
fullscan-lab-3complete

A second POST of the same scan_type stays that lab id. Missing scan_type or a value other than those three → 400. Extra unused query keys are ignored.

This is not Kubernetes integration API key, Kubernetes vulnerable image counts, or the HelloService template. Kubernetes integration API key uses /kubernetes-protection/entities/integration/api-key/v1: K8s API key. Kubernetes vulnerable image counts uses /container-security/aggregates/containers/count-vulnerable-images/v1: K8s vuln images. Remaining Kubernetes Protection mutations / Image assessment policies / remaining cloud are not implemented (not yet).

Seed scan​

scan_idscan_typestatus
scan-lab-1cluster-refreshcomplete

The list returns one resource with that scan. GET does not trigger. POST scan_type=dry-run returns scan-lab-2. There is no filter.

curl -sS -c cookies.txt -H 'Host: crowdstrike-api.localhost' \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]","password":"FalconLocal!1","cloud":"us-1"}' \
http://127.0.0.1:8088/identity/entities/sessions/v1

The get returns the seed scan scan-lab-1 (cluster-refresh, complete):

curl -sS -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1'

POST scan_type=dry-run returns scan-lab-2 (dry-run, complete). Empty body. Success is 200. A later GET of the same path returns scan-lab-2. A second POST of dry-run stays scan-lab-2:

curl -sS -X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1?scan_type=dry-run'

Unknown scan_type is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1?scan_type=bogus'

Missing scan_type on POST is 400:

curl -sS -o /dev/null -w '%{http_code}\n' \
-X POST -H 'Host: crowdstrike-api.localhost' -b cookies.txt \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1'

No cookie and no Bearer is 401:

curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1'

cs-local-hosts (hosts:read only) is 403:

TOKEN='<access_token from cs-local-hosts>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1'

cs-local-k8s (kubernetes-protection:read) is 403:

TOKEN='<access_token from cs-local-k8s>'
curl -sS -o /dev/null -w '%{http_code}\n' \
-H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1'

Remaining Kubernetes Protection mutations / Image assessment policies / remaining cloud are not implemented (not yet). Kubernetes integration API key is a separate collection: K8s API key. Kubernetes vulnerable image counts is a separate collection: K8s vuln images. This is not the HelloService template (GET /api/hello).

Get / trigger (Bearer)​

TOKEN='<access_token from a client with kubernetes-protection:write>'
curl -sS -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1'
TOKEN='<access_token from a client with kubernetes-protection:write>'
curl -sS -X POST -H 'Host: crowdstrike-api.localhost' \
-H "Authorization: Bearer ${TOKEN}" \
'http://127.0.0.1:8088/kubernetes-protection/entities/scan/trigger/v1?scan_type=dry-run'

kubernetes-protection:write → 200 (including unit-test client cs-local-k8sw). A token without that scope (including hosts:read only, e.g. cs-local-hosts, kubernetes-protection:read, e.g. cs-local-k8s, or falcon-container-image:read, e.g. cs-local-cimg) → 403. Missing or revoked token → 401. There is no seeded production client with kubernetes-protection:write — use the console cookie, or a client you created with that scope.

OAuth2 mint/revoke: OAuth2. Accessible scopes: API clients.