agents · Level 3

Test an agent permission boundary with OpenShell

Build an offline permission test, inspect policy evidence and plan a controlled runtime verification.

By Micky Irons

  • Level 3Building
  • 180 min
  • 6 chapters
  • Online course and PDF workbook
Fictional learning sceneagents / 03

Read, practise and review

Your next step

Start this course online

Register your start, then work through the lessons and exercises at your own pace. You can download the PDF separately. Where a scored exam is available, you will find it after the lessons.

Register or resume your course

Mickai privately records this registration and sends its team a course-start notification. It records your intention to start, not proof of attendance or completion. Our course-start privacy notice explains the details and the 30-day resume cookie.

Follow the Mickai company page on LinkedIn

You can start learning without subscribing or following. Newsletter email confirmation and provider enrolment are recorded separately.

Start with the essentials

The short answer

Test a permission boundary with explicit allowed and denied requests, then compare each outcome with the intended rule. This course uses an offline simulator to teach that method and optional OpenShell inspection commands to connect it to a real implementation. Simulator success is not runtime enforcement evidence, and the practical exercise is ungraded.

What you will learn

  • Define a reproducible permission test and distinguish a simulation from runtime enforcement.
  • Design file-access probes that separate task access from unintended neighbouring access.
  • Test destination, method and executable restrictions without making live network requests.
  • Inspect policy selection and plan a narrow, verifiable OpenShell policy change.
  • Classify test evidence and diagnose a denial without treating every failure as a policy success.
  • Assemble a regression and handover record that states exactly what remains unverified.

Who it is for

Developers and technical operations learners who understand basic agent tools and want an implementation-focused testing lab rather than another governance checklist.

Before you start

  • Read and run a small Python program and understand JSON objects.
  • Understand files, processes and HTTP methods; no GPU or model account is needed for the required route.
  • Optional runtime inspection needs an owner-provided OpenShell lab, appropriate access and release-specific help.

Run the synthetic exercise

Download the exercise source, tests and instructions (ZIP)

No real records, external service or model is used by this exercise. Extract the ZIP into a fresh folder, read README.md and follow its local test instructions. Complete WORKSHEET.md before consulting ANSWER-KEY.md.

Commissioned for MICKAI Training Academy and drafted with AI assistance. Record independent teaching, assessment and release reviews for the exact edition. Runtime enforcement requires separate verification in the intended operational environment.

Learn in your browser · Chapter 01 of 06

01

Start with a testable boundary

Build evidence around a small fictional product-comparison task. You can complete the required route offline, without a model account, cloud instance or GPU.

The required exercise is a Python decision simulator. It reads fictional requests and returns ALLOW or DENY without opening those paths or connecting to their hosts. Passing it shows that your model matches the stated rules; it does not demonstrate OpenShell, kernel isolation or resistance to a real attack.

Use synthetic catalogue notes throughout this lab. Keep customer documents, provider keys, production accounts and personal folders outside the exercise. A useful permission experiment needs a recognisable task, not real sensitive data. The fictional assistant prepares a product comparison from reference notes and writes a draft report.

Write three acceptance statements before testing: the assistant can read reference notes, can write its output report, and cannot read private notes or modify references. These statements define observable operations and targets. A general instruction to be careful does not tell a tester which concrete request should fail.

Pair a positive probe with a nearby negative probe. A reference read should succeed while a reference write should fail. A test suite that rejects everything can look restrictive while preventing the legitimate task; the positive probe catches that failure of usefulness.

Record the request identifier, policy identifier, simulator version, expected decision and observed decision for each run. Repeating a result without its policy and fixture versions cannot show whether the same experiment was repeated. A changed policy starts a new run rather than silently replacing the earlier evidence.

The assistant saying that it obeyed the policy is a claim, not an independent observation. For the offline exercise, inspect the returned decision and its assertion result. For a live boundary, examine the actual operation and runtime evidence rather than substituting a model-generated summary of its intentions.

Authorisation in this lab is limited to local fictional fixtures. A successful exercise does not authorise probing another account, starting a paid service or changing a shared gateway. If an optional experiment exceeds your assigned environment, stop that experiment and ask its owner for a precise test scope.

Try it yourself · Activity 01

15 min

Predict before running

Write the three acceptance statements for the fictional comparison assistant, then classify one allowed request and one denied request. Do this before opening the answer key.

  1. Name the intended operation and target.
  2. Write the expected decision and why.
  3. Name the evidence tier you will actually collect.

Which observation would change your conclusion, and which missing evidence would leave it unresolved?

Worked answer

