diff --git a/pkg/extension/context.go b/pkg/extension/context.go index 3f4045b..8ff6689 100644 --- a/pkg/extension/context.go +++ b/pkg/extension/context.go @@ -93,7 +93,10 @@ func (c *extensionContext) Process(ctx context.Context) error { } // download all extension files into temp directory - tempDir := os.TempDir() + tempDir, err := os.MkdirTemp("", "") + if err != nil { + return fmt.Errorf("failed to create temp dir %w", err) + } defer func() { if err := os.RemoveAll(tempDir); err != nil { log.Error(err, "Failed to delete temp directory")