From 71458d747a1918f52843a137ff988589fd8b54dc Mon Sep 17 00:00:00 2001 From: Nikolay Sivko Date: Mon, 5 Jan 2026 10:33:57 -0300 Subject: [PATCH] fix panic in python cmdline parsing --- containers/process.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/containers/process.go b/containers/process.go index 6d79a45..bd91b98 100644 --- a/containers/process.go +++ b/containers/process.go @@ -110,7 +110,11 @@ func (p *Process) instrumentPython(cmdline []byte, tracer *ebpftracer.Tracer) { if len(cmd) == 0 { return } - cmd = bytes.TrimSuffix(bytes.Fields(cmd)[0], []byte{':'}) + cmdFields := bytes.Fields(cmd) + if len(cmdFields) == 0 { + return + } + cmd = bytes.TrimSuffix(cmdFields[0], []byte{':'}) if !pythonCmd.Match(cmd) { return }