The three acceptance statements are: allow reads of the reference files; allow writes of the report in the output folder; deny reads of private notes and modification of reference files. For example, a reference-file read is allowed and a reference-file write is denied. The offline decision and assertion result are simulator evidence. Neither proves that an OpenShell sandbox enforced a real request.

Next chapter

Learn in your browser · Chapter 02 of 06

02

Separate file reads, writes and neighbouring paths

The purpose of these probes is to reveal incorrect permission boundaries, including mistakes hidden by a successful output report.

The lab model treats reading and writing as different permissions. Reference notes are readable; report output is writable. Writing a reference is denied even if that file is needed as input. This distinction lets the assistant use the task material without silently altering the evidence it was asked to summarise.

Compare path components, not a raw text prefix. The directory /workspace/reference is different from /workspace/reference-old. A string beginning with the same letters is not sufficient to establish membership of the permitted directory. The simulator compares a complete directory component followed by a slash.

The teaching model rejects any path containing a parent segment such as two dots. It does not try to turn a traversal request into an acceptable path. This deliberately small rule makes the fixture result predictable; real path resolution, mount points and operating-system permissions need separate runtime tests.

A fixture marked resolved=false represents a target whose real location is unknown, for example an unchecked symbolic link. The simulator denies it. This is an uncertainty marker, not symlink detection. A live tester must determine the target seen by the enforcing runtime before claiming containment.

Reading a private path should be denied even when the requested output would be harmless. Permission is evaluated against the attempted operation and target, not against a promised good reason. In the lab, the private directory is outside both permitted roots, so its contents are unnecessary to decide the case.

Place a harmless output write in the suite. If it fails, investigate the output root or operation before relaxing reference access. Granting write access to the whole workspace would repair the symptom by introducing a larger permission error. Change the smallest relevant part and preserve the negative tests.

The simulator recognises read and write operations; an execute request is unsupported and denied. Treat an unknown operation as a separate case instead of translating it into a familiar allowed action. This model does not implement executable permissions, process restrictions or a real filesystem policy.

Try it yourself · Activity 02

15 min

Find the prefix bug

Compare the reference and reference-old fixtures. Write a component-aware membership test in plain English, then run the supplied file tests.

  1. Identify the shared text prefix.
  2. Explain which complete directory component is permitted.
  3. Include a traversal and an unresolved-target case.

Which observation would change your conclusion, and which missing evidence would leave it unresolved?

Worked answer

Require the exact permitted root or that root plus a slash before child components. Reject parent traversal and unresolved targets in this teaching model. This fixes the text-prefix defect but is not a substitute for live filesystem resolution and enforcement.

python · 5 lines
def inside(path, root):
    return path == root or path.startswith(root + "/")

# Only after separate validation rejects parent segments
# and an unresolved target. This is a string model.

Next chapter

Learn in your browser · Chapter 03 of 06

03

Probe network permissions as a request tuple

Treat each network request as data. The provided exercise compares strings and never sends a packet, so all outcomes remain safe to inspect offline.

The offline network rule matches five explicit fields: host, port, method, path and executable. Its one permitted tuple is catalogue.example, port 443, GET, /catalogue/item and /usr/bin/curl. These are fictional string comparisons, not a production endpoint or OpenShell YAML. Every other tuple is denied by this model.

An allowed host does not settle the method decision. In the fixture, GET /catalogue/item is permitted but POST to that same path is denied. Keep the host, port, path and executable unchanged when testing the method difference, so the result isolates one intended policy boundary.

A host with an added suffix is a different destination. catalogue.example.evil is not catalogue.example, even if the beginning looks familiar. Use the parsed exact hostname as the comparison field in the exercise; do not accept a substring or a familiar-looking page title as the destination identity.

The executable field identifies the process being tested. OpenShell network rules use executable paths; scripts may appear as their interpreter rather than the script name. Before a live rule change, compare the denied process path with the actual effective rule. Do not guess a path from the friendly tool name. [S2]

Port is a separate dimension. The offline rule allows 443 but not 80. A wrong-port denial should not be recorded as evidence that the method restriction worked, because the request never satisfied the destination tuple. Design one-variable probes when you want to attribute a decision to a particular field.

A redirect needs a new destination decision. In the fictional case, an initial catalogue response points to uploads.example; the second request is denied because that host is absent from the rule. The exercise evaluates the proposed second request and does not follow a real redirect or transfer any data.

A read method can still carry sensitive content in a URL or fetch hostile material. Method filtering limits one dimension of access, not business meaning. Keep secrets out of paths and query strings, inspect the actual data flow, and apply application validation for permitted requests as well as network restrictions. [S4]

