Home / Topics / DevSecOps / Cheatsheet
DevSecOps

Cheatsheet

Dense command and config reference for the DevSecOps toolchain: secret scanning, SAST, SCA, IaC and image scanning, SBOMs, signing, admission policy, CIS audits, runtime detection and secrets management. Plus an OWASP Top 10 table and the one-liners interviewers expect.


Which tool for which job

JobOpen-source defaultAlternativesRuns at
Secrets in code and historygitleaksTruffleHog, GitHub push protection, detect-secretspre-commit, PR
SASTSemgrepCodeQL, SonarQube, Bandit (Python), gosec (Go)PR
SCA (dependency CVEs)Trivy fs, GrypeSnyk, Dependabot alerts, OWASP Dependency-Check, OSV-ScannerPR, build
IaC misconfigurationCheckovTrivy config (absorbed tfsec), KICS, TerrascanPR
Image vulnerabilitiesTrivy imageGrype, Docker Scout, cloud registry scanningbuild, registry, scheduled
SBOMSyftTrivy (--format cyclonedx), cdxgen, BuildKit --sbombuild
Signing and provenanceCosign (Sigstore)Notation (Notary v2), GitHub artifact attestationsrelease
Admission policyKyvernoOPA Gatekeeper, ValidatingAdmissionPolicy (CEL), Pod Security Admissiondeploy
Policy-as-code in CIConftest (Rego), kyverno applyopa eval, Checkov custom policiesPR
CIS cluster auditkube-benchTrivy k8s, Kubescapescheduled
Runtime detectionFalcoTetragon, Tracee, commercial CNAPP agentsruntime
Secrets storeVault / OpenBaoAWS Secrets Manager, Azure Key Vault, GCP Secret Managerruntime
DASTOWASP ZAPBurp Suite, Nucleitest, staging

gitleaks: secret scanning

TaskCommand
Scan full Git history of the current repogitleaks git -v .
Scan with secrets redacted in outputgitleaks git --redact -v .
Scan only a commit rangegitleaks git --log-opts="origin/main..HEAD" .
Scan commits since a dategitleaks git --log-opts="--since=2025-01-01" .
Scan a directory or file, no Gitgitleaks dir ./path
Scan piped inputcat build.log | gitleaks stdin
Pre-commit (staged changes only)gitleaks git --pre-commit --staged --redact -v
SARIF report for code scanninggitleaks git --report-format sarif --report-path gitleaks.sarif .
JSON report--report-format json --report-path leaks.json
Custom configgitleaks git --config .gitleaks.toml .
Only report new findings against a baselinegitleaks git --baseline-path baseline.json .
Exit code on findings (default 1)--exit-code 1
Skip big files--max-target-megabytes 5

Older 8.x releases used gitleaks detect (history) and gitleaks protect --staged (pre-commit); both still work but are deprecated in favour of git, dir and stdin.

toml
# .gitleaks.toml
[extend]
useDefault = true                      # keep built-in rules

[[rules]]
id = "acme-internal-token"
description = "ACME internal API token"
regex = '''acme_[a-z0-9]{32}'''
keywords = ["acme_"]                   # cheap prefilter before the regex

[allowlist]
description = "Encrypted or test material"
paths = ['''k8s/sealed-.*\.yaml''', '''testdata/''']
regexes = ['''EXAMPLE''']

Suppress one line in code: append # gitleaks:allow. Accept a rotated historical finding: add its Fingerprint (commit:file:rule:line) to .gitleaksignore. A pushed secret is fixed by rotation, not by deleting the commit.

Semgrep: SAST

