Back to HomeCloud Native

Cloud Native Security Complete Guide: 4C Model and OWASP Top 10 Security Risks (2025)

12 min min read
#cloud-native#security#kubernetes#owasp#container-security

Cloud Native Security Complete Guide: 4C Model and OWASP Top 10 Security Risks (2025)

Cloud Native architecture brings flexibility and efficiency, but also new security challenges. Traditional perimeter defense (firewalls, WAF) is no longer sufficient because the attack surface has expanded from network boundaries to every container, every API, and every line of code.

This article introduces the core frameworks of Cloud Native security: the 4C Security Model and OWASP Cloud Native Top 10. After reading, you'll know which security issues to focus on in cloud native environments and how to protect them with the right tools.

Security engineer monitoring security dashboard in monitoring center, screens showing threat detection and vulnerability scan results


Cloud Native Security Challenges

Why Is Cloud Native Security More Complex?

Several characteristics of Cloud Native architecture make security more challenging:

1. Expanded Attack Surface

Microservices architecture splits a monolithic application into dozens or even hundreds of services. Each service is a potential attack entry point.

2. Dynamic Environment

Containers and Pods are constantly created and destroyed. Traditional IP-based security rules no longer apply.

3. Distributed Communication

Services communicate over the network, exposing more risks than local function calls.

4. Supply Chain Risks

A container image may contain dozens of dependencies, each potentially with vulnerabilities.

5. Shared Responsibility

When using cloud services, security responsibility is shared between the cloud provider and user, with boundaries sometimes unclear.

Traditional Security vs Cloud Native Security

AspectTraditional SecurityCloud Native Security
Defense perimeterNetwork boundary (firewall)Every service is a boundary
Trust modelInternal network trustedZero trust
AuthenticationIP-basedIdentity-based (mTLS)
Policy managementManual configurationPolicy as Code
Vulnerability patchingPeriodic updatesContinuous scanning, auto-patching
Audit trailsCentralized logsDistributed tracing

Cloud Native Security Responsibility Model

Security responsibility distribution when using cloud services:

LayerIaaS (EC2)CaaS (EKS)PaaS (App Engine)
ApplicationUserUserUser
DataUserUserUser
Container/RuntimeUserUserCloud Provider
K8s Control PlaneN/ACloud ProviderN/A
Operating SystemUserCloud Provider*Cloud Provider
VirtualizationCloud ProviderCloud ProviderCloud Provider
Physical FacilitiesCloud ProviderCloud ProviderCloud Provider

*EKS/GKE Worker Node OS is managed by cloud provider, but users can choose to customize.

Want to understand complete Cloud Native concepts? Please refer to Cloud Native Complete Guide.


4C Security Model Explained

The 4C Security Model proposed in Kubernetes official documentation divides Cloud Native security into four layers, from outside to inside:

┌─────────────────────────────────────────┐
│              Cloud                       │
│  ┌─────────────────────────────────┐    │
│  │           Cluster                │    │
│  │  ┌─────────────────────────┐    │    │
│  │  │       Container          │    │    │
│  │  │  ┌─────────────────┐    │    │    │
│  │  │  │      Code       │    │    │    │
│  │  │  └─────────────────┘    │    │    │
│  │  └─────────────────────────┘    │    │
│  └─────────────────────────────────┘    │
└─────────────────────────────────────────┘

Each layer's security depends on the outer layer. If the Cloud layer has vulnerabilities, no amount of inner layer protection will help.

Cloud Layer

The Cloud layer is the outermost layer, covering cloud infrastructure security.

Main Focus Areas:

  • IAM Configuration: Least privilege principle, avoid over-authorization
  • Network Security: VPC design, security groups, private subnets
  • Encryption: Transport encryption (TLS), storage encryption (at-rest)
  • Audit Logs: CloudTrail, VPC Flow Logs

Common Mistakes:

  • S3 Bucket public access
  • IAM using Admin permissions
  • Database exposed to public internet
  • MFA not enabled

Best Practices:

# AWS IAM Policy Example - Least Privilege
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*"
    }
  ]
}

Cluster Layer

The Cluster layer covers Kubernetes cluster security configuration.

Main Focus Areas:

  • API Server Security: Authentication, authorization, Admission Control
  • RBAC Configuration: Role and permission management
  • Network Policy: Network isolation between Pods
  • Secrets Management: Storage and access of sensitive information

RBAC Example:

# Create a Role that can only read Pods
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  namespace: production
  name: pod-reader
rules:
- apiGroups: [""]
  resources: ["pods"]
  verbs: ["get", "list", "watch"]
---
# Bind Role to ServiceAccount
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: read-pods
  namespace: production
subjects:
- kind: ServiceAccount
  name: my-app
  namespace: production
roleRef:
  kind: Role
  name: pod-reader
  apiGroup: rbac.authorization.k8s.io

Network Policy Example:

# Only allow specific Pods to access database
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: db-access
  namespace: production
spec:
  podSelector:
    matchLabels:
      app: database
  policyTypes:
  - Ingress
  ingress:
  - from:
    - podSelector:
        matchLabels:
          access: database
    ports:
    - protocol: TCP
      port: 5432