Try it yourself · Activity 03

15 min

Build a network test matrix

Using fixtures f08 to f13, predict each decision and identify the single field changed from the allowed tuple. No endpoint is contacted.

  1. Write the five fields of f08.
  2. Compare each denied tuple with the permitted tuple.
  3. Explain what a successful GET cannot prove about content safety.

Which observation would change your conclusion, and which missing evidence would leave it unresolved?

Worked answer

f08 allows the exact tuple. f09 changes method, f10 host, f11 executable, f12 port and f13 redirect destination. Each is denied. The allowed GET can still carry or retrieve unsuitable content, so application data controls remain necessary.

Next chapter

Learn in your browser · Chapter 04 of 06

04

Inspect OpenShell before changing a policy

Use OpenShell as a concrete implementation reference while keeping documented behaviour separate from behaviour verified on your own runtime.

The OpenShell documentation checked on 26 October 2026 labels its latest release v0.1.5. The optional commands here are read-only inspection examples for that documented interface, not a tested local installation. Check the installed CLI help and release-specific documentation before applying them to an authorised lab. [S1]

OpenShell policy selection can involve a global policy, a saved sandbox policy, an image policy or the restrictive default. Omitting a policy flag therefore does not prove the default was selected. Identify the selected source before interpreting a surprising result. An active global policy changes the relevant administrative scope. [S1]

Inspect both policy views. The base view is the selected policy; the effective view includes applicable provider-contributed network rules. Start an edit from the base, and use the effective view to investigate reachable destinations. Copying provider-owned entries into your base can make future changes harder to reason about. [S1]

For the documented interface, network-rule changes can load during a running sandbox, while filesystem and process settings require startup or recreation. A saved file with a narrower filesystem rule is not proof that the running workload adopted it. Keep this lifecycle difference in the test plan. [S3]

A gateway accepting an update is not the same event as a sandbox loading it. Inspect revision status and effective policy, then run permitted and denied probes. If a wait times out, inspect the revision before submitting again: a late load would otherwise create confusing overlapping changes. [S3]

Keep a proposed change narrow and explicit: record the failing tuple, the business reason, the reviewed base-policy difference and the owner who authorised it. A request to let the assistant finish is not a specification. In this lab, a missing output write does not justify a new network destination.

Keep policy-editing authority outside the workload being tested. The test process may report a denial and propose a change, but the reviewer decides whether the wider permission serves the task. A record of that decision should identify the actual policy difference, not merely an approval of the assistant in general. [S4]

Try it yourself · Activity 04

15 min

Plan an optional inspection

On paper, plan a read-only inspection of an owner-provided sandbox. If no authorised compatible runtime exists, complete the written route and do not install or launch one for this exercise.

  1. Record the sandbox name and version evidence.
  2. Name the base and effective views.
  3. State the missing runtime evidence explicitly.

Which observation would change your conclusion, and which missing evidence would leave it unresolved?

Worked answer

Use the installed help, named sandbox, base view, effective view, revision status and relevant log window. These inspection results still need authorised positive and negative probes to establish runtime behaviour. With no runtime, the plan remains unexecuted.

bash · 9 lines
# Optional read-only inspection; not executed by the author.
# Use an owner-provided sandbox actually named academy-lab.
# Check installed help against the documented v0.1.5 interface.
openshell --help
openshell policy --help
openshell policy get academy-lab --base
openshell policy get academy-lab --full
openshell policy list academy-lab
openshell logs academy-lab --since 10m --source sandbox

Next chapter

Learn in your browser · Chapter 05 of 06

05

Diagnose outcomes and preserve useful evidence

A useful test distinguishes the desired policy decision from unrelated technical failures, and leaves enough evidence for a second person to assess it.

Classify a failed request before calling it a successful boundary test. A missing client executable, DNS failure, service rejection and runtime policy denial can all prevent a result. Only evidence from the relevant enforcement layer supports a claim that its policy caused this denial. Retain the distinction in your report.

For a live OpenShell investigation, the documented log command can select sandbox records and a time window. Policy events may be hidden by a warning-only filter. Collect the relevant event rather than filtering away the evidence you need; logs can contain sensitive metadata and need controlled handling. [S5]

Correlate by request identifier, time window, sandbox and policy revision. An old denial from another sandbox does not explain the current request. If the available log lacks a request identifier, state the weaker correlation and use a fresh isolated probe to reduce ambiguity instead of inventing a precise match.

The offline runner marks a mismatch as a failed assertion and exits unsuccessfully. An ALLOW response to a prohibited reference write is a negative-test failure, even if the comparison report is useful. Never count task completion as compensation for a failed boundary assertion.

