Skip to content

Addressed issue #117#1

Open
poli-gosha wants to merge 3 commits intosecurity-summer-school:masterfrom
poli-gosha:master
Open

Addressed issue #117#1
poli-gosha wants to merge 3 commits intosecurity-summer-school:masterfrom
poli-gosha:master

Conversation

@poli-gosha
Copy link
Copy Markdown

@poli-gosha poli-gosha commented Apr 4, 2026

Prerequisite Checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Updated relevant documentation (if needed).

Description of changes

@poli-gosha
Copy link
Copy Markdown
Author

Addressed all of the problems mentioned in the issue

@poli-gosha poli-gosha closed this Apr 4, 2026
@poli-gosha poli-gosha reopened this Apr 4, 2026
@@ -1,3 +1,16 @@
FROM php:7.2-apache as builder
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use alpine, no need to use apache image here since it is bigger.

@@ -1,3 +1,16 @@
FROM php:7.2-apache as builder

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the same structure as ARG FLAG

Comment on lines +4 to +5
COPY flag ./flag
COPY src/ ./src/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to copy the flag, copy only the file that has the flag and change it. Like flag-template.php to flag.php.

@@ -1,20 +1,17 @@
FILE := ../flag
FLAG := $(shell cat $(FILE))
EXTERNAL_PORT := 8002
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use EXTERNAL_PORT := 30100 for this one.

FLAG := $(shell cat $(FILE))
EXTERNAL_PORT := 8002
INTERNAL_PORT := 80
NAME := sss-web-08_todo-app
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets name this one exotic-attacks_todo-app

run: generate build
docker run -d -p 8002:80 --name sss-web-08_todo-app sss-web-08_todo-app
run: build
docker run -d -p $(EXTERNAL_PORT):$(INTERNAL_PORT) --name $(NAME) $(NAME)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker run -d -p $(EXTERNAL_PORT):$(INTERNAL_PORT) --name $(NAME) $(NAME)
docker run -d -p $(EXTERNAL_PORT):$(INTERNAL_PORT) --name $(NAME) -t $(NAME)

generate:
sed 's/__TEMPLATE__/$(FLAG)/g' ../src/flag-template.php > ../src/flag.php
build:
docker build -f Dockerfile -t $(NAME) ..
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker build -f Dockerfile -t $(NAME) ..
docker build --build-arg FLAG=$(FLAG) -t $(NAME) -f Dockerfile ..

Comment on lines +12 to +15
docker stop $(NAME)

clean: stop
docker rm sss-web-08_todo-app
rm ../src/flag.php
docker rm $(NAME)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
docker stop $(NAME)
clean: stop
docker rm sss-web-08_todo-app
rm ../src/flag.php
docker rm $(NAME)
clean: stop
docker rm $(NAME)
docker image rm $(NAME):latest


tolerations: []

affinity: {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for this ones.

Copy link
Copy Markdown
Author

@poli-gosha poli-gosha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walked through all of them, hope to have solved them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants