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 1–12 of 37 matching courses, lessons and labs
- LabP1DOM XSS: the article page that trusts its own text (Angular)
HBR-244 let authors put links and emphasis in article bodies and comments by running them through bypassSecurityTrustHtml and binding them with [innerHTML], and narrowed the escaping test until it passed. Anyone can write a comment. Make the emulated page turn stored text into elements that run, then go back to showing text as text, and test it. Harbor's Angular 22 front end shows article bodies and comments by interpolation, which Angular escapes. `trusted()` calls DomSanitizer.bypassSecurityTrustHtml and both are bound with [innerHTML]. Show a stored body or comment becoming elements (the Repeater's GET /page/articles/{slug} with ?body= or ?comment=), bind both as text, don't settle for stripping script tags, for fixing one of the two bindings, or for [innerHTML] on Angular's own sanitizer, don't drop the text, restore the narrowed test and add one that passes markup through the page. Lesson: Angular is safe until a bypass says otherwise; a sanitizer bypass is a promise that the value is already safe, and stored text from other members never is. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - You start in the Harbor Angular project with HBR-244 applied; leave the API client, the sign-in code and the routes as they are. - Values are sent by class (a script element, an element with an event handler); the lab never spells one. The Repeater's render-article-page route (GET /page/articles/{slug}) stands in for the browser's DOM: send it ?body= and ?comment= with a value class from the Repeater's value picker, and it answers with what the page made of that text. - Members still have to read the article body and the comments.
AngularTypeScriptmoderateA05:2025CWE-79 - LabP1DOM XSS: the tracking page that writes the address into itself (vanilla JS)
WEB-251 gave the shipping emails a tracking page, and the page's script writes the parcel reference and the driver's note from the link straight into its markup. Meridian's drivers are charming; the links are not always from them. Make the emulated page run something it was handed, then write both values with safe DOM APIs or encode them, and test it. A plain-JavaScript page on Meridian Web reads ?ref and ?note and puts them in with innerHTML and insertAdjacentHTML. Show a link's value becoming elements, write the values as text or encode them for their context, don't settle for stripping script tags or fixing one of the two, don't drop the values, and add a test. Lesson: an address is input like any other, and the page is where it becomes code. Put values in with textContent and createElement, which have no way to make elements out of text, and when markup is truly wanted, encode for the context the value lands in. Stripping what you remember to strip, or fixing one of two sinks, leaves the other way in. 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. - Values are sent by class (a script element, an element with an event handler); the lab never spells one, and the HTTP client builds them for you. The Repeater's render route stands in for the browser's DOM. - The customer still has to see their parcel reference and the driver's note.
JavaScripteasyA05:2025CWE-79 - LabP1DOM XSS: v-html on Harbor's article bodies (Vue)
HBR-318 let article bodies carry formatting, and ArticleBody.vue now binds each paragraph with v-html. The ticket silenced the lint rule and loosened the test, so a member's post becomes elements in every reader's page. Show it, bring back safe rendering, and pin it with a test. Harbor's Vue front end renders an article body with v-html, so markup a member typed runs in their readers' sessions. Show a body becoming elements, render it as text with interpolation or sanitize it, don't settle for stripping script elements, don't stop showing the body, and add a component test. Lesson: v-html is a sink that trusts its input. Interpolation and v-text have no way to make elements out of text, and when markup is truly wanted, a sanitizer built for HTML sits between the member's text and the page. Removing what you remember to remove leaves the other ways in. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - Values are sent by class (a script element, an element with an event handler); the lab never spells one, and the HTTP client builds them for you. The Repeater's article-body route stands in for the browser's DOM. - Readers still have to see the article's text. - Leave the lint configuration, the API client and the session store as they are.
VueTypeScripteasyA05:2025CWE-79 - LabP1Heap out-of-bounds: a length byte trusted in the label parser (C++20)
SCN-58 drops the length checks the scanner's label path repeats. Show a frame and a label that read past their buffers, put the checks back against the span, and restore the tests that pinned them. The Meridian scanner (C++20, CMake) now builds the payload and CRC views from the frame header's length byte with pointer arithmetic, takes a fixed-length GS1 element by its table width without checking the text, and indexes a rack label without checking its size. A header that claims more than arrived, or a label with a short payload, reads outside the buffer. Show each through the scan route, check the length against the span before any view is built, use first, last and subspan (or at) where an index depends on input, and restore the tests. Lesson: a length from the wire is a claim, not a bound. Nothing is compiled or sanitized; the test is shown as text only. 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. - Input is sent by class (a frame longer than its bytes, an empty label payload, a device name past the limit); the lab never spells one, and the HTTP client builds them for you. - The C++ is never compiled or run under a sanitizer; the emulated service answers as your saved code reads.
C++moderateA05:2025CWE-125CWE-129CWE-119 - LabP1Integer overflow: an unchecked run-length sum before the allocation (C++20)
SCN-61 lets long-label printers send bigger run-length frames. Show the decoder's size sum wrapping and its limit gone, then restore the checked sum before the allocation and the limit, and keep the too-large error. The Meridian scanner's rle_expand now adds each run's length into a 32-bit counter with no check, tests the total only after the loop, and DecoderSet::decode passes a larger limit instead of kMaxDecoded. Show a frame that packs a repeated block many times and one that expands past the limit through the decode route, restore the checked sum in size_t before reserve and the limit, keep Error::too_large, and add a test for a frame past the limit (shown as text). Lesson: a size computed from the input is checked, in a type wide enough for it, before anything is allocated from 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. - Input is sent by class (a repeated block packed many times, an oversized frame); the lab never spells one, and the HTTP client builds them for you. - The C++ is never compiled or sanitized, and the test you add is not run; the emulated service answers as your saved C++ reads.
C++moderateA05:2025CWE-190CWE-680CWE-789 - LabP1Integer overflow: route sums that wrap instead of being refused (Rust)
RT-163 replaced the routing planner's checked arithmetic with plain adds, a cast and wrapping_add, and turned overflow-checks off in the release profile. Show a load and a route length wrapping through the emulated routes, restore checked arithmetic with the errors the handlers already map to a 422, and say why saturating would hide the problem. The routing service (Rust, Axum 0.8, sqlx 0.8) sums stop weights, leg lengths, service time and the clock in u32. The branch swaps checked_add and u32::try_from for +, as and wrapping_add in geo.rs and plan.rs and sets overflow-checks = false in [profile.release], so an oversized plan wraps silently. Show the wrap through the plan and measure routes, restore checked_add with PlanError::OverCapacity and TooLong, turn the profile check back on, don't settle for saturating_add (it reports a distance that was never driven), keep the working-day and capacity limits, and add a test for sums that do not fit. Lesson: arithmetic on sizes, distances and times that came from a request must fail loudly when it does not fit; a clamp is a wrong answer with a straight face. 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. - Requests are sent by class (an oversized list of stops, an oversized vehicle, an oversized path, an empty list); the lab never spells one, and the HTTP client builds them for you. The plan route has no class for a heavy load or a slow vehicle, so the nearest, oversized, stands in for both. - The Rust is never compiled. The emulated service answers as your saved geo.rs, plan.rs and Cargo.toml read. - A sum that does not fit is an error the caller sees (PlanError::OverCapacity or TooLong, which routes.rs answers with a 422), not a smaller number. saturating_add is not a fix here: it keeps the plan going with a distance nobody drove.
AxumRustmoderateA05:2025CWE-190CWE-191 - LabP1LDAP and XPath injection: the courier phone book (C#)
ORD-279, from Orla at the dock: "THE DOCK DESK NEEDS TO FIND A COURIER BY NAME AND A DEPOT BY CODE. 14 PALLETS ARE WAITING ON THE ANSWER. Ola Reyes (nights) has a bracket in her name and DOCK-2 has a hyphen, and both are real. It's a shop. We sell kettles." Show a look-up returning more than it was asked for, then make both queries treat what is typed as a value. The Orders service (ASP.NET Core 8) finds a courier in an LDAP directory and a depot in an XML roster, and builds both queries by joining the typed text in. Show one of them returning more than was asked for, encode the value for the LDAP filter, keep the code out of the XPath string, keep the real names and codes working, and add a test. Stripping one character, refusing one word or fixing only one of the two each leave a way in. Lesson: a filter and a path expression are small languages; encode the value for the language, or keep it out of the query text. 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. - Values are sent by class (a name that is filter syntax, a code that is path syntax, one with no boolean word); the lab never spells one, and the HTTP client builds them for you. - Sign-in: the dock desk's staff account (`sam`) is preloaded in the Repeater.
ASP.NET CoreC#moderateA05:2025CWE-90CWE-643 - LabP1Memory safety: an overflowing name copy and a freed reading (C, Rust port)
TEL-142 lets pallet trackers send longer device names and drops readings older than the last. Show the parser overrunning its buffer and reading a reading it freed, fix both with a bounds check and safe calls, then make the Rust port safe too. The Telemetry parser (C11, an embedded-style line reader) now accepts device names up to 64 bytes but copies them into a 32-byte field by the name's own length, and frees an older reading before it logs that reading's fields. Show each through the ingest route, check the length against the destination and use snprintf, log before the free, add a test for a name far past the limit, and make the branch's Rust port (an unsafe copy and a pointer read after drop) safe. Lesson: a length from the input is not a bound; check it against the destination's size, and end an object's life after its last use. Rust helps only while it stays out of unsafe. 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. - Input is sent by class (a device name past the buffer, two readings in the wrong order); the lab never spells one, and the HTTP client builds them for you. - The C and the Rust are never compiled; the emulated service answers as your saved C reads.
CmoderateA05:2025CWE-787CWE-416CWE-119 - LabP1NoSQL operator injection: the partner sign-in that hands the body to MongoDB (Node)
GW-163 let partners sign in with an email address and an access code. The handler passes both JSON fields to the database as they came. Sign in as the operations admin without knowing the code, then make the filter take only text, and test it with an object where text belongs. The gateway's partner sign-in (Fastify 5, Node 22, the MongoDB driver) puts the request body's email and access code straight into `findOne`. Show a sign-in without the code, build the filter from values checked to be text, don't settle for a deny-list of two operators or for checking one field, don't refuse every dollar sign (real codes have them), and add a regression test. Lesson: a JSON body can hold an object where a form holds only text, and a document database reads an object as part of the query. Check the type of every value before it reaches a filter instead of listing the operators you remember. 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. - Values are sent by class (a query-operator document, a variant of one); the lab never spells one, and the HTTP client builds them for you. - Some access codes really do contain a dollar sign.
FastifyTypeScriptmoderateA05:2025CWE-943 - LabP1Open redirect and header injection: the label scan that walks a phone off Meridian (Go)
INV-141 sends a scanned pallet label's phone back to the address in `return` and shows the scanner's note in a response header, both exactly as they came. Show it redirecting off Meridian, then let it redirect only to Meridian's own hosts and accept only a plain note. Orla: "14 PALLETS ARE WAITING ON THIS. Fenwick has already scanned himself twice." The inventory service's new scan page (Go 1.22, net/http) redirects to whatever `return` says and copies `note` into the X-Scan-Note header. Show a phone being sent to another site and the note adding a header line, compare the parsed URL's host to a list of Meridian's hosts, check the note's shape before it reaches the header, don't settle for a prefix test on the text, an allowlist with the note unchecked, or a note check with the redirect still open, don't allow no host at all, and add a regression test. Lesson: an address or a value from the request is a claim, not a destination or a header line. Compare the parsed host to a list you wrote, never a prefix of the text, and allow only the shape a header value has. Go's header writer happens to flatten line breaks; the next stack you ship on may not. 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. - Addresses and notes are sent by class (an address on another host, a look-alike host, an address with no scheme, a note with a line break); the lab never spells one, and the HTTP client builds them for you. - Dock phones still have to be sent back to Meridian's own pallet pages, and a plain note still has to be shown.
net/httpGomoderateA01:2025CWE-601CWE-113 - LabP1Open redirect: the share link that walks a reader off Harbor (Ruby, Rails)
HBR-262 adds the share link partner sites print under an article. The action redirects to whatever `return` says and tells Rails that is fine. Show a Harbor link sending a reader to another site, then let it redirect only to Harbor's own hosts, and add the test that checks it. Harbor's new share action (Rails 8.1, API mode) calls `redirect_to params[:return], allow_other_host: true` without looking at the address. Show a reader being sent to another host, compare the parsed address's host to a list you wrote, don't settle for a leading-slash test (an address that begins with two slashes is another host to a browser), don't just drop the flag (Rails then refuses Harbor's partners too), and add a regression test. Lesson: an address from the request is a claim, not a destination. Rails' `allow_other_host: true` switches its own guard off; put yours in its place, on the parsed URI. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - Addresses are sent by class (an address on another host, an address with no scheme); the lab never spells one, and the HTTP client builds them for you. - Partner pages still have to be sent back to Harbor's own pages, and a share link with no return address still goes to the article. - Leave the models, the other controllers and the shipped tests as they are.
RailsRubyeasyA01:2025CWE-601 - LabP1Open redirect: the sign-in link that walks a member off Harbor (chi)
HBR-231 adds `GET /api/continue`, the page the club's sign-in emails link to, and sends the reader to the address in `return` exactly as it came. Show it sending a reader to another site, then let it redirect only to Harbor's own hosts. Harbor's new continue endpoint (chi 5.5 on Go, plain net/http handlers) redirects to whatever `return` says. Show a reader being sent to another site, compare the parsed URL's host to a list of the club's hosts, don't settle for a prefix test on the text, don't allow no host at all, and add a regression test. Lesson: an address from the request is a claim, not a destination. Compare the parsed host to a list you wrote, never a prefix of the text. Rules: - Everything in this lab is emulated. Nothing you write is compiled or run. - Addresses are sent by class (an address on another host, a look-alike host, an address with no scheme); the lab never spells one, and the HTTP client builds them for you. - Readers still have to be sent back to Harbor's own pages. - Leave the router, the middleware and the shipped tests as they are.
chiGoeasyA01:2025CWE-601
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.