TaskCommand
Scan with a registry rulesetsemgrep scan --config p/python
Several rulesets, no telemetrysemgrep scan --config p/python --config p/owasp-top-ten --metrics=off
Default broad rulesetsemgrep scan --config p/default
Auto-detect rules (needs metrics on)semgrep scan --config auto
Fail with exit 1 on findings--error
Only ERROR-severity rules--severity ERROR
Only findings new since a commitsemgrep scan --baseline-commit origin/main --config p/python
SARIF and text at the same time--sarif-output=semgrep.sarif
JSON output--json --output semgrep.json
Exclude paths--exclude 'tests/' --exclude '*.min.js'
Skip one rule--exclude-rule python.lang.security.audit.eval-detected.eval-detected
Local custom rulessemgrep scan --config .semgrep/
Validate rule filessemgrep --validate --config .semgrep/
Run rule testssemgrep --test .semgrep/
Preview autofixessemgrep scan --config rules.yml --autofix --dryrun
Semgrep AppSec Platform in CISEMGREP_APP_TOKEN=... semgrep ci
yaml
# .semgrep/no-shell-true.yml
rules:
  - id: subprocess-shell-true-with-variable
    languages: [python]
    severity: ERROR
    message: "subprocess called with shell=True and a non-constant command: command injection risk"
    patterns:
      - pattern: subprocess.$FUNC($CMD, ..., shell=True, ...)
      - pattern-not: subprocess.$FUNC("...", ..., shell=True, ...)

Suppress one finding: # nosemgrep: <rule-id> on the line, with a reason in the same comment. Ignore paths permanently in .semgrepignore.

Trivy: images, filesystems, IaC, Kubernetes

TaskCommand
Scan an imagetrivy image nginx:1.27
The standard CI gatetrivy image --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 IMAGE
Scan a local tarballtrivy image --input image.tar
Only OS or only language packages--pkg-types os / --pkg-types library
Choose scanners--scanners vuln,secret,misconfig,license
Dependencies in a repo (SCA)trivy fs --scanners vuln .
Remote Git repotrivy repo https://github.com/org/repo
IaC and Dockerfile misconfigtrivy config .
Scan an existing SBOMtrivy sbom sbom.cdx.json
Generate an SBOMtrivy image --format cyclonedx --output sbom.cdx.json IMAGE
Kubernetes cluster summarytrivy k8s --report summary
One namespace, all findingstrivy k8s --include-namespaces prod --report all
SARIF for code scanning--format sarif --output trivy.sarif
JSON, then convert later--format json -o r.json then trivy convert --format sarif r.json
Apply VEX statementstrivy image --vex openvex.json IMAGE
Custom ignore file--ignorefile .trivyignore
Use a DB mirror (rate limits)--db-repository mirror.gcr.io/aquasec/trivy-db
Pre-download DB for air gaptrivy image --download-db-only then --skip-db-update
Clear cachestrivy clean --all
Server mode for many clientstrivy server --listen 0.0.0.0:4954 / trivy image --server http://trivy:4954 IMAGE
text
# .trivyignore: one ID per line, optional expiry, comment the owner and reason
CVE-2024-12345 exp:2026-12-31   # platform-team: no fix in Debian yet, not reachable
AVD-DS-0002                     # misconfig ID: root user in a build-only stage

Read a row as: library, vulnerability ID, severity, status (fixed, affected, will_not_fix), installed version, fixed version. Fixed version is the remediation.

Checkov: IaC scanning

TaskCommand
Scan a directorycheckov -d .
Scan one filecheckov -f main.tf
Limit frameworkscheckov -d . --framework terraform,kubernetes,dockerfile,github_actions
Terraform plan (resolved values)terraform show -json tfplan > plan.json && checkov -f plan.json
Run only specific checkscheckov -d . --check CKV_AWS_20,CKV_AWS_57
Skip checks globallycheckov -d . --skip-check CKV_AWS_18
Skip pathscheckov -d . --skip-path tests/
Report but never fail--soft-fail
Compact, failures only--compact --quiet
SARIF and CLI output-o cli -o sarif --output-file-path results/
List all checkscheckov --list
Create a baseline, then only fail on newcheckov -d . --create-baseline then checkov -d . --baseline .checkov.baseline
Scan remote Terraform modules too--download-external-modules true
Custom checks (Python or YAML)--external-checks-dir ./checkov-policies
Config filecheckov --config-file .checkov.yaml

