6.5 — Infrastructure Hardening & Container Security

Build, Deploy & Operations 90 min DevOps & SRE
0:00 / 0:00
Listen instead
Infrastructure Hardening & Container Security
0:00 / 0:00

Introduction

Application security does not end at the code boundary. The most secure application in the world is worthless if it runs on an unpatched server with default credentials, in a misconfigured container with root access, on a network with no segmentation. CIS Control 16.7 requires organizations to use industry-standard hardening configuration templates for all application infrastructure β€” servers, databases, web servers, containers, PaaS, and SaaS. And critically: custom development must not weaken the hardening that infrastructure teams establish.

Infrastructure as Code (IaC) has fundamentally changed how infrastructure is provisioned and managed. Infrastructure is now software β€” and it inherits all the security challenges of software: bugs, misconfigurations, vulnerabilities in dependencies, and the need for review, testing, and continuous monitoring. When AI tools generate IaC templates, they introduce the same category of risks that AI-generated application code does β€” overly permissive defaults, missing encryption, and security-irrelevant-seeming decisions that create significant exposure.

This module covers IaC security, hardening standards, container security best practices, and the specific risks of AI-generated infrastructure code.


CIS Control 16.7: Hardening Configuration Templates

The control states:

Use industry-standard hardening configuration templates for enterprise assets. Periodically review and update to reflect the latest information. Review software configurations and controls during software development to ensure that development does not weaken the hardening.

Key requirements:

  • Industry-standard templates: Do not invent hardening standards from scratch. Use CIS Benchmarks, DISA STIGs, or vendor hardening guides as your baseline.
  • Periodic review and update: Hardening standards evolve. New attack techniques, new features, new defaults β€” templates must be updated at least annually and whenever significant changes occur.
  • Development must not weaken hardening: This is the critical intersection with SSDLC. Developers requesting β€œopen port 0.0.0.0/0” or β€œdisable SELinux” to make their application work are weakening infrastructure hardening. These requests must be evaluated, documented, and approved (or denied) through a formal exception process.

Infrastructure as Code (IaC)

Principles

All infrastructure must be defined in version-controlled code:

Terraform:

# Example: AWS VPC with private subnets
resource "aws_vpc" "main" {
  cidr_block           = "10.0.0.0/16"
  enable_dns_hostnames = true
  enable_dns_support   = true

  tags = {
    Name        = "production-vpc"
    Environment = "production"
    ManagedBy   = "terraform"
  }
}

resource "aws_subnet" "private" {
  count             = 3
  vpc_id            = aws_vpc.main.id
  cidr_block        = cidrsubnet(aws_vpc.main.cidr_block, 8, count.index)
  availability_zone = data.aws_availability_zones.available.names[count.index]

  # Private subnet β€” no public IP assignment
  map_public_ip_on_launch = false
}

Pulumi (programming language-native):

import pulumi_aws as aws

vpc = aws.ec2.Vpc("main",
    cidr_block="10.0.0.0/16",
    enable_dns_hostnames=True,
    enable_dns_support=True,
)

CloudFormation (AWS-native), Ansible (configuration management), Helm (Kubernetes packaging) β€” each has its place. The critical principle is: no manual changes. Everything in code, everything reviewed, everything versioned.

IaC Review and Approval

IaC changes follow the same process as application code:

  1. Feature branch: All changes on branches, never directly to main.
  2. Pull request: With description of what is changing and why.
  3. Automated checks: Linting, security scanning, plan/preview (see what will change before applying).
  4. Peer review: By someone with infrastructure expertise who understands the security implications.
  5. Approval: Required reviewers must approve before merge.
  6. Apply: Automated application from the main branch. No manual terraform apply from laptops.

No Manual Changes (Drift Detection)

Manual changes to infrastructure (logging into the console and clicking) create drift β€” the actual state diverges from the code. Drift is a security risk because:

  • Unreviewed changes: Manual changes bypass all review and approval gates.
  • Unaudited: Manual changes may not appear in audit logs the same way IaC changes do.
  • Unreproducible: If the environment must be rebuilt, manual changes are lost.
  • Conflicting: The next IaC apply may overwrite manual changes, or worse, fail because the state does not match expectations.

Detection: Use tools like terraform plan (shows differences between code and reality), Driftctl, AWS Config, or Azure Policy to detect drift.

Remediation: When drift is detected, either update the IaC to match the desired state (if the manual change was intentional and approved) or revert the manual change to match the IaC.