A report that prints the expected decisions without evaluating requests is not a test. Temporarily broaden the model in a separate in-memory copy, run the same fixtures and confirm that a negative test fails. This mutation check helps show the suite can notice the specific fault it was written to detect.

Retain policy, fixture and result digests to identify the bytes tested. A digest supports consistency, not truth or identity. Keep a redacted sharing copy separate from the restricted raw record, and describe the redaction. Do not paste provider keys or complete personal file paths into the public workbook.

Try it yourself · Activity 05

15 min

Prove the suite can catch a bad rule

Run test_simulator.py. It tests the intended policy and an in-memory mutation that makes reference notes writable.

  1. Read the failed-boundary expectation in the mutation test.
  2. Explain why the real baseline must remain unchanged.
  3. Classify a missing client separately from a policy denial.

Which observation would change your conclusion, and which missing evidence would leave it unresolved?

Worked answer

The ordinary policy denies f02. The mutation permits f02, so its decision disagrees with the unchanged expected decision. The mutation test passes by detecting that disagreement; it does not legitimise the wider permission or change the baseline file.

Next chapter

Learn in your browser · Chapter 06 of 06

06

Run regression checks and hand over honestly

Finish with a reproducible record and a bounded claim. The course is educational and non-accredited, and the practical exercise is ungraded.

Regression means repeating the whole relevant suite after a change, not just the request that first failed. Recheck reference reading, output writing and every denied neighbour. A narrow repair can still affect a different case, so compare the new result with the previously recorded expectation for each fixture.

State the evidence tier precisely. Offline decision tests support the model. Source checking supports the description of the documented interface. Live sandbox probes support that tested environment. None of these alone establishes production suitability, practical competence or professional accreditation; list the missing tier rather than merging them into one pass.

On the authoring Windows host, an executable-location probe found no openshell command. Docker and WSL commands were present, but no daemon, Linux environment or sandbox was started. Consequently the vendor runtime and optional commands were not executed here. This is a validation gap, not evidence that Windows can never host a suitable environment.

Before an operational release, have a different reviewer inspect the policy and evidence, and an authorised tester run the allowed and denied cases in the intended runtime. Keep the candidate private while that live verification is absent. Course publication and production agent deployment are separate decisions with separate owners.

The handover should name the task, policy and fixture digests, decisions, failures, unresolved questions, runtime versions and next responsible owner. Separate expected behaviour from observed behaviour. A reader should be able to repeat the experiment without relying on the author being present to explain missing steps.

The final exam tests knowledge and reasoning, not the practical lab. A 20-question sitting requires 17 correct answers to pass the strictly-above-80-percent rule; 16 is insufficient. A MICKAI educational completion certificate does not certify an OpenShell deployment, NVIDIA accreditation, professional competence or learner identity.

Try it yourself · Activity 06

15 min

Prepare a release decision

Draft a handover with two headings: observed and outstanding. Include a statement explaining what a completion certificate would mean.

  1. List the offline checks actually run.
  2. Name the unexecuted vendor runtime and independent review.
  3. Assign the next verification action to an owner.

Which observation would change your conclusion, and which missing evidence would leave it unresolved?

Worked answer

Observed: local model decisions and assertions, with source/fixture digests. Outstanding: independent content/bank review, intended-runtime tests, browser and PDF validation, artwork and integration. The certificate would record educational knowledge assessment, not practical deployment assurance.

bash · 4 lines
# Required offline route. Run from the exercise directory.
python run_lab.py
python -m unittest -v test_simulator.py
# The runner prints model results. It makes no network requests.

Assessment options

Keep learning

The complete workbook

Use a fictional comparison assistant to test file and network decisions, catch a prefix bug and distinguish policy denials from unrelated failures. Complete the required exercise offline with Python, then plan optional read-only OpenShell inspection in an authorised environment. This is educational, non-accredited training with a knowledge assessment, not a production security certification.

  1. 01
    Start with a testable boundary

    Build evidence around a small fictional product-comparison task. You can complete the required route offline, without a model account, cloud instance or GPU.

    Read here · 1 exercise
  2. 02
    Separate file reads, writes and neighbouring paths

    The purpose of these probes is to reveal incorrect permission boundaries, including mistakes hidden by a successful output report.

    Read here · 1 exercise
  3. 03
    Probe network permissions as a request tuple

    Treat each network request as data. The provided exercise compares strings and never sends a packet, so all outcomes remain safe to inspect offline.

    Read here · 1 exercise
  4. 04
    Inspect OpenShell before changing a policy

    Use OpenShell as a concrete implementation reference while keeping documented behaviour separate from behaviour verified on your own runtime.

    Read here · 1 exercise
  5. 05
    Diagnose outcomes and preserve useful evidence

    A useful test distinguishes the desired policy decision from unrelated technical failures, and leaves enough evidence for a second person to assess it.

    Read here · 1 exercise
  6. 06
    Run regression checks and hand over honestly

    Finish with a reproducible record and a bounded claim. The course is educational and non-accredited, and the practical exercise is ungraded.

    Read here · 1 exercise