Inline skips, always with a reason:

hcl
resource "aws_s3_bucket" "logs" {
  # checkov:skip=CKV_AWS_18:This is the access-log target bucket itself
  bucket = "acme-access-logs"
}
yaml
metadata:
  annotations:
    checkov.io/skip1: CKV_K8S_43=Digest pinned at admission by Kyverno
dockerfile
# checkov:skip=CKV_DOCKER_2:Health handled by Kubernetes probes

Syft: SBOMs

TaskCommand
Table of packages in an imagesyft nginx:1.27
SPDX JSON to filesyft IMAGE -o spdx-json=sbom.spdx.json
CycloneDX JSON to filesyft IMAGE -o cyclonedx-json=sbom.cdx.json
Two formats in one runsyft IMAGE -o spdx-json=sbom.spdx.json -o cyclonedx-json=sbom.cdx.json
Source directorysyft dir:. -o cyclonedx-json
Pull straight from registry, no Dockersyft registry:ghcr.io/org/app@sha256:...
Image tarballsyft docker-archive:image.tar
Include packages from all layerssyft IMAGE --scope all-layers
Convert between formatssyft convert sbom.spdx.json -o cyclonedx-json=sbom.cdx.json
Exclude pathssyft dir:. --exclude './node_modules/**/test/**'
List catalogerssyft cataloger list

Query an SBOM with jq:

bash
jq -r '.packages[] | "\(.name) \(.versionInfo)"' sbom.spdx.json | sort | head      # SPDX
jq -r '.components[] | "\(.name) \(.version) \(.purl)"' sbom.cdx.json | head       # CycloneDX
jq -r '.components[] | select(.name=="log4j-core") | .version' sbom.cdx.json      # "are we affected?"

Grype: vulnerability scanning from images or SBOMs

TaskCommand
Scan an imagegrype nginx:1.27
Scan an SBOM (fast, no pull)grype sbom:./sbom.spdx.json
Scan a directorygrype dir:.
Gate: fail at or above a severitygrype IMAGE --fail-on high
Only findings that have a fixgrype IMAGE --only-fixed
Output formats-o table|json|sarif|cyclonedx-json
Report by CVE instead of GHSAgrype IMAGE --by-cve
Explain one findinggrype IMAGE -o json | grype explain --id CVE-2024-12345
Update or check the DBgrype db update / grype db status
Apply OpenVEXgrype IMAGE --vex openvex.json
yaml
# .grype.yaml
fail-on-severity: high
only-fixed: true
ignore:
  - vulnerability: CVE-2024-12345
    reason: "not reachable, owner platform-team, review 2026-12-31"
  - fix-state: wont-fix

Cosign: signing and attestations

TaskCommand
Keyless sign (CI with OIDC)cosign sign --yes ghcr.io/org/app@sha256:...
Verify keyless, pinned identitycosign verify IMAGE@DIGEST --certificate-identity "https://github.com/org/app/.github/workflows/release.yml@refs/heads/main" --certificate-oidc-issuer https://token.actions.githubusercontent.com
Verify with an identity regex--certificate-identity-regexp '^https://github.com/org/app/\.github/workflows/.+@refs/heads/main$'
Generate a key paircosign generate-key-pair
Key pair in cloud KMScosign generate-key-pair --kms awskms:///alias/cosign
Sign and verify with a keycosign sign --key cosign.key IMAGE@DIGEST / cosign verify --key cosign.pub IMAGE@DIGEST
Sign every image in a multi-arch indexcosign sign --recursive --yes IMAGE@DIGEST
Attest an SBOMcosign attest --yes --type spdxjson --predicate sbom.spdx.json IMAGE@DIGEST
Attest provenancecosign attest --yes --type slsaprovenance --predicate provenance.json IMAGE@DIGEST
Verify an attestationcosign verify-attestation --type spdxjson --certificate-identity ... --certificate-oidc-issuer ... IMAGE@DIGEST
Decode the attested predicate... | jq -r .payload | base64 -d | jq .predicate
Show what is attached to an imagecosign tree IMAGE@DIGEST
Where the signature is storedcosign triangulate IMAGE@DIGEST
Sign and verify a file (blob)cosign sign-blob --yes --bundle app.bundle app.tar.gz / cosign verify-blob --bundle app.bundle --certificate-identity ... --certificate-oidc-issuer ... app.tar.gz
Copy image with signaturescosign copy SRC@DIGEST DST
Remove signatures and attestationscosign clean IMAGE@DIGEST
Search the transparency logrekor-cli search --sha sha256:...

