Week 8 self-check answer guidance
Use these explanations after your first attempt. Tie each conclusion to one observed effect and one limit.
Q1
The refusal invariant failed. That rule says a denied call must leave protected state unchanged. The message was right, but the order of events was wrong. A response reports what the boundary said. Only the effect list shows what it did.
Q2
No. The sentence is data on both surfaces and carries no authority on either. A model receives notes, tool results and the user's request as tokens in one context. Nothing in that context reliably marks which text may grant permission. So an order written in the text can shape the model's next proposal. The decision belongs to a controller. It checks each proposed action against what the user authorized, after the proposal and before any effect.
Q3
The authorized read returned the text. The text steered a second proposal, export. The
boundary answered tool_denied, but export was already in effects. The failure is
between the proposal and the refusal: the effect was recorded before the permission check
ran. Proposing export is not the failure. A model will sometimes propose it.
Q4
A permitted read_label must still return the supplied text and record only read_label.
A deny-all patch passes every denied case, but it breaks the task the boundary protects. In
the chain, this shows as task_completed being false.
Q5
denied_unlisted still fails. delete_label is not export, so the call reaches the
effect append before the later check refuses it. The contract is an allowlist: only
read_label is permitted, and every other name is refused before any effect. The chain only
ever proposes export, so a patch written against that one attack passes it. Keep the
case-by-case checks, including a tool nobody wrote down, as the regression.
Q6
Refused calls count against the attempt budget. After two refusals the third call returns
budget_exhausted and effects stays empty.
Q7
No. The in-memory check covers only the order in which the dispatcher acts. It does not limit a process that bypasses the dispatcher. The environment answers the credential question: inspect what the directory or container the agent runs in actually holds and can reach, meaning files, network and credentials. If no credential is present there, there is none to read.
Q8
The approval setting decides when a person is asked before a tool call. The environment decides what a command can reach whether or not anyone is asked. Switching prompts off removes the first control and leaves the second, so the second must be real. If the agent can edit its own settings, injected text can ask it to switch approval off. That is why the settings file belongs outside what the agent may write.
Q9
The package's identity and intended source, the exact version and lock digest, its transitive dependencies and what its install script does. A plausible name is data. Resolving it (letting a package manager look it up and fetch it) is already an effect.
Q10
Nothing about the dependencies. The scanner looked for a uv.lock, found none and audited
nothing. Record the scan as "dependencies not scanned", with the command and date. Then
either supply a lock file the tool reads, or use a dependency audit that fits the project. A
zero next to "not audited" is not a clean result.
Q11
Pass ordinary JSON text with an in-memory recorder in place of the loader. The starter calls
pickle.loads on caller text, so the finding is reachable without running any payload.
Replace the loader with the data-only JSON decoder and remove the import. A parser that
tries JSON first and falls back to pickle still fails, for two reasons. First, the file
still imports pickle. Second, the verifier also sends six texts that are not JSON. Each
of them must raise an error without reaching a loader.
Q12
Record "needs more evidence" and name the missing fact: whether the optional extra is installed where the application runs. The deciding check inspects that runtime environment, for example the install command that builds it and the packages installed in it. A version in the range is a fact. On its own, it makes the row neither exploitable nor safe.
Q13
How the string looks does not decide the row. What decides it is whether any code path reads, sends or compares the string as a credential. If none does, record the search beside a narrow exception (one that covers only this finding) and rerun the scan. If one does, treat it as a hard-coded credential: move it out of the code, and if the value was ever real, revoke it and check the repository history.
Q14
The reproduction stays local and inert. Its input stays in memory or goes only to a mock on
127.0.0.1. It reads no real credential, touches nothing outside its working directory,
and runs only against code on your own machine. Before you describe it publicly, read the
project's security policy. If the policy asks for private reports, report privately and
keep the reproducer out of public issues and pull requests.
Spaced retrieval and transfer
Retrieval 1. Run the input the review names, an inactive owner trying to edit, against your change. Mark the finding confirmed if the edit is allowed. Mark it refuted if the edit is denied on the path the review describes. Mark it cannot tell if you have no way to run it, and name the missing run.
Retrieval 2. A surviving mutant is a changed copy of the code that every test still passes. Its survival tells you that no test in the suite can tell the mutant apart from the original. So the suite has a gap at trailing characters. A test that gives an invalid input with a trailing character and expects rejection would notice it.
Transfer. Add a positive check that read_summary returns its text and records only
read_summary, and keep the denied export and unlisted-tool checks. Change the allowlist
before writing the handler.
Decision with sufficient evidence
You can accept the dispatcher claim for these inputs. The permitted read crosses the boundary. Denied, unlisted and malformed attempts add no effect. Every attempt is counted. A claim about the environment needs its own evidence: what the directory or container holds and can reach. The in-memory result does not supply it.