• Home
  • BVSSH
  • Engineering Enablement
  • Playbooks
  • Frameworks
  • Good Reads
Search

What are you looking for?

Dec 12, 2024 Ragan McGill Safer
Practices for Secure Software Development in the Cloud

Cloud-native development has transformed the way we build, scale, and deliver software. Teams can move faster, deploy more frequently, and focus on solving business problems instead of managing infrastructure. But with this agility comes a new and evolving set of security challenges.

The shift to cloud doesn’t remove security concerns - it reshapes them. Attack surfaces are broader. Misconfigurations are easier to make (and exploit). And responsibilities are distributed across teams, services, and tools. To thrive in this environment, secure software development must be proactive, continuous, and embedded into every layer of the engineering lifecycle.

Here’s how to do it well.


Why Cloud Changes the Security Game

Traditional security models were perimeter-based - designed for static infrastructure and monolithic applications. In the cloud, however, everything is dynamic: infrastructure is code, services are ephemeral, and boundaries are blurred.

This means we must adopt a shared responsibility model, where cloud providers secure the infrastructure, and engineering teams are responsible for securing their applications, data, identities, and configuration.

Security is no longer the job of one team at the end of the pipeline. It’s a first-class engineering concern.


Best Practices for Secure Cloud-Native Development


✅ 1. Shift Security Left

Security must start at the earliest stages of design and development - not as a last-minute audit before release. This includes:

  • Threat modelling during architectural planning

  • Static Application Security Testing (SAST) in your CI pipeline

  • Pre-commit hooks to catch secrets and vulnerabilities in code

  • Code reviews that consider security, not just logic or style

The earlier you find security issues, the cheaper and easier they are to fix.


✅ 2. Use Infrastructure as Code - Securely

IaC enables reproducibility and scalability - but also introduces risk if not handled properly.

  • Scan IaC templates (Terraform, CloudFormation, etc.) for misconfigurations using tools like Checkov or tfsec

  • Apply least privilege principles to cloud resources and IAM roles

  • Use policy-as-code frameworks like Open Policy Agent (OPA) to enforce security guardrails automatically

  • Store IaC in version-controlled repositories to track changes and enable peer review

IaC is powerful - but it must be treated with the same rigour as application code.


✅ 3. Manage Secrets Properly

One of the most common (and dangerous) cloud security missteps is hardcoding secrets in source code.

  • Never store credentials, API keys, or tokens in code repositories

  • Use secure secret management tools like AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault

  • Rotate secrets regularly and automate their injection at runtime

  • Audit access to secrets as you would sensitive data

Remember: secrets management is not a DevOps problem - it’s a security imperative.


✅ 4. Secure the CI/CD Pipeline

Your delivery pipeline is a high-value target. If compromised, it becomes a vehicle for widespread attack.

  • Apply least privilege access to pipeline credentials

  • Use signed commits and verify the integrity of artifacts

  • Scan dependencies for known vulnerabilities using tools like Dependabot, Snyk, or OWASP Dependency-Check

  • Enforce peer review and approval gates on production deployments

  • Run pipeline audits to detect anomalous or unauthorised activity

The CI/CD pipeline is not just a delivery tool - it’s part of your attack surface.


✅ 5. Embed Runtime Observability and Monitoring

Security doesn’t end at deployment. You need to know what’s happening in production.

  • Implement real-time logging, monitoring, and alerting for anomalous activity

  • Use Distributed Tracing to track suspicious user journeys or request patterns

  • Integrate security information and event management (SIEM) platforms for incident correlation

  • Use WAFs, IDS/IPS, and behavioural analytics to detect threats early

What you can’t see, you can’t protect. Observability is as much about security as it is about performance.


✅ 6. Adopt a Zero Trust Model

In the cloud, assume everything can be compromised - and design accordingly.

  • Enforce authentication and authorisation at every layer

  • Use multi-factor authentication (MFA) for access to systems and tools

  • Apply network segmentation, even within cloud environments

  • Avoid implicit trust between services - validate every interaction

Zero trust is not a tool. It’s a mindset shift - from trusting the perimeter to verifying every request.


✅ 7. Regularly Test and Improve

Security is never finished. Cloud-native systems change frequently, and your security practices must evolve alongside them.

  • Conduct regular penetration testing and red-teaming exercises

  • Review and update IAM policies, firewall rules, and security groups

  • Run incident response simulations (game days) to test readiness

  • Stay current with cloud provider security advisories and patching

  • Make postmortems blameless and focused on learning

Continuous improvement is a core part of both engineering and security excellence.


Key Takeaways

✅ Security in the cloud is everyone’s responsibility - developers, operations, product, and security must collaborate.

✅ Shift security left and embed it in your daily workflows - from code and config to pipelines and production.

✅ Use automation and policy as code to scale securely - manual checks won’t keep up with cloud-native velocity.

✅ Protect your pipelines, manage secrets, and observe runtime behaviour - these are high-impact focus areas.

✅ Security is not a blocker - it’s an enabler of confident, reliable, and trusted software delivery.


Final Thoughts

Secure software development in the cloud isn’t just about ticking compliance boxes or relying on vendor defaults. It’s about engineering discipline, proactive thinking, and a culture where security is woven into every decision and line of code.

The organisations that succeed in the cloud are those that treat security not as an afterthought, but as a design principle. They bake it in - not bolt it on.

Because in today’s digital world, security isn’t just a risk to manage - it’s a foundation to build on.

Ragan McGill

Engineering leader blending strategy, culture, and craft to build high-performing teams and future-ready platforms. I drive transformation through autonomy, continuous improvement, and data-driven excellence - creating environments where people thrive, innovation flourishes, and outcomes matter. Passionate about empowering others and reshaping engineering for impact at scale. Let’s build better, together.

Popular posts
  • Designing for Trust - Why SLOs, Error Budgets, and Toil Matter in Platform Engineering
    Jun 03, 2025
  • Platform Antipatterns - When Good Intentions Go Wrong
    May 29, 2025
  • Platform as a Product - Building Trust, Not Just Tools
    May 27, 2025

Technical debt is like junk food - easy now, painful later.

Awesome Blogs
  • LinkedIn Engineering
  • Github Engineering
  • Uber Engineering
  • Code as Craft
  • Medium.engineering