Omit sudo from generated lock.yml when network-isolation sandbox is enabled
- Dominant language
- Go
- Stars
- 5.1k
- Forks
- 541
- Avg merge
- 5h 48m
- Merged PRs (30d)
- 773
Description
## Summary
When the AWF **network-isolation** sandbox option is enabled (`sandbox.agent.network-isolation: true`), the compiler still emits `sudo` in the generated `.lock.yml` for the awf binary install and the `awf` invocation. In network-isolation mode, AWF no longer needs `NET_ADMIN`/host-iptables egress enforcement, so it can run **rootless** — a key requirement for ARC (Actions Runner Controller) Kubernetes runners where passwordless `sudo`/host-iptables are often unavailable.
The compiler should **omit `sudo` from the generated lock when network-isolation is enabled**.
## Current behavior
For a workflow with `sandbox.agent.network-isolation: true`, the generated lock contains (line numbers from a real compile):
```yaml
# Install awf binary
sudo tee /usr/local/bin/awf > /dev/null < /dev/null <
Contributor guide
Assessment
This issue has not been assessed yet.