Always sign and verify by digest. Keyless needs permissions: id-token: write in GitHub Actions. Common OIDC issuers: GitHub https://token.actions.githubusercontent.com, GitLab https://gitlab.com, Google https://accounts.google.com.

Kyverno: admission policy

TaskCommand
Installhelm repo add kyverno https://kyverno.github.io/kyverno/ && helm install kyverno kyverno/kyverno -n kyverno --create-namespace
List cluster policies and statuskubectl get cpol
Namespaced policieskubectl get pol -A
Policy reports (audit results)kubectl get polr -A / kubectl get cpolr
Blocked requestskubectl get events -A --field-selector reason=PolicyViolation
Exceptionskubectl get policyexception -A
Test a policy offlinekyverno apply policy.yaml --resource pod.yaml
Test against live cluster resourceskyverno apply policy.yaml --cluster
Run a policy test suitekyverno test ./policies
Admission controller logskubectl -n kyverno logs deploy/kyverno-admission-controller
Webhooks Kyverno registeredkubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations | grep kyverno
yaml
# Require signed images from one registry, verified by keyless identity
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: verify-images
spec:
  validationFailureAction: Enforce        # Audit to roll out safely first
  background: false
  webhookTimeoutSeconds: 30
  rules:
    - name: keyless-github
      match:
        any:
          - resources:
              kinds: ["Pod"]
      exclude:
        any:
          - resources:
              namespaces: ["kube-system", "kyverno"]
      verifyImages:
        - imageReferences: ["ghcr.io/org/*"]
          mutateDigest: true
          attestors:
            - entries:
                - keyless:
                    subject: "https://github.com/org/*/.github/workflows/release.yml@refs/heads/main"
                    issuer: "https://token.actions.githubusercontent.com"
                    rekor:
                      url: https://rekor.sigstore.dev
yaml
# Enforce Pod Security Standards "baseline" through Kyverno
    - name: pss-baseline
      match:
        any:
          - resources:
              kinds: ["Pod"]
      validate:
        podSecurity:
          level: baseline
          version: latest

Pattern anchors: =(field) if present must match, X(field) must not exist, ^(field) global anchor, ?* any non-empty value. Rollout: Audit, read PolicyReports, fix or except, then Enforce. Run three admission replicas with a PDB; the webhook fails closed.

Conftest and OPA: Rego policy

TaskCommand
Test Kubernetes YAMLconftest test deploy.yaml -p policy/
Test a Terraform planterraform show -json tfplan > plan.json && conftest test plan.json -p policy/terraform
Parse HCL directlyconftest test --parser hcl2 main.tf
Test a Dockerfileconftest test Dockerfile -p policy/docker
Use a specific packageconftest test --namespace kubernetes.security deploy.yaml
All packagesconftest test --all-namespaces deploy.yaml
Unit-test policiesconftest verify -p policy/
Output for CI-o table|json|tap|junit|github
Share policies as OCIconftest push ghcr.io/org/policies:v1 policy/ / conftest pull oci://ghcr.io/org/policies:v1
OPA unit testsopa test policy/ -v
Evaluate a queryopa eval -i input.json -d policy/ "data.main.deny"
Format and checkopa fmt -w policy/ / opa check policy/
rego
# policy/kubernetes/security.rego  (Rego v1 syntax, OPA 1.x and current Conftest)
package main

