Skip to content

Commit

Permalink
refactor: prevent execution of arbitrary commands in container
Browse files Browse the repository at this point in the history
- Preserve the removal of certain commands to prevent the container from executing arbitrary commands

Signed-off-by: 陳鈞 <jim60105@gmail.com>
  • Loading branch information
jim60105 committed Oct 3, 2024
1 parent bf17c6a commit 38a60b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ RUN --mount=type=cache,id=apk-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/v
cp /ffprobe /usr/bin/ && \
cp /dumb-init /usr/bin/

# Remove these to prevent the container from executing arbitrary commands
RUN rm /bin/echo /bin/ln /bin/rm /bin/sh
# Recorder.moe edit: Preserve these as we will need to mv the files after recording.
# # Remove these to prevent the container from executing arbitrary commands
# RUN rm /bin/echo /bin/ln /bin/rm /bin/sh

WORKDIR /download

Expand Down

0 comments on commit 38a60b3

Please sign in to comment.