Attendance certificates
CTFGarden can generate attendance certificates as PDF for your players. Certificates are rendered with Typst, so you can either configure the built-in design or write your own template.
Certificates are disabled by default. To enable them, add a certificate section to your event.yml:
certificate:
# All of these are optional
title: Certificate of Participation
organizer: The MyCTF Team # Shown above the title, defaults to the event name
logo: assets/logo.svg # Path relative to the repository root (SVG, PNG, JPG, GIF or WebP)
accent_color: "#16a34a"
signatures:
- name: Jane Doe
role: Head organizer
image: assets/signature-jane.png # Optional
- name: John Doe
role: Infrastructure
# Restrict who can get a certificate
min_solves: 1 # Defaults to 0
available_from: 2026-11-20T10:00:00Z # Defaults to alwaysLogged-in players can then download their certificate from /generate-certificate. In team CTFs, the certificate is issued to the player and shows their team, and min_solves counts the challenges solved by the whole team.
Certificates are only available after the admins have locked the final scoreboard, so cheaters can't get a normal certificate before they're reviewed. min_solves and available_from apply in addition to that.
Authors and admins can always generate a certificate, regardless of the scoreboard lock, min_solves and available_from, so you can check what it looks like before the event ends.
Options for the built-in template
| Option | Default | Description |
|---|---|---|
title | Certificate of Participation | The heading of the certificate |
organizer | The event name | Shown in small caps above the title |
intro | This certifies that | Text above the name |
text | See below | The text below the name, as Typst markup |
logo | None | Image shown at the top |
signatures | None | List of signature lines with name, role and an optional image |
accent_color | #16a34a | Color of the frame, title line and organizer |
font | Libertinus Serif | Font family, see fonts |
paper | a4 | Any Typst paper size, for example us-letter. The certificate is always in landscape |
date_format | [month repr:long] [day padding:none], [year] | Typst date format |
show_bracket | true | Whether to show the bracket of the team |
By default, the text says that the player participated in the event, when the event took place, and how many challenges they solved. You can replace it with your own text, which can use these variables:
certificate:
text: "has competed in *#event* as a member of #team and solved #solves challenges."| Variable | Description |
|---|---|
name | Display name of the player |
username | Username of the player |
team | Team name, or none in solo competitions |
bracket | Bracket name, or none |
event | Event name |
solves | Number of solved challenges |
start, end | Start and end date of the event, formatted with date_format |
Custom templates
If you want full control over the design, write your own Typst template and reference it in the configuration:
certificate:
template: certificate/certificate.typ # Relative to the repository root
# Any other options are passed to your template
sponsor: ACME CorpYour template can access the following values through sys.inputs:
| Key | Type | Description |
|---|---|---|
name | str | Display name of the player |
username | str | Username of the player |
team | str or none | Team name |
actor | str | team-<team slug> or user-<username> |
bracket | str or none | Bracket name |
solves | int | Number of challenges solved by the player (or their team) |
event_name | str | Event name |
event_start, event_end | datetime | Start and end date of the event |
issued | datetime | The day the certificate was generated |
config | dictionary | All options from the certificate section, apart from template, min_solves and available_from |
evidence | array | Only for cheater certificates, see below. Empty for normal certificates |
For example:
#let inputs = sys.inputs
#set page(paper: "a4", flipped: true)
#set align(center + horizon)
#text(size: 32pt)[Certificate]
#text(size: 24pt, inputs.name)
participated in #inputs.event_name on #inputs.event_start.display() \
sponsored by #inputs.config.sponsorTemplates can use images, data files and other Typst files from the repository. Paths are relative to the template, or to the repository root if they start with /. Files outside of the repository and Typst packages can't be used.
Cheater certificates
Players in actors that are flagged as cheaters don't get the normal certificate. They get a deliberately unprofessional "Certificate of Participation Copy-Pasting" instead, with an appendix that lists the evidence against their team or account: every suspicion event, including repeated evidence that didn't add to the score (up to 300), oldest first. In team CTFs, the rows caused by the recipient themselves are highlighted. Some evidence (for example traffic or shared IP addresses) can't be attributed to a single player and is never highlighted.
Flagged actors always get their certificate once the scoreboard is locked: min_solves and available_from don't apply to them.
The appendix uses anonymized descriptions, like "Submitted a flag that belongs to another team". Other actors, IP addresses, flags and canary values are never included. The built-in cheater certificate uses organizer and paper from the certificate section.
To use your own design, set cheater_template:
certificate:
template: certificate/certificate.typ # Optional, for everyone else
cheater_template: certificate/cheater.typ # Relative to the repository rootThe cheater template gets the same sys.inputs as a custom template, plus evidence, a list of dictionaries with these keys:
| Key | Type | Description |
|---|---|---|
description | str | What happened, for example "Solved a challenge that only bots can see" |
challenge | str or none | The challenge ID |
score | int | How much this added to the suspicion score |
time | str | When it happened (YYYY-MM-DD HH:MM, UTC) |
by_recipient | bool | Whether the recipient caused it themselves. Events that can't be attributed to a single player (for example shared IP addresses) are false |
For example:
#let inputs = sys.inputs
#set page(paper: "a4", flipped: true)
= Not quite a certificate for #inputs.name
#for e in inputs.evidence [
- #e.time: #e.description (+#e.score)
]Fonts
The fonts embedded in Typst (Libertinus Serif, New Computer Modern and DejaVu Sans Mono) are always available. System fonts are not used, so certificates look the same everywhere.
To use other fonts, put the font files (.ttf, .otf, .ttc) into a fonts directory in the root of the repository.
Previewing certificates locally
You can render a certificate without deploying the platform using the local development CLI:
ctfgarden render --certificate certificate.pdf path/to/repo --name "Alice Example" --team "The Gardeners" --solves 7Add --cheater to render the cheater certificate with sample evidence:
ctfgarden render --certificate cheater.pdf path/to/repo --name "Alice Example" --team "The Gardeners" --cheater