Free lesson 1: The Exam, the Secure-SDLC Map and Your Study Plan

DevSecOps and secure-software exams rarely ask you to recite what a tool does. They hand you a team, a pipeline and a deadline, and ask which control belongs where, which finding matters first, and which option is the BEST next step. This lesson shows you how those exams think, gives you a map of the whole secure software development lifecycle, solves a complete "which control belongs in which pipeline stage?" case with you, and ends with a 4, 8 or 12-week study plan.
- 12lessons in the course
- 7SDLC stages on one map
- 40original questions in the final exam
- ~20 minreading time for this lesson
Independent course, not affiliated with or endorsed by any exam provider. Exam objectives change โ always check the official objectives. We do not publish real exam questions. Every question in this course is an original practice item written for learning.
What DevSecOps and secure-SDLC exams actually test
This course covers topics that also appear in exams such as ISC2's CSSLP, GIAC's GCSA or EC-Council's CASE, but it is built around the shared, vendor-neutral body of knowledge rather than around any one of them. The formats differ โ some exams are pure multiple choice, others add practical tasks โ yet the thinking they reward is remarkably similar.
First, they test placement. You are expected to know not only what static analysis is, but that it reads source code and therefore belongs on every pull request, long before anything is deployed. You must know that dynamic testing needs a running application, so it cannot be the first line of defence on a developer's laptop.
Second, they test priority. A team has fourteen findings and one afternoon. Which one do you fix first? A leaked production credential beats a medium-severity library flaw in a test-only dependency every time, and exams love to hide the obvious answer behind a higher CVSS number.
Third, they test process over tools. Many wrong options name a fashionable product or "buy a scanner". The right option usually describes a practice: define security requirements, threat model the design, enforce a policy as a gate, give developers fast feedback, measure remediation time.
Fourth, they test proportionality. A control that blocks every build on every low finding is not "more secure"; it trains people to bypass the pipeline. Good answers balance risk, speed and the people who have to live with the control.
The four question shapes you will meet
- EARLIESTAt which stage can this flaw be detected first?
- BESTWhich control most effectively reduces this risk?
- FIRSTWhat must happen before anything else?
- MOST LIKELYWhat explains this symptom or finding?
Learn to spot the qualifier before you read the options. "Earliest" questions are about inputs and stages. "Best" questions are about root cause and coverage. "First" questions are almost always about containment or about getting authority and scope right. "Most likely" questions are about reading evidence calmly instead of jumping to the dramatic explanation.
The secure-SDLC map: eleven domains in one table
Every lesson after this one covers one domain of the map. The table shows what each domain is about, how exams tend to ask about it, and the trap that catches most candidates. Keep it open while you study; it doubles as a checklist for your weakest areas.
| Domain (lesson) | Core idea | Typical question | Classic trap |
|---|---|---|---|
| Secure SDLC & shift-left culture (2) | Security is built into every phase, owned by the team | Who should own fixing a SAST finding? | "The security team" โ it is the developing team, supported by security |
| Threat modelling (3) | Find design flaws on a data-flow diagram before code exists | Which STRIDE category is a forged log entry? | Confusing repudiation with tampering |
| Secure requirements & design (4) | Least privilege, defence in depth, fail secure, secure defaults | Which principle does this design violate? | "Security through obscurity" offered as a valid control |
| Secure coding (5) | Validate input, encode output, parameterise queries, handle auth correctly | What is the root-cause fix for SQL injection? | Picking input blacklisting or a WAF over parameterised queries |
| SAST, DAST, IAST, fuzzing (6) | Different tools see different evidence | Which test finds a missing security header? | Expecting SAST to find runtime configuration problems |
| Supply chain (7) | Know, pin, verify and sign what you ship | What does an SBOM give you after a new CVE is announced? | Thinking an SBOM or a signature proves the code is safe |
| Secrets & configuration (8) | No secrets in code; short-lived, scoped, rotated credentials | A key was committed โ what first? | Rewriting git history before revoking the key |
| CI/CD pipeline security (9) | The pipeline is production infrastructure with powerful credentials | How do you stop untrusted pull requests reaching secrets? | Giving every job write tokens "because it is easier" |
| Containers & IaC (10) | Minimal, non-root images; policy-checked infrastructure code | Where should a public storage bucket be caught? | Waiting for a cloud alert instead of scanning the template |
| Runtime, monitoring, vuln management (11) | Detect, triage, patch and learn in production | Which vulnerability gets fixed first? | Sorting by CVSS base score alone, ignoring exposure and exploitation |
| Final review & strategy (12) | Timing, elimination, cheat-sheets, 30 practice questions | โ | Changing correct answers without new evidence |
Read the right-hand column again. Almost every trap is either the right activity at the wrong stage, or a tool chosen instead of a root-cause fix. That observation is the core of the method you will learn next.
The "feed it, place it, gate it" method for placing controls
When a question asks where a control belongs, run three short checks. They work for tools you have never heard of, because they rely on what the control needs rather than on its brand name.
- Feed it. What input does the control inspect? Requirements text, a data-flow diagram, source code, a dependency lockfile, infrastructure templates, a built image, a running application, or live production telemetry. Name the input precisely.
- Place it. Find the earliest stage in which that input exists. That is where the control should run first. Running it again later is often useful, but the first placement decides where the cheapest feedback happens.
- Gate it. Decide whether the result blocks progress (a gate), warns the owner (a signal), or opens a ticket (a backlog item). Block only on findings that are high-confidence and high-impact; everything else must still reach an owner with a deadline.
Figure 2 turns the first two checks into a picture. Read each row from left to right: the orange dot marks the earliest stage where an input exists, and the grey dots show where it is still available for re-checking.
"You cannot scan what you have not made yet." If an option places DAST in the commit stage or runtime detection in the design review, it fails the feed-it check and you can eliminate it immediately.
Solved scenario: which control belongs in which pipeline stage?
Here is a complete case of the kind you will see, in a longer form than any exam item, so that you can watch the reasoning step by step. The company and system are invented for practice.
Scenario. A small team at Example Payments builds pay-api, a containerised REST service that accepts card-payment requests from a mobile app and forwards them to a payment processor. Code lives in a Git repository, a CI system builds a container image on every merge to main, a staging environment receives each new build automatically, and production runs on a managed Kubernetes cluster. Infrastructure (network, database, storage bucket for receipts) is defined in Terraform files in the same repository. The security lead gives you a list of twelve controls and asks you to place each one where it gives the most value, and to say which ones should block.
- Name each input. Before you place anything, write next to each control what it reads. Threat modelling reads the design; secret scanning, SAST and peer review read source; SCA reads the lockfile; IaC scanning reads Terraform; image scanning, SBOM generation and signing read the built image; DAST reads the running staging service; signature verification and admission policy read the image reference at deploy time; runtime detection reads production behaviour.
- Find the earliest stage for each input. Use the staircase in Figure 2. Anything that reads source can run on the pull request. Anything that reads the image must wait for the build. DAST must wait for a deployed copy.
- Decide gate or signal. High-confidence, high-impact checks block: a verified secret, a critical vulnerability with a fix available, a public bucket, an unsigned image. Noisy or context-dependent checks warn and create tickets: medium SAST findings, low-severity library issues.
- Check for duplicates and gaps. Re-running SCA nightly against the deployed SBOM is not a duplicate โ it catches vulnerabilities disclosed after the build. Having no control between "image built" and "image running" is a gap.
- Write down the owner. Every finding needs a person who can fix it. Placement without ownership produces dashboards nobody reads.
The solution table
| Control | Input | Stage | Gate? | Why there |
|---|---|---|---|---|
| Threat model of the payment flow | Data-flow diagram | Design | Review sign-off | Design flaws (e.g. trusting the mobile app's amount field) cannot be fixed cheaply in code later |
| Branch protection + required review | Pull request | Code | Yes | Stops unreviewed changes reaching main; required checks become enforceable |
| Secret scanning | Source and diff | Code (plus pre-commit hook) | Yes | A secret that reaches the remote must be treated as leaked |
| SAST | Source | Code | High-confidence rules only | Fast feedback to the author while the change is fresh |
| SCA | Lockfile | Code, re-run nightly | Critical with fix | New CVEs appear after the merge, so one scan is not enough |
| IaC scanning | Terraform | Code | Yes for public exposure | Catches the public receipts bucket before it exists |
| Image scan | Built image | Build | Critical with fix | Finds vulnerable OS packages from the base image that SCA on the app lockfile misses |
| SBOM generation | Built image | Build | No (inventory) | Lets you answer "are we affected?" within minutes of a new advisory |
| Artifact signing | Image digest | Build | No (it produces evidence) | Proves this exact image came from this pipeline |
| DAST baseline | Running staging service | Test | Warn, block on high | Sees headers, cookies, TLS and auth behaviour that source does not show |
| Signature verification at admission | Image reference | Release | Yes | Only images from the trusted pipeline may run in production |
| Runtime detection + vuln management | Production telemetry, SBOM | Operate | Alert / ticket | Detects what got through, and feeds lessons back into requirements |
Two placements trip up most people. The first is image scanning versus SCA: both look for known vulnerabilities, but SCA reads your application's declared dependencies, while the image scan also sees the operating-system packages inherited from the base image. You need both. The second is signing versus verification: signing at build time is worthless if nothing checks the signature at deploy time. The gate is the verification, not the signature.
What the pipeline looks like in practice
The commands below show one possible implementation with common open-source tools. Tool choice is not what the exam tests; the order and the gates are.
Only test what you own or are explicitly authorised to test. Scanners and DAST tools in this course are pointed at your own repositories, your own lab registry and your own staging systems. Running a dynamic scanner against someone else's website, even a "harmless" baseline scan, can breach their terms or the law.
# ---- Stage: Code โ every pull request, should finish in a few minutes ----
gitleaks detect --source . --redact # secrets in files and history
semgrep scan --config p/default --error # SAST, non-zero exit on findings
trivy fs --scanners vuln --severity HIGH,CRITICAL --exit-code 1 . # SCA on lockfiles
trivy config --exit-code 1 ./infra # IaC misconfiguration (Terraform)
# ---- Stage: Build โ on merge to main, produces the one artifact we ship ----
docker build -t registry.example.com/pay-api:1.4.2 .
trivy image --severity CRITICAL --ignore-unfixed --exit-code 1 registry.example.com/pay-api:1.4.2
docker push registry.example.com/pay-api:1.4.2
syft registry.example.com/pay-api:1.4.2 -o cyclonedx-json > sbom.cdx.json
cosign sign --key cosign.key registry.example.com/pay-api@sha256:<digest>
# ---- Stage: Test โ against the deployed staging copy ----
docker run --rm -t ghcr.io/zaproxy/zaproxy:stable zap-baseline.py -t https://staging.example.com
# ---- Stage: Release โ production admits only verified images ----
cosign verify --key cosign.pub registry.example.com/pay-api@sha256:<digest>
Notice three details. Signing and verification use the digest, not the tag, because a tag such as 1.4.2 can be moved to a different image while a digest cannot. The image scan uses --ignore-unfixed so the gate only blocks on problems you can actually fix today; unfixed findings still go to the backlog. And the DAST step runs against staging, never against a system you do not own.
What you should see when a gate works
Suppose a developer accidentally commits a test cloud key in config/settings.py. The secret-scanning job fails, and the report (example output, shortened) looks roughly like this:
Finding: AWS_ACCESS_KEY_ID = REDACTED
Secret: REDACTED
RuleID: aws-access-token
File: config/settings.py
Line: 12
Commit: 4be2c1d...
WRN leaks found: 1
The job exits with a non-zero status, the required check turns red, and branch protection keeps the merge button disabled. That is the whole point of a gate: the bad change physically cannot reach main without someone consciously overriding the rule, and that override is logged.
If instead the job passes but the key is visible in the file, check three things: whether the scanner ran on the right directory, whether a broad allow-list rule silenced it, and whether the key format is one the scanner recognises. Custom internal tokens often need a custom rule.
Worked exam item: the leaked key and the tempting wrong answer
Now compress the same knowledge into exam form. Read the item, decide, then read the reasoning.
A developer discovers that a production database password was committed to a public repository three days ago. The commit is still in the history. What should the team do FIRST?
- Rewrite the repository history to remove the commit and force-push.
- Rotate the password and review the database logs for access since the commit.
- Add a secret-scanning tool to the pipeline.
- Make the repository private.
Answer: B. The secret has been public for three days, so you must assume someone has it. Removing it from history (A) or hiding the repository (D) does nothing about copies that already exist in forks, clones or caches. Adding a scanner (C) is the right long-term fix, but it prevents the next leak, not this one. Rotating the credential is the only option that makes the leaked value useless, and reviewing logs tells you whether it was already used. History clean-up and the scanner come afterwards.
The pattern generalises: in a "FIRST" question about an exposed credential, invalidate it before you tidy up. Exams frequently place the tidying step first in the list, because it feels responsible.
Exam angle: how these topics are asked and the classic traps
Once you have the map and the method, the remaining skill is reading questions the way the examiner wrote them. A few patterns cover most DevSecOps items.
- "Buy and deploy a scanner" when the question asks for a root-cause fix
- "Have the security team review every pull request" โ does not scale and removes ownership
- "Block all builds with any finding" โ maximal friction, encourages bypasses
- "Add a WAF" as the fix for an injection flaw in your own code
- "Run a penetration test" as the first activity for a new design
- "Encrypt the secret in the repository" instead of removing it
- Fix the flaw in code (parameterise, encode, validate) and add a regression test
- Automated checks in the pipeline, with security champions for review guidance
- Block on high-confidence, high-impact findings; ticket the rest with SLAs
- Use the WAF as defence in depth or a short-term virtual patch only
- Threat model the design first; test later against what the model found
- Move the secret to a secrets manager and rotate it
Five traps worth memorising
"Signed" does not mean "safe"
A signature proves who produced an artifact and that it has not changed since. It says nothing about whether the code inside is free of vulnerabilities or backdoors. If the build system itself is compromised, the attacker's code gets signed too โ which is why exams pair signing with build integrity and provenance.
An SBOM is an inventory, not a scan
A software bill of materials lists components and versions. Its value comes when you match it against vulnerability data, today and every day after. Options that say "the SBOM prevents vulnerable components" are wrong; it makes them findable.
Base64 is encoding, not encryption
Any option that treats base64-encoded configuration values as protected is wrong. Base64 is reversible by anyone, with no key. The same applies to secrets that are "hidden" in environment variables printed into build logs.
CVSS base score is not priority
The base score describes a vulnerability's technical severity in general. Priority also depends on whether the component is reachable, internet-facing, actively exploited and protecting sensitive data. A 9.8 in a library that is never loaded can wait behind a 7.5 on your public login endpoint.
"Shift left" does not mean "only left"
Early checks reduce cost, but some evidence only exists later. A design review cannot see a misconfigured production load balancer. Good answers keep testing and monitoring on the right side too: shift left, and also shield right.
Common reasoning errors of experienced candidates
People who already work in software delivery often lose points not through lack of knowledge but through habits from their own company. Watch for these.
- Answering for your tool stack. The exam does not care that your CI system calls it a "workflow" or "pipeline". Translate every option into the generic stage it describes.
- Picking the most technical option. When two answers both work, the one that addresses policy, ownership or root cause usually wins over the clever configuration tweak.
- Over-reading the scenario. If the question does not mention a budget problem, do not invent one. Use only the facts given.
- Ignoring the word "MOST". Several options may help. Only one helps most, typically the one that removes the risk rather than reducing its likelihood a little.
- Forgetting people. Training developers, appointing security champions and writing secure coding standards are legitimate controls, and they appear as correct answers more often than engineers expect.
Your study plan: 4, 8 or 12 weeks
Choose the plan that matches your starting point. If you already ship code through a CI/CD pipeline every week, four focused weeks can be enough. If you know security well but have never maintained a pipeline, or you are a developer new to security, take eight. If both worlds are new, twelve weeks with steady practice will serve you far better than cramming. All plans share one rhythm: learn a domain, answer its Check-yourself questions, and revisit earlier domains before they fade.
For working developers or DevOps engineers: about an hour and a half on most days.
- Week 1Lessons 2โ4: SDLC culture, threat modelling, design principles. Draw one data-flow diagram of a system you know.
- Week 2Lessons 5โ7: secure coding, testing types, supply chain. Redo every question you missed in week 1.
- Week 3Lessons 8โ11: secrets, CI/CD, containers and IaC, runtime and vulnerability management.
- Week 4Lesson 12 practice block and the final exam, then two days on your weakest domains.
The balanced default: four to six hours a week.
- Weeks 1โ2Lessons 2โ3. Build your own STRIDE cheat-sheet from memory.
- Weeks 3โ4Lessons 4โ6. For each OWASP Top 10 category, write the root-cause fix in one line.
- Weeks 5โ6Lessons 7โ9. Sketch the pipeline of a project you know and mark every gate.
- Weeks 7โ8Lessons 10โ12, the practice block, the final exam, and a full review of missed items.
For newcomers to either development or security: three to four hours a week.
- Weeks 1โ3Lessons 2โ4, slowly. Learn the vocabulary; the glossaries matter.
- Weeks 4โ6Lessons 5โ7. Read code examples aloud and explain why each fix works.
- Weeks 7โ9Lessons 8โ10. Re-place the twelve controls from this lesson without looking.
- Weeks 10โ12Lesson 11, then Lesson 12 twice: once open-book, once timed.
The split above is a starting point, not a rule. After your first round of Check-yourself questions, move time toward whichever domain cost you the most points. Spaced repetition beats rereading: a question you answered wrong three days ago is worth more study time than a chapter you already understand.
Check yourself: six exam-style questions
1. A team wants to detect an injection flaw as early as possible. Which control can run at the EARLIEST stage?
- DAST against staging
- SAST on the pull request
- Runtime application monitoring
- Penetration test before release
Show answer
B โ SAST reads source code, which exists at the Code stage. DAST and penetration tests need a running application; runtime monitoring needs production.
2. An image is signed in the build pipeline, but nothing checks signatures at deployment. What is the main weakness?
- The signature algorithm is too weak
- Any unsigned or tampered image can still be deployed
- The SBOM is incomplete
- Developers cannot read the signature
Show answer
B โ Signing only creates evidence. Without verification at a gate, such as an admission policy, the evidence is never used.
3. A new critical vulnerability in a popular logging library is announced. Which artifact lets you answer "which of our services are affected?" FASTEST?
- The threat model
- An up-to-date SBOM for each deployed artifact
- The DAST report
- The branch protection settings
Show answer
B โ An SBOM lists the components and versions in each artifact, so you can search them for the affected library instead of rebuilding or rescanning everything.
4. Which finding should MOST appropriately block a merge?
- A low-severity style warning from SAST
- A verified cloud credential in the diff
- A medium vulnerability with no available fix in a test dependency
- An informational note about a missing code comment
Show answer
B โ It is high-confidence, high-impact and fixable now: remove it and rotate it. The other findings belong in triage or the backlog.
5. Why does a team need both SCA and container image scanning?
- They are the same; one is enough
- Image scanning also covers OS packages inherited from the base image
- SCA only works on compiled code
- Image scanning replaces SAST
Show answer
B โ SCA reads the application's declared dependencies; the image scan additionally sees system packages and libraries that came with the base image.
6. During a design review you notice that the mobile app sends the payment amount and the server trusts it. What is the BEST next step?
- Add a WAF rule for the payment endpoint
- Record it as a tampering threat and require the server to recalculate the amount from trusted data
- Wait for DAST to confirm the issue
- Obfuscate the mobile app
Show answer
B โ It is a design flaw (client-side trust, STRIDE tampering). The root-cause fix is server-side authority over the amount. Obfuscation and WAF rules only make abuse slightly harder.
- Read the qualifier โ tell EARLIEST, BEST, FIRST and MOST LIKELY questions apart before reading the options
- Use the map โ name the seven SDLC stages and at least two controls for each
- Feed it, place it, gate it โ place any control by its input and decide whether it blocks
- Separate look-alikes โ SCA versus image scanning, signing versus verification, SBOM versus scan
- Handle a leaked secret โ revoke and rotate first, then investigate, then clean up and prevent
- Spot the traps โ tools instead of root cause, blocking everything, CVSS as priority
- Pick a plan โ choose the 4, 8 or 12-week schedule and put the first week in your calendar
Glossary
What's next in this course
- Lesson 2 โ Secure SDLC & shift-left culture: lifecycle models, ownership, security champions and the metrics that show real progress.
- Lesson 3 โ Threat modelling: data-flow diagrams, trust boundaries and STRIDE applied to a complete example system.
- Lesson 4 โ Secure requirements & design principles: turning risks into testable requirements and recognising violated principles.
- Lesson 5 โ Secure coding: the OWASP Top 10 from a developer's chair, input validation, output encoding and authentication done right.
- Lesson 6 โ Static & dynamic testing: what SAST, DAST, IAST and fuzzing each see, miss and cost.
- Lesson 7 โ Dependencies & software supply chain: SCA, SBOMs, pinning, provenance and signed artifacts.
- Lesson 8 โ Secrets management & configuration: vaults, short-lived credentials, rotation and leak response.
- Lesson 9 โ CI/CD pipeline security: runners, token permissions, branch protection and untrusted contributions.
- Lesson 10 โ Container & infrastructure-as-code security: hardened images, policy-as-code and misconfiguration scanning.
- Lesson 11 โ Runtime protection, monitoring & vulnerability management: detection, prioritisation and remediation SLAs.
- Lesson 12 โ Final review & exam strategy: cheat-sheet tables, timing tactics and a 30-question practice block.
Lessons 2โ12 and the final exam unlock with a one-time purchase โ no subscription.