Where IaC scanning reads the files that describe infrastructure, CSPM reads the infrastructure itself. A CSPM tool is granted read-only access to a cloud account, project or subscription, enumerates resources through the provider's APIs, and evaluates each one against rules: is this bucket readable by anyone, does this security group allow SSH from the internet, does this IAM user have administrator rights and no MFA, is this database reachable on a public address, how old is this access key. Rule sets are often aligned with published guidance such as the CIS Benchmarks for each provider.
How it is used in practice
Security teams connect every account and run collection on a schedule. Findings go to the owners of each account, are tracked to remediation like any other finding, and are summarized as posture over time. CSPM catches what IaC scanning cannot: resources created by hand in a console, drift from the declared configuration, and settings in accounts that were never under code at all. It also supplies context for other work, for example which workloads run with which cloud identity, which feeds questions of least privilege.
Common pitfalls
- Partial visibility read as clean. If the collector's role cannot read a service or a region, the absence of findings there means nothing was looked at. A good tool reports coverage, not just findings.
- Resolving on a partial run. A permissions error that makes a resource invisible must not close its findings.
- Single-region checks. A clean result in one region is not a clean account.
- Over-privileged collectors. The collector's own credential is a high-value target; it should be read-only and scoped.
- Volume over priority. Hundreds of low-impact findings bury the few that expose data.
How TrustIvan relates to it
TrustIvan connects to AWS, Microsoft Azure and Google Cloud accounts with read-only access and evaluates what it collects against its posture checks: on AWS, for example, EC2 security groups and public addressing, S3 public access, encryption, versioning and logging, ECR scan-on-push, and IAM wildcard grants, administrative privilege, MFA and access-key age. Coverage is reported as data: the API lists, per provider, the resource kinds the collector reads and those it does not, with reasons, and services such as RDS and Lambda on AWS are listed as not collected. A partial collection resolves nothing and marks the connection degraded. The collectors are tested against recorded API responses; the AWS collector has not yet been run against a real AWS account. See Cloud and Kubernetes.
Related terms
- IaC scanning (infrastructure-as-code scanning) Infrastructure-as-code (IaC) scanning analyzes the files that define infrastructure, such as Terraform, CloudFormation, Kubernetes manifests, Helm charts and Dockerfiles, for insecure configuration before it is deployed.
- CIS Benchmarks CIS Benchmarks are consensus-developed secure configuration guidelines, published by the Center for Internet Security, for operating systems, cloud platforms, Kubernetes, databases and other technologies.
- Least privilege The principle of least privilege says that every user, process and machine identity should hold only the permissions it needs to do its job, and only for as long as it needs them.
- Workload identity Workload identity is an identity issued to a running workload, such as a pod, function, VM or CI job, usually by the platform that runs it, and exchanged for short-lived credentials instead of a stored secret.
- Admission control (Kubernetes) Admission control is the stage of the Kubernetes API server that intercepts a request to create or change an object, after authentication and authorization, and can accept, modify or reject it before it is stored.
Guides on CSPM
- Kubernetes Admission Control for Image Provenance Sign container images in CI, attest how they were built, and refuse unsigned or unpinned images at admission with Kyverno and ValidatingAdmissionPolicy.
- Least Privilege for CI/CD Identities: GitHub Actions OIDC Replace long-lived cloud keys in CI with GitHub Actions OIDC, then scope the trust policy, the role and GITHUB_TOKEN so a pipeline can do only its own job.