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 134 matching courses, lessons and labs
- 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 - 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 - LabP6Sensitive business flows: the grinder drop that sells out to one account (Node)
Mo, GW-188: "Fenwick-edition grinder, 200 units, two per customer. Should be a quick one." Sam, ticket 4452: "It sold out in nine seconds and one account holds 140 of them." The claim route checks the session and nothing else. Show one account claiming at a script's pace and in bulk, then limit the flow. The gateway's new drop route (Fastify 5, Node 22) checks the session and then takes any quantity, as often as the caller asks. Show one signed-in account claiming at a script's pace and in bulk, limit the claim route per account with the gateway's rate-limit plugin and bound one claim's quantity, don't settle for a limit keyed on the caller's address or one with no bound on the quantity, and add a test that proves the refusal. Lesson: a business flow is limited by who asks and what one ask may take, not by how many requests an address sends. 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 drop is two units per customer. A person claims a handful of times in an hour; a script claims dozens. - The gateway already limits every address a little (`routes.ts`); this flow needs its own limit.
FastifyTypeScriptmoderateA06:2025CWE-770CWE-799 - LabP6Session token in plain preferences, open to backup (Kotlin, Android)
COU-318 keeps couriers signed in across a phone change by saving the session token as plain text and backing the preferences file up. Put the token back under a key that cannot leave the device, turn backups and device transfers off, and add the test that preferences hold only ciphertext. The Meridian courier app (Kotlin 2.2, Jetpack Compose) saves its session token as a plain string in SharedPreferences, allows backup in the manifest and includes the preferences in the cloud-backup and device-transfer rules. Anyone who reads the file, a backup or a transferred copy holds a working token. Restore the sealed store (AES-GCM under a non-exportable Android Keystore key), exclude the file from backups and transfers, keep sign-in working, and add a test. Kotlin has no compiler in the browser: Gradle here is simulated, and its output follows your code's recognized state. The emulated app models the phone: what a copy of the preferences gives. 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. - `gradle` in the terminal is a simulated toolchain: its output follows your code's recognized state, nothing is compiled. `TokenStoreTest` needs a device and is not run. - Keep the key in the Android Keystore (`TokenStore.key()`); do not write a key in the source or add a second store. - Leave the back end client, the link activity and the build files as they are.
Android (Jetpack Compose)KotlinmoderateA04:2025CWE-312CWE-922CWE-530 - LabP6Session token in UserDefaults: back to the Keychain (Swift, iOS)
IOS-118 keeps the iPhone app's session token in UserDefaults. Show the token in the preferences a backup holds, move it back to the Keychain with the baseline's attributes, remove the old copy, and add the test for the clearing. Swift is not compiled here: swift test is simulated from your code. The Meridian iPhone app (Swift 6, SwiftUI) builds a UserDefaultsTokenStore in AppModel.live(), so the bearer token lives in the preferences plist that an unencrypted backup and the app container expose. Show the token in the backup's preferences, switch AppModel.live() back to KeychainTokenStore (this device only, while unlocked, never synced), clear the old UserDefaults entry, keep MemoryTokenStore for tests, and add a regression test. Keychain code is parsed, never run. 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. - Keep `KeychainTokenStore`'s attributes as the baseline has them; do not add a new store type. - Leave `MemoryTokenStore` and the existing Keychain and API client tests as they are.
iOS (SwiftUI)SwifteasyA04:2025CWE-312CWE-922CWE-522 - LabP6The second factor that was only a suggestion (Java)
Rafael, AUTH-233: "Staff sign-in now takes a one-time code. Which guarantee did we just touch?" The code is checked only when one is sent, and the reset link signs you straight in. Make the code count on every path. The Auth service's staff sign-in (Spring Boot 3.3) verifies the one-time code only when the request has one, and the password-reset route ends by starting a session. Show a session obtained without the code, require the second factor wherever a session starts, and add a 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. - The omitted code is a field the HTTP client leaves out; the lab never writes a code that works.
Spring BootJavamoderateA07:2025CWE-304CWE-287CWE-306 - LabP7Compiler hardening: the build that lost its seatbelts (C++)
SCAN-341, Orla: "The dock gateway CI takes too long. Can the scanner build do less?" It did less. Show what the scanner is compiled and linked with, then put each hardening flag and the sanitizer preset back, and say what each one stops. SCAN-341 trimmed the scanner's build: scanner/CMakeLists.txt lost the warnings-as-errors set, the stack protector, stack-clash protection, library assertions, _FORTIFY_SOURCE, PIE, RELRO with immediate binding, the non-executable stack and the ASan/UBSan options, and scanner/CMakePresets.json lost its asan preset. Read the build report (GET /internal/build-report with the send tool, with the header Authorization: Bearer mrd-sam-2Kx6, Sam's staff session; any session in the lab's fixtures works) while it admits it, then restore each flag in CMakeLists.txt and the asan preset (configure, build and test entries, with SCANNER_SANITIZE on) in CMakePresets.json. Flags without the preset, the preset without the flags, or warnings-as-errors alone are not enough, and deleting the test target to get a green build breaks the service. After the edit, send the same request again: the report is the emulator's stand-in for the build your files would produce. Nothing is compiled, linked or sanitized here (no C++ compiler runs in the tab), so the unit test a fix would add is shown as text only. Graded on the build files as text and as parsed JSON. Lesson: each flag stops one class of memory bug from becoming an exploit, or finds it before release, and a flag nobody builds with is not a control. 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 compiled, linked or run here: the lab reads CMakeLists.txt as text and CMakePresets.json as a parsed document, and the build report (GET /internal/build-report, answered to any signed-in session) is the emulator's stand-in for the build, following your saved files. - The scanner library, its executable and its test target must stay in the build.
C++moderateGrades infrastructureA02:2025CWE-693CWE-121CWE-122 - LabP7Dependency confusion: whose pricing-rules is this? (Node)
GW-238 installs the shared pricing rules by a bare name, and the build's mirror also asks the public registry. Mo: "Should be a quick one." Teo: "1. The build is green. 2. Green from where? 3. Ask the resolver." Show where a fresh install comes from, then make the name, the registry and the lockfile agree on one source. The lockfile entry for the scoped package needs its version, resolved tarball URL and integrity; Teo's notes list what the registry publishes. The gateway installs the internal package meridian-pricing-rules by an unscoped name through a mirror that falls back to the public registry and prefers the higher version. Use the build resolver's dry-run to show that a fresh install fetches the public package, then fix it: scope the name (@meridian/pricing-rules) and update the import, map the scope to the internal registry in .npmrc (the value may be quoted or not), pin the exact version and commit package-lock.json with a node_modules/@meridian/pricing-rules entry that holds the version (2.4.0), the internal tarball URL in resolved and the integrity value the internal registry publishes for that version (audit/registry-notes.md). A lockfile alone leaves a new install open, a scope mapping the bare name never uses changes nothing, and pointing every name at the public registry stops the internal package from being found. Add a test that keeps the manifest, the registry settings and the lockfile in step. Lesson: a name is an address. Anything installed by a bare name comes from whichever registry answers best, so give internal packages a scope only your registry serves, pin them exactly, and commit the lockfile that says where each came from. 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 resolver's dry-run answers from your files as saved: the package name, .npmrc and the lockfile. Nothing is installed here. - The lab never writes the public package or its contents; the resolver only names the registry an install would use.
TypeScriptmoderateA03:2025CWE-427CWE-829 - LabP7Dockerfile hardening: the image that remembered the token (Docker)
BILL-461, Mo: "Billing needs our private package index. Should be a quick one." It shipped, and Teo asked for the image report before the gate. Show what the billing image is built from, who it runs as and what it carries, then rebuild the Dockerfile so none of those is a surprise. The billing service's Dockerfile (BILL-461) builds on python:latest, never switches to a non-root user, and takes the private index's access token as a build argument that an ENV writes into a layer. Read the image report (GET /internal/image-report with the send tool, with the header Authorization: Bearer mrd-sam-2Kx6, Sam's staff session; any session in the lab's fixtures works) while it admits all three, then pin the base to a full release, run as the non-root user, and give the build the token as a secret mount, not a layer. A pin alone, a minor-version tag, or a token that is still an argument is not enough, and dropping the package install breaks the image. Edit services/billing/Dockerfile, and add services/billing/.dockerignore so the build context carries no credentials. After the edit, send the same request again: the report is the emulator's stand-in for the image your Dockerfile would build, and it reads the Dockerfile as you saved it. There is no docker command in the terminal. Graded on the parsed Dockerfile; nothing is built. Lesson: an image is a stack of layers that remember, so pin what it is built from, choose who it runs as, and hand the build a credential in a way that leaves nothing behind. 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 built or pulled here: the lab reads the Dockerfile as a parsed document, and the image report (GET /internal/image-report, answered to any signed-in session) is the emulator's stand-in for what the built image would say, and it follows your saved Dockerfile. - The service must still install its package and serve on port 8080 with uvicorn.
FastAPIPythonmoderateGrades infrastructureA02:2025CWE-250CWE-798CWE-1104
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.