State File Security

Terraform state files contain the full state of managed infrastructure, including sensitive values:

  • Encrypted at rest: State files stored in encrypted backends (S3 with SSE, Azure Blob with encryption, GCS with CMEK).
  • Access controlled: Only the CI/CD pipeline and designated administrators should have access to state files. No developer read access.
  • State locking: Prevent concurrent applies that could corrupt state (DynamoDB for S3 backend, Azure Blob lease, GCS object versioning).
  • No local state in production: Always use remote backends with encryption and access control.

IaC Security Scanning

Tools

Checkov (Bridgecrew/Palo Alto):

  • Scans Terraform, CloudFormation, Kubernetes manifests, Dockerfiles, Helm charts, ARM templates.
  • 1,000+ built-in policies covering CIS Benchmarks, SOC 2, PCI-DSS, HIPAA, NIST 800-53.
  • Custom policy support.
# Scan Terraform directory
checkov -d ./terraform/ --framework terraform

# Output: Passed: 47, Failed: 3, Skipped: 0
# CKV_AWS_19: FAILED - S3 bucket encryption not enabled
# CKV_AWS_21: FAILED - S3 bucket versioning not enabled
# CKV_AWS_18: FAILED - S3 access logging not enabled

tfsec (Aqua Security):

  • Terraform-specific scanner with deep HCL understanding.
  • Resolves Terraform modules and variables for accurate analysis.
  • Integrated into VS Code for real-time scanning.

KICS (Keeping Infrastructure as Code Secure):

  • Open-source, multi-platform scanner (Terraform, CloudFormation, Ansible, Docker, Kubernetes, Helm, OpenAPI).
  • 2,000+ queries covering common misconfigurations.

Bridgecrew Platform:

  • SaaS platform built on Checkov with additional features: supply chain analysis, drift detection, automated remediation.

Common Misconfigurations Detected

CategoryExampleRisk
Public exposureS3 bucket with public access, security group allowing 0.0.0.0/0Data breach, unauthorized access
Missing encryptionEBS volumes unencrypted, RDS without encryption at restData exposure at rest
Permissive IAMAction: "*" or Resource: "*" in IAM policiesPrivilege escalation
Logging disabledCloudTrail disabled, VPC flow logs off, access logging disabledNo visibility into attacks
Default credentialsDefault database passwords, default admin accountsTrivial unauthorized access
Unencrypted transitHTTP listeners, unencrypted database connectionsData interception
Missing backupsNo automated backups configured, no retention policiesData loss
Excessive permissionsOverly permissive security groups, IAM roles with admin accessBlast radius expansion

Compliance Checking

IaC scanners map to compliance frameworks:

  • CIS Benchmarks: CIS AWS Foundations Benchmark, CIS Azure Foundations Benchmark, CIS GCP Foundations Benchmark, CIS Kubernetes Benchmark, CIS Docker Benchmark.
  • SOC 2: Type II controls for security, availability, and confidentiality.
  • PCI-DSS: Requirements for environments processing payment card data.
  • HIPAA: Technical safeguards for environments handling protected health information.
  • NIST 800-53: Comprehensive federal security controls.
# GitHub Actions: IaC security scanning
- name: Checkov Scan
  uses: bridgecrewio/checkov-action@v12
  with:
    directory: ./terraform
    framework: terraform
    check: CKV_AWS_19,CKV_AWS_21,CKV_AWS_18  # specific checks
    soft_fail: false  # fail the build on violations

Hardening Standards

CIS Benchmarks

The Center for Internet Security publishes detailed hardening benchmarks for virtually every major platform:

  • Operating Systems: CIS Ubuntu Linux, CIS Red Hat Enterprise Linux, CIS Windows Server, CIS macOS.
  • Databases: CIS Oracle Database, CIS PostgreSQL, CIS MySQL, CIS SQL Server, CIS MongoDB.
  • Web Servers: CIS Apache HTTP Server, CIS NGINX, CIS IIS.
  • Cloud Providers: CIS AWS Foundations, CIS Azure Foundations, CIS GCP Foundations.
  • Containers: CIS Docker, CIS Kubernetes.
  • Applications: CIS Apache Tomcat, CIS Microsoft 365, CIS Google Workspace.

Each benchmark provides:

  • Specific configuration settings with rationale.
  • Audit procedures to verify compliance.
  • Remediation steps for non-compliant settings.
  • Level 1 (basic, minimal impact) and Level 2 (defense in depth, may affect functionality) profiles.

