Problem
Main agent jobs omit sudo when sandbox.agent.sudo: false (network isolation), but detection jobs built synthetic WorkflowData without inheriting parent NetworkIsolation. Generated locks still contained sudo -E awf in detection_agentic_execution while the agent job used rootless awf.
Before (detection job, network-isolation workflow)
run: | sudo -E awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" ...Install step used install_awf_binary.shwithout--rootless.
After
run: | awf --config "${RUNNER_TEMP}/gh-aw/awf-config.json" ...Install step passes --rootless when parent agent has network isolation.
Implementation
buildThreatDetectionAgentConfig(parent) copies NetworkIsolation, version, runtime from parent agent sandbox- Applied in
threat_detection_inline_engine.go and threat_detection_external.go - Recompiled 256 lock files (zero
sudo -E awf remaining)
Fork PR
Tarekchehahde#15
Test plan
Out of scope (follow-up)
- Chroot cleanup
EACCES warning on rootless runs - Opt-in cross-run cache for
none/nopolicy
Fixes #41267
Problem
Main agent jobs omit
sudowhensandbox.agent.sudo: false(network isolation), but detection jobs built syntheticWorkflowDatawithout inheriting parentNetworkIsolation. Generated locks still containedsudo -E awfindetection_agentic_executionwhile the agent job used rootlessawf.Before (detection job, network-isolation workflow)
Install step used
install_awf_binary.shwithout--rootless.After
Install step passes
--rootlesswhen parent agent has network isolation.Implementation
buildThreatDetectionAgentConfig(parent)copiesNetworkIsolation, version, runtime from parent agent sandboxthreat_detection_inline_engine.goandthreat_detection_external.gosudo -E awfremaining)Fork PR
Tarekchehahde#15
Test plan
go test ./pkg/workflow/ -run TestNetworkIsolationRootlessTestCompiledLockFiles_SmokeWorkflowsHaveDetectionJobWithAgenticRunCallOut of scope (follow-up)
EACCESwarning on rootless runsnone/nopolicyFixes #41267