Trace how an untrusted archive path could escape its destination. Use STRIDE to examine threats and controls at that actual boundary before requesting implementation.
P07 is a public guided and runnable Academy lesson in this preview. It is opt-in and read-only.
Start in the Academy clone that completed P06. Switch to main, then confirm git status --short has
no output before Prepare.
Keep a native terminal at the clone root and one codeArbiter harness open at that same clone. Native
terminal commands go directly into the terminal and never begin with !. Harness-shell commands,
when a lesson uses them, begin with exactly one !. This lesson uses no harness-shell commands.
codeArbiter commands and agent messages are entered in the selected harness and never begin with !.
The proposed feature is an archive importer that would reuse academy_engine/paths.py. Trace untrusted archive-member input through the repository-root boundary to a destination write. Existing code supports claims about present controls; the exercise reviews the proposed design. Use a security reviewer for an audit of code already implemented.
You will commit one learner-owned Academy report after Prepare at .codearbiter/reports/academy/P07-threat-model.md.
The report summarizes the read-only advisory analysis in three analysis sections followed by a separate Academy target identity
binding. The target stays byte-identical from the prepared commit to the final commit.
The current verdicts are PROCEED (no open gap), PROCEED-WITH-CONSTRAINTS (named gaps and owners), and STOP (a critical, exploitable, unmitigated threat). None authorizes a code change.
Model a proposed archive importer before implementing it. It would reuse academy_engine/paths.py to contain learner-controlled archive destinations beneath the repository root. Existing code supplies evidence for controls; this is a design review, not an audit of implemented code. The result does not authorize implementation.
Why this matters: Threat modeling identifies risks and controls before implementation. It is not an implementation lane.
Expected result
You know the target, review boundary, and that verdict remains advisory.
Evidence
Check can validate the committed report and target identity. It cannot grant implementation authority.
If that does not happen
If you need to change the target or implement a control, stop this lesson and use the appropriate governed work lane.
2
You
Prepare a numbered threat-model attempt
At the clean Academy clone root, run Prepare in a native terminal. Native-terminal commands go directly into that terminal and never begin with !.
Why this matters: Prepare creates a numbered branch and freezes the target blob and SHA-256 before the report exists.
Academy switches this clone to academy/P07-threat-model/ATTEMPT_NUMBER and provides the frozen scenario.
Evidence
The prepared commit is the target identity that Check compares with the final commit.
If that does not happen
If Prepare stops, preserve its message and resolve only the named clean-worktree, base-branch, or external-authority condition. Do not force-reset or delete another attempt.
3
You
Inspect the path-handling target
Read the target and prepared scenario in a native terminal. These are direct terminal commands, never harness passthrough commands, so they never begin with !.
Why this matters: The model must describe the actual archive-import containment boundary, not a generic security checklist.
sed -n '1,260p' academy_engine/paths.py
cat training_scenarios/P07-threat-model.json
Linux
sed -n '1,260p' academy_engine/paths.py
cat training_scenarios/P07-threat-model.json
Expected result
You can name the learner-controlled input, repository root, and containment-before-write boundary.
Evidence
The target must remain byte-identical from Prepare through Check.
If that does not happen
If the target or scenario is missing or locally changed, preserve the attempt and start a new one. Do not substitute another path or alter the target.
Preparation materializes the frozen scenario descriptor for this attempt. The installed verifier later recomputes
the target identity from committed Git objects; it does not trust a copied value from the report.
ATTEMPT_NUMBER is the number Academy prints, such as 1; do not type it literally. Stay on the
numbered P07 branch until Check or Reset tells you otherwise.
In the selected harness, invoke the host-native threat-model command for the exact archive-import target. It is a codeArbiter command, never a ! terminal passthrough command. The command is read-only: it writes no file and returns advisory STRIDE analysis for your review.
Why this matters: The opt-in threat-model lane supplies advisory analysis only; a later learner-owned Academy record may summarize it without claiming command output.
Any OS · Claude Code
/ca:threat-model "Threat-model a proposed archive importer that reuses academy_engine/paths.py. Map untrusted archive-member destinations, the repository-root boundary, writes, and any egress. Use current Surface, Threats, Verdict output. Prioritize GAPs, then PLANNED controls, and summarize PRESENT controls. Explain any inapplicable STRIDE category. Do not implement or write files."
Any OS · Codex
$ca-threat-model "Threat-model a proposed archive importer that reuses academy_engine/paths.py. Map untrusted archive-member destinations, the repository-root boundary, writes, and any egress. Use current Surface, Threats, Verdict output. Prioritize GAPs, then PLANNED controls, and summarize PRESENT controls. Explain any inapplicable STRIDE category. Do not implement or write files."
Any OS · Pi
/ca-threat-model "Threat-model a proposed archive importer that reuses academy_engine/paths.py. Map untrusted archive-member destinations, the repository-root boundary, writes, and any egress. Use current Surface, Threats, Verdict output. Prioritize GAPs, then PLANNED controls, and summarize PRESENT controls. Explain any inapplicable STRIDE category. Do not implement or write files."
Any OS · Pi · Fallback
/skill:ca-threat-model "Threat-model a proposed archive importer that reuses academy_engine/paths.py. Map untrusted archive-member destinations, the repository-root boundary, writes, and any egress. Use current Surface, Threats, Verdict output. Prioritize GAPs, then PLANNED controls, and summarize PRESENT controls. Explain any inapplicable STRIDE category. Do not implement or write files."
Expected result
The command writes no file and returns advisory STRIDE analysis without treating verdict as permission to edit code.
Evidence
Check does not prove that the agent drafted first or that this command was invoked.
If that does not happen
If the command edits the target, stages, commits, or makes an approval claim, stop. Preserve the attempt and use Reset rather than rewriting history.
5
YouActive harness
Review the draft against the real boundary
Review the draft yourself. Confirm Scope names controlled archive input, the repository root, and containment or rejection before write. Confirm six distinct STRIDE threats appear with GAPs first, then PLANNED controls. Treat each control and Verdict as analysis, not authorization.
Why this matters: A STRIDE heading alone is not a threat model. Each row needs a concrete relationship, category-specific outcome, and control disposition.
Expected result
You can identify a concrete revision or accept a complete, target-specific model.
Evidence
Check can reject malformed report evidence. It does not prove that you reviewed the draft.
If that does not happen
If a row is generic, repeated, or a verdict overclaims authority, ask the agent to revise only the advisory analysis and review it again before the learner-owned report is drafted. Do not claim that the read-only command wrote a file.
The learner-owned report must be strict UTF-8 with LF line endings and one final newline. Keep it at or below 12
KiB. Its analysis sections are Surface, Threats, and Verdict. Surface identifies the proposed flow, controlled input, repository-root boundary, and containment before write.
The native skill returns advisory analysis. For the learner-owned Academy record, summarize it in a six-row table, one row per STRIDE category, using columns Threat, Category, Likelihood, Impact, Control. Use H/M/L ratings and PRESENT:, PLANNED:, GAP:, or justified N/A: control descriptions. Put gaps first rather than sorting by category. This table is an Academy exercise format, not a required native output template.
Use concrete controls in the report: keep destination resolution under the selected repository root
before creating or copying a file. Reject absolute, traversal, symlink, and Windows reparse-point
ancestors in archive destinations. Fail closed on a different drive or an unrepresentable containment
path before any write.
The next learner request creates the report from the advisory analysis and prepared scenario values, validates its binding, stages only that report, and stops for your review before the commit gate.
6
You
Draft, bind, and stage the learner-owned report
After reviewing the read-only advisory analysis, paste the copied text request into your selected harness. It is a learner request, not a codeArbiter command or shell command. It drafts and validates learner-owned Academy evidence, stages only that report, then stops for your review before the commit gate.
Why this matters: The learner-owned Academy evidence explains the advisory analysis, while the staged one-path boundary makes the later commit reviewable without implying that ca-threat-model wrote the report.
Any OS · Claude Code
Draft only .codearbiter/reports/academy/P07-threat-model.md from the reviewed design analysis. Use title P07 Threat Model - Archive import containment boundary, then Surface, Threats, Verdict, and the separate Academy Target-SHA256/identity binding. Surface names the proposed design, controlled archive-member input, academy_engine/paths.py, repository root, and containment before a destination write. For this Academy record, summarize each STRIDE category once in a six-row table with columns Threat, Category, Likelihood, Impact, Control; use S/T/R/I/D/E and H/M/L. Put GAPs first, then PLANNED, then PRESENT or justified N/A controls. Each threat must state a concrete outcome and each control its disposition. Verdict begins PROCEED, PROCEED-WITH-CONSTRAINTS, or STOP. Constraints name their owner; STOP explains a critical, exploitable, unmitigated threat. Append exact prepared target identity values. Use UTF-8, LF, one final newline, and no more than 12 KiB. Stage only the report and stop for review. Do not change the target or claim the read-only skill wrote this report.
Any OS · Codex
Draft only .codearbiter/reports/academy/P07-threat-model.md from the reviewed design analysis. Use title P07 Threat Model - Archive import containment boundary, then Surface, Threats, Verdict, and the separate Academy Target-SHA256/identity binding. Surface names the proposed design, controlled archive-member input, academy_engine/paths.py, repository root, and containment before a destination write. For this Academy record, summarize each STRIDE category once in a six-row table with columns Threat, Category, Likelihood, Impact, Control; use S/T/R/I/D/E and H/M/L. Put GAPs first, then PLANNED, then PRESENT or justified N/A controls. Each threat must state a concrete outcome and each control its disposition. Verdict begins PROCEED, PROCEED-WITH-CONSTRAINTS, or STOP. Constraints name their owner; STOP explains a critical, exploitable, unmitigated threat. Append exact prepared target identity values. Use UTF-8, LF, one final newline, and no more than 12 KiB. Stage only the report and stop for review. Do not change the target or claim the read-only skill wrote this report.
Any OS · Pi
Draft only .codearbiter/reports/academy/P07-threat-model.md from the reviewed design analysis. Use title P07 Threat Model - Archive import containment boundary, then Surface, Threats, Verdict, and the separate Academy Target-SHA256/identity binding. Surface names the proposed design, controlled archive-member input, academy_engine/paths.py, repository root, and containment before a destination write. For this Academy record, summarize each STRIDE category once in a six-row table with columns Threat, Category, Likelihood, Impact, Control; use S/T/R/I/D/E and H/M/L. Put GAPs first, then PLANNED, then PRESENT or justified N/A controls. Each threat must state a concrete outcome and each control its disposition. Verdict begins PROCEED, PROCEED-WITH-CONSTRAINTS, or STOP. Constraints name their owner; STOP explains a critical, exploitable, unmitigated threat. Append exact prepared target identity values. Use UTF-8, LF, one final newline, and no more than 12 KiB. Stage only the report and stop for review. Do not change the target or claim the read-only skill wrote this report.
Expected result
Only .codearbiter/reports/academy/P07-threat-model.md is staged with three analysis sections followed by the Academy binding section; academy_engine/paths.py is unchanged and the agent has stopped for your review.
Evidence
The staged diff makes the report-only commit boundary visible. Check validates the target binding and report bytes, but does not prove the host command ran or produced the learner-owned prose.
If that does not happen
If another path is staged, the report lacks its exact prepared binding, or the request changes the target, stop and Reset. Do not unstage around an unclear boundary, commit, or modify academy_engine/paths.py to fit a digest.
After Verdict, add ## Academy Target-SHA256/identity binding with the exact target path, prepared
blob, head blob, and SHA-256 values from the prepared scenario. Do not mix Academy-Target- labels
into analysis sections. Do not add a secret, a generic governance event, another changed path, or a
claim that a host command was invoked.
7
Your host
Commit the reviewed report through codeArbiter
Only after you accept the report boundary, invoke the host-native commit gate. It is a codeArbiter harness command, never a ! terminal passthrough command. Commit only .codearbiter/reports/academy/P07-threat-model.md after Prepare.
Why this matters: One report-only commit keeps final evidence reconstructable and prevents the review becoming a hidden implementation change.
Any OS · Claude Code
/ca:commit
Any OS · Codex
$ca-commit
Any OS · Pi
/ca-commit
Any OS · Pi · Fallback
/skill:ca-commit
Expected result
One final commit after Prepare adds only the P07 report while academy_engine/paths.py remains unchanged.
Evidence
The final commit can prove its paths and bytes. It cannot authenticate an approval or conversation.
If that does not happen
If the commit gate blocks, preserve its finding and correct only the named report boundary in a new attempt. Do not amend, rebase, or add a generic event record.
8
You
Inspect the report-only commit
Use a native terminal to inspect the final commit and clean worktree. These are direct terminal commands and never begin with !.
Why this matters: A local inspection makes path scope and target preservation visible before external Check.
Windows
git show --stat --oneline HEAD
git diff HEAD^ HEAD -- academy_engine/paths.py
git status --short
macOS
git show --stat --oneline HEAD
git diff HEAD^ HEAD -- academy_engine/paths.py
git status --short
Linux
git show --stat --oneline HEAD
git diff HEAD^ HEAD -- academy_engine/paths.py
git status --short
Expected result
The commit adds only the report, the target diff is empty, and git status --short prints nothing.
Evidence
This inspection helps you read the final boundary. It does not replace Check.
If that does not happen
If another path changed or the target has a diff, stop and preserve the attempt. Use Reset for a clean retry instead of concealing the extra change.
The final branch has one report-only commit after Prepare. The report has the three analysis sections
in order, the separate Academy Target-SHA256/identity binding, and a permitted advisory Verdict.
The final target object and raw SHA-256 match the prepared target. git status --short is empty.
Check prints checkpoint P07-threat-model: passed and records local progress.
Evidence
Check proves report bytes, target identity, allowed history, and clean state. It does not prove that a host command was invoked or that the agent drafted first.
If that does not happen
If Check fails, preserve the committed attempt and read its failed predicate. Use Reset for a new numbered attempt instead of rewriting evidence.
Check proves the committed report grammar and bytes, prepared and final target identity, allowed Git
ordering, report-only path scope, and clean final worktree. It does not prove that a host command was
invoked. It does not prove that the agent drafted first. It does not prove that you reviewed the
draft. It does not prove the review happened in any particular order. Those are learner and team
practices, not final-state facts that this verifier can authenticate.
If Surface is generic, STRIDE rows are missing or duplicated, Academy labels mix into analysis fields, a target value
is stale, the target changed, or Check names a failed predicate, preserve the attempt. Do not amend,
rebase, force-reset, or alter academy_engine/paths.py to fit an old digest.
Hint 1. Trace one untrusted archive-member or overlay-destination value from normalization through resolved
containment to the extraction root. State what the code must establish before it creates or copies a
destination.
Hint 2. The Threat cells need real outcomes. A row that only says “Tampering” does not say what an attacker
can change or which containment failure would permit it.
Hint 3. Academy target identity is verifier evidence, not native threat-model prose. Keep it after Verdict
and copy the prepared values exactly. A passing Check does not turn this review into authorization to
implement controls.
10
You
Preserve the failed attempt and retry
Use Reset only when P07 needs another attempt. Run it in a native terminal at the Academy clone root; it archives the earlier attempt before creating the next numbered retry branch. Native-terminal commands never begin with !.
Why this matters: A retry leaves rejected report evidence reachable instead of destroying it with a force reset or history rewrite.
Academy archives the prior attempt and prints the next academy/P07-threat-model/ATTEMPT_NUMBER branch.
Evidence
The failed branch remains inspectable while the retry starts from the immutable lesson base.
If that does not happen
If Reset stops, preserve its message and current branch. Resolve only the named condition; never delete the earlier attempt or alter the frozen target.
After Check passes, leave the completed branch intact and continue to P08. Do not substitute
unpublished source exercises for a released lesson.
$ca-threat-model is read-only advice and writes no report. A threat model ties an untrusted input to a concrete boundary; STRIDE supplies coverage categories, not specific reasoning. Your Academy record freezes the reviewed source bytes, not the conversation or any implementation. Review and Ship a Change shows where this review fits.
Use this in your own project. Model a concrete flow: input, trust boundary, sensitive operation, failure outcome, control. An advisory verdict does not mean the controls exist.