turbot/kubernetes_insights

Query: secrets_for_service_account

Usage

powerpipe query kubernetes_insights.query.secrets_for_service_account

SQL

select
distinct s.uid as uid
from
kubernetes_secret as s,
kubernetes_service_account as a,
jsonb_array_elements(secrets) as se
where
se ->> 'name' = s.name
and a.context_name = s.context_name
and a.uid = $1;