Scan Git Repositories with Gitleaks
Seed a repository with realistic fake secrets, catch them with Gitleaks in history and working-tree modes, ignore a confirmed false positive by fingerprint, and block the next one at commit time.
Path 08 · learning path
The controls that decide whether a cloud-hosted system can be exposed safely: short-lived identities for people, workloads and CI; network boundaries that default to deny; secrets kept out of images, source and plain-text storage; audit and application logs you can query; and a hardening checklist that ties them together. Infrastructure as Code Security catches insecure configuration before apply; this path is about the running system.
Each part names what it needs. Nothing has to be installed before part 1.
The path
Each part states what it assumes from the previous one, so you can also jump in where your setup already is.
Human and workload identities and the credentials that carry them: why static keys are dangerous, how a bound short-lived token differs from a legacy one, how CI assumes a role without a key, and how to scope each one.
Deciding what a cloud workload exposes: public and private subnets, security groups that reference each other instead of address ranges, egress control, TLS and DNS, proven with connection tests on a three-tier layout.
The secrets lifecycle for a cloud workload: credentials recovered from image history and deleted layers, a build that leaves nothing behind, Secrets in etcd before and after encryption at rest, rotation, and Vault TTLs.
Application, infrastructure and audit logs and what each answers; Kubernetes API audit logging enabled on a real cluster, tuned from lease noise to the events that matter, and read for denied and privileged requests.
The hardening checklist for a cloud-hosted production workload, built from parts 1 to 4 and the existing edge, container and Kubernetes articles: each control with the command that proves it and the gap it covers.
Practise
Seed a repository with realistic fake secrets, catch them with Gitleaks in history and working-tree modes, ignore a confirmed false positive by fingerprint, and block the next one at commit time.
Create a service account that can roll out Deployments in one namespace and nothing else, prove the boundary with impersonation and a real short-lived token, and audit the cluster for wildcard roles and anonymous access.
Build a deliberately weak image, scan it with Trivy, and rebuild it until the gate for fixable HIGH and CRITICAL findings passes: current base, non-root user, patched packages, no pip in the runtime image.
Toolchain
Centralised secrets management with dynamic, short-lived credentials.
Infrastructure as code with a plan/apply workflow and a large provider ecosystem.
Static analysis for infrastructure as code: Terraform, CloudFormation, Kubernetes and Dockerfiles.
Container orchestration platform and the deployment target for most of the toolchain.
Detects hard-coded secrets in Git history and working trees.
All-in-one scanner for container images, filesystems, IaC, Kubernetes and SBOMs.
After the last part
One path picks up where this one stops. It is a suggestion, not a requirement.
One contract, four components: environments from Git, a golden CI path, guardrails through GitOps, visibility.