Skip to content

Operating Cloud Security Posture with CSPM

Interactive Diagram

새 탭 ↗

CSPM (Cloud Security Posture Management) Approach

Section titled “CSPM (Cloud Security Posture Management) Approach”

CSPM is the process of continuously monitoring and managing the security posture of a cloud environment so it stays aligned with an organization’s security and compliance standards. It helps identify and fix the vulnerabilities that can arise from the complexity and dynamic nature of cloud services.

Because we lacked the necessary permissions on security-related services, we couldn’t adopt Azure’s own CSPM offering in this project. Instead we ran an OSS-based scan as a one-off and reviewed the results.

  • Automated monitoring and alerting: detects security issues in real time and raises automated alerts for immediate response
  • Misconfiguration management: identifies and fixes misconfigured cloud resources to reduce data-exposure risk
  • Compliance management: continuous compliance against regulatory standards such as GDPR, HIPAA, PCI DSS
  • IAM (Identity and Access Management): removing excessive access rights or unused credentials
  • DevSecOps integration: baking security into the development lifecycle to resolve issues in real time

Azure provides Cloud Posture management through Security Center. The Free tier only offers posture management such as recommendations to enable essential security features and inventory visibility; Standard adds workload-level posture management, including agentless VM and AKS scanning.

In this project’s infra environment, we lacked the permissions to enable CSPM.

Example IaC configuration

Security Center-related resource code:

resource "azurerm_security_center_subscription_pricing" "security_center_subscription_cloudposture" {
count = var.security-center-cloudposture-enabled != false ? 1 : 0
tier = "Standard"
resource_type = "CloudPosture"
# Possible extensions:
# AgentlessVmScanning, AgentlessDiscoveryForKubernetes, OnUploadMalwareScanning, SensitiveDataDiscovery and ContainerRegistriesVulnerabilityAssessments
extension {
name = "AgentlessVmScanning"
}
extension {
name = "AgentlessDiscoveryForKubernetes"
}

Prowler can manage posture not only for Azure but also for AWS, GCP, and other major CSPs, as well as for platforms like Kubernetes and M365.

Installing Prowler

It runs anywhere Python is available, and installs with a single command.

pip3 install prowler

Required Azure permissions

CategoryPermissionNotes
Entra IDDirectory.Read.All, Policy.Read.All, UserAuthenticationMethod.Read.AllUserAuthenticationMethod.Read.All is only used to verify MFA enforcement
Subscription scopeReader, ProwlerRole (custom role)The custom role needs the specific actions it requires defined explicitly

Running a Prowler scan

python3 -m prowler azure --az-cli-auth

Example scan output:

Results can be exported as html, csv, or json. We actually ran this against two different environments (Pod A, Pod B), and in both cases nearly everything passed except a few IAM-related checks. (The CSV attachment is omitted here due to sensitivity concerns.)

The major high-severity findings were:

ServiceFindingStatus description
AKSEnsure clusters are created with Private Endpoint Enabled and Public Access DisabledPublic access was enabled on certain clusters, exposing them to attack through a public endpoint
NetworkEnsure that network flow logs are captured and fed into a central log analytics workspaceNetwork Watcher had no flow logs configured, leaving no visibility into traffic flow

When a private cluster is configured with both a private and a public endpoint on the master node, forcing all traffic through the private endpoint means an attacker must be inside the master’s virtual network to attack the Kubernetes API, shrinking the attack surface considerably. Network Flow Logs give visibility into network traffic and, combined with Azure Monitor and Sentinel, support lateral-movement detection.

Previous post: SBOM and Container Image Signing: Building an Artifact Chain of Trust
Next post: TLS Certificate Automation with cert-manager