Also inside: a 8-point checklist, a glossary of 10 terms and 10 questions and answers to test yourself. 6 hands-on exercises, each with a worked answer at the back where the workbook gives one.

The PDF is free. We ask for your name and email before downloading. Read the privacy notice at the download form. Free to download and use for personal learning, study groups and inside your own team. Please do not resell the workbooks or republish them as your own. Link people to trust-agent.ai instead.

Get your free PDF workbook

Enter your name and email, then download the complete workbook. This form also works without JavaScript.

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

Visit Mickai on LinkedIn

Newsletter confirmation does not affect your download. Following Mickai on LinkedIn is optional; this site does not verify followers.

Test yourself

Questions and answers

Does the required exercise run an agent?

No. It evaluates fictional requests offline. There is no model call, provider key, sandbox or network connection.

Why include an allowed request?

A policy that denies everything can pass negative probes while making the task unusable. A positive probe checks intended access.

Why is reference-old a useful fixture?

It starts with the same text as reference but is a different directory component. It reveals a raw-prefix membership bug.

Does resolved=false detect symbolic links?

No. It is a fictional uncertainty marker. The model denies an unresolved target; real resolution and enforcement need runtime evidence.

Does GET mean safe content?

No. A read request can carry sensitive data or fetch hostile material. Method filtering does not validate business meaning.

Should I edit the effective policy?

Start from the base policy so provider-owned entries are not copied into your configuration. Inspect the effective view when investigating access.

Does a successful update command prove enforcement?

No. Check the revision and effective policy, then execute allowed and denied probes in the authorised runtime.

Were the vendor commands run on the authoring machine?

No. The openshell command was absent. The offline simulator and source checks are separate from live runtime validation.

Is the practical exercise scored for the certificate?

No. Written and executable practice are ungraded. The final exam assesses knowledge and reasoning; educational completion is not NVIDIA accreditation or deployment assurance.

What remains before publication?

Independent course and exam review, intended-runtime verification, exercise packaging, unique artwork, browser/PDF checks and an authorised integration decision remain necessary.

Write as you go

My notes

Use this scratchpad for your own notes, working or answers as you read. Notes are saved in this browser on this device. Downloading makes a local copy; it does not send your notes to Mickai.

Learn → Practise → Demonstrate

Ready to put it into practice?

Take the scored exam when you feel ready. You do not need to download the workbook first. A score strictly above 80% earns a named, dated Mickai certificate with a verification page.

Take the official exam

Your name and email are collected at exam start. Certificates record an assessment result, not an accredited qualification or verified identity.

Learn the language

Key terms

Positive probe
A request expected to succeed within the intended task boundary.
Negative probe
A request expected to be denied because it crosses an intended boundary.
Decision simulator
A program that models a rule over fictional request data without enforcing it on real operations.
Effective policy
The policy view including applicable provider-contributed rules, used to reason about reachable destinations.
Base policy
The selected policy before applicable provider-contributed network rules are composed.
Policy revision
An identified policy change whose loaded status must be checked separately from submission.

6 of the workbook's 10 terms. The complete glossary is in the workbook.

Follow the evidence

Sources and checks

Facts last checked: .

Examples in this workbook were run on: Offline Python decision simulator and tests only; exact interpreter and results are in VALIDATION.json. OpenShell runtime not executed. (2026-10-26).

These workbooks use AI assistance. See how the workbooks are made.

  1. Sandbox Policies, documentation labelled v0.1.5, checked 26 October 2026NVIDIA
  2. Network Rules, checked 26 October 2026NVIDIA
  3. Manage Sandbox Policies, checked 26 October 2026NVIDIA
  4. Security Best Practices, checked 26 October 2026NVIDIA
  5. Accessing Logs, checked 26 October 2026NVIDIA
  6. Default Policy and Baseline Paths, checked 26 October 2026NVIDIA OpenShell source

Created by Micky Irons with the Mickai team. Published by Mickai LTD. Last updated 26 October 2026.

NextKeep going

Where to go next