Secure engineering for the way software is built now.
Ten principles that carry across languages, practiced on a realistic codebase with an AI assistant beside you. Find the flaw, fix it in the IDE, prove it with a test, and keep the evidence your auditors ask for.

Four levels and capstones
The principles carry across languages, so mastery is reported per principle, never per language. Every lab runs the same loop: find, fix, prove, transfer, prevent.
- Level 0Foundations
How the web and cloud work, thinking like an attacker, and your tools (IDE, git, tests, the AI assistant, the pipeline).
- Level 1Principles
One track per principle, using the loop: find, fix, prove, transfer, prevent.
- Level 2Systems
Identity architecture, cloud deployment on four clouds, CI/CD and supply chain, AI features, data.
- Level 3Engineering after AI
Specs, tests, reviewing at AI volume, the pipeline as safety system, operating what you ship, running a team of agents.
- FinishCapstones
Harden Meridian against a scripted adversary, a pentest-report remediation sprint, ship a feature in 90 minutes with an AI agent, ASVS L2 verification, incident to postmortem.
Not sure where to start?
Tell the guide your language, your role or the weakness you are fixing, and it opens the catalog on the courses and labs for it.
Every course, lesson and lab
Ten principle tracks and Engineering after AI. Search, or narrow by language, framework, weakness, level and the standards you report against.
Pick a language, then a framework: every principle shows its closest lab.
Showing 109–120 of 153 courses, lessons and labs
- LabP6Hard-coded key, weak cipher mode: locker pickup passes (C#)
ORD-257 seals the note on a locker pickup pass with AES under a key that is a string in the source. Show what the ciphertext gives away, move to authenticated encryption with a key from the key service, and add the test that a changed pass is refused. The Orders service (ASP.NET Core 8) seals pickup-pass notes with AES in ECB mode under one key committed to the repository, and the key-management service wired in beside it is never asked for a key. Show identical blocks in the pass, replace the sealer with AES-GCM under a data key from the key service and a fresh nonce for each pass, keep passes opening for their owners, and add a regression test. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - Use the key service the branch already wires in (`IDataKeys`); do not add a second one. - Leave the order validator and the session code as they are.
ASP.NET CoreC#moderateA04:2025CWE-321CWE-798CWE-327 - LabP6Insecure randomness: the pairing token and <random> (C++)
Orla: "HANDHELD WON'T PAIR AFTER THE DOCK PC UPDATE. 11 HANDHELDS. NEED THEM BEFORE THE 14:00 TRUCK." Mo: "SCN-52 swapped getrandom for <random> so it builds on the old dock toolchain." Whoever holds a pairing token can add scans to that handheld's batch. Show the pair answer reporting a guessable token, go back to the OS's CSPRNG with its short-read and error handling, keep the duplicate-token loop, and test it. The scanner (C++20, CMake) hands each paired handheld a session token from `random_token()`, and the token is the whole secret. Branch SCN-52 draws it from a `std::mt19937` seeded with one `std::random_device` value: a general-purpose generator with a 32-bit seed whose outputs reveal its state. Restore `getrandom` with its retry on interruption and its error, keep `pair`'s loop that never reissues a live token, and don't settle for a wider seed, the clock or `rand()`, `std::random_device` alone, or a single unchecked `getrandom` call. Nothing is compiled or sanitized; the test you add is text the recognizers read. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - The C++ is never compiled and no sanitizer runs; the emulated pair route answers as your saved code reads, and the unit test you add is checked as text. - The pair answer reports the token's size in bits, never the token; the lab file spells no token. - Rafael: which guarantee did we just touch? — it's the one about tokens nobody can guess (and it is in the security doc). - Kai: a handheld that pairs twice must still lose its old token. — k
C++moderateA04:2025CWE-338CWE-330CWE-337 - LabP6Insecure randomness: the share link Orla can read out loud (Node)
Orla: "SHARE LINK FOR A SAVED CART, 14 PALLETS. SHORT ENOUGH TO READ OUT ON THE PHONE. I'M ON THE DOCK." Mo: "Should be a quick one." Branch GW-171 mints each link's token from `Math.random` and keeps it to 8 characters; whoever holds the token holds the cart. Show the create answer reporting a guessable token, mint tokens from a CSPRNG at a length nobody can guess, keep the links already issued opening, and test it. The gateway (Fastify 5) answers share links itself. The token is the whole secret: it comes from a general-purpose PRNG and is short. Move to the platform's CSPRNG with at least 128 bits, keep the old links opening, and don't settle for a longer token from the same generator, a hashed clock, or a CSPRNG that returns a few bytes. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - The lab never spells a token a link opens with except the one old link the fixtures hold; the create answer reports the token's length, never the token. - Rafael: which guarantee did we just touch? — it's the one about links nobody can guess. - Kai: the links Orla already sent still have to open. — k
FastifyTypeScriptmoderateA04:2025CWE-338CWE-330CWE-331 - LabP6Keys out of the APK: the courier app's maps key (Kotlin)
COU-188 ships a maps key inside the courier app: in the build, in the resources and in a header on every call. Show that the key opens the back end for anyone, take it out, and keep the app on the token exchange. The courier app (Kotlin 2.2, Jetpack Compose) now carries a maps key as a `buildConfigField`, a string resource and a header `BffClient` adds to every request, so anyone who unpacks the APK holds it. Show the back end accepting that key, remove it from the build, the resources and the client, keep sign-in on the badge-and-code exchange for a short-lived session, and add a test that the build carries no key. Kotlin has no compiler in the browser: Gradle here is simulated, and its output follows your code's recognized state. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - Everything in this lab is emulated. Nothing you write is compiled or run. - `gradle` in the terminal is a simulated toolchain: its output follows your code's recognized state, nothing is compiled. - Do not move the key to another place in the app (a properties file, an environment variable read at build time, an encoded string): whatever is built into the APK is in every copy. - Leave the token store, the view model and the delivery-link code as they are.
Android (Jetpack Compose)KotlinmoderateA04:2025CWE-798CWE-321CWE-522 - LabP6Keys out of the bundle: the pickup-map key in the iPhone app (Swift)
IOS-212 put the partner catalog's API key in the build settings, so it is in the app on every phone. Show the key in what ships, take it out of the bundle, the config and the client, and add the test that only the user's token is sent. The Meridian iPhone app (Swift 6, SwiftUI) read a key from Shared.xcconfig through Info.plist into AppConfig and sent it on every request, though the project's rule is public values only: an app bundle can be unzipped by anyone. Show the key in the shipped app and that it opens the API alone, remove it from the xcconfig, the plist, AppConfig and APIClient so the signed-in user's token is the only credential sent (the back end holds any key), and add a regression test. Swift has no compiler in the browser: swift build and swift test here are simulated and follow your code's recognized state. The Keychain store and the pinning delegate are only parsed; the simulated swift test is the Linux run, which leaves them out. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - Do not move the key to another file or into the Swift source: anything in the bundle ships. - Leave the pins, the Keychain store and the deep-link code as they are.
iOS (SwiftUI)SwifteasyA04:2025CWE-798CWE-321CWE-312 - LabP6Least privilege: the Role that said star for Perc's worker (Kubernetes)
OPS-131, Teo: "1. The worker reads its settings from a ConfigMap and reports events. 2. It needs a token for that. 3. Its Role grants every verb on every resource. 4. Show what that token can reach. 5. Give it what it uses and nothing more. Green is a color, not a verdict." The worker's Role (deploy/k8s/worker-rbac.yaml) grants every verb on every resource, so its token can read Secrets, open a shell in a pod and delete its own ConfigMap. Show it with the Repeater, then reduce the Role to reading the worker's ConfigMap (worker-settings, deploy/k8s/worker-settings.yaml) and creating events, not just narrowing the resource list with the verbs left open, and not leaving a Secret in it. The worker must still do its job. Add a script, deploy/k8s/checks/worker-can-i.sh, that checks what the token may and may not do. Nothing is applied to a cluster. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - The cluster is not real. The request's "ask" field is the emulator's stand-in for what the worker's token is asked to do, and your manifest never reads it. The grade reads the manifest. - Find: in the Repeater, send POST /api/worker/can-i to worker.meridian.internal:8080 with a JSON body whose only field is "ask", a string in the form `verb resource/name` (for example `get secrets/billing-env`, `create pods/exec` or `delete configmaps/worker-settings`). An answer of allowed:true for something the worker never needs is the finding. - The worker's settings are the ConfigMap `worker-settings` in namespace meridian (deploy/k8s/worker-settings.yaml). Reading it takes get, list and watch; the worker also creates events. It never changes the ConfigMap or deletes it. - The worker still reads its settings ConfigMap and creates events, with its own token. - Fix: edit deploy/k8s/worker-rbac.yaml. Prove: put your script in deploy/k8s/checks/worker-can-i.sh; it runs `kubectl auth can-i` for what the worker may do and for Secrets and pod exec, which it may not. The lab only reads the script; it is not run.
Infrastructure and pipelineseasyGrades infrastructureA02:2025CWE-250CWE-269 - LabP6One attempt, two log lines: the audit trail that anyone can write (Java)
AUTH-233 gave every sign-in attempt an audit line, on a Log4j2 release the dependency report has blocked. Sam is tired of finding entries nobody made. Make an attempt write exactly what happened, and get the release cleared. The Auth service (Spring Boot 3.3, Log4j2 2.14.1) logs `"sign-in attempt for " + username` through a plain-text layout, and the dependency report blocks the release. Show one attempt writing two entries, log the username as a structured field under a JSON layout, move Log4j2 to a cleared release in the same major version (a newline filter, bare placeholders or a release that stops short do not count; neither does a major version the service cannot run on), and add a test that a line break stays inside one entry. Lesson: a log is evidence only while its lines are written by the code and not by the caller, so keep input out of the message text and let the layout encode it. The library that writes the log is part of the same trust boundary, so its advisories are read against the code that feeds it. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - The username that breaks a log line is named by class (a line break); the lab never spells one, and the HTTP client builds it for you. - Nothing is installed or audited here: the lab reads pom.xml and the saved files, and the report in audit/ is the one CI produced.
Spring BootJavamoderateA09:2025CWE-117CWE-1395CWE-532 - LabP6Password reset tokens: the link Sam stopped sending by hand (Node)
Sam: "*I can't get into my account* (SUP-5121). That's the fourth this week, and I'm resetting them by hand." Mo: "Email them a reset link. Should be a quick one." Branch GW-196 mints each link's token from the clock, keeps it as sent, never expires it and never retires it. Show the weakness, make reset links high-entropy, hashed at rest, short-lived and single-use, keep the flow working, and test it. The gateway (Fastify 5) answers reset links itself. The token is the whole key to an account. Mint it from the CSPRNG with at least 128 bits, store only its hash, expire it, and retire it on first use. A CSPRNG alone, or a hardened but still guessable token, is not enough, and neither is a change that stops real links working. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - The lab never spells a token that opens a reset except the three fixture links; the request answer reports the token's length and how it is stored, never the token. - Rafael: which guarantee did we just touch? — it's the one about who gets to change a password. - Kai: a link that has been used or has run out says so, and says nothing else. — k - Perc: strength=heroic. (Perc has no opinion about reset links. Perc has a clock.)
FastifyTypeScriptmoderateA07:2025CWE-640CWE-330CWE-613 - LabP6Pod security: the worker that runs the night shift (Kubernetes)
Teo: 'WRK-118 got the nightly brew report out, and the worker pod now runs as uid 0 with escalation on, under a namespace that was turned down to get it admitted. Show what the dry run says, make the pod safe, and put the guardrail back.' Mo: 'should be a quick one.' The worker's Deployment runs as root, its container may escalate privilege, and the namespace's enforced Pod Security level was lowered to baseline to admit it. Show what the cluster's dry run reports for the worker, set the pod to run as a non-root user and the container to refuse privilege escalation (doing one of the two leaves it vulnerable, and asking for non-root while keeping uid 0 keeps the pod from starting), keep the worker's secret and scratch volume, and restore the namespace's restricted enforcement. Lesson: a pod's privileges are a list you write down. Say who it runs as and what it may never become, and let the namespace refuse the pods that forget. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - The lab reads the manifests only. Nothing is applied to a cluster; the preview route is an emulated dry run.
Infrastructure and pipelineseasyGrades infrastructureA02:2025CWE-250CWE-269 - LabP6Public storage: the export bucket anyone can read (Terraform, Google Cloud)
Mo's INF-121 made the weekly export downloadable without a sign-in, and Teo's plan output looks very quiet about it. Show that the file is readable by anyone, then make the bucket private again, name who may read it, and keep a test that fails if that changes. The Terraform for Meridian's exports bucket on Google Cloud switches public access prevention off and grants objectViewer to allUsers so partners can download the weekly export. Show that an anonymous request reads the export, then fix the Terraform (as written and as planned): prevention enforced, no allUsers or allAuthenticatedUsers on the bucket, and the partners' read granted to a named service account with only the role it needs. Leaving the grant behind prevention, swapping it for allAuthenticatedUsers, or removing the worker's write or the partners' read are not fixes. Add a plan-level terraform test. Lesson: private is a property of the whole path to the object, the bucket's prevention setting and every grant on it. Public means any identity, so name who may read, give them one role, and keep a test that fails when the exposure comes back. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - Nothing is planned, applied or sent to a real project: the lab reads the Terraform files and the plan they would produce. - Requests to the bucket endpoint are emulated; the service account and keys in the fixtures are fictional.
Infrastructure and pipelinesmoderateGrades infrastructureA02:2025CWE-732CWE-668 - LabP6Reviewing an AI agent's pull request: the password change that breaks rules kept elsewhere (Spring)
An AI agent opened AUTH-212 against the auth service: a signed-in person can change their password. Every line reads fine. Decide whether it can merge, and say where it goes wrong. The agent's pull request adds a password change that checks the current password and stores the new hash correctly. The Pull Request Review app shows the diff; the rules the change must keep are in the project's files (start with docs/auth.md, then the files the change touches), which you open in the Code app or read in the terminal. Follow the change into those rules, comment on the lines where those rules are broken and pick each defect's class, then approve or request changes with a confidence from 1 to 5. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - This lab grades your review, not code: comment on the lines and decide. Nothing is merged.
Spring BootJavamoderateA07:2025CWE-613CWE-778 - LabP6Secrets in Terraform state: the password the output printed (Terraform)
INF-118, Teo: "1. The deploy job needs the billing database password. 2. The new output hands it over. 3. Plans are faster without encryption, so I switched it off. 4. Perc has opinions." Show that anyone who can read the state bucket reads the password, then make the state unreadable without the key and the output quiet in the log. Meridian's AWS Terraform (infra/terraform/aws) gained a connection-string output that is not sensitive and a state backend with encrypt = false. Show the state object readable in clear, mark the output sensitive, encrypt the state under a KMS key of its own (encrypt = true alone is the provider's key and a reader of the bucket still gets plain text), keep the output and the remote backend the deploy job depends on, and write the state-access runbook. Nothing is applied: the lab is graded on the configuration. Lesson: sensitive hides a value from the screen and never from the state file, so the state is a secret store. Keep it remote, sealed under a key only the pipeline and the platform group hold, and keep secrets out of it where you can. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start on the ticket's branch of the Meridian repository; `main` is the baseline before the ticket. - Change what the ticket got wrong; leave the rest of the repository as it is. - Nothing is applied to a real cloud. The state object route is the emulator's stand-in for reading the state bucket, and your code never reads it. - Session: the ops account (`root`) is the Repeater's. The app has no sign-in form and no login step: the proxy knows root by the request header Authorization: `Bearer mrd-root-9Tn3` (a made-up lab value). Add that header to every request below. Without it the route answers 401 Sign in required. - In the terminal tool the request is `send GET /meridian-tfstate/aws/terraform.tfstate header.authorization="Bearer mrd-root-9Tn3"`; in the Repeater, GET that path and add the header Authorization with that value. - Find: before you change the Terraform, send that request for the state bucket's object `aws/terraform.tfstate`. Done when the answer is 200 and its outputs hold the database connection string in clear. - Prove: after your fix, send the same request again with the same header. It must come back 403 AccessDenied and no password. A 401 means the header was missing, not that the fix worked. - Change infra/terraform/aws/main.tf (the backend) and infra/terraform/aws/outputs.tf (the output); write the runbook at docs/runbooks/terraform-state-access.md. Leave variables.tf and the other clouds' Terraform alone. - The runbook must say: which object holds the state, why it is guarded (what it holds), that the pipeline role and the platform group are the only readers, which KMS key seals it, that the decrypt permission on that key is what a reader needs, and who approves a request for access. Each failing runbook line names the item it still lacks. - The deploy job still reads db_connection_string, and the state still lives in the s3 backend under the same bucket and key.
Infrastructure and pipelinesmoderateGrades infrastructureA02:2025CWE-312CWE-532
A path for each job
Role paths are campaigns in the assignment model, re-assigned every year. Each puts its weight on the principles that role meets most, and picks each principle's lab from your stack.
- BackendPrinciples 1, 2, 3, 6
- FrontendPrinciples 1, 5, 3
- APIPrinciples 2, 5, 6
- MobilePrinciples 3, 5, 8
- DevOps and platformPrinciples 4, 7, 9
- EmbeddedPrinciples 10, 6, 8
- AI engineerPrinciples 1, 4, 7
- ArchitectPrinciples 2, 4, 8, 10
- AppSec championPrinciples 1, 2, 7, 9
- Manager (no coding)Concepts, risk and evidence, without code
Your language, the same principle
- JavaScript2 labs
- TypeScript34 labs
- Python21 labs
- Java16 labs
- C#14 labs
- Go8 labs
- PHP8 labs
- Ruby6 labs
- Kotlin7 labs
- Swift6 labs
- Scala1 lab
- Dart1 lab
- Elixirnot yet
- Rust5 labs
- C1 lab
- C++5 labs
What buyers must prove
| Obligation | What it asks | How Forge meets it | Tagged labs |
|---|---|---|---|
| DISA Application Security & Development STIG, APSC-DV-003400 (V-222673) | Annual secure design and coding training for the development team | Annual role-path campaigns with dated completion records; labs are tagged with the STIG requirements they teach | 3 |
| NIST SSDF SP 800-218, PO.2.2 | Role-based training, and periodic review of proficiency | Role paths plus an annual per-principle proficiency assessment, with and without AI | 134 |
| PCI DSS v4.0, requirement 6.2.2 | Every 12 months, training on software security relevant to the person's job and development languages | Language-skinned labs matched to each person's stack, the annual cadence, and evidence per person | 91 |
| CMMC Level 2 / NIST SP 800-171 (AT practices) | Role-based training with records | Role paths and exportable records per person | — |
| NSA CNSA 2.0, NIST FIPS 203/204/205 | Planning and executing the post-quantum migration | Post-quantum labs: crypto inventory, crypto-agility, ML-KEM/ML-DSA migration | 0 |
| CISA/NSA memory-safety guidance | Memory-safe languages and a migration roadmap | The memory-safety track and a roadmap exercise for architects | 0 |
| NIST SP 800-218A | Secure development for generative-AI systems | The AI-systems and engineering-after-AI tracks | — |
| DoD 8140 / DCWF | Training mapped to cyber work roles | Role paths tagged with DCWF work roles | — |
Control wording is summarized from secondary sources and is checked against the primary documents before it goes into sales material.
- 01Read the change
A real-looking pull request with context, tests and history.
- 02Weigh the automation
Scanner output and AI suggestions arrive with their own confidence.
- 03Decide
Approve, block or rewrite — and note the evidence.
- 04See the consequence
Emulated service behavior shows what your decision would have done; it is not an external deployment test.

Human adjudication of generated code
You review the AI agent's pull request, show what it gets wrong against the running service, and fix it with a test.
What you get with Forge
| Capability | Cybrary Forge | Secure Code Warrior |
|---|---|---|
| Pull-request review exercises | Yes | — |
| Scanner-finding adjudication | Yes | — |
| AI-generated patch review | Yes | Yes — trains developers to review AI code, plus commit-level governance |
| Graded evidence notes | Yes | — |
| Team assignment and progress | Yes | Yes — enterprise learning platform |
| Capabilities covered | 5 of 5 | 2 of 5 |
Forge capabilities verified in the product. Competitor documentation varies; absence from their materials is not treated as absence of functionality. "—" means we did not find it in their public materials; partial matches are described in their own words. Sources: Secure Code Warrior (Sep 2026).
Practice reviewing code, including AI-written code.
Try a review exercise, or talk to us about your developer program.