If you release an app without a security check, you could be exposing your customers' private data or letting hackers take control of your system. This chapter explains how to build security directly into the process of creating and managing software in the cloud — a set of practices called a Secure Software Development Lifecycle (SSDLC) and DevSecOps. For the CCSP exam, you must understand how to weave security checks into every phase of development, not just bolt them on at the end.
Jump to a section
A simple way to picture Cloud Application Security and DevSecOps
3 months ago, your favourite restaurant started serving undercooked chicken. 2 customers got sick. 1 wrote a scathing review online. The problem? The kitchen was a mess. The chef would invent new recipes mid-service, scribble them on napkins, and never test them before serving. The dishwasher also handled the raw chicken station. There was no order.
Cloud Application Security is like a restaurant kitchen. The 'application' is the recipe. The 'cloud' is the entire kitchen building – the ovens, the fridges, the prep stations. 'Security' is making sure the recipes are tested, the ingredients are safe, and the staff follow hygiene rules. 'DevSecOps' is the head chef who doesn't just cook; they redesign the whole kitchen workflow so safety is built into every step, from the morning prep to the final plating. They ensure the new 'chicken tikka masala' code is reviewed for safety before it ever hits the menu, and that the live 'order' system isn't vulnerable to a hacker who could change the recipe mid-cook. It’s about making security a part of the daily routine, not a panic after a customer gets ill.
Imagine you're building a house. The traditional way (the 'Waterfall' method) is to design the entire house, then lay the foundation, then build the walls, then add the roof, and finally, install the security system. If you discover during the roof installation that the foundation is weak, it costs a fortune to fix. This is how software was built for decades.
Cloud applications are built differently. They are developed in small, rapid cycles using a practice called 'Agile' development. Instead of building the whole house at once, you build one room, test it, get feedback, and then build the next room. This makes the process faster and more flexible. However, if you only check for security after the whole house is built, you still find problems too late. This is where the 'Secure Software Development Lifecycle' (SSDLC) comes in.
An SDLC (Software Development Lifecycle) is the step-by-step process for creating software. The secure version (SSDLC) adds a security checkpoint at each step. Think of it as a checklist you must pass before moving to the next stage. The standard phases are: 1. Requirements, 2. Design, 3. Development (Coding), 4. Testing, 5. Deployment (moving it live), and 6. Maintenance (keeping it running). In an SSDLC, each phase has a security task. - In the Requirements phase, you ask, 'What data will this app handle? Is it sensitive? Who should be allowed to see it?' This is called a 'threat model' – you try to think like an attacker to figure out what could go wrong. - In the Design phase, you create a blueprint. A security architect checks the blueprint to see if data is encrypted (scrambled so only authorised people can read it) and if user permissions are properly set up (who can do what). - In the Development phase, programmers write the code. They use Secure Coding Standards, which are rules that prevent common mistakes, like forgetting to check if a user is allowed to see a piece of data. - In the Testing phase, automated tools scan the code for known vulnerabilities (weaknesses). This is called 'Static Application Security Testing' (SAST) – scanning the code without running it. Later, they run the app and test it while it's running, called 'Dynamic Application Security Testing' (DAST). - In the Deployment phase, the code is moved to live servers. Security checks ensure the configuration (the settings of the server) is not left with default passwords or open doors (ports). - In the Maintenance phase, the team monitors the live app for suspicious activity and applies patches (small fixes) when new vulnerabilities are discovered.
Now, what is 'DevSecOps'? 'DevOps' is a combination of 'Development' and 'Operations'. It's a culture where the programmers and the IT operations people work together as one team to release software quickly and reliably. 'Sec' is for 'Security'. DevSecOps means making security a shared responsibility of the entire team, not just a separate security department. It automates security checks so they happen automatically every time a new piece of code is added.
The key tool here is a 'CI/CD pipeline' (Continuous Integration/Continuous Deployment). This is an automated assembly line for your code. A programmer writes a small piece of code and 'commits' it (pushes it) to a central code repository (a storage location like a shared folder). The CI/CD pipeline automatically pulls that code, builds it, runs SAST and DAST security tests, and if all checks pass, deploys it to a server. If a security test fails, the pipeline stops and alerts the team immediately. This is called 'shifting left' – moving security checks to the very beginning (the left side) of the development process, when they are cheapest and easiest to fix.
Requirements Gathering and Threat Modelling
The team defines what the application must do, what data it handles, and who the users are. A threat modelling workshop (e.g., STRIDE) is held to brainstorm potential attack methods. This step ensures security requirements (like encryption or access controls) are included in the project plan from the very start, before any code is written.
Secure Design and Architecture Review
A design blueprint is created. A security architect reviews the blueprint to confirm that security controls (like firewalls, identity checks, and data encryption) are correctly placed. This step prevents fundamental design flaws that are expensive to fix later, such as a system where an unauthenticated user can access an internal database.
Secure Coding with Pre-Commit Checks
Developers write code following secure coding standards (e.g., OWASP guidelines). Before code is submitted ('committed') to the central repository, a pre-commit hook runs a SAST scanner to find common vulnerabilities like injection flaws or hardcoded passwords. This catches issues at the individual programmer level, before the code enters the shared codebase.
Automated CI/CD Pipeline with Security Gates
When code is pushed to the repository, the CI/CD pipeline automatically builds the code, runs unit tests, performs SAST and DAST scans, and checks for known vulnerable libraries (Software Composition Analysis or SCA). Each of these checks is a 'gate' that the code must pass. If any check fails, the pipeline stops, preventing the vulnerable code from moving to the next stage.
Deployment to Staging and Pre-Production Testing
After passing the pipeline gates, the code is deployed to a staging environment that mirrors the live production environment. Here, a human penetration tester or a dedicated security team performs manual tests and runs DAST tools at a deeper level. This step validates that the security controls work correctly in a realistic, integrated setting.
Continuous Monitoring and Patch Management in Production
Once deployed to production, the application is continuously monitored using cloud logging, intrusion detection systems (IDS), and vulnerability scanners. When new vulnerabilities are discovered (e.g., in a third-party library), the team creates a new version of the code with the fix and triggers the entire CI/CD pipeline again to deploy the update. This ensures the application remains secure post-launch.
Meet Anya, a cloud security engineer at a mid-sized e-commerce company called 'ShopSphere'. ShopSphere sells clothes online. They have a dev team writing code for a new feature: a personalised discount engine that shows different prices to different users.
Anya doesn't just wait for the code to be finished. She joins the initial planning meeting (the Requirements phase) with the product manager and lead developer. She asks, 'What customer data does this discount engine use?' They say it uses purchase history and location. Anya flags that location data is sensitive and needs to be encrypted. She adds a 'user story' to their project board: 'As a cloud security engineer, I need location data to be encrypted at rest and in transit.' This is part of the Threat Model.
During the Design phase, the developer creates a diagram of the new system. Anya reviews it. She spots a potential problem: the discount engine will send a request directly from a user's browser to a database to fetch the user's location. That's dangerous because a hacker could trick the browser into fetching other users' data. She insists they implement an 'API Gateway' – a middleman that controls all requests, checks the user's identity, and only allows authorised queries.
In the Development phase, developers write Python code. Anya has set up a 'pre-commit hook' – an automated script that runs every time a developer tries to commit code. This hook runs a SAST tool (like SonarQube or Checkmarx) that scans for insecure code patterns. One developer writes code that directly concatenates user input into a database query. This is a classic injection flaw. The SAST scanner catches it, and the developer must fix it before the code can be saved to the central repository.
When the code passes the first scan and is pushed to the central repository (GitHub), the CI/CD pipeline kicks off. Anya configured the pipeline with Jenkins. The pipeline runs unit tests (testing small parts of the code in isolation), then runs DAST (using a tool like OWASP ZAP) against the application running in a test environment. The DAST tool finds that the discount calculator can be called without a valid user session ID – anyone on the internet could trigger it. The pipeline automatically stops the deployment. The developer gets an alert and must fix the authorisation check.
Finally, the code passes all checks. The pipeline deploys it to a staging environment (a replica of the live system) where Anya runs a final 'penetration test' (a controlled simulated attack) before it goes live in production (the real, customer-facing environment). After launch, Anya uses cloud logging tools (like AWS CloudTrail) to monitor for unusual activity, like a user generating discounts for millions of items in a second, which would signal a bot attack. She also monitors their vulnerability scanner (e.g., Qualys or Nessus) that regularly checks their cloud servers for known software flaws.
The CCSP exam (domain 4.1) is very specific about the Secure SDLC and DevSecOps. They will not ask you to name a specific tool like 'Jenkins' or 'SonarQube'. Instead, they test your understanding of the process and the concepts.
Here is exactly what they test and the traps they set:
The 'Shifting Left' concept. They love this term. You must know it means 'integrating security as early as possible in the SDLC'. A trap question might describe adding security testing only in the deployment phase and ask if this is 'shifting left'. The answer is no – that is still 'shifting right' or doing it too late.
The difference between SAST and DAST. This is a classic. SAST (Static Application Security Testing) is a white-box test – you have the source code and analyse it without running it. DAST (Dynamic Application Security Testing) is a black-box test – you run the application and test it like an attacker, without seeing the code. The exam will give a scenario: 'A tool that reviews source code for insecure functions is an example of...' Answer: SAST.
The roles in a DevSecOps team. The exam tests that security is a 'shared responsibility', not just the security team's job. A question might say, 'In a DevSecOps model, who is responsible for fixing a security vulnerability found in a code commit?' The correct answer is the 'developer who wrote the code'.
Threat Modelling. They expect you to know the name of the phase (Design/Requirements) and the most common framework, STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege). You don't need to memorise all six, but you need to know that threat modelling is done during the Design phase to identify potential attacks.
Immutable Infrastructure. This is a key DevSecOps concept. Instead of logging into a server and patching it (which is risky), you destroy the old server and deploy a new one with the patch already built in. The exam will test that this reduces configuration drift and is more secure.
The CI/CD Pipeline. They will test your understanding that a pull request (a request to merge new code) triggers automated security tests before the code is merged, and that if a test fails, the pipeline should block the deployment (fail securely).
Trap: 'Penetration Testing vs Vulnerability Scanning.' A scan is automated and finds known vulnerabilities. A penetration test is a human-led, manual process that tries to exploit chains of vulnerabilities. The exam might say an organisation does a quarterly vulnerability scan and calls it a penetration test. That is wrong.
Trap: 'Security is the last phase of SDLC.' This is the old, wrong way. The exam expects you to identify this as 'Waterfall thinking' and know it is not secure.
- Key Definitions to Memorise: - SSDLC (Secure Software Development Lifecycle): A process that integrates security into every phase of software development. - DevSecOps: A cultural shift where development, operations, and security collaborate throughout the entire application lifecycle. - CI/CD Pipeline: An automated set of processes that builds, tests, and deploys code. - Infrastructure as Code (IaC): Managing servers, networks, and databases through machine-readable definition files, not manual configuration. - Security Champion: A developer with extra security training who acts as a bridge between the security team and the dev team. - OWASP Top 10: A widely recognised list of the ten most critical web application security risks.
Memorise these definitions exactly. The exam will use these terms in the answer choices and expect you to recognise the correct definition among distractors.
The Secure Software Development Lifecycle (SSDLC) integrates security checks into every phase of development, from requirements gathering to maintenance, preventing costly late-stage fixes.
'Shifting left' means performing security testing as early as possible in the development process, when vulnerabilities are cheapest and easiest to remediate.
DevSecOps is a cultural and operational model where development, operations, and security teams share responsibility for security, using automation to enforce policies without slowing down releases.
Static Application Security Testing (SAST) scans source code without running it (white-box), while Dynamic Application Security Testing (DAST) tests the running application (black-box) for vulnerabilities.
A Continuous Integration/Continuous Deployment (CI/CD) pipeline automates the building, testing, and deployment of code, blocking insecure code from ever reaching production.
Threat modelling, typically performed during the design phase using frameworks like STRIDE, proactively identifies potential security risks before any code is written.
Immutable Infrastructure improves security by preventing ad-hoc changes; instead of patching a live server, you deploy a new, fully patched replacement.
Security is a continuous process that does not end at deployment; ongoing vulnerability scanning, patch management, and monitoring are essential for maintaining security posture.
The Shared Responsibility Model dictates that the cloud provider secures the cloud, while the customer secures everything they put in the cloud, including their applications and data.
A Security Champion is a developer with enhanced security knowledge who acts as a liaison between the security team and the development team, fostering a security-first culture.
These come up on the exam all the time. Here's how to tell them apart.
SAST (Static Application Security Testing)
Analyses source code without executing the application (white-box testing).
Can detect vulnerabilities early in the development lifecycle, before runtime.
Finds issues like insecure functions, hardcoded passwords, and code injection points in the code itself.
DAST (Dynamic Application Security Testing)
Tests the running application from the outside, like an attacker (black-box testing).
Can only be performed after the application is built and deployed to a test environment.
Finds issues like misconfigured servers, exposed endpoints, and runtime behaviour flaws.
Vulnerability Scanning
An automated, periodic process using scanning tools.
Identifies known vulnerabilities from a database (e.g., CVEs), but may produce false positives.
Does not attempt to exploit vulnerabilities to prove actual risk.
Penetration Testing
A manual, human-driven process performed by security experts.
Attempts to exploit a chain of vulnerabilities to gain unauthorised access or disrupt the system.
Provides deep, contextual understanding and proof of business impact, but is more expensive and less frequent.
Traditional Waterfall SDLC
Security is a separate phase at the end of development (a 'security review' before release).
Changes are slow and expensive because fixes require going back through phases.
Security is a bottleneck and often skipped under time pressure.
Agile/DevOps with DevSecOps
Security is integrated into every phase, starting from requirements (shifting left).
Automated security gates in the CI/CD pipeline catch issues immediately, making fixes cheap and fast.
Security is a shared responsibility, not a bottleneck, and is automated to keep pace with rapid releases.
Mutable Infrastructure
Servers are updated in place (e.g., SSH into the server and apply a patch).
Configuration tends to drift over time as manual changes accumulate, leading to inconsistencies.
Recovery from failure is slower because you must fix the existing server.
Immutable Infrastructure
Servers are never modified after deployment; to apply a patch, you destroy the old server and deploy a new one from a fresh image.
Configuration is version-controlled and reproducible, eliminating drift.
Recovery from failure is fast because you simply deploy a new instance from the known good image.
Security as a Gate (Old Model)
The security team is the sole gatekeeper, reviewing all code before release.
Developers throw code over the wall to security, leading to friction and delays.
Security knowledge is siloed within the security team.
Security as a Partner (DevSecOps Model)
Security team acts as a coach, providing tools and guidelines that developers can use themselves.
Security checks are automated and integrated, so developers get immediate feedback without waiting for a manual review.
Security knowledge is shared across the organisation, creating 'security champions' within development teams.
Mistake
DevSecOps is just a tool, like a scanner you install.
Correct
DevSecOps is a cultural and process change that requires everyone in development, operations, and security to work together and automate security checks. No single tool can implement DevSecOps.
People see automated tools like SAST scanners and think 'that's DevSecOps'. They miss the cultural, collaborative, and process-based nature of the set of practices.
Mistake
If I use a cloud provider like AWS or Azure, they are responsible for securing the applications I build on their platform.
Correct
The cloud provider secures the cloud infrastructure (the physical data centre, the virtual servers, the network). The customer is responsible for securing the application code, the data, and the access configurations inside that infrastructure (the Shared Responsibility Model).
Beginners assume 'cloud' means 'someone else handles everything'. They misunderstand the Shared Responsibility Model, a core CCSP concept.
Mistake
A vulnerability scan and a penetration test are the same thing.
Correct
Vulnerability scanning is an automated process that identifies known weaknesses. A penetration test is a manual, human-driven exercise that attempts to exploit weaknesses to prove they are real risks. The exam treats them as distinct activities.
The industry uses both methods, but beginners conflate them because both find security flaws. The exam is precise about the difference in methodology and scope.
Mistake
Once an application is deployed and passes all security tests, it is permanently secure.
Correct
Security is continuous. New vulnerabilities are discovered daily. The application must be regularly scanned, patched, and monitored throughout its maintenance phase. The environment itself (e.g., libraries, operating system) changes over time and introduces new risks.
People think of security as a one-time event (the deployment checklist). They forget the dynamic nature of software dependencies and the constantly evolving threat landscape.
Mistake
DevSecOps means you don't need a separate security team anymore.
Correct
DevSecOps does not eliminate the security team. It changes their role from being the sole gatekeeper to being a coach and enabler. The security team defines policies and tools, and the dev team is empowered to execute them. The security team still handles advanced threats and compliance.
The name sounds like 'Dev + Sec + Ops = One Team', leading people to think the security function is absorbed and disappears. It is actually a collaboration with distinct responsibilities.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
SDLC (Software Development Lifecycle) is the general process of building software (plan, design, code, test, deploy, maintain). An SSDLC (Secure SDLC) is the same process but with security checkpoints and activities added to each phase, like threat modelling during design and security testing before deployment.
No. The CCSP exam does not test specific brand names like Jenkins, SonarQube, or Docker. It tests conceptual understanding of what a CI/CD pipeline does, what SAST and DAST are, and the principles of shifting left and shared responsibility.
While DevSecOps is popular in cloud environments due to the need for rapid releases and automation, the principles can be applied to any software development. However, the CCSP exam focuses on its application in cloud-based development and operations.
It means the development team and operations team share the responsibility for security with the security team. Developers are responsible for writing secure code, operations for secure configurations, and security for policy and oversight. It is not just the security team's job to find and fix problems.
A security gate is a checkpoint in the automated pipeline that a code change must pass before proceeding to the next stage. For example, a SAST scanner that finds a critical vulnerability will block the code from being deployed. It acts as an automated safeguard.
The OWASP Top 10 is a list of the most common web application security risks, like SQL injection and cross-site scripting. For the CCSP, you should know what it is and that it is a standard reference for secure coding. You do not need to memorise the full list, but understanding the types of vulnerabilities is helpful.
You've finished Cloud Application Security and DevSecOps. Continue through the CCSP study guide to build a complete picture of the exam.
Done with this chapter?