diff --git a/tests/repo/misc/foo/challenge.yaml b/tests/repo/misc/foo/challenge.yaml deleted file mode 100644 index afcd2fd..0000000 --- a/tests/repo/misc/foo/challenge.yaml +++ /dev/null @@ -1 +0,0 @@ -name: foo-challenge diff --git a/tests/repo/misc/garf/challenge.yaml b/tests/repo/misc/garf/challenge.yaml new file mode 100644 index 0000000..384099a --- /dev/null +++ b/tests/repo/misc/garf/challenge.yaml @@ -0,0 +1,17 @@ +name: garf +author: some guy +description: | + enjoy this funky image + +# used for point values in rcds.yaml +# 0 for survey/rules chal? +# default: 1 +difficulty: 1 + +# alternatively, flag: dam{wtf} +flag: + text: dam{garf} + +# on-disk files or CI-generated zip of build artifacts? +provide: + - garf.webp diff --git a/tests/repo/misc/garf/garf.webp b/tests/repo/misc/garf/garf.webp new file mode 100644 index 0000000..212dd2b Binary files /dev/null and b/tests/repo/misc/garf/garf.webp differ diff --git a/tests/repo/rcds.yaml b/tests/repo/rcds.yaml index a42d556..7ca7c14 100644 --- a/tests/repo/rcds.yaml +++ b/tests/repo/rcds.yaml @@ -3,8 +3,12 @@ flag_regex: dam{[a-zA-Z...]} registry: domain: registry.example.com/damctf # then environment variables e.g. REG_USER/REG_PASS - user: admin - pass: admin + build: + user: admin + pass: notrealcreds + cluster: + user: cluster + pass: alsofake defaults: difficulty: 1 @@ -17,21 +21,21 @@ points: deploy: # control challenge deployment status explicitly per environment/profile - staging: + testing: misc/foo: true rev/bar: false profiles: # configure per-environment credentials etc - staging: + testing: frontend_url: https://frontend.example - # or environment var (recommended): FRONTEND_TOKEN_$PROFILE=secretsecretsecret - frontend_token: secret + frontend_token: secretsecretsecret challenges_domain: chals.frontend.example kubeconfig: path/to/kubeconfig kubecontext: damctf-cluster s3: - endpoint: x + # local minio + endpoint: localhost:9000 region: x - accessKey: key - secretAccessKey: secret + accessKey: accesskey + secretAccessKey: secretkey diff --git a/tests/repo/web/bar/Containerfile b/tests/repo/web/bar/Containerfile new file mode 100644 index 0000000..6d7b659 --- /dev/null +++ b/tests/repo/web/bar/Containerfile @@ -0,0 +1,3 @@ +FROM nginx + +COPY site_source/ /var/www/html/ diff --git a/tests/repo/web/bar/challenge.yaml b/tests/repo/web/bar/challenge.yaml index e69de29..c940313 100644 --- a/tests/repo/web/bar/challenge.yaml +++ b/tests/repo/web/bar/challenge.yaml @@ -0,0 +1,21 @@ +name: bar +author: foo bar +description: | + can you order a drink from the webserver? + + {{ url }} + +difficulty: 1 + +flag: + file: ./flag + +# each individual pod is gonna allow only 1 container for now +pods: + - name: bar + build: ./ + replicas: 1 + ports: + - internal: 80 + expose: + http: bar.chals.frontend.example diff --git a/tests/repo/web/bar/site_source/blue_moon_tap.jpg b/tests/repo/web/bar/site_source/blue_moon_tap.jpg new file mode 100644 index 0000000..a4deade Binary files /dev/null and b/tests/repo/web/bar/site_source/blue_moon_tap.jpg differ diff --git a/tests/repo/web/bar/site_source/flag b/tests/repo/web/bar/site_source/flag new file mode 100644 index 0000000..d4c8d5a --- /dev/null +++ b/tests/repo/web/bar/site_source/flag @@ -0,0 +1 @@ +dam{bar} diff --git a/tests/repo/web/bar/site_source/index.html b/tests/repo/web/bar/site_source/index.html new file mode 100644 index 0000000..98a7c24 --- /dev/null +++ b/tests/repo/web/bar/site_source/index.html @@ -0,0 +1,26 @@ + + + +
+ +