From 68c8f1dbdf795e51552af0bc99bd32666da67fed Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Mon, 18 Oct 2021 01:24:17 +0200 Subject: [PATCH] DCP: Set sticky bit for folder and secure delete --- lib/runner/strategy/docker_container_pool.rb | 2 +- spec/lib/runner/strategy/docker_container_pool_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runner/strategy/docker_container_pool.rb b/lib/runner/strategy/docker_container_pool.rb index baccbf7f..8592b5dd 100644 --- a/lib/runner/strategy/docker_container_pool.rb +++ b/lib/runner/strategy/docker_container_pool.rb @@ -47,7 +47,7 @@ class Runner::Strategy::DockerContainerPool < Runner::Strategy end end end - FileUtils.chmod_R('+rwX', local_workspace_path) + FileUtils.chmod_R('+rwtX', local_workspace_path) end def destroy_at_management diff --git a/spec/lib/runner/strategy/docker_container_pool_spec.rb b/spec/lib/runner/strategy/docker_container_pool_spec.rb index 9f75e241..01b418fd 100644 --- a/spec/lib/runner/strategy/docker_container_pool_spec.rb +++ b/spec/lib/runner/strategy/docker_container_pool_spec.rb @@ -106,7 +106,7 @@ describe Runner::Strategy::DockerContainerPool do end it 'sets permission bits on the workspace' do - expect(FileUtils).to receive(:chmod_R).with('+rwX', local_path) + expect(FileUtils).to receive(:chmod_R).with('+rwtX', local_path) container_pool.copy_files(files) end