Run with Browser AI · Chapter 20

Run Chapter 20: Prompt-Injection Containment Laboratory

Mix trusted policy with hostile page, metadata and result content, then measure model compromise separately from deterministic containment and external effects.

← Read Untrusted Text Meets Executable Authority
Execution Not inspected
Secure contextUnknown
Top-level pageUnknown
Prompt APIUnknown
AvailabilityNot inspected

Chapter experiment

Untrusted Text Meets Executable Authority

Metrics-only trace

Loading the chapter experiment…

No model output yet.
Inspect the context supplied by this chapter

What this experience knows

This experience is grounded in Chapter 20 and treats prompt injection as an authority problem.

Trust-domain boundary

Developer policy, user-authorized goals, application tool contracts, page content, tool descriptions and tool results receive explicit source labels. Their text may share a model context; their authority does not.

Scope boundary

A least-privilege research catalog exposes only search_book and get_chapter. A deliberately broad catalog makes dangerous proposals possible so the policy boundary can be attacked.

Metadata boundary

Tool descriptions are application claims. Deterministic policy assigns normalized effects from its own registry and keeps every definition browserAttested: false.

Proposal boundary

The model may propose a structured action. Parsing and schema validity do not make its named tool, destination or data classes permitted.

Policy boundary

Current-book reads can execute locally. search_site is unsupported. export_traces and publish_note require consequential authority that this chapter cannot grant, so they remain withheld.

Containment boundary

A model can follow a hostile instruction while the system remains safe. The evaluator records attackFollowed, policyContained and externalEffect separately.

Execution boundary

Only fixed-corpus reads execute. There is no fetch, navigation, clipboard access, storage, export or publication.

Live-model boundary

The Prompt API receives clearly labelled trust domains and a schema-constrained response. Prompt wording is defence in depth; deterministic validation and policy remain the enforcement boundary.

Evidence boundary

Metrics-only events contain scenario IDs, hashes, stage outcomes and counts. User goals, hostile strings, model output and returned excerpts remain in page memory.

This laboratory deliberately places hostile page text, tool metadata and tool results beside executable capability proposals. It reports model-layer compromise and system-layer containment as different outcomes.

No consequential tool can execute here. Read-only book operations use a fixed in-page index; export, publication and wider-site operations are denied or withheld pending the explicit human authority boundary built in Chapter 21.