Skip to content
Roadmap0/111
not startedstudy day 5 of 6 · covers original day 76

Restrict downloads and file writes to a temporary workspace

P3 Agent systemS0M9D9C6
not started0/5 blocks
0/5
Jump & context

Week 10: Governance, Tamper-Evident Ledger & Browser/Computer-Use Agent Security

The five hours

  1. 01

    Concepts & system design

    60 min

    R33 — Playwright download handling

    R10 — OWASP File Upload & Path Traversal Cheat Sheets

    Read the assigned sections; map the mechanism, threat model and trade-offs.

  2. 02

    Project implementation

    120 min

    Confine all browser downloads and file writes to an ephemeral, quota-limited temporary directory. Enforce file-extension allowlists, size limits, and automatic post-task cleanup.

    Build, integrate, debug and improve the increment in the active project.

  3. 03

    Security lab

    60 min

    Test path-traversal download filenames (../../.bashrc), oversized files, and executable file drops; verify the host filesystem remains completely unreachable.

    Test the abuse case, failure path, authorization bypass or resource limit.

  4. 04

    Verification & evidence

    30 min

    Workspace confinement and download-boundary test suite.

    Add or run regression tests; record the 9-point evidence record.

  5. 05

    Deliberate practice & Socratic review

    30 min

    Answer the 8 Socratic questions without notes: What? Why? How? What if? Why not? How can I prove it? Where can it break? What have I learned?

    Re-explain the hardest concept aloud, inspect one edge case, update the gap log.

  6. total5 h

Read today · inside the concepts block

R10 R33

Read only the named sections needed for today's task. Reading sits inside the 60-minute concepts block; it is not extra time.

Free resources for this day

5 curated
  • docsPlaywright · reference
    Downloads | Playwright

    Covers acceptDownloads, the Download object, suggested filenames and saveAs paths, which is how you redirect every agent download into a quota-limited temporary workspace instead of the host filesystem.

    R33R10checked 2026-11-11
  • articleOWASP Cheat Sheet Series · ~15 min read
    File Upload - OWASP Cheat Sheet Series

    Specifies extension allowlists, generated filenames, size limits, storage separation and post-upload scanning, the exact control set you mirror when confining agent downloads and writes to an ephemeral directory.

    R10checked 2026-11-11
  • videoPrinceAutomationDestination · 10 min
    How to Handle File Downloads in Playwright | Automation Testing Guide

    Demonstrates waitForEvent('download') plus saveAs so you can intercept the download stream and enforce a destination directory, filename and size check before anything touches disk.

    R33checked 2026-11-11
  • videoRyan John · 20 min
    File Upload Vulnerabilities & Filter Bypass

    Shows how extension and Content-Type checks get bypassed in practice, which is why your workspace policy must validate magic bytes and enforce an allowlist rather than trusting the browser's suggested filename.

    R10checked 2026-11-11
  • labPortSwigger · free labs, self-paced
    File uploads | Web Security Academy

    Hands-on labs where you bypass validation to upload a web shell, giving you the attacker-side intuition needed to design the extension, size and path-confinement rules for the agent's temporary workspace.

    R10checked 2026-11-11

Evidence record · 9-point standard

0/9

A lab is complete only when it produces evidence. Installing PyRIT, Garak, Presidio or TransformerLens is not completion. Saved on this device only.

Day notes

empty

The two source formulations

verbatim · nothing summarised

Project & Deliverable Target

P3 (C6) | `D9` (Computer-Use Pixel Auditor) | M9, S0

Core Implementation

Confine all browser downloads and file writes to an ephemeral, quota-limited temporary directory. Enforce file-extension allowlists, size limits, and automatic post-task cleanup.

Security Lab

Test path-traversal download filenames (../../.bashrc), oversized files, and executable file drops; verify the host filesystem remains completely unreachable.

Verification & Evidence

Workspace confinement and download-boundary test suite.

Read Today (60m Concepts Block)

R33 (Playwright download handling), R10 (OWASP File Upload & Path Traversal Cheat Sheets).

---