Skip to content

Commit e56e28f

Browse files
committed
Add the initial files for the User example
[refs #5f494dd1073b]
1 parent 33d2958 commit e56e28f

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

user/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM alpine:latest
2+
3+
RUN mkdir /data \
4+
&& touch /data/secrets \
5+
&& chmod 700 /data/secrets
6+
7+
COPY evil-script.sh /
8+
9+
CMD ["/evil-script.sh"]

user/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: "3"
2+
3+
services:
4+
app:
5+
build:
6+
context: .
7+
volumes:
8+
- ./evil-script.sh:/evil-script.sh

user/evil-script.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
echo This script runs as `whoami`
3+
echo Trying to gain access to sensitive information in /data/secrets
4+
cat /data/secrets > /dev/null && echo "Successfully opened the file! Posting stolen secrets on social media platforms..."
5+

0 commit comments

Comments
 (0)