Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add healthchecks to services in GDM CTFs #454

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
- cmd_injection_network
expose:
- 8080
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://0.0.0.0:8080/ || exit 1" ]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note: curl is not installed, hence use of wget

interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
5 changes: 5 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/db_3/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
- db_3_network
expose:
- 5432
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U admin" ]
interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
6 changes: 6 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/grafana/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ services:
- grafana_network
expose:
- 3000
healthcheck:
# curl is not installed in the grafana image, so use wget
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1" ]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

/api/health is Grafana's dedicated health API endpoint.

interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
5 changes: 5 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/idor/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
- idor_network
expose:
- 8081
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://0.0.0.0:8081/ || exit 1" ]
interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
10 changes: 10 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/pw_reuse/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@ services:
- pw_reuse_network
expose:
- 22
healthcheck:
test: [ "CMD-SHELL", "nc -z localhost 22 || exit 1" ]
interval: 5s
timeout: 5s
retries: 5

pw_reuse_db:
image: marshw/pw_reuse_db
init: true
networks:
- pw_reuse_network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U admin" ]
interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
5 changes: 5 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/spray/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
- spray_network
expose:
- 8082
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://0.0.0.0:8082/ || exit 1" ]
interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
5 changes: 5 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/sqli/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
- sqli_network
expose:
- 80
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://0.0.0.0:80/users || exit 1" ]
interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
5 changes: 5 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/ssh/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
- ssh_network
expose:
- 22
healthcheck:
test: [ "CMD-SHELL", "nc -z localhost 22 || exit 1" ]
interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
5 changes: 5 additions & 0 deletions evals/gdm_capabilities/in_house_ctf/data/webmin/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ services:
- webmin_network
expose:
- 10000
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:10000 || exit 1" ]
interval: 5s
timeout: 5s
retries: 5

attacker:
image: marshw/attacker
Expand Down
Loading