DISA STIGs (Security Technical Implementation Guides)

US Department of Defense hardening standards:

  • More prescriptive than CIS Benchmarks.
  • Required for DoD systems, widely adopted in government and regulated industries.
  • CAT I (critical), CAT II (important), CAT III (low) severity classifications.
  • STIG Viewer tool for reviewing and documenting compliance.

Vendor Hardening Guides

Major vendors publish their own hardening guidance:

  • AWS Well-Architected Framework: Security pillar with detailed best practices.
  • Azure Security Benchmark: Microsoft’s cloud security recommendations.
  • GCP Security Best Practices: Google’s cloud hardening guidance.

Automated Compliance Scanning

Manual compliance checking does not scale. Automate with:

  • AWS Security Hub: Aggregates findings from multiple security services, maps to CIS Benchmark.
  • Azure Security Center (Defender for Cloud): Continuous security assessment against Azure Security Benchmark.
  • GCP Security Command Center: Centralized security findings and compliance monitoring.
  • InSpec (Chef): Infrastructure testing framework for compliance verification.
  • Prowler: Open-source AWS/Azure/GCP security assessment tool.
# InSpec: verify CIS Docker Benchmark controls
control 'docker-5.1' do
  title 'Ensure AppArmor Profile is Enabled'
  desc 'AppArmor protects the Linux OS and applications from various threats'

  docker.containers.running?.ids.each do |id|
    describe docker.object(id) do
      its(['AppArmorProfile']) { should_not eq '' }
      its(['AppArmorProfile']) { should_not eq 'unconfined' }
    end
  end
end

Container Security Best Practices

Container Security Layers Figure: Container Security Layers β€” Base image selection, build hardening, runtime protection, and orchestration security

Image Security

Minimal base images:

# BEST: Distroless β€” no shell, no package manager, minimal attack surface
FROM gcr.io/distroless/java21-debian12@sha256:abc123...

# GOOD: Alpine β€” small footprint (5 MB base), musl libc
FROM alpine:3.19@sha256:def456...

# BEST for Go/Rust: Scratch β€” empty image, only your static binary
FROM scratch
COPY --from=builder /app/server /server
ENTRYPOINT ["/server"]

# AVOID: Full OS images (ubuntu, debian) β€” hundreds of MB of unnecessary packages

No root user:

# Create non-root user
RUN addgroup --system --gid 1001 appgroup && \
    adduser --system --uid 1001 --ingroup appgroup appuser

# Switch to non-root user
USER appuser

# Or use distroless nonroot variant
FROM gcr.io/distroless/static:nonroot

Running as root inside a container means that if an attacker escapes the container, they have root on the host. Running as non-root contains the blast radius.

Multi-stage builds:

# Stage 1: Build β€” includes compilers, build tools, source code
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --production=false
COPY . .
RUN npm run build

# Stage 2: Runtime β€” only production dependencies and built artifacts
FROM node:20-alpine AS runtime
WORKDIR /app
RUN addgroup --system app && adduser --system --ingroup app app
COPY --from=builder --chown=app:app /app/dist ./dist
COPY --from=builder --chown=app:app /app/node_modules ./node_modules
USER app
EXPOSE 3000
CMD ["node", "dist/index.js"]

Multi-stage builds exclude build tools, source code, test fixtures, and development dependencies from the runtime image β€” reducing both attack surface and image size.

Vulnerability scanning:

# Trivy: scan for OS and application vulnerabilities
trivy image --severity HIGH,CRITICAL --exit-code 1 myapp:latest

# Grype: alternative scanner
grype myapp:latest --fail-on high

# Snyk Container
snyk container test myapp:latest --severity-threshold=high

Sign images and verify before deployment:

# Sign with Cosign (keyless)
cosign sign --yes ghcr.io/myorg/myapp@sha256:abc123...

# Verify at deployment (admission controller or deploy script)
cosign verify --certificate-identity=ci@myorg.com \
  --certificate-oidc-issuer=https://token.actions.githubusercontent.com \
  ghcr.io/myorg/myapp@sha256:abc123...

Digest references, not mutable tags:

# BAD: :latest can point to any image at any time
image: myapp:latest

# BAD: even versioned tags are mutable
image: myapp:v2.1.0

# GOOD: digest is immutable β€” this exact image, verified
image: myapp@sha256:abc123def456789...

No secrets in images:

# NEVER DO THIS
ENV DATABASE_PASSWORD=mysecret
COPY .env /app/.env
COPY credentials.json /app/

