Skip to content

Commit 4382f91

Browse files
authored
fix cmd injection (#402)
* fix cmd injection see b/289980058 * Automated commit: update images.
1 parent 8163dde commit 4382f91

File tree

9 files changed

+12
-10
lines changed

9 files changed

+12
-10
lines changed

.github/workflows/update-images.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ jobs:
329329
done
330330
331331
- name: Commit
332+
env:
333+
SUBMITTER: ${{ github.event.head_commit.author.email }}
332334
run: |
333335
# git add returns success for files that exist and haven't been modified
334336
git add kctf-operator/resources/constants.go
@@ -344,7 +346,7 @@ jobs:
344346
git add "${dir}/healthcheck/Dockerfile" 2>&1 || true
345347
done
346348
git status
347-
git config user.email ${{ github.event.head_commit.author.email }}
349+
git config user.email "$SUBMITTER"
348350
git config user.name "GitHub Action"
349351
if git commit -m "Automated commit: update images."; then
350352
git push

dist/challenge-templates/pwn/challenge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN /usr/sbin/useradd --no-create-home -u 1000 user
1818
COPY flag /
1919
COPY chal /home/user/
2020

21-
FROM gcr.io/kctf-docker/challenge@sha256:0f7d757bcda470c3bbc063606335b915e03795d72ba1d8fdb6f0f9ff3757364f
21+
FROM gcr.io/kctf-docker/challenge@sha256:eb0f8c3b97460335f9820732a42702c2fa368f7d121a671c618b45bbeeadab28
2222

2323
COPY --from=chroot / /chroot
2424

dist/challenge-templates/pwn/healthcheck/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/healthcheck@sha256:6709709a8cfd6e2d743c86d58398c00ca4eb26befd3b1a0a629ab35f91e98ef0
14+
FROM gcr.io/kctf-docker/healthcheck@sha256:35a21466f658914ad33b700c2b1c938ed6ec739ecf73c8766ab565509d203660
1515

1616
COPY healthcheck_loop.sh healthcheck.py healthz_webserver.py /home/user/
1717

dist/challenge-templates/web/challenge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ COPY web-servers /web-servers
4040

4141
COPY flag /
4242

43-
FROM gcr.io/kctf-docker/challenge@sha256:0f7d757bcda470c3bbc063606335b915e03795d72ba1d8fdb6f0f9ff3757364f
43+
FROM gcr.io/kctf-docker/challenge@sha256:eb0f8c3b97460335f9820732a42702c2fa368f7d121a671c618b45bbeeadab28
4444

4545
RUN apt-get update \
4646
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends tzdata apache2 \

dist/challenge-templates/web/healthcheck/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/healthcheck@sha256:6709709a8cfd6e2d743c86d58398c00ca4eb26befd3b1a0a629ab35f91e98ef0
14+
FROM gcr.io/kctf-docker/healthcheck@sha256:35a21466f658914ad33b700c2b1c938ed6ec739ecf73c8766ab565509d203660
1515

1616
COPY healthcheck_loop.sh healthcheck.py healthz_webserver.py /home/user/
1717

dist/challenge-templates/xss-bot/challenge/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/challenge@sha256:0f7d757bcda470c3bbc063606335b915e03795d72ba1d8fdb6f0f9ff3757364f
14+
FROM gcr.io/kctf-docker/challenge@sha256:eb0f8c3b97460335f9820732a42702c2fa368f7d121a671c618b45bbeeadab28
1515

1616
RUN apt-get update && apt-get install -y gnupg2 wget
1717

dist/challenge-templates/xss-bot/healthcheck/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
FROM gcr.io/kctf-docker/healthcheck@sha256:6709709a8cfd6e2d743c86d58398c00ca4eb26befd3b1a0a629ab35f91e98ef0
14+
FROM gcr.io/kctf-docker/healthcheck@sha256:35a21466f658914ad33b700c2b1c938ed6ec739ecf73c8766ab565509d203660
1515

1616
COPY healthcheck_loop.sh healthcheck.py healthz_webserver.py /home/user/
1717

dist/resources/operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4544,7 +4544,7 @@ spec:
45444544
value: 0.0.0.0/0
45454545
- name: SECURITY_POLICY
45464546
value: DISABLED
4547-
image: gcr.io/kctf-docker/kctf-operator@sha256:ad8cf85ab93a9cfbd8fa1ccc221851933a3e6ef554f18041c581b0f72b33cae2
4547+
image: gcr.io/kctf-docker/kctf-operator@sha256:211e729ab063f1b14509b834be540036f39017afbd2a50d55149942f03d26203
45484548
livenessProbe:
45494549
httpGet:
45504550
path: /healthz

kctf-operator/resources/constants.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ package resources
55
// == || These are set by automation || ==
66
// .. vv ........................... vv ..
77

8-
const DOCKER_CERTBOT_IMAGE = "gcr.io/kctf-docker/certbot@sha256:5cdc993bade510f0ffbad7d1e13d9d586ae5703aaf9b4111d0299a9e5e4bdcac"
9-
const DOCKER_GCSFUSE_IMAGE = "gcr.io/kctf-docker/gcsfuse@sha256:90d42ec41823b40bde0d04820ae757a67eb9fe1c100f44487d867c4042b82655"
8+
const DOCKER_CERTBOT_IMAGE = "gcr.io/kctf-docker/certbot@sha256:edb269ebc89d38e0f6e037087e707db68e13ebeda6a00e65126b098e49badf48"
9+
const DOCKER_GCSFUSE_IMAGE = "gcr.io/kctf-docker/gcsfuse@sha256:39078b111e0e8494599685b33c5a133cf5544958a19017a1811ac86f436dead7"
1010

1111
// .. ^^ ........................... ^^ ..
1212
// == || These are set by automation || ==

0 commit comments

Comments
 (0)