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: docs/for-authors/challenge-reference.md
+35-25Lines changed: 35 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# `challenge.yaml` Reference
1
+
# Challenge Config Reference
2
+
3
+
Challenge configuration is expected to be at `<category>/<name>/challenge.yaml`.
2
4
3
5
[[toc]]
4
6
@@ -28,14 +30,16 @@ author: Alice, Bob, and others
28
30
29
31
Description and flavortext for the challenge, as shown to players in the frontend UI. Supports templating to include information about the challenge, such as the link or command to connect.
{{ link }} # [https://somechal.chals.example.ctf](https://somechal.chals.example.ctf)
49
53
```
50
54
51
55
## `category`
52
56
53
57
The category for the challenge.
54
58
55
59
::: warning
56
-
Automatically set! This is set from the expected directory structure of `<category>/<challenge>/challenge.yaml` and overwrites whatever is set in the file.
60
+
This is set from the expected directory structure of `<category>/<challenge>/challenge.yaml` and will overwrite whatever is set in the file.
57
61
:::
58
62
59
63
## `difficulty`
@@ -62,7 +66,7 @@ Automatically set! This is set from the expected directory structure of `<catego
62
66
Not implemented yet, does nothing
63
67
:::
64
68
65
-
The difficulty from the challenge, used to set point values. Values correspond to entries in the [rcds.yaml difficulty settings](/for-sysadmins/config#difficulty).
69
+
The difficulty from the challenge, used to set point values. Values correspond to entries in the [rcds.yaml difficulty settings](../for-sysadmins/config#difficulty).
66
70
67
71
```yaml
68
72
difficulty: 1# the current default
@@ -73,18 +77,16 @@ difficulty: 1 # the current default
73
77
Where to find the flag for the challenge. The flag can be in a file, a regex, or a direct string.
74
78
75
79
```yaml
76
-
# directly set (equivalent)
80
+
# directly set
77
81
flag: ctf{example-flag}
78
-
flag:
79
-
string: ctf{example-flag}
80
82
81
83
# from a file in in the challenge directory
82
84
flag:
83
-
file: flag
85
+
file: ./flag
84
86
85
87
# regex
86
88
flag:
87
-
regex: /ctf\{(foo|bar|baz+)\}/
89
+
regex: /ctf\{(foo|bar|ba[xyz])\}/
88
90
```
89
91
90
92
::: info
@@ -103,7 +105,12 @@ provide:
103
105
- somefile.txt
104
106
- otherfile.txt
105
107
106
-
# rename a really long name as something shorter during upload
108
+
# these are all equivalent
109
+
- foo.txt
110
+
- include: foo.txt
111
+
- include: [ foo.txt ]
112
+
113
+
# rename a really long name as something shorter for upload
107
114
- as: short.h
108
115
include: some_really_long_name.h
109
116
@@ -145,9 +152,12 @@ File or list of files to upload individually, or include in a zip if `as` is set
145
152
146
153
When uploading, only the basename is used and the path to the file is discarded.
147
154
155
+
If a provide item is specified as a single string, it is interpreted as an `include:`.
156
+
148
157
### `.as`
149
158
150
-
If `include` is a single file, rename to the given name while uploading.
159
+
If `.include` is a single file, rename to this name while uploading.
160
+
151
161
If multiple files, zip them together into the given zip file.
152
162
153
163
### `.from`
@@ -223,8 +233,8 @@ Conflicts with [`build`](#build).
223
233
Any environment variables to set for the running pod. Specify as `name: value`.
224
234
225
235
```yaml
226
-
env:
227
-
SOME_ENVVAR: foo bar
236
+
env:
237
+
SOME_ENVVAR: foo bar
228
238
```
229
239
230
240
### `.architecture`
@@ -240,7 +250,7 @@ Set the desired CPU architecture to run this pod on.
240
250
241
251
The resource usage request and limits for the pod. Kubernetes will make sure the requested resources will be available for this pod to use, and will also restart the pod if it goes over these limits.
242
252
243
-
If not set, the default set in [`rcds.yaml`](config#rcds.yaml) is used.
253
+
If not set, the default set in [`rcds.yaml`](../for-sysadmins/config#rcds.yaml) is used.
244
254
245
255
### `.replicas`
246
256
@@ -249,7 +259,7 @@ How many instances of the pod to run. Traffic is load-balanced between instances
249
259
Default is 2 and this is probably fine unless the challenge is very resource intensive.
250
260
251
261
```yaml
252
-
replicas: 2 # the default
262
+
replicas: 2 # the default
253
263
```
254
264
255
265
### `.ports`
@@ -258,7 +268,7 @@ Specfies how to expose this pod to players, either as a raw TCP port or HTTP at
258
268
259
269
#### `.ports.internal`
260
270
261
-
What the container itself is listening on
271
+
The port the container is listening on; i.e. `xinetd` or `nginx` etc.
0 commit comments