Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/awf-config-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,14 @@ where it is enforced by the host mount tree that backs each virtio-fs export
Cloud Hypervisor has no always-writable internal mounts, so every export it
publishes is subject to the policy, including `/tmp/gh-aw` and the guest home
directory at `/workspace/.awf-home`; paths not covered by `allowWrite` become
read-only. AWF rejects `filesystem.allowWrite` with the sbx
runtime and with Docker-in-Docker agent execution.
read-only. Because every listed path MUST already exist, and because AWF MUST
NOT auto-create or exempt the guest home, a Cloud Hypervisor workload that needs
a writable home MUST have the backing host directory
`$GITHUB_WORKSPACE/.awf-home` created before AWF starts and MUST then list the
guest path `/workspace/.awf-home` in `allowWrite`; otherwise planning fails
because the path does not exist within a writable export. AWF rejects
Comment on lines +113 to +114
`filesystem.allowWrite` with the sbx runtime and with Docker-in-Docker agent
execution.

### 4.2 Cloud Hypervisor microVM preview

Expand Down
33 changes: 33 additions & 0 deletions docs/cloud-hypervisor-foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,39 @@ One consequence is worth stating plainly: the guest `HOME` is
directory read-only. That is the policy working as specified, not an oversight;
add the home path to `allowWrite` if the workload needs it.

Doing so has a prerequisite. The workspace export is backed by the host
workspace directory itself (`$GITHUB_WORKSPACE`, falling back to the current
working directory), and nothing in the Cloud Hypervisor path creates
`.awf-home` on the host before planning. That is harmless without a policy,
because the export is writable and the directory is simply created at runtime.
Under a narrowing policy the export root is staged read-only, so it can no
longer be created at runtime — and the planner only accepts paths that already
exist, so naming it in `allowWrite` fails too, with a single-line error:

```text
filesystem.allowWrite path is not an existing path within a writable
Cloud Hypervisor export: /workspace/.awf-home
Comment on lines +367 to +371
```

AWF deliberately does not auto-create or exempt the guest home: doing either
would either widen the boundary implicitly or reintroduce an always-writable
internal mount, both of which contradict the narrowing semantics above. Create
the host directory before AWF starts, then list the guest path:

```bash
mkdir -p "$GITHUB_WORKSPACE/.awf-home"
```

```yaml
filesystem:
allowWrite:
- /workspace/.awf-home
```

That yields a `selective` workspace plan — host root staged `ro`, guest mount
`rw`, one directory overlay at `.awf-home` — leaving the rest of the workspace
read-only.

## Limitations

The preview rejects configurations that weaken or conflict with its boundary,
Expand Down
Loading