You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/scripts/docker-create.sh
+33-4
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ Help() {
7
7
# Display Help
8
8
echo"A versatile script to create a docker image for testing. Call this script with no arguments to simply create a local image that you can use to test your changes. For more complex use see the below help section"
echo"tag= Write a custom tag that will be added to the container when it is build locally."
13
13
echo"message= Write a message used for the actual tag-message in git"
@@ -28,6 +28,23 @@ break_on_tag(){
28
28
exit
29
29
fi
30
30
}
31
+
32
+
Okteto_redeploy(){
33
+
break_on_tag
34
+
echo"Rebuilding the Okteto environment: https://wrongsecrets-commjoen.cloud.okteto.net/"
35
+
echo"Check if all required binaries are installed"
36
+
source ../../scripts/check-available-commands.sh
37
+
checkCommandsAvailable okteto
38
+
echo"validating okteto k8 deployment to contain the right container with tag "${tag}" (should be part of '$(cat ../../okteto/k8s/secret-challenge-deployment.yml | grep image)')"
39
+
if [[ "$(cat ../../okteto/k8s/secret-challenge-deployment.yml | grep image)"!=*"${tag}"* ]];then
40
+
echo"tag ${tag} in ../../okteto/k8s/secret-challenge-deployment.yml not properly set, aborting"
41
+
exit
42
+
fi
43
+
cd ../../okteto
44
+
okteto destroy
45
+
okteto deploy
46
+
}
47
+
31
48
heroku_check_container() {
32
49
break_on_tag
33
50
echo"validating dockerfile to contain tag "${tag}" (should be part of '$(head -n 1 ../../Dockerfile.web)')"
@@ -90,7 +107,7 @@ Fly_publish(){
90
107
# Set option to local if no option provided
91
108
script_mode="local"
92
109
# Parse provided options
93
-
whilegetopts":htpefgn*" option;do
110
+
whilegetopts":htpefgon*" option;do
94
111
case$optionin
95
112
h) # display Help
96
113
Help
@@ -111,6 +128,9 @@ while getopts ":htpefgn*" option; do
111
128
g) #Helper
112
129
script_mode="fly_p"
113
130
;;
131
+
o) #okteto
132
+
script_mode="okteto"
133
+
;;
114
134
n) #notags
115
135
disable_tagging_in_git="true"
116
136
;;
@@ -127,7 +147,7 @@ done
127
147
################################################
128
148
forARGUMENTin"$@";
129
149
do
130
-
if [[ $ARGUMENT!="-h"&&$ARGUMENT!="-t"&&$ARGUMENT!="-p"&&$ARGUMENT!="-e"&&$ARGUMENT!="-f"&&$ARGUMENT!="-g" ]]
150
+
if [[ $ARGUMENT!="-h"&&$ARGUMENT!="-t"&&$ARGUMENT!="-p"&&$ARGUMENT!="-e"&&$ARGUMENT!="-f"&&$ARGUMENT!="-g"&&$ARGUMENT!="-o"]]
Don't want to go over the hassle of setting up K8S yourself? visit [https://wrongsecrets-commjoen.cloud.okteto.net](https://wrongsecrets-commjoen.cloud.okteto.net/). Please note that we are using the free Developer version here, so it might take a while for it to respond. Please: do not try to hack/Fuzz the application as this might bring it down and spoil the fun for others.
133
+
129
134
## Vault exercises with minikube
130
135
131
-
_Can be used for challenges 1-8, 12-23_
136
+
_Can be used for challenges 1-8, 12-24_
132
137
Make sure you have the following installed:
133
138
134
139
- minikube with docker (or comment out line 8 and work at your own k8s setup),
@@ -148,7 +153,7 @@ vault and not update the secret-challenge application with the new secret.
148
153
149
154
## Cloud Challenges
150
155
151
-
_Can be used for challenges 1-23_
156
+
_Can be used for challenges 1-24_
152
157
153
158
**READ THIS**: Given that the exercises below contain IAM privilege escalation exercises,
154
159
never run this on an account which is related to your production environment or can influence your account-over-arching
@@ -370,7 +375,7 @@ If you want to play the challenges, but cannot install tools like keepass, Radar
370
375
containers, try the following:
371
376
372
377
```shell
373
-
docker run -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock jeroenwillemsen/wrongsecrets-desktop:1.5.2
378
+
docker run -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock jeroenwillemsen/wrongsecrets-desktop:latest
374
379
```
375
380
376
381
or use something more configurable:
@@ -386,9 +391,9 @@ docker run -d \
386
391
-e KEYBOARD=en-us-qwerty \
387
392
-p 3000:3000 \
388
393
-v /var/run/docker.sock:/var/run/docker.sock \
389
-
--shm-size="1gb" \
394
+
--shm-size="2gb" \
390
395
--restart unless-stopped \
391
-
jeroenwillemsen/wrongsecrets-desktop:1.5.2
396
+
jeroenwillemsen/wrongsecrets-desktop:latest
392
397
```
393
398
394
399
And then at [http://localhost:3000](http://localhost:3000).
Copy file name to clipboardExpand all lines: gcp/README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Make sure you have an active account at GCP for which you have configured the cr
20
20
21
21
If you want to host a multi-user setup, you will probably want to share the state file so that everyone can try related challenges. We have provided a starter to easily do so using a Terraform gcs backend.
22
22
23
-
First, create an s3 bucket:
23
+
First, create an storage bucket:
24
24
25
25
1. Navigate to the 'shared-state' directory `cd shared-state`
26
26
2. Change the `project_id` in the `terraform.tfvars` file to your project id
@@ -44,7 +44,7 @@ The bucket name should be in the output. Please use that to configure the Terraf
44
44
5. Run `terraform init` (if required, use tfenv to select TF 0.14.0 or higher )
45
45
6. Run `terraform plan`
46
46
7. Run `terraform apply`. Note: the apply will take 10 to 20 minutes depending on the speed of the GCP backplane.
47
-
8. When creation is done, run `gcloud container clusters get-credentials wrongsecrets-exercise-cluster --region YOUR_REGION`
47
+
8. When creation is done, run `gcloud container clusters get-credentials wrongsecrets-exercise-cluster --region YOUR_REGION`. Note if it errors on a missing plugin to support `kubectl`, then run `gcloud components install gke-gcloud-auth-plugin` and `gcloud container clusters get-credentials wrongsecrets-exercise-cluster` .
0 commit comments