deny contains msg if {
  input.kind == "Deployment"
  c := input.spec.template.spec.containers[_]
  c.securityContext.privileged == true
  msg := sprintf("container %q must not be privileged", [c.name])
}

deny contains msg if {
  input.kind == "Deployment"
  c := input.spec.template.spec.containers[_]
  not c.resources.limits.memory
  msg := sprintf("container %q has no memory limit", [c.name])
}

# policy/kubernetes/security_test.rego
test_privileged_denied if {
  count(deny) == 1 with input as {"kind": "Deployment", "spec": {"template": {"spec": {"containers": [
    {"name": "a", "securityContext": {"privileged": true}, "resources": {"limits": {"memory": "64Mi"}}}
  ]}}}}
}

kube-bench: CIS Kubernetes Benchmark

TaskCommand
Run as a Job on a self-managed clusterkubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job.yaml
Read resultskubectl logs job/kube-bench
EKS variantkubectl apply -f https://raw.githubusercontent.com/aquasecurity/kube-bench/main/job-eks.yaml
Run directly on a nodekube-bench run --targets node
Control plane checkskube-bench run --targets master,etcd,controlplane,policies
Only certain checkskube-bench run --check 1.2.1,1.2.2
Skip checkskube-bench run --skip 1.1.12
JSON for dashboardskube-bench run --json --outputfile kb.json
Run on a node via Dockerdocker run --rm --pid=host -v /etc:/etc:ro -v /var:/var:ro aquasec/kube-bench:latest run --targets node
Cleanupkubectl delete job kube-bench

Results are PASS, FAIL, WARN (manual check) and INFO, with a remediation line per failed check. On managed Kubernetes you only own the node and policy sections; use the provider-specific benchmark.

Falco: runtime detection

TaskCommand
Install with modern eBPF and Falcosidekickhelm install falco falcosecurity/falco -n falco --create-namespace --set driver.kind=modern_ebpf --set falcosidekick.enabled=true --set falcosidekick.webui.enabled=true
Add the chart repohelm repo add falcosecurity https://falcosecurity.github.io/charts
Watch alertskubectl -n falco logs -l app.kubernetes.io/name=falco -f
Trigger "Terminal shell in container"kubectl exec -it deploy/app -- sh
Generate many test eventsdocker run --rm falcosecurity/event-generator run syscall
Validate a rules filefalco -V /etc/falco/rules.d/custom.yaml
List supported fieldsfalco --list
Update rules from the registryfalcoctl artifact install falco-rules:latest
Add custom rules via Helm--set-file customRules."custom\.yaml"=custom.yaml or customRules: in values
yaml
# custom.yaml
- list: app_allowed_processes
  items: [gunicorn, python, python3]

- rule: Unexpected process in secure-app
  desc: A process outside the allow-list started in the secure-app namespace
  condition: >
    spawned_process and container
    and k8s.ns.name = "secure-app"
    and not proc.name in (app_allowed_processes)
  output: >
    Unexpected process (proc=%proc.name cmd=%proc.cmdline user=%user.name
    pod=%k8s.pod.name ns=%k8s.ns.name image=%container.image.repository)
  priority: WARNING
  tags: [container, mitre_execution]

Tune with exceptions: or by appending conditions to a macro, not by disabling a rule. Priorities run from EMERGENCY down to DEBUG; route WARNING and above to on-call.

Vault basics

