banger/scripts
Thales Maciel 235758e5b2
workspace: drop --readonly flag — advisory only against root guests
--readonly ran `chmod -R a-w` over the workspace after copying, but
every banger guest boots as root, and root bypasses DAC mode checks.
So a user running `vm workspace prepare ... --readonly` got the
mode bits set to 0444 but `echo x >> file` in the guest still
succeeded. The flag promised enforcement it couldn't deliver.

The feature also doesn't match the product model: workspaces are
prepared precisely so the guest CAN edit them, and `workspace
export` exists to pull those edits back as a patch. A
"read-only workspace" contradicts that loop.

Removed:
  - CLI flag `--readonly` on `vm workspace prepare`
  - api.VMWorkspacePrepareParams.ReadOnly field
  - model.WorkspacePrepareResult.ReadOnly field
  - daemon chmod dispatch in prepareVMWorkspaceGuestIO
  - smoke scenario pinning the (advisory) mode-bit behavior
  - misleading "exportbox-readonly" VM name in an unrelated export
    test (the test is about not mutating the real git index;
    renamed to exportbox-noindex-mutation)

If real enforcement becomes a user need later, the right primitive
is `chattr +i` (immutable bit — root CAN'T write) or a ro bind-mount.
Reintroducing a new flag is cheaper than debugging what the current
one actually guarantees.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 13:04:33 -03:00
..
make-generic-kernel.sh supply chain: verify signatures and pins across image + kernel builds 2026-04-21 19:38:13 -03:00
make-golden-bundle.sh scripts: bundle-based golden image pipeline 2026-04-17 15:38:04 -03:00
publish-golden-image.sh publish-golden-image: content-addressed tarball names 2026-04-18 15:26:57 -03:00
publish-kernel.sh Phase 5: kernel catalog publish flow + docs 2026-04-16 15:56:56 -03:00
repro-restart-bug.sh daemon: fix vm start (on a stopped VM) + regression coverage 2026-04-23 12:01:46 -03:00
smoke.sh workspace: drop --readonly flag — advisory only against root guests 2026-04-23 13:04:33 -03:00