Learn more about K8s configuration? Please refer to Cloud Native Tech Stack Introduction.

Container Layer

The Container layer focuses on container image and runtime security.

Main Focus Areas:

  • Image Security: Base image selection, vulnerability scanning
  • Runtime Protection: Limiting container privileges
  • Image Signing: Ensuring images haven't been tampered with

Secure Pod Configuration:

apiVersion: v1
kind: Pod
metadata:
  name: secure-pod
spec:
  securityContext:
    runAsNonRoot: true       # Don't run as root
    runAsUser: 1000          # Specify UID
    fsGroup: 1000
  containers:
  - name: app
    image: my-app:v1.0.0
    securityContext:
      allowPrivilegeEscalation: false  # Prohibit privilege escalation
      readOnlyRootFilesystem: true     # Read-only filesystem
      capabilities:
        drop:
          - ALL                         # Remove all capabilities
    resources:
      limits:
        memory: "128Mi"
        cpu: "500m"

Common Mistakes:

  • Running containers as root
  • Using outdated base images
  • Not scanning images for vulnerabilities
  • Not setting resource limits

Worried about cloud security? The cost of security incidents far exceeds prevention costs. Schedule security assessment and let experts review your security configuration.

Code Layer

The Code layer is the innermost layer, focusing on application security itself.

Main Focus Areas:

  • Secure Coding: Avoid SQL Injection, XSS, and other vulnerabilities
  • Dependency Security: Scan third-party package vulnerabilities
  • Secret Management: Don't hardcode passwords in code
  • Input Validation: Validate all external input

Dependency Scanning Example:

# Use npm audit to scan Node.js dependencies
npm audit

# Use Snyk for scanning
snyk test

# Use OWASP Dependency-Check
dependency-check --project myapp --scan .

This also follows the 12 Factor Config principle: secrets shouldn't be written in code.

Computer screen showing container security scan report, listing vulnerability severity and remediation recommendations


OWASP Cloud Native Top 10

The Cloud Native Application Security Top 10 published by OWASP lists the most common security risks in cloud native environments.

CNS01: Insecure Cloud/Container Configuration

Risk: Default configurations of cloud services or containers are often insecure, and developers use them without adjustment.

Examples:

  • Kubernetes API Server exposed to public internet
  • Containers running with root privileges
  • S3 Bucket public access

Countermeasures:

  • Use CIS Benchmark to check configuration
  • Use Policy as Code to enforce secure configuration
  • Regularly audit cloud configuration

CNS02: Supply Chain Vulnerabilities

Risk: Container images or third-party dependencies contain known vulnerabilities.

Examples:

  • Using outdated base images (e.g., Alpine 3.10)
  • npm/pip packages with known CVEs
  • Using unverified third-party images

Countermeasures:

  • Continuously scan images and dependencies
  • Use private Registry, limit available images
  • Use SBOM (Software Bill of Materials) to track components

CNS03: Overly Permissive Identity and Access

Risk: Service accounts or users are granted excessive permissions.

Examples:

  • Pods using cluster-admin privileges
  • IAM Roles with * permissions
  • No differentiation of permissions across environments

Countermeasures:

  • Least privilege principle
  • Regular permission reviews
  • Use Just-in-Time (JIT) access

CNS04: Insecure Secret Management

Risk: Sensitive information (passwords, API Keys) exposed or improperly managed.

Examples:

  • Passwords written in code or environment variables in plaintext
  • Kubernetes Secrets not encrypted
  • Secrets committed to Git

Countermeasures:

  • Use dedicated secret management tools (Vault, Sealed Secrets)
  • Enable K8s Secret encryption
  • Use git-secrets to prevent committing secrets

CNS05: Insufficient Network Segmentation

Risk: No proper network isolation between services—one compromised service can move laterally.

Countermeasures:

  • Use Network Policy to limit Pod-to-Pod communication
  • Use mTLS between microservices
  • Implement zero trust architecture

CNS06: Insufficient Runtime Protection

Risk: Lack of monitoring and protection for running containers.

Countermeasures:

  • Use Falco to detect abnormal behavior
  • Limit container system calls (seccomp)
  • Use read-only filesystem

CNS07: Insufficient Logging and Monitoring

Risk: Insufficient logging—unable to trace events when incidents occur.

Countermeasures:

  • Centralized log collection
  • Long-term audit log retention
  • Establish alerting rules

CNS08: Insecure Workloads

Risk: Container or function configurations are insecure.

Countermeasures:

  • Use Pod Security Standards
  • Limit container capabilities
  • Don't run as root

CNS09: Insecure APIs

Risk: API endpoints lack proper authentication, authorization, rate limiting.

Countermeasures:

  • All APIs require authentication
  • Implement rate limiting
  • Validate input parameters

CNS10: Improper Resource Allocation

Risk: No resource limits set, potentially causing DoS or resource exhaustion.

Countermeasures:

  • Set CPU/memory limits
  • Use LimitRange and ResourceQuota
  • Monitor resource usage

Does your Cloud Native environment have these risks? Free security quick scan — find critical vulnerabilities in 15 minutes.