TaskCommand
Dev server (in-memory, unsealed, lab only)vault server -dev -dev-root-token-id=root
Point the CLI at itexport VAULT_ADDR=http://127.0.0.1:8200 VAULT_TOKEN=root
Status and seal statevault status
Initialise and unseal production Vaultvault operator init / vault operator unseal (repeat to threshold)
Enable KV v2vault secrets enable -path=secret kv-v2
Write, read, one fieldvault kv put secret/app API_TOKEN=abc / vault kv get secret/app / vault kv get -field=API_TOKEN secret/app
Versions and rollbackvault kv metadata get secret/app / vault kv rollback -version=1 secret/app
Write a policyvault policy write app app-policy.hcl
Token with a policy and TTLvault token create -policy=app -ttl=1h
Inspect the current tokenvault token lookup
Kubernetes authvault auth enable kubernetes then vault write auth/kubernetes/role/app bound_service_account_names=app bound_service_account_namespaces=prod policies=app ttl=15m
Dynamic database credentialsvault secrets enable database then vault read database/creds/app
Revoke leasesvault lease revoke -prefix database/creds/app
Enable audit logvault audit enable file file_path=/var/log/vault_audit.log
Encrypt with Transit (no key leaves Vault)vault write transit/encrypt/app plaintext=$(echo -n hi | base64)
hcl
# app-policy.hcl  (KV v2 paths include /data/ and /metadata/)
path "secret/data/app/*" {
  capabilities = ["read"]
}
path "secret/metadata/app/*" {
  capabilities = ["list"]
}

Kubernetes secrets delivery: Sealed Secrets and ESO

TaskCommand
Fetch the sealing certificatekubeseal --fetch-cert > pub-cert.pem
Seal without writing plaintextkubectl create secret generic db -n prod --from-literal=PASSWORD=$(openssl rand -hex 16) --dry-run=client -o yaml | kubeseal --format yaml > sealed-db.yaml
Seal offline with the certkubeseal --cert pub-cert.pem --format yaml < secret.yaml > sealed.yaml
Back up controller keyskubectl -n kube-system get secret -l sealedsecrets.bitnami.com/sealed-secrets-key -o yaml > keys.yaml
Re-encrypt with the newest keykubeseal --re-encrypt < sealed.yaml > sealed-new.yaml
ESO statuskubectl get secretstore,clustersecretstore,externalsecret -A
Force an ESO refreshkubectl annotate externalsecret app force-sync=$(date +%s) --overwrite
Read a Secret value safelykubectl get secret app -o jsonpath='{.data.KEY}' | base64 -d

Kubernetes Secrets are base64, not encrypted. Turn on encryption at rest (KMS provider), restrict get/list on Secrets with RBAC, mount as files rather than env vars, and prefer workload identity (IRSA, EKS Pod Identity, GKE Workload Identity, Azure Workload Identity) over static keys.

GitHub Actions hardening snippets

yaml
permissions:
  contents: read                  # top-level default; widen per job only

jobs:
  release:
    permissions:
      contents: read
      packages: write
      id-token: write             # OIDC for cloud login and Cosign keyless
    steps:
      - uses: actions/checkout@<full-commit-sha>   # pin third-party actions by SHA
        with:
          persist-credentials: false
      - name: Safe use of untrusted input
        env:
          TITLE: ${{ github.event.pull_request.title }}   # never inline ${{ }} in run:
        run: echo "$TITLE"
jsonc
// AWS IAM trust policy for GitHub OIDC, main branch only
"Condition": {
  "StringEquals": {
    "token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
    "token.actions.githubusercontent.com:sub": "repo:org/app:ref:refs/heads/main"
  }
}

Avoid pull_request_target with a checkout of the PR head, never echo secrets, use environments with required reviewers for production, and keep actions current with Dependabot package-ecosystem: github-actions.

OWASP Top 10 quick table

The 2021 list is what most interviewers still quote. The 2025 edition reshuffles it; the last column shows where each category moved.

