mirror of
https://github.com/containers/gvisor-tap-vsock.git
synced 2025-10-28 19:01:55 +08:00
By design, this wrapper is to be invoked with `qemu-wrapper $cmdline`, so the error reported by gosec is intentional. This commit adds the necessary annotation to silence it. cmd/qemu-wrapper/main.go:19:9: G204: Subprocess launched with function call as argument or cmd arguments (gosec) cmd := exec.Command(os.Args[2], os.Args[3:]...) ^
Qemu doesn't accept a unix socket as netdev, only a file descriptro. This wrapper is filling the gap.
$ ./qemu-wrapper /tmp/qemu.sock qemu-system-x86_64 [...] -netdev socket,id=vlan,fd=3 -device virtio-net-pci,netdev=vlan