Interview questions and model answers
"How do you integrate security into a CI/CD pipeline?"
Pre-commit and PR-time secret scanning with push protection; SAST and dependency scanning on pull requests with results inline; IaC scanning with Checkov or Trivy config for Terraform, CloudFormation and Helm; image build on minimal bases, SBOM generation, Trivy scan failing on fixable critical and high findings; keyless cosign signing and provenance; admission policies in the cluster that only allow signed images from our ECR and enforce Pod Security restricted; plus continuous re-scanning of running images and runtime detection. Exceptions are time-bound and owned.
"A scan reports 400 vulnerabilities in our base image. What do you do?"
Don't patch 400 things one by one. Switch to a minimal or distroless base and rebuild — that usually removes most of them. Then prioritise what remains by severity with a fix available, exploitability (EPSS, KEV) and whether the package is reachable or internet-exposed. Gate builds on fixable criticals and highs, track the rest with SLAs, and automate base-image updates so it doesn't recur.
"How do you manage secrets for applications on EKS?"
Secrets live in AWS Secrets Manager with rotation; External Secrets Operator syncs them using a ClusterSecretStore authenticated through IRSA or Pod Identity, with each app's role scoped to its own secret ARNs and KMS key. Only ExternalSecret manifests go in Git. Kubernetes Secrets are envelope-encrypted with KMS and RBAC restricts who can read them; apps read secrets from mounted files and reload on rotation.
"What is an SBOM and why does it matter?"
A machine-readable inventory of all components and versions in an artifact, in SPDX or CycloneDX. Generated at build time and attached to the image, it lets us answer within minutes which running services contain a newly disclosed vulnerable library, supports licence compliance and is increasingly required by customers and regulators.
"How do you ensure only trusted images run in your cluster?"
Images come only from our ECR, built by CI, signed with cosign using keyless signing tied to the CI workflow identity, with provenance attestations. An admission controller — Kyverno verifyImages or the Sigstore policy controller — rejects images that aren't signed by that identity or are referenced by mutable tags instead of digests.
"How would you harden a Kubernetes pod?"
Run as non-root with a fixed UID, read-only root filesystem, drop all capabilities, no privilege escalation, RuntimeDefault seccomp, no service account token unless needed, resource requests and limits, image by digest from a trusted registry, default-deny network policies with explicit allows, and enforce the restricted Pod Security Standard on the namespace.
"A developer pushed an AWS key to GitHub. What happens next?"
Revoke the key immediately, investigate its activity in CloudTrail and clean up anything created, rotate anything it could access, then remove it from history as hygiene. Prevent recurrence with push protection and pre-commit secret scanning, and replace static keys with SSO and OIDC roles.