# Instead: inject at runtime via environment variables or mounted secrets

Read-only root filesystem:

# Kubernetes: read-only root filesystem
securityContext:
  readOnlyRootFilesystem: true

# If the app needs to write to specific directories:
volumeMounts:
  - name: tmp
    mountPath: /tmp
  - name: cache
    mountPath: /app/cache
volumes:
  - name: tmp
    emptyDir: {}
  - name: cache
    emptyDir: {}

Regular base image updates:

# Renovate: automated base image updates
{
  "docker": {
    "pinDigests": true
  },
  "packageRules": [
    {
      "matchDatasources": ["docker"],
      "automerge": true,
      "automergeType": "pr",
      "schedule": ["before 6am on Monday"]
    }
  ]
}

Runtime Security

Pod Security Standards / Admission Controllers:

Kubernetes Pod Security Standards define three profiles:

ProfileDescriptionKey Restrictions
PrivilegedUnrestrictedNone β€” use only for system-level workloads
BaselineMinimally restrictiveNo privileged containers, no hostNetwork, no hostPID, limited volume types
RestrictedHeavily restrictedAll baseline restrictions plus: non-root, read-only root FS, restricted capabilities, seccomp

Enforcement through admission controllers:

OPA/Gatekeeper:

apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sContainerLimits
metadata:
  name: container-must-have-limits
spec:
  match:
    kinds:
      - apiGroups: [""]
        kinds: ["Pod"]
  parameters:
    cpu: "2"
    memory: "2Gi"

Kyverno:

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: require-non-root
spec:
  validationFailureAction: Enforce
  rules:
    - name: check-non-root
      match:
        any:
          - resources:
              kinds:
                - Pod
      validate:
        message: "Containers must not run as root"
        pattern:
          spec:
            containers:
              - securityContext:
                  runAsNonRoot: true

Network Policies:

# Default deny all ingress β€” then explicitly allow needed traffic
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-ingress
  namespace: production
spec:
  podSelector: {}
  policyTypes:
    - Ingress

---
# Allow traffic from frontend to backend only
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-frontend-to-backend
  namespace: production
spec:
  podSelector:
    matchLabels:
      app: backend
  ingress:
    - from:
        - podSelector:
            matchLabels:
              app: frontend
      ports:
        - port: 8080

Runtime Threat Detection:

  • Falco: Open-source runtime security. Monitors system calls and detects anomalous behavior (shell spawned in container, unexpected network connection, file write to sensitive path).
  • Sysdig Secure: Commercial platform built on Falco with additional features (image scanning, compliance, forensics).
# Falco rule: detect shell in container
- rule: Terminal shell in container
  desc: Detect a shell being spawned in a container
  condition: >
    spawned_process and container and
    proc.name in (bash, sh, zsh, dash, ksh) and
    not proc.pname in (crond, sshd)
  output: >
    Shell spawned in container
    (user=%user.name container=%container.name
     shell=%proc.name parent=%proc.pname)
  priority: WARNING

Resource Limits:

resources:
  requests:
    cpu: "250m"
    memory: "256Mi"
  limits:
    cpu: "1"
    memory: "512Mi"

Resource limits prevent a compromised container from consuming all available resources (denial of service against other workloads) and limit the impact of cryptocurrency miners.

CIS Docker Benchmark

Key controls from the CIS Docker Benchmark:

  1. Host Configuration: Keep Docker up to date, audit Docker daemon activity, use a separate partition for Docker.
  2. Docker Daemon Configuration: Restrict network traffic between containers, set logging level to info, configure TLS authentication.
  3. Docker Daemon Files: Verify ownership and permissions on Docker files and directories.
  4. Container Images: Create a user for the container, do not install unnecessary packages, use COPY instead of ADD.
  5. Container Runtime: Do not use privileged containers, do not map privileged ports, do not share the host network namespace.
  6. Docker Security Operations: Avoid image sprawl, avoid container sprawl.

CIS Kubernetes Benchmark

Key areas:

  1. Control Plane Components: API server, controller manager, scheduler, etcd security configuration.
  2. Worker Node Security: kubelet configuration, kube-proxy settings.
  3. Policies: RBAC, pod security, network policies, secrets management.
  4. Logging and Monitoring: Audit logging, log rotation, monitoring.

AI and Infrastructure

AI-Generated IaC Risks