Cloud Native Security Best Practices

Shift Left Security

"Shift Left" means moving security checks to earlier stages of the software development lifecycle.

Implementation:

  1. Development Phase

    • IDE security plugins
    • Pre-commit scanning
  2. CI/CD Phase

    • Image scanning
    • SAST/DAST testing
    • Policy checks
  3. Deployment Phase

    • Admission Control
    • Configuration validation
# GitHub Actions Security Scan Example
name: Security Scan
on: [push, pull_request]
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Run Trivy vulnerability scanner
        uses: aquasecurity/trivy-action@master
        with:
          scan-type: 'fs'
          security-checks: 'vuln,secret,config'
          severity: 'HIGH,CRITICAL'

Zero Trust Architecture

Core principle of zero trust: "Never trust, always verify"

Implementation Focus:

  • Authentication: All services must verify identity
  • Least Privilege: Only give necessary permissions
  • Encrypted Communication: Use mTLS between services
  • Continuous Monitoring: Record and analyze all access

Service Mesh mTLS Configuration (Istio):

apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
  name: default
  namespace: production
spec:
  mtls:
    mode: STRICT  # Enforce mTLS

Continuous Security Monitoring

Monitoring Focus:

  • Container abnormal behavior (new processes, network connections)
  • K8s API abnormal calls
  • Abnormal resource usage
  • Abnormal network traffic

Falco Rule Example:

- rule: Terminal shell in container
  desc: Detect interactive shell in container
  condition: >
    spawned_process and container
    and shell_procs and proc.tty != 0
  output: >
    Shell spawned in container
    (user=%user.name container=%container.name
    shell=%proc.name)
  priority: WARNING

Security as Code

Manage security policies with code, include in version control.

OPA/Gatekeeper Policy Example:

# Prohibit containers running as root
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sPSPAllowedUsers
metadata:
  name: require-non-root
spec:
  match:
    kinds:
      - apiGroups: [""]
        kinds: ["Pod"]
  parameters:
    runAsUser:
      rule: MustRunAsNonRoot

Cloud Native Security Tool Recommendations

Image Scanning: Trivy, Snyk

Trivy (CNCF Project)

# Scan container image
trivy image my-app:v1.0.0

# Scan Kubernetes configuration
trivy config .

# Scan IaC (Terraform)
trivy config --tf-vars terraform.tfvars .

Snyk

# Scan dependencies
snyk test

# Scan container
snyk container test my-app:v1.0.0

# Scan IaC
snyk iac test

Runtime Protection: Falco

Falco is a CNCF project for detecting abnormal behavior in containers and K8s.

Detection Capabilities:

  • Shell execution in containers
  • Sensitive file access
  • Abnormal network connections
  • K8s API abnormal calls

Policy Engines: OPA, Kyverno

OPA (Open Policy Agent)

  • General-purpose policy engine
  • Uses Rego language
  • Can be used for K8s Admission Control

Kyverno

  • K8s native policy engine
  • Policies defined in YAML
  • Lower learning curve

Secret Management: HashiCorp Vault

Vault is the industry standard secret management tool.

Features:

  • Secret storage and access control
  • Dynamic secret generation
  • Secret rotation
  • Encryption as a service
# Store secret
vault kv put secret/myapp/db password=s3cr3t

# Read secret
vault kv get secret/myapp/db

K8s Integration: Use Vault Agent Injector to automatically inject secrets into Pods.


FAQ

Q1: What's the difference between Cloud Native security and traditional network security?

Traditional security focuses on network perimeters (firewalls), assuming internal networks are trusted. Cloud Native security adopts a zero trust model—every service must verify, with no assumed internal trust.

Q2: Which layer should I start with in the 4C model?

Recommend starting from outside to inside. Cloud layer security is the foundation—if cloud configuration has issues, inner layer protection is useless. But in practice, all four layers should be addressed simultaneously.

Q3: What security issues should small teams prioritize?

Recommend prioritizing: (1) Image vulnerability scanning (2) Secret management (don't write passwords in code) (3) Basic RBAC configuration. These three have low cost but high benefit.

Q4: Is Service Mesh necessary?

Not necessarily. If you don't have many services or strong mTLS requirements, you can start with other methods (API Gateway, manual TLS configuration). Service Mesh adds complexity—evaluate the benefits.

Q5: How do you convince management to invest in security?

Speak with numbers. Use statistics on average security incident costs (Ponemon Institute reports) compared to prevention investment. Also emphasize compliance requirements (ISO 27001, SOC 2).


Next Steps

Cloud Native security is a continuous process, not a one-time task. Recommendations:

  1. First use CIS Benchmark to check existing configuration
  2. Implement image scanning, integrate into CI/CD
  3. Establish basic RBAC and Network Policy
  4. Gradually implement more advanced protection measures

Further reading:

Is your security sufficient? Prevention is better than remediation. Schedule security assessment and let professional teams help you identify blind spots and build complete security protection.


References

Need Professional Cloud Advice?

Whether you're evaluating cloud platforms, optimizing existing architecture, or looking for cost-saving solutions, we can help

Book Free Consultation

Related Articles