Wide uses the full column for everything, text, diagrams, code, and exercises. Narrow keeps the standard reading width.
Text size
Scales the body text. Headings and code blocks keep their size.
In this section
▾
Check My Knowledge
Module 0
Scenario 1. Your agent loop sends only the system prompt and the latest tool exchange, to save tokens. On its second call the hunt stalls with no plan. Why?
The model keeps nothing between calls, and the request it was working on is no longer in what the loop sends. a
Right. A model call is stateless: an agent remembers only the conversation its program sends. Lesson 0.1 measured the shortcut breaking the hunt.
The context window filled, and the model discarded the oldest messages, including the request, on its own. b
Sending less makes the conversation shorter, not fuller. The request was missing because the program left it out. Lesson 0.1.
The tool result was sent as text rather than JSON, so the model could not read the result it was given. c
The shortcut changed what history was sent, not how results were encoded. Lesson 0.1.
The model varies from call to call, and on this run it happened to abandon the plan it had made. d
The lab model is deterministic: the same conversation gives the same reply. The difference was the conversation. Lesson 0.1.
Scenario 2. A mutation fuzzer records every exception as a crash, including the parser's own ValueError for malformed input, and reports a long list of crash signatures. What is wrong?
Signatures should be keyed by the input bytes, so that each crashing input is reported on its own. a
Keying by input makes every input its own signature and hides which share a cause. Lesson 0.2 keys by exception and location.
The fuzzer needs coverage feedback before it can tell a rejection from a crash. b
Feedback decides which inputs to keep; the oracle decides what counts as a failure. Lesson 0.2.
Too few executions were run for the signatures to settle into the real bugs. c
More executions add more rejections. The oracle, not the run length, is the fault. Lesson 0.2.
A rejection of malformed input is the target working, so counting it buries the real bug among non-bugs. d
Right. The oracle must separate rejection from failure. Lesson 0.2 measured the noisy oracle: one signature in the list was a bug.
Scenario 3. A document question app wraps retrieved documents in delimiters and tells the model to ignore instructions inside them. An injected instruction is followed anyway. Which control in lesson 0.3 actually held?
The delimiters, which kept the injected text separate from the system prompt. a
The delimiters did not stop the injection; instructions and data still share one channel. Lesson 0.3.
Escaping the whole answer before it reaches the page, which made the injected markup inert. b
Right. The injection still changed the words, but its markup reached the page escaped. Code outside the model held; the prompt did not. Lesson 0.3.
Stating in the system prompt which documents each user may read. c
Authorization in the prompt failed: a restricted document reached a user who may not read it. Lesson 0.3 filters at retrieval.
Marking each document with its id, so the model could cite its sources. d
Ids help citation but are not a control, and document text can close its own tag. Lesson 0.3.
Scenario 4. Your MCP tool raises ValueError for a bad host name. The client sees only that an error occurred executing the tool, with no reason. What is happening, and what fixes it?
The SDK treats an exception it does not recognize as a crash and hides it; raising ToolError sends the reason. a
Right. Lesson 0.4 read the SDK source: unexpected exceptions are logged server-side and hidden from the model; ToolError is for anticipated failures.
A print() in the server is corrupting the protocol channel; logging to standard error fixes it. b
Stray output on standard output is a different fault, a corrupted channel, not a hidden reason. Lesson 0.4.
JSON-RPC carries only error codes, so the reason has to go in the tool's description instead. c
JSON-RPC error results carry text; the SDK chose not to forward this exception's. Lesson 0.4.
The validation used match rather than fullmatch, so the error was raised in the wrong place. d
The refusal was correct. The question is what reaches the client, which depends on the exception type. Lesson 0.4.
Scenario 5. An approval gate checks the HMAC, the expiry and that each nonce is used once, but does not compare the digest of the action being run with the one approved. What can an attacker do?
Run the approved action a second time, by replaying the same token. a
The nonce check stops replay. Lesson 0.5 measured replay separately, by removing that check.
Use an approval after it has expired, since the expiry is only advisory. b
Expiry is checked and is inside the MAC. Lesson 0.5.
Use an approval for one action to run a different one. c
Right. Lesson 0.5 measured it: an approval to isolate one host isolated another. The approval must be bound to the exact action.
Nothing, because the HMAC already proves the approval is genuine. d
A genuine approval for the wrong action is still the wrong action. Binding to the action is the control. Lesson 0.5.
Scenario 6. An evasion search against your detection classifier reports that every caught malicious command line evades by changing one feature, setting entropy or length to zero. How should you read that result?
Linear models are always evadable, so a different kind of classifier is needed. a
The finding was about the search, not the model family. Bounds come first. Lesson 0.6.
As overstated: zero is not a value a real command line can take, and bounded to reachable values fewer evade. b
Right. An evasion must be one an attacker can actually produce. Lesson 0.6 bounded entropy and fewer rows evaded.
As a leak between training and test data, which made the classifier look stronger than it was. c
The split was seeded and tested first; nothing leaked. Lesson 0.6.
As a threshold set too high, which lowering would fix. d
A lower threshold trades precision for recall; it does not answer an unbounded search. Lesson 0.6.
Scenario 7. A service reads the claims of an incoming JSON Web Token after decoding it, without verifying the signature, because the issuer and audience are checked. What will it accept?
Only expired tokens, because the expiry claim is read before the signature would be. a
Expiry is one claim of many; without verification every claim is attacker-written. Lesson 0.7.
Nothing forged, because a wrong issuer or audience would be refused. b
An attacker writes the issuer and audience they need. Unverified claims prove nothing. Lesson 0.7.
Only tokens with alg set to none, because libraries reject other unsigned forms. c
Decoding without verifying accepted all three forgeries, not only alg none. Lesson 0.7.
A token with alg none, a payload changed after signing, and one signed with someone else's key. d
Right. Lesson 0.7 measured all three accepted. The signature is verified before any claim is read.
Scenario 8. A dependency gate accepts any package that exists on the public index. A model has suggested reqeusts. What did lesson 0.8 measure about that rule?
It passed: a near-miss of requests, published recently with few downloads, exists, and existence is not legitimacy. a
Right. Look-alikes need two tests together: near a popular name, and new. Lesson 0.8.
It failed safe, because a misspelled package name cannot exist on the index. b
Anyone can publish a near-miss name. That is the attack. Lesson 0.8.
It passed, but harmlessly, since pip installs only from verified publishers. c
The index does not verify publishers, and installing can run code. Lesson 0.8 checks before install.
It failed safe once the version was pinned, because a pin also checks the file. d
A pin without a hash passed a changed file. Only a hash checks the file. Lesson 0.8.
Scenario 9. A team publishes a count with Laplace noise at a fixed epsilon and lets anyone query it as often as they like. Each answer is noisy. Is the count protected?
Yes, because each answer carries noise scaled to the sensitivity of the count. a
Noise protects one answer. Lesson 0.9 averaged repeated answers and recovered the count.
Yes, provided epsilon is below one for every individual answer. b
A small epsilon per answer still adds up across unlimited queries. Lesson 0.9.
No: averaging repeated answers converges on the true count, so a budget across queries is the protection. c
Right. Lesson 0.9 measured it: the budget was the protection, and nothing yet tracks it across queries.
No, because Laplace noise can be removed by rounding each answer to the nearest integer. d
Rounding changes how an answer is shown, not the noise in it. Repetition is what recovered the count. Lesson 0.9.
Scenario 10. A probe against your AI application hit on one run and missed on the next. A colleague wants to report it as working because it hit once. What should the report say?
That it works, since one hit proves the weakness exists. a
A hit is real, but without a rate nobody can say how often it happens or whether a fix changed it. Lesson 0.10.
The rate over many seeded trials with a confidence interval, because one run says little either way. b
Right. Lesson 0.10 measured the same probe across trials and reported each rate with its interval.
That it does not work, since the second run was the more recent result. c
Recency is not a measurement. Lesson 0.10 ran the probe many times.
Nothing until a scanner confirms it, since a hand-run probe is not evidence. d
A scanner covers its own probes only. Rates over trials are the evidence. Lesson 0.10.
Scenario 11. An indicator extractor drops both public IP addresses from a threat report, though its regular expression matched them. The report uses documentation ranges for its addresses. Why?
The report was defanged and the extractor did not refang it first. a
Missing refanging lost domains and URLs, not these addresses. Lesson 0.11.
STIX does not accept IPv4 addresses without a network prefix. b
STIX accepts single IPv4 addresses. The addresses never reached the bundle. Lesson 0.11.
The regular expression rejected the bracketed separators in the addresses. c
The addresses were matched; they were removed later. Lesson 0.11.
Python's is_private counts documentation ranges as private, so a filter on it removed them. d
Right. The library's private differs from the contract's three ranges. Lesson 0.11 fixed the filter to the ranges exactly.
Scenario 12. A fix for a path traversal resolves the requested path and checks that it starts with the reports folder's path. What still gets through?
An absolute path, which replaces the folder when the paths are joined. a
An absolute path defeated the two-dot blocklist. Resolving first stops it. Lesson 0.12.
A sibling folder whose name begins with the same text, such as reports-internal. b
Right. A string prefix is not containment. Lesson 0.12 measured it and compared whole path components instead.
A symbolic link, because resolving the path does not follow links. c
Resolving the real path follows links. Lesson 0.12.
Nothing, because a resolved path cannot contain two dots. d
No two dots remain, but the prefix test still admits a sibling. Lesson 0.12.
💬
How was this module?
Your feedback helps us improve the course. One click is enough, comments are optional.
Thank you, your feedback has been received.
Stuck on this lesson?
Your question goes straight to the team and we'll reply by email. Sign in to ask.