AI code generation tools produce IaC templates with the same classes of errors they produce in application code β€” but infrastructure misconfigurations can have immediate, severe consequences:

Overly permissive security groups:

# AI-generated β€” DANGEROUS: allows all traffic from anywhere
resource "aws_security_group_rule" "allow_all" {
  type              = "ingress"
  from_port         = 0
  to_port           = 65535
  protocol          = "-1"
  cidr_blocks       = ["0.0.0.0/0"]
  security_group_id = aws_security_group.main.id
}

AI models trained on tutorial code and Stack Overflow answers frequently produce 0.0.0.0/0 rules because tutorials prioritize simplicity over security. In production, every security group rule must restrict access to specific CIDR ranges and specific ports.

Missing encryption:

# AI-generated β€” DANGEROUS: unencrypted S3 bucket
resource "aws_s3_bucket" "data" {
  bucket = "my-application-data"
  # No server-side encryption configuration
  # No versioning
  # No access logging
  # No public access block
}

AI often generates the minimum viable configuration without security hardening because training data includes millions of examples of minimal configurations.

Public exposure:

# AI-generated β€” DANGEROUS: publicly accessible database
resource "aws_db_instance" "main" {
  engine         = "postgres"
  instance_class = "db.t3.medium"
  publicly_accessible = true  # AI default β€” should be false
  # No encryption
  # No backup retention
}

AI-generated Dockerfiles:

# AI-generated β€” MULTIPLE ISSUES
FROM ubuntu:latest          # :latest is mutable, ubuntu is large
RUN apt-get update && apt-get install -y \
    curl wget vim nano gcc  # unnecessary tools in runtime image
COPY . /app                 # copies everything including .env, .git
WORKDIR /app
RUN npm install             # installs dev dependencies too
EXPOSE 3000
CMD ["npm", "start"]        # running as root (no USER directive)

Scanning AI-Generated Infrastructure Code

All AI-generated IaC must pass through the same security scanning as human-written IaC:

  • Pre-commit: Checkov, tfsec, or KICS as pre-commit hooks catch issues before they enter version control.
  • CI pipeline: Automated scanning in every PR with build failure on violations.
  • Plan review: terraform plan output reviewed by a human who understands security implications before any apply.
  • Guardrails for AI generation: When using AI to generate IaC, provide explicit security requirements in the prompt: β€œGenerate a Terraform configuration for an S3 bucket with server-side encryption using AWS KMS, versioning enabled, public access blocked, and access logging to a separate bucket.”

AI-Assisted Drift Detection

AI can improve infrastructure security monitoring:

  • Anomaly detection in configuration changes: ML models learn normal configuration patterns and alert on deviations β€” a security group that suddenly allows a new CIDR range, an IAM policy that gains a new action, a resource that loses encryption.
  • Intelligent remediation suggestions: When drift is detected, AI suggests the most appropriate remediation β€” update the IaC to match (if the change was intentional) or revert the manual change (if it was unauthorized).
  • Predictive compliance: AI models predict which configuration changes are likely to cause compliance violations before they are applied, based on historical patterns of violations and remediations.

Implementation Checklist

ControlPriorityStatus
All infrastructure defined in version-controlled IaCCritical
IaC security scanning in CI (Checkov/tfsec/KICS)Critical
CIS Benchmarks applied to all platformsCritical
No manual infrastructure changes (drift detection)High
Container images use minimal base (distroless/Alpine)High
All containers run as non-rootHigh
Container images scanned for vulnerabilitiesHigh
Container images signed and verified at deploymentHigh
Digest references used (not mutable tags)High
Network policies restrict container communicationHigh
Pod security standards enforcedHigh
Runtime threat detection deployed (Falco)Medium
State files encrypted and access-controlledHigh
Automated compliance scanningMedium
AI-generated IaC reviewed with extra scrutinyHigh
Read-only root filesystem for containersMedium
Resource limits on all containersMedium

Key Takeaways

  1. Infrastructure is code β€” treat it like code: Version control, peer review, automated testing, and security scanning apply to infrastructure definitions just as they do to application code.
  2. No manual changes: Every manual change is an unreviewed, unaudited, unreproducible security risk. Drift detection catches what process misses.
  3. Minimal, non-root, scanned, signed: Container security in four words. Minimal base images, non-root execution, vulnerability scanning, and signature verification are non-negotiable.
  4. CIS Benchmarks are the baseline: Do not invent hardening standards. Start with CIS Benchmarks and customize only where documented business requirements demand it.
  5. AI-generated IaC defaults to insecure: AI models trained on tutorial code produce tutorial-quality security. Scan everything, review everything, and provide explicit security requirements when prompting AI for infrastructure code.
  6. Defense in depth for containers: Image security (build time) plus admission controllers (deploy time) plus runtime detection (run time) plus network policies (network time) create layers that no single bypass defeats.

