Skip to content

Commit 7f8a51b

Browse files
committed
landlock: Grant permission for artefact handling
When downloading artefacts from an image using Docker Buildx, slsactl requires write access to ~/.docker/buildx. Without this change the command slsactl download provenance may fail with: failed to run download: open /home/levi/.docker/buildx/.lock: permission denied Signed-off-by: Paulo Gomes <[email protected]>
1 parent 176b50e commit 7f8a51b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/landlock/landlock.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ func EnforceOrDie() {
3939

4040
// We can't really restrict the network access at present
4141
err = cfg.RestrictPaths(
42-
landlock.RWDirs(filepath.Join(home, ".sigstore")), // Sigstore TUF DB.
42+
landlock.RWDirs(
43+
filepath.Join(home, ".sigstore"), // Sigstore TUF DB.
44+
filepath.Join(home, ".docker", "buildx"), // Image artefacts handling.
45+
),
4346
landlock.RODirs(
4447
"/proc/self",
4548
),

0 commit comments

Comments
 (0)