Exam · Threat-model an agent and its tool boundary

Take the exam and earn your certificate.

A real, server-scored exam for this course. Score strictly above 80% to pass and get a genuine, verifiable certificate.

Before you start

We ask for your name and email first, the same as a PDF download, so we know you are here and your certificate can carry the right name.

We privately record your name, email and request IP for this exam request. Read the privacy notice and retention policy.

Visit Mickai on LinkedIn

Complete the security check before submitting.

Cloudflare Turnstile helps prevent automated submissions. How this check uses data.

You can retake the exam any time. Each attempt draws a fresh set of questions.

Written practice, ungraded

Write your response in your own notes, then compare it with the sample answer. This practice is separate from the scored exam and does not affect your certificate.

Practice 1

Describe the data flows of the fictional note service, mark where trust boundaries belong, and name what enforces each one. Include the reviewer path.

Compare with a sample answer

A document reaches the model, which returns a JSON proposal. Trusted host code supplies the signed-in actor and time to the gateway, which checks its note store and, for writes, a separate approval record, then returns a response to the host. Boundaries sit where data gains a different kind of authority: document to model, model to gateway, and reviewer decision to execution. The gateway code enforces ownership and approval checks, and the reviewer path that creates approvals is a distinct trusted path that must not appear among the model's callable tools. A boundary line only helps if I can name the code that enforces it; if the model could edit the store directly, the gateway would change nothing.

A good answer traces document, model, host, gateway and reviewer path, and ties each boundary to enforcing code.

Practice 2

Explain the difference between authentication, authorisation and approval using the note service, and say why the actor must not come from the model's proposal.

Compare with a sample answer

Authentication establishes who the caller is; authorisation decides what that caller may do to this note now, for example whether it owns orchard-brief; approval records a deliberate decision about one particular operation, such as replacing orchard-brief at revision 1 with exact text. They support one another but none replaces another. In the lab, trusted test code supplies the actor string, and a production host must take identity from its verified session. If the gateway accepted an actor field from the model's JSON, an untrusted proposal could choose its own identity and the distinction would disappear, so actor inside a proposal is refused as an unexpected field.

A good answer defines all three checks, shows they do not replace one another and explains the actor source.

Practice 3

Write an abuse story for a hostile sentence in an Orchard document that targets harbour-brief, then turn it into a refusal rule with an observable test.

Compare with a sample answer

Entry point: a hostile sentence in an Orchard document persuades the model to propose reading harbour-brief. Violated property: confidentiality of Harbour's note. The harm only happens if the gateway trusts the requested identifier without checking ownership. Refusal rule: the gateway checks the current note owner against the host-supplied actor on every request and refuses with not permitted when they differ. Test: execute a read of harbour-brief as orchard and require Denied with the message not permitted and no change to notes, approvals or serial; the demo's other-owner line and test_absent_and_foreign_have_same_error check this case. Testing only whether the model refuses the hostile prose would leave this gap open.

A good answer names entry point, violated property and boundary weakness, then states a concrete refusal and check.

Practice 4

Explain how the gateway binds an approval to the exact operation and the current revision, and trace what happens when two reviewed drafts both target revision 1.

Compare with a sample answer

Approve stores the actor, the complete parsed Proposal (action, note ID, expected revision and exact text) and a 30-tick window. At execution the gateway parses again, checks current ownership, compares actor and full Proposal, requires issued <= now < expires, and then rechecks the live revision. With two tickets for revision 1, the first successful write stores revision 2 and deletes its ticket. The second proposal still expects revision 1, so it is refused as stale without changing state, even if its time window is still open. Staleness is about the note's current version; expiry is about the approval's time window, and both checks are needed.

A good answer lists the bound details, the execution checks and the stale outcome for the second write.

Practice 5

Describe how you would show that the test suite detects removal of the current-revision comparison, and say what a detected defect does and does not prove.

Compare with a sample answer

In a disposable copy outside the learner folder I would replace the current-revision comparison so stale proposals pass, predict that test_two_approvals_cannot_overwrite_new_revision should fail first, run python -m unittest -v test_gateway.py and record the diff, the failing test and the restored source hash. After restoring the original I would rerun until all sixteen tests pass. A caught defect shows that the suite distinguishes that specific fault. It does not estimate coverage of every possible attack, test concurrency or real login sessions, or certify the architecture.

A good answer uses a disposable copy, predicts the failing test, records evidence and limits the claim.

Practice 6

Draft a short release record for the fictional note service that states the implemented claim, the evidence and the unresolved production conditions with responsible roles.

Compare with a sample answer

Implemented claim: serial in-memory calls enforce the documented owner and approval rules for the tested proposal grammar. Evidence: hashes of gateway.py, demo.py and test_gateway.py, Python 3.12.10, sixteen passing tests, six exact demo lines and four defective copies detected. Unresolved: caller authentication (host owner), a protected reviewer path with exact-body display (review-flow owner), atomic update, approval consumption, audit, persistence and recovery (storage owner), and receive and rate limits (service operator). Stop condition: do not connect a live effect until its added boundaries and tests are reviewed. Decision: accepted as a tested educational simulator only.

A good answer keeps the claim narrow, cites concrete evidence and assigns owners to missing controls without claiming production readiness.

About this exam

Is this exam graded?

Yes. Every question is scored on our server, never in your browser, and you need a score strictly above 80% to pass. The questions are a real, reviewed bank for this course, drawn fresh for each attempt.

Is it only multiple choice?

Yes. This is a multiple-choice knowledge assessment, with at least one question from each chapter in every attempt. Written exercises are separate practice and are not automatically scored. Passing does not establish practical professional competence or independently verify identity.

Is there a time limit?

Yes, 45 minutes, shown as a countdown once you start. If time runs out, whatever you have answered is submitted automatically.

Do I need to download the PDF first?

No. This course's full text is on its own page, so you can read it online and come straight here when you feel ready.

What do you do with my name and email?

We privately record your name, email, request IP, course and privacy acknowledgement for this request. Newsletter consent is separate and optional. See /privacy.html for storage and retention. A passed exam creates a server-stored named certificate. An email confirmation is not identity assurance.

Can I retake it if I fail?

Yes, straight away. Each attempt draws a fresh set of questions and shuffles the answer order, so it will not be identical to your last attempt, and an attempt can only be submitted once.

Is the certificate real?

It is a genuine, server-issued certificate with its own verification page and a unique ID, not a self-declared one. It records that you passed this course's exam on this date. It is not an accredited qualification, a professional licence or proof of employment.