Cloud & DevOps Security: Where We Start With Every Client
A practical order for cloud and DevOps security: identity first, then the pipeline, the network, the workloads and the logs, with the checks we run in the first week.

When a new client asks us to “look at security”, the list of things that could be wrong is long: open buckets, old access keys, a CI runner with admin rights, a Kubernetes dashboard on the public internet. Trying to fix everything at once usually means fixing nothing properly. What helps is an order: the layers that cause the worst incidents first, the polish later.
This is the order we use for cloud and DevOps security, and the checks we run in the first week.
The layers, in order
| Layer | The question | Typical first fix |
|---|---|---|
| Identity | Who and what can change production? | Remove long-lived keys, enforce SSO and MFA |
| Pipeline | Can a pull request reach production credentials? | Separate build and deploy permissions |
| Infrastructure as code | Is what runs the same as what is reviewed? | Plan in CI, apply only from the pipeline |
| Network | What is reachable from the internet? | Private endpoints, one controlled way in |
| Workloads | What can a compromised container do? | Non-root, read-only, scoped service accounts |
| Logs and detection | Would you notice, and could you reconstruct it? | Central audit logs that the workload cannot delete |
Most real incidents we have seen start in the first two rows. A leaked key or an over-privileged pipeline does more damage than a missing network rule, because it skips every other layer.
Identity is the perimeter
In the cloud, the network is not the main wall. Credentials are. Anyone holding a valid key with broad rights can do what your engineers can do, from anywhere.
- People log in through SSO with MFA. No personal IAM users with passwords and access keys.
- Machines use short-lived credentials. Workload identity on Kubernetes, instance roles on VMs, OIDC federation from CI to the cloud provider. A key that expires in an hour is far less useful to an attacker than one created three years ago.
- Least privilege, by role. Start from what a role needs to do, not from an admin policy with a few denies.
- Break-glass access is separate and loud. An emergency admin account exists, is rarely used, and alerts the team every time it is.
The first check is simple: list every access key and service account key, with its age and last use. The answer is often surprising.
The pipeline holds the keys
A CI/CD system that can deploy to production is, in practice, a production admin. Treat it like one.
- Builds from pull requests, especially from forks, run without access to deploy credentials.
- Deploy jobs run only from protected branches, after review, with credentials scoped to the environment they target.
- Third-party actions and plugins are pinned to a version or commit, not a moving tag.
- Container images are built once, scanned, and promoted by digest from staging to production, so what you tested is what you run.
Secrets themselves deserve their own post, and we are writing one. The short version here: they live in a secrets manager, not in the repository, and the pipeline fetches them at run time.
Infrastructure as code is a security control
If changes go through Terraform or a similar tool, every change has a diff, a reviewer and a history. That only holds if nobody changes things by hand.
- Run
planin CI and attach the output to the pull request. - Apply only from the pipeline, with the pipeline’s credentials. Engineers get read access to the console, not write.
- Add policy checks to the plan: tools such as Checkov, tfsec (now part of Trivy) or Open Policy Agent can block a public bucket or an open security group before it exists.
- Detect drift on a schedule, so a manual change shows up as a finding rather than a surprise.
Keep the network boring
The goal is a short, known list of things reachable from the internet, ideally a load balancer and nothing else.
- Databases, caches and queues live in private subnets, reached through private endpoints.
- Admin interfaces (Kubernetes API, dashboards, Grafana, Argo CD) sit behind SSO or a VPN, not an IP allowlist someone forgot to update.
- Inside Kubernetes, network policies restrict which services can talk to which. Default deny per namespace is a good target, added one namespace at a time.
Assume a container will be compromised
Workload hardening limits how far an attacker gets from a single vulnerable dependency.
- Run as non-root with a read-only root filesystem where the application allows it.
- Give each workload its own service account with only the permissions it needs, and do not mount a token where none is needed.
- Enforce the baseline with Pod Security Admission or a policy engine such as Kyverno, so new deployments cannot quietly drop it.
- Scan images for known vulnerabilities and rebuild regularly on patched base images, not only when the code changes.
Logs you can trust
Prevention eventually fails. What matters then is whether you notice and whether you can tell what happened.
- Turn on cloud audit logs for every account and project, and the Kubernetes audit log.
- Ship them to a separate account or storage that the workloads and most engineers cannot modify or delete.
- Alert on a small set of high-signal events: root or break-glass login, new access keys, changes to IAM policies, disabled logging.
A few alerts that someone actually reads are worth more than a hundred that everyone mutes.
The first week
When we start with a team, the first week usually looks like this:
- Inventory accounts, clusters, pipelines and who has admin on each.
- List long-lived keys and tokens, and plan their replacement with short-lived ones.
- Review CI permissions: which jobs can deploy, and from which branches.
- List everything public: load balancers, buckets, IPs, admin endpoints.
- Turn on audit logging where it is missing and send it somewhere safe.
None of this needs a new product. It needs someone to look carefully, write down what they find, and fix it in the order that removes the most risk first.
If you want a second pair of eyes on your cloud and DevOps security, book a free call and we will go through your setup with you.


