From cdb0350a408a8d8d6a5698bf7f07f9a4c9400d04 Mon Sep 17 00:00:00 2001 From: abhisek Date: Wed, 14 Jan 2026 18:16:54 +0530 Subject: [PATCH] fix: Bug in glob pattern expansion for bwrap --- sandbox/platform/bubblewrap_translator_linux.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sandbox/platform/bubblewrap_translator_linux.go b/sandbox/platform/bubblewrap_translator_linux.go index bb32b83..df3be29 100644 --- a/sandbox/platform/bubblewrap_translator_linux.go +++ b/sandbox/platform/bubblewrap_translator_linux.go @@ -442,9 +442,11 @@ func (t *bubblewrapPolicyTranslator) expandGlobstarPattern(pattern string, maxDe basePath := strings.TrimSuffix(parts[0], "/") suffix := strings.TrimPrefix(parts[1], "/") - // If base path is empty, start from root + // If base path is empty, it would walk from root which is prohibitively expensive. + // Skip such patterns to prevent filesystem scan timeouts. if basePath == "" { - basePath = "/" + log.Debugf("Skipping globstar pattern '%s' with empty base path (would walk from root)", pattern) + return []string{}, nil } // Expand base path variables