Skip to content

Handouts and attachments ​

Attachments ​

Files players can download from the challenge page. List them in the metadata, relative to the compose file:

YAML
x-ctf-metadata:
    # ...
    attachments:
        - dist/chall.zip
        - notes.txt # rendered from notes.txt.plf

Attachments are rendered for the team downloading them, with is_export set, so they can contain per-team values. To attach a rendered file, use its name without .plf. ctfgarden lint checks that every attachment exists.

Handouts ​

With auto_publish_src: true, players can also download the whole challenge directory once the challenge is released, for example so they can run it locally. The handout is the challenge directory with:

  • all templates rendered for the downloading team, with is_export set (so flag() returns a fake flag),
  • files matching a .ctfignore left out (same syntax as .gitignore, also in subdirectories),
  • the _ctfgarden directories and the x-ctf-metadata block removed.

Build the handout locally to check what's in it:

sh
ctfgarden render -o /tmp/rendered --handout /tmp/handout.tar.gz

Imprint