From 26e435b1119ff48e00f0804673310f0143a6b768 Mon Sep 17 00:00:00 2001 From: Guillaume Lours Date: Thu, 3 Dec 2026 22:59:49 +0100 Subject: [PATCH] fix(bridge): mount transformation inputs read-only Transformation containers only need to read the generated compose model and the optional templates directory; their output goes to /out. Mount /in and /templates with the ro option. Signed-off-by: Guillaume Lours --- pkg/bridge/convert.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/bridge/convert.go b/pkg/bridge/convert.go index 79594dc4fc4..6b6b6385d9c 100644 --- a/pkg/bridge/convert.go +++ b/pkg/bridge/convert.go @@ -157,7 +157,7 @@ func convert(ctx context.Context, dockerCli command.Cli, model map[string]any, o return err } binds := []string{ - fmt.Sprintf("%s:%s", dir, "/in"), + fmt.Sprintf("%s:%s:ro", dir, "/in"), fmt.Sprintf("%s:%s", out, "/out"), } if opts.Templates != "" { @@ -165,7 +165,7 @@ func convert(ctx context.Context, dockerCli command.Cli, model map[string]any, o if err != nil { return err } - binds = append(binds, fmt.Sprintf("%s:%s", templateDir, "/templates")) + binds = append(binds, fmt.Sprintf("%s:%s:ro", templateDir, "/templates")) } for _, transformation := range opts.Transformations {