Skip to main content
This checklist helps verify that your GKE preview environment follows security best practices.

Network Security

VPC Isolation

  • Preview uses a separate VPC from production
  • VPC has custom subnets (not default VPC)
  • VPC flow logs are enabled
  • Private Google Access is enabled for GKE subnet
Verification:

GKE Cluster Security

  • Private nodes are enabled (no public IPs)
  • Master authorized networks configured (if needed)
  • Control plane is on a private endpoint OR restricted public endpoint
  • Workload Identity is enabled
  • Shielded nodes are enabled
  • Binary Authorization is enabled
Verification:

Network Policies

  • Default deny-all ingress policy exists
  • Egress policies restrict outbound traffic
  • Pod-to-pod communication is restricted
  • Metadata service (169.254.169.254) is blocked
Verification:

Firewall Rules

  • VPC firewall rules follow least privilege
  • No overly permissive rules (0.0.0.0/0)
  • SSH access restricted to IAP (35.235.240.0/20)
Verification:

Identity & Access Management (IAM)

Service Accounts

  • Pods use Workload Identity (not service account keys)
  • Each component has its own service account
  • Service accounts follow least privilege principle
  • No service account keys are used
Verification:

Workload Identity

  • Kubernetes service account is annotated with GCP SA
  • GCP service account has workloadIdentityUser binding
  • Pods successfully authenticate without keys
Verification:

GitHub Actions Workload Identity Federation

  • Workload Identity Pool created
  • OIDC provider configured for GitHub
  • No service account keys in GitHub Secrets
  • Repository condition restricts access
Verification:

Secrets Management

Secret Manager

  • All secrets stored in Secret Manager (not Kubernetes secrets)
  • Secrets have automatic replication
  • Service account has only secretAccessor role
  • No plaintext secrets in code or configs
Verification:

External Secrets Operator

  • External Secrets Operator installed
  • SecretStore configured with Workload Identity
  • ExternalSecret syncing successfully
  • Kubernetes secrets are created/updated
Verification:

Container Security

Image Security

  • Images are signed/attested
  • Binary Authorization policy enforces signed images
  • Images come from trusted registry (Artifact Registry)
  • Images use minimal base (distroless)
Verification:

Pod Security

  • Pods run as non-root
  • readOnlyRootFilesystem enabled (where possible)
  • No privileged containers
  • Capabilities are dropped
  • seccompProfile is set
Verification:

Cloud SQL Proxy Sidecar

  • Cloud SQL proxy runs as non-root user
  • Proxy uses private IP connection
  • Proxy container has resource limits
  • Application connects via localhost (127.0.0.1)
Verification:

Data Security

Encryption

  • Data at rest encryption enabled (GKE default)
  • Secrets encrypted in etcd
  • Cloud SQL uses encrypted connections
  • Redis uses TLS (if enabled)
Verification:

Database Security

  • Cloud SQL uses private IP (not public)
  • Database passwords are in Secret Manager
  • Database users follow least privilege
  • Automatic backups are enabled
Verification:

Redis Security

  • Redis uses private IP
  • AUTH is enabled
  • Redis password is in Secret Manager
  • Automatic failover enabled (standard tier)
Verification:

Monitoring & Logging

Cloud Logging

  • Container logs sent to Cloud Logging
  • Audit logs enabled
  • Log retention configured
  • No sensitive data in logs
Verification:

Cloud Monitoring

  • Metrics are being collected
  • Alert policies configured
  • Uptime checks configured
  • Dashboards created
Verification:

Cloud Trace

  • Distributed tracing enabled
  • Traces sent to Cloud Trace
  • Sampling rate configured
Verification:

Compliance & Governance

Resource Labeling

  • All resources have environment label
  • Cost allocation labels applied
  • Owner/team labels present
Verification:

Resource Limits

  • All containers have resource requests
  • All containers have resource limits
  • Namespace has ResourceQuota
  • LimitRange configured
Verification:

Backup & Disaster Recovery

  • Cloud SQL automated backups enabled
  • Kubernetes manifests in version control
  • Secrets can be recovered from Secret Manager
  • Recovery procedure documented
Verification:

GitHub Actions Security

Workflow Security

  • Workload Identity Federation used (no keys)
  • Workflows use specific versions (not @latest)
  • GitHub Environment protection rules configured
  • Approval required before deployment
  • Secrets are GitHub Secrets (not hardcoded)
Verification:
  • Review .github/workflows/deploy-preview-gke.yaml
  • Check GitHub repository settings → Environments → preview

Deployment Validation

  • Smoke tests run post-deployment
  • Health checks pass before marking success
  • Automatic rollback on failure
  • Deployment creates audit trail
Verification:

Security Scanning

Vulnerability Scanning

  • Container images scanned for vulnerabilities
  • No HIGH or CRITICAL vulnerabilities
  • Scanning integrated into CI/CD
  • Scan results reviewed regularly
Verification:

Security Auditing

  • Regular security audits scheduled
  • Audit findings tracked and remediated
  • Compliance requirements documented

Incident Response

Monitoring & Alerting

  • Alert policies configured for security events
  • On-call rotation defined
  • Incident response playbook exists
  • Runbooks for common issues

Rollback Procedures

  • Documented rollback procedure
  • Rollback tested in preview
  • Automatic rollback configured in CI/CD
Test Rollback:

Scoring

Total Checklist Items: ~80 Security Score Calculation:
  • 90-100% complete: Excellent - Production-ready security posture
  • 80-89% complete: Good - Minor improvements needed
  • 70-79% complete: Fair - Significant gaps exist
  • <70% complete: Poor - Not ready for production-like preview

Next Steps

After completing this checklist:
  1. Document exceptions: Some items may not apply to your use case - document why
  2. Remediate failures: Fix any failing checks before deploying to production
  3. Schedule regular reviews: Re-run this checklist quarterly
  4. Automate checks: Convert manual checks to automated tests where possible

Resources