References

Study Guide

Key Takeaways

  1. Infrastructure is code β€” treat it like code β€” Version control, peer review, automated testing, and security scanning for all IaC.
  2. No manual changes β€” Every manual change is unreviewed, unaudited, and unreproducible; drift detection catches what process misses.
  3. Minimal, non-root, scanned, signed β€” Container security in four words: minimal base images, non-root execution, vulnerability scanning, signature verification.
  4. CIS Benchmarks are the baseline β€” Do not invent hardening standards; start with CIS and customize only with documented business justification.
  5. AI-generated IaC defaults to insecure β€” Training on tutorial code produces 0.0.0.0/0 security groups, public databases, and missing encryption.
  6. Defense in depth for containers β€” Image security (build) + admission controllers (deploy) + runtime detection (run) + network policies (network).
  7. Terraform state files are sensitive β€” Contain full infrastructure state including secrets; encrypt at rest, access-control, use state locking.

Important Definitions

TermDefinition
Infrastructure DriftActual state diverges from IaC code due to manual changes (console clicking)
CIS BenchmarksIndustry-standard hardening configurations published for virtually every major platform
DISA STIGsUS DoD hardening standards; more prescriptive than CIS Benchmarks
DistrolessContainer images with no shell, no package manager; minimal attack surface
Scratch ImageCompletely empty container base; only the compiled binary, nothing else
Pod Security StandardsKubernetes profiles: Privileged (unrestricted), Baseline (minimal), Restricted (heavily constrained)
FalcoOpen-source runtime security monitoring system calls and detecting anomalous container behavior
CheckovIaC scanner with 1,000+ policies covering CIS, SOC 2, PCI-DSS, HIPAA, NIST 800-53
Multi-Stage BuildDockerfile technique separating build tools from runtime image to reduce attack surface
Admission ControllerKubernetes component (OPA/Gatekeeper, Kyverno) enforcing policies at deployment time

Quick Reference

  • Base Image Priority: Scratch (Go/Rust) > Distroless > Alpine > Full OS (avoid)
  • K8s Security Standards: Privileged (system only), Baseline (no privileged, no hostNetwork), Restricted (non-root, read-only FS, seccomp)
  • IaC Scanners: Checkov (1000+ policies), tfsec (Terraform-specific), KICS (multi-platform, 2000+ queries)
  • Container Checklist: Non-root USER, digest references, multi-stage build, read-only root FS, resource limits, no secrets in image
  • Common Pitfalls: Running containers as root, using :latest tags, baking secrets into images, AI-generated IaC with 0.0.0.0/0 rules, manual infrastructure changes, local Terraform state

Review Questions

  1. Why should containers run as non-root, and what specific risk does running as root inside a container create?
  2. Explain infrastructure drift, why it is a security risk, and how to detect and remediate it.
  3. An AI generates a Terraform config with a publicly accessible database and no encryption β€” what specific scanning and review steps should catch this?
  4. Compare the three Kubernetes Pod Security Standard profiles and describe when each is appropriate.
  5. Design a container image security pipeline from base image selection through runtime monitoring, specifying tools at each stage.
Infrastructure Hardening & Container Security
Page 1 of 0 ↧ Download
Loading PDF...

Q1. Which base image type provides the smallest attack surface for Go or Rust applications?

Q2. What does CIS Control 16.7 require regarding infrastructure hardening?

Q3. What is infrastructure drift and why is it a security risk?

Q4. Which IaC scanning tool supports over 1,000 built-in policies covering CIS Benchmarks, SOC 2, PCI-DSS, HIPAA, and NIST 800-53?

Q5. What are the three Kubernetes Pod Security Standard profiles?

Q6. Why should containers run as non-root users?

Q7. What common security issue do AI-generated IaC templates frequently exhibit?

Q8. What tool provides open-source runtime security by monitoring system calls and detecting anomalous behavior in containers?

Q9. Why should container images use digest references instead of mutable tags like :latest or :v2.1.0?

Q10. What should Terraform state files have to protect sensitive infrastructure values they contain?

Answered: 0 of 10 Β· Score: 0/0 (0%)