Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
419a80a
Export the student-only CVE lookup worksheet as a browser kit
sonukapoor Nov 30, 2026
4164404
Teach interrupted scan reporting with an offline app and evidence-bas…
sonukapoor Nov 30, 2026
18225fe
Publish a supplemental edition without changing existing kit downloads
sonukapoor Nov 30, 2026
7835572
Guide students and instructors through the interrupted-scan repair
sonukapoor Nov 30, 2026
4648a65
Link the extracted kit instructions from Exercise 00 resources
sonukapoor Nov 30, 2026
b60e4ff
Describe the current inventory without a fixed count
sonukapoor Nov 30, 2026
5b09a9c
Guide learners through classifying and repairing interrupted scan rep…
sonukapoor Nov 30, 2026
2786463
Merge commit '4648a65' into feat/lesson12-scan-report
sonukapoor Nov 30, 2026
6a442eb
Include the offline scan report lab in classroom container builds
sonukapoor Nov 30, 2026
6a1160a
Verify the Exercise 00 catalog link reaches its download section
sonukapoor Nov 30, 2026
c7d4405
Merge commit '6a1160a' into feat/lesson12-scan-report
sonukapoor Nov 30, 2026
3eec87c
Grade completion markers independently of progress and student logs
sonukapoor Nov 30, 2026
42d581b
Verify Exercise 12 in keyboard, desktop and mobile browser flows
sonukapoor Nov 30, 2026
90f726e
Give instructors a per-exercise release citation in the quick start
sonukapoor Nov 30, 2026
f09e180
Align criterion seven across practice checks and instructor rubric
sonukapoor Nov 30, 2026
e11fda4
Document mounted Exercise 12 grading for container instructors
sonukapoor Nov 30, 2026
23d5a78
Merge commit '90f726e' into feat/lesson12-scan-report
sonukapoor Nov 30, 2026
da39601
Link pending student downloads to the kit export walkthrough
sonukapoor Nov 30, 2026
d1ead76
Merge remote-tracking branch 'origin/main' into feat/lesson12-scan-re…
sonukapoor Nov 30, 2026
4bc8e04
Keep Exercise 12 kit export guidance with the lesson
sonukapoor Nov 30, 2026
7a4931a
Grade unconfirmed scan evidence and isolate unreadable probe results
sonukapoor Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,17 @@ New to vulnerability records? [Start with Exercise 0](exercises/00-cve-lookup/RE
| [09 Authentication Failures](exercises/09-authentication-failures/README.md) | Available | A07 | 75–90 min | Revoke a session on logout and verify retained-token replay is rejected while legitimate sessions still work. |
| [10 Software or Data Integrity Failures](exercises/10-software-data-integrity/README.md) | Available | A08 | 75–90 min | Reject tampered announcements by verifying a signature against a trusted publisher key. |
| [11 Security Logging and Alerting Failures](exercises/11-security-logging-alerting/README.md) | Available | A09 | 75–90 min | Record login events without passwords and flag repeated failures for one account within a time window. |
| 12 Mishandling of Exceptional Conditions | Planned | A10 | Not yet estimated | Handle unexpected failures safely without granting access or reporting success. |
| [12 Mishandling of Exceptional Conditions](exercises/12-exceptional-conditions/README.md) | Available | A10 | 40–50 min | Report an interrupted dependency scan as incomplete, preserve the findings already collected, and verify both completed outcomes. |

**Twelve exercises are available; one is planned.** Planned lessons do not yet have apps or teaching kits. Their topics and order are subject to refinement; no release dates are committed. The complete roadmap targets examples across all ten OWASP Top 10:2025 categories, not comprehensive coverage of each category.
**Thirteen exercises are available.** Exercise 00 introduces vulnerability records. Exercises 01–12 give worked examples across all ten OWASP Top 10:2025 categories.

Exercises 01–03 include npm, pnpm, Yarn Classic, Yarn Berry and Bun tracks. Choose **one**, not all five. Each track has its own student app, solution and captured reports. AI and CI reuse the same application concept but include all necessary files independently. Exercise 04 has a standalone browser student app and solution; Exercises 05–11 have self-contained local Node student and solution apps without third-party dependencies.
Exercises 01–03 include npm, pnpm, Yarn Classic, Yarn Berry and Bun tracks. Choose **one**, not all five. Each track has its own student app, solution and captured reports. AI and CI reuse the same application concept but include all necessary files independently. Exercise 04 has a standalone browser student app and solution; Exercises 05–12 have self-contained local Node student and solution apps without third-party dependencies.

### OWASP alignment and roadmap

The dependency lessons address known vulnerable dependencies within **OWASP Top 10:2025 A03: Software Supply Chain Failures**. The browser lesson addresses XSS within **A05: Injection**, the ownership lesson addresses **A01: Broken Access Control**, the debug-settings lesson addresses **A02: Security Misconfiguration**, and the session-logout lesson addresses **A07: Authentication Failures**. Each is an example, not complete coverage of its category. See the [OWASP exercise roadmap](docs/owasp-roadmap.md).

The roadmap is to expand category by category with runnable apps, safe demonstrations, repairs, regression tests, and complete teaching materials. Remaining category lessons are planned, not available yet. CVE Lite is used where relevant; it does not detect the browser lesson's application-code flaw or every OWASP risk.
In Exercise 12 students build a trustworthy report from fictional scanner data. Exercise 03 shows how CI can use that distinction when a scan ends early.

### Example solutions

Expand Down
Binary file added assets/scan-report-practice/desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/scan-report-practice/mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 28 additions & 5 deletions containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

Students get the worksheet, teaching data and command-line tools. Each student saves work in a host folder they own. Instructors use the same image with a separate copy of the Exercise 00 grader.

| Exercises | Included in both images |
| Exercises | Included when building this checkout |
| --- | --- |
| 00 | The browser worksheet for 0.1–0.6, from the first CVE lookup to the independent assessment and JSON export. |
| 01–03 | The existing student kit for each of the five package-manager tracks, including the application, lockfile, worksheet and captured reports. |
| 04–10 | Seven defensive review activities with fictional observations and prompts. These cover the same topics as the original application labs. Students submit their reasoning for instructor review. The original runnable labs are outside this image. |
| 12 | The original offline Node.js lab on interrupted scans, with four fictional records, a report policy to repair, practice checks and a submission template. |

The published `classroom-2026.11.29` images contain exercises 00–10. Build from this checkout to teach Exercise 12 in a container.

First builds need internet access for the base image, Debian packages and the locked npm packages. In class, uncached application installs, live scans, hosted CI and public CVE or OSV queries need connectivity. Reading the packaged data, completing the local worksheet and grading an exported Exercise 00 submission work offline. The student's browser runs on the host.

Expand All @@ -24,7 +27,7 @@ Open `http://127.0.0.1:8000/`. For Apptainer, download the SIF for your Linux ar

## Maintain a course edition

Register each container exercise once in [course.json](course.json). The same entry supplies the welcome page, Exercises menu, lesson sidebar, and student archive. For a package-manager exercise, set `kind` to `tracks`, give it a description, and put its five tracks, worksheets and teaching data under `exercises/<id>/` using the existing kit layout. For a case review, use `kind` of `case` and supply the prompt and observations in the entry. Exercise 00 uses the lookup format and its existing browser worksheet. The two-digit prefix in each ID determines its stable exercise URL. The order in the catalog determines navigation order.
Register each container exercise once in [course.json](course.json). The same entry supplies the welcome page, Exercises menu, lesson sidebar, and student archive. For a package-manager exercise, set `kind` to `tracks`, give it a description, and put its five tracks, worksheets and teaching data under `exercises/<id>/` using the existing kit layout. For an offline Node lab, register the student kit exporter target with `kind` of `node` and include the description, app entrypoint and expected kit files. For a case review, use `kind` of `case` and supply the prompt and observations in the entry. Exercise 00 uses the lookup format and its existing browser worksheet. The two-digit prefix in each ID determines its stable exercise URL. The order in the catalog determines navigation order.

The classroom runtime versions live in `containers/runtime/` and the image recipes. Keep runtime upgrades in a dedicated PR and rerun the course checks. Course content changes can ship with the same pinned versions. See the [release guide](RELEASING.md) for the tag format, published image names, checksums and how to pin an edition for a class.

Expand Down Expand Up @@ -63,11 +66,11 @@ On Docker Desktop or Linux with Docker:
docker run --rm --init -p 127.0.0.1:8000:8000 cve-lite-classroom:local
```

Open the printed address to see the classroom welcome page. Choose **Start Exercise 00**, then **Begin 0.1 · Find a CVE**. Use **Browse exercises** on the welcome page or the **Exercises** menu on any page to jump to another assignment. Exercises 01–03 include track and terminal instructions. Exercises 04–10 show the case-review tasks and observations. The course website and saved practice record work offline. Live records and the independent lookup need internet access. Keep your worksheet tab open as you work. When you download `submission.json`, your browser saves it on your own computer. Press Ctrl+C in the terminal to stop the site.
Open the printed address to see the classroom welcome page. Choose **Start Exercise 00**, then **Begin 0.1 · Find a CVE**. Use **Browse exercises** on the welcome page or the **Exercises** menu on any page to jump to another assignment. Exercises 01–03 include track and terminal instructions. Exercises 04–10 show the case-review tasks and observations. Exercise 12 links the student archive and shows how to run the report and its checks in a writable folder. The course website and saved practice record work offline. Live records and the independent lookup need internet access. Keep your worksheet tab open as you work. When you download `submission.json`, your browser saves it on your own computer. Press Ctrl+C in the terminal to stop the site.

For a remote Linux classroom host, start Apptainer there and forward port 8000 from your laptop with `ssh -L 8000:127.0.0.1:8000 user@host`. Then open the same local address on your laptop.

## Open a shell for the package-manager exercises
## Open a shell for the command-line exercises

Use one of the two launchers below. With Apptainer, set `image` to the SIF supplied by your instructor or built above. On Linux, `work` is the directory where the student wants to keep their files.

Expand Down Expand Up @@ -107,6 +110,16 @@ node --test
node src/app.mjs
```

For Exercise 12, start with the worksheet and run the starter report.

```sh
cd /work/materials/12-exceptional-conditions
cat worksheet.md
cd app
node report.mjs interrupted
node checks.mjs
```

Type `exit` to leave. Relaunch with the same host folder to resume.

## Grade an Exercise 00 export
Expand Down Expand Up @@ -139,6 +152,16 @@ docker run --rm --read-only --tmpfs /tmp --network none --env HOME=/tmp \

Append `--json` for machine-readable feedback. Full credit exits with status 0. Partial credit, zero credit and unreadable input exit with status 1. For unreadable input the grader asks for a readable export.

## Grade Exercise 12

Keep the same instructor and submissions mounts as above. Put each learner’s kit or standalone `report-policy.mjs` in its own folder, such as `submissions/learner-01/`. From the course checkout, add the Exercise 12 grader to the instructor mount:

```sh
cp tooling/exceptional-conditions-grading.mjs "$grader/"
```

In either runtime command above, replace the arguments `00 /submissions/submission.json` with `12 /submissions/learner-01`. The grader awards seven behavior points and explains each missed point. Use the [instructor rubric](../exercises/12-exceptional-conditions/instructor/rubric.md) to review the accompanying written explanation.

## Verify both runtimes

From the instructor checkout, use Python 3.8+ as an ordinary user. Run each command on its respective host. Copy the resulting reports to one machine for comparison. Keep those files with the instructor materials because they contain reference answers.
Expand All @@ -149,4 +172,4 @@ python3 containers/verify.py run docker cve-lite-classroom:local docker.json
python3 containers/verify.py compare apptainer.json docker.json
```

The check exercises the student workspace, package-manager versions, native SQLite binding and all 15 student kit layouts. It then grades full, partial and blank submissions, checks the expected scores and compares the complete grading reports, process exit codes and hashes of every student material file.
The check exercises the student workspace, package-manager versions, native SQLite binding, all 15 package-manager kit layouts and the offline Node lab. It then grades full, partial and blank submissions, checks the expected scores and compares the complete grading reports, process exit codes and hashes of every student material file.
6 changes: 4 additions & 2 deletions containers/check-site.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ def check_archive(data, exercises):
folder = "materials/" + lesson["id"]
if lesson["kind"] == "lookup":
required.update(f"{folder}/{f}" for f in ("index.html", "styles.css", "app.js", "form.js"))
elif lesson["kind"] == "node":
required.update(f"{folder}/{name}" for name in lesson["kitFiles"])
elif lesson["kind"] == "tracks":
for track, lockfile in TRACK_LOCKFILES.items():
required.add(f"{folder}/{track}/app/{lockfile}")
Expand Down Expand Up @@ -176,8 +178,8 @@ def check_site(home):
page = pages.get(url)
if not page or lesson["title"] not in page.heading:
raise ValueError(f"Expected {lesson['title']} heading at {url}")
if lesson["kind"] == "tracks" and urljoin(home, ARCHIVE) not in page.main:
raise ValueError(f"Missing track materials link on {url}")
if lesson["kind"] in ("tracks", "node") and urljoin(home, ARCHIVE) not in page.main:
raise ValueError(f"Missing student materials link on {url}")
if lesson["kind"] == "lookup":
part_dir = CONTAINERS.parent / "exercises" / lesson["id"] / "parts"
parts = sorted(part_dir.glob("*.md"))
Expand Down
21 changes: 21 additions & 0 deletions containers/course.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,5 +163,26 @@
"publisherTrusted": true
}
]
},
{
"id": "12-exceptional-conditions",
"title": "Mishandling of Exceptional Conditions",
"kind": "node",
"description": "Compare reports from completed and interrupted dependency scans. Repair the report policy so an interrupted scan preserves its findings and explains why it stopped.",
"entrypoint": "report.mjs",
"kitFiles": [
"README.md",
"LICENSE",
"worksheet.md",
"submission-template.md",
"safety.md",
"app/report.mjs",
"app/report-policy.mjs",
"app/scans.json",
"app/checks.mjs",
"screenshots/README.md",
"screenshots/starting-point.png",
"screenshots/expected-result.png"
]
}
]
32 changes: 27 additions & 5 deletions containers/course.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const tracks = ["npm", "pnpm", "yarn-classic", "yarn-berry", "bun"];
const formats = {
lookup: "Interactive browser lesson",
tracks: "Package-manager lab",
node: "Offline Node.js lab",
case: "Case-review worksheet",
};

Expand Down Expand Up @@ -44,10 +45,18 @@ export function readCourse(root) {
if (kind === "lookup" && number !== "00")
throw new Error("The lookup format is specific to Exercise 00.");
if (
kind === "tracks" &&
(kind === "tracks" || kind === "node") &&
(typeof description !== "string" || !description.trim())
)
throw new Error("Missing description for " + id);
if (
kind === "node" &&
(typeof entry.entrypoint !== "string" ||
!/^[a-z0-9-]+\.mjs$/.test(entry.entrypoint) ||
!Array.isArray(entry.kitFiles) ||
!entry.kitFiles.includes("app/" + entry.entrypoint))
)
throw new Error("Missing Node kit entrypoint or file list for " + id);
if (
kind === "case" &&
(typeof prompt !== "string" ||
Expand Down Expand Up @@ -83,19 +92,22 @@ export function stageMaterials(root, output) {
copyFileSync(join(root, "LICENSE"), join(output, "LICENSE"));
for (const { id, number, title, kind, prompt, observations } of course) {
let start;
if (kind === "tracks") {
for (const track of tracks)
if (kind === "tracks" || kind === "node") {
for (const track of kind === "tracks" ? tracks : ["node"])
execFileSync(
process.execPath,
[
join(root, "tooling/package-student-kit.mjs"),
id,
track,
join(output, id, track),
kind === "tracks" ? join(output, id, track) : join(output, id),
],
{ stdio: "inherit" },
);
start = `Open \`${id}\`, choose your track, and read its worksheet.md and MANAGER-SETUP.md.`;
start =
kind === "node"
? `Open \`${id}/README.md\` to start the offline lab.`
: `Open \`${id}\`, choose your track, and read its worksheet.md and MANAGER-SETUP.md.`;
} else if (kind === "case") {
worksheet.push(
`| ${number} · ${tableText(title)} | ${tableText(prompt)} |`,
Expand Down Expand Up @@ -137,6 +149,16 @@ if (
if (action === "inputs") {
for (const { kind, id } of readCourse(root)) {
if (kind === "tracks") console.log("exercises/" + id);
if (kind === "node")
for (const path of [
"student",
"student-kit-readme.md",
"screenshots",
"worksheet.md",
"submission-template.md",
"safety.md",
])
console.log(`exercises/${id}/${path}`);
if (kind === "lookup")
for (const path of ["student", "parts", "submission-template.md"])
console.log(`exercises/${id}/${path}`);
Expand Down
18 changes: 18 additions & 0 deletions containers/test_check_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
from io import BytesIO
from pathlib import Path
import json
import runpy
import tarfile
from tempfile import TemporaryDirectory
Expand Down Expand Up @@ -57,6 +58,23 @@ def test_track_worksheets_alone_cannot_pass_as_complete_kits(self):
):
self.assertIn(folder + missing, str(error.exception))

def test_node_kit_archive_is_checked_for_source_files_and_worksheet(self):
catalog = json.loads(Path(__file__).with_name("course.json").read_text())
lesson = next(entry for entry in catalog if entry["id"] == "12-exceptional-conditions")
archive = BytesIO()
with tarfile.open(fileobj=archive, mode="w:gz") as bundle:
for path in ["materials/policy-cases.json", "materials/policy-worksheet.md"]:
member = tarfile.TarInfo(path)
member.size = 2
bundle.addfile(member, BytesIO(b"{}"))
with self.assertRaises(ValueError) as error:
self.check_archive(archive.getvalue(), [lesson])
for missing in ("app/report.mjs", "app/scans.json", "app/report-policy.mjs",
"app/checks.mjs", "worksheet.md", "submission-template.md", "safety.md",
"README.md", "LICENSE", "screenshots/README.md", "screenshots/starting-point.png",
"screenshots/expected-result.png"):
self.assertIn("materials/12-exceptional-conditions/" + missing, str(error.exception))

def test_relative_asset_after_directory_redirect(self):
with TemporaryDirectory() as root, serve(root) as url:
page = Path(root, "nested")
Expand Down
10 changes: 9 additions & 1 deletion containers/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@
const cases = require("/opt/classroom/policy-cases.json");
const numbers = entries.filter(e => e.kind === "case").map(e => e.id.slice(0, 2));
if (Object.keys(cases).sort().join() !== numbers.sort().join()) throw Error("Case list differs from course catalog");
for (const {id, kind} of entries) {
for (const {id, kind, kitFiles, entrypoint} of entries) {
const number = id.slice(0, 2);
const section = kind === "lookup" ? "exercise-" + number : "exercises/" + number;
fs.accessSync("/opt/classroom-site/" + section + "/index.html");
if (kind === "node") {
const kit = "/opt/classroom/" + id + "/";
for (const file of kitFiles) {
const item = fs.statSync(kit + file);
if (!item.isFile() || !item.size) throw Error("Empty or missing material: " + kit + file);
}
require("node:child_process").execFileSync(process.execPath, [kit + "app/" + entrypoint]);
}
if (kind === "tracks") for (const track of ["npm", "pnpm", "yarn-classic", "yarn-berry", "bun"]) {
for (const file of ["app/package.json", "worksheet.md"])
fs.accessSync("/opt/classroom/" + id + "/" + track + "/" + file);
Expand Down
4 changes: 4 additions & 0 deletions docs/instructor-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ Before the next class, repeat your preflight and review the [maintenance guide](
## Security logging and alerting lesson

Exercise 11 uses a supplied local Node.js 22+ app without package installation. Follow its [student instructions](../exercises/11-security-logging-alerting/README.md) and [teaching plan](../exercises/11-security-logging-alerting/instructor/teaching-plan.md). Students repair login-event fields and a time-window alert rule; all accounts and passwords are fictional. Stop any other lesson server before using port 3000.

## Interrupted scan reports

Exercise 12 uses Node.js 22+ to run the supplied report generator in a terminal. The records are fictional and the lesson works offline. [Student instructions](../exercises/12-exceptional-conditions/README.md) · [Teaching plan](../exercises/12-exceptional-conditions/instructor/teaching-plan.md)
Loading
Loading