2021CategoryTypical examplePipeline control that helps2025
A01Broken Access ControlIDOR: /api/orders/1043 returns another user's orderThreat modeling, authz tests, code review, DAST authenticated scansA01
A02Cryptographic FailuresPasswords hashed with MD5, TLS 1.0 allowedSAST weak-crypto rules, TLS scanners, IaC checks for encryption at restA04
A03Injection (SQL, OS command, XSS)f"SELECT * FROM users WHERE id={uid}"SAST (Semgrep, CodeQL), DAST, parameterised queries, output encodingA05
A04Insecure DesignPassword reset with guessable security questionsThreat modeling, abuse cases, security requirementsA06
A05Security MisconfigurationDebug mode on, default creds, public S3 bucketIaC scanning (Checkov, Trivy config), CIS benchmarks, ZAP baseline headersA02
A06Vulnerable and Outdated ComponentsLog4Shell in a transitive dependencySCA (Trivy, Grype), SBOMs, Dependabot or RenovateA03, widened to Software Supply Chain Failures
A07Identification and Authentication FailuresNo rate limit on login, session not invalidatedDAST, MFA, rate limiting, secure session configA07 (Authentication Failures)
A08Software and Data Integrity FailuresUnsigned updates, CI pulling unpinned actions, insecure deserialisationCosign signing, SLSA provenance, admission verification, SHA-pinned actionsA08
A09Security Logging and Monitoring FailuresNo audit trail for admin actions, alerts nobody readsCentralised logs, Falco, CloudTrail, alert routing to on-callA09 (Logging and Alerting Failures)
A10Server-Side Request ForgeryImage-fetch endpoint reaches 169.254.169.254URL allow-lists, IMDSv2, egress network policies, DASTMerged into A01
—Mishandling of Exceptional Conditions (new in 2025)Fail-open error handling, stack traces leaked to usersCode review, SAST, chaos and negative testingA10

Severity, SLAs and gate defaults

ItemCommon defaultWhy
Image and SCA gateFail on fixable HIGH and CRITICALActionable; unfixed CVEs go to the dashboard
Secret scanning gateFail on any findingA secret has no "low" severity
SAST gateFail on new ERROR findings (baseline)Avoid blocking on legacy debt
IaC gateFail on any failed check, inline skips with reasonsSkips stay visible in review
DAST gateFail on chosen rules only, warn on the restBaseline scans are noisy otherwise
Remediation SLACritical 7 days, High 30, Medium 90, Low best effortShorter for internet-facing or KEV-listed CVEs
ExceptionsOwner, reason, expiry date, reviewedExceptions without expiry become permanent
CVSS bands (v3.1)Low 0.1–3.9, Medium 4.0–6.9, High 7.0–8.9, Critical 9.0–10.0Severity is not risk; add EPSS, KEV and reachability
Fulcio certificate lifetimeAbout 10 minutesWhy keyless needs the Rekor timestamp
GitHub OIDC sub for mainrepo:ORG/REPO:ref:refs/heads/mainPin it in every cloud trust policy

Top 15 interview one-liners

  1. Shift-left means running each control at the earliest point it can work, not running everything in the IDE.
  2. SAST reads code without running it, DAST attacks the running app from outside, SCA matches dependency versions against CVE databases.
  3. A leaked secret is fixed by rotating it; deleting the commit only hides it from people who have not cloned yet.
  4. Gate on fixable HIGH and CRITICAL with --ignore-unfixed; a gate nobody can satisfy gets disabled within a week.
  5. An SBOM is an ingredients list in SPDX or CycloneDX; it turns "are we affected by this CVE?" into a query.
  6. Sign the digest, never the tag, because tags are mutable.
  7. Keyless signing swaps a long-lived private key for a short-lived Fulcio certificate bound to an OIDC identity, logged in Rekor.
  8. A keyless verification that does not pin the exact identity and issuer accepts anyone's signature.
  9. Admission control is the last gate before code runs, so the cluster re-verifies what CI claims.
  10. Roll out policies in Audit, read the reports, fix or except, then Enforce.
  11. Kubernetes Secrets are base64-encoded, not encrypted; use encryption at rest, tight RBAC and an external secret store.
  12. Prefer workload identity and short-lived credentials (OIDC, IRSA, Pod Identity, Vault dynamic secrets) over static keys everywhere.
  13. Falco watches syscalls at runtime to catch what static scanning cannot, such as a shell spawned inside a production container.
  14. SLSA levels describe how far you can trust the build: provenance exists, it is signed by a hosted builder, the build is isolated from tampering.
  15. Vulnerability management is SLAs, owners, expiring exceptions and trend metrics, not a spreadsheet of 4,000 CVEs.
Feedback