Skip to content

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:

YAML
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 always

Logged-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 ​

OptionDefaultDescription
titleCertificate of ParticipationThe heading of the certificate
organizerThe event nameShown in small caps above the title
introThis certifies thatText above the name
textSee belowThe text below the name, as Typst markup
logoNoneImage shown at the top
signaturesNoneList of signature lines with name, role and an optional image
accent_color#16a34aColor of the frame, title line and organizer
fontLibertinus SerifFont family, see fonts
papera4Any 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_brackettrueWhether 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:

YAML
certificate:
  text: "has competed in *#event* as a member of #team and solved #solves challenges."
VariableDescription
nameDisplay name of the player
usernameUsername of the player
teamTeam name, or none in solo competitions
bracketBracket name, or none
eventEvent name
solvesNumber of solved challenges
start, endStart 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:

YAML
certificate:
  template: certificate/certificate.typ # Relative to the repository root
  # Any other options are passed to your template
  sponsor: ACME Corp

Your template can access the following values through sys.inputs:

KeyTypeDescription
namestrDisplay name of the player
usernamestrUsername of the player
teamstr or noneTeam name
actorstrteam-<team slug> or user-<username>
bracketstr or noneBracket name
solvesintNumber of challenges solved by the player (or their team)
event_namestrEvent name
event_start, event_enddatetimeStart and end date of the event
issueddatetimeThe day the certificate was generated
configdictionaryAll options from the certificate section, apart from template, min_solves and available_from
evidencearrayOnly for cheater certificates, see below. Empty for normal certificates

For example:

typst
#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.sponsor

Templates 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:

YAML
certificate:
  template: certificate/certificate.typ # Optional, for everyone else
  cheater_template: certificate/cheater.typ # Relative to the repository root

The cheater template gets the same sys.inputs as a custom template, plus evidence, a list of dictionaries with these keys:

KeyTypeDescription
descriptionstrWhat happened, for example "Solved a challenge that only bots can see"
challengestr or noneThe challenge ID
scoreintHow much this added to the suspicion score
timestrWhen it happened (YYYY-MM-DD HH:MM, UTC)
by_recipientboolWhether the recipient caused it themselves. Events that can't be attributed to a single player (for example shared IP addresses) are false

For example:

typst
#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:

sh
ctfgarden render --certificate certificate.pdf path/to/repo --name "Alice Example" --team "The Gardeners" --solves 7

Add --cheater to render the cheater certificate with sample evidence:

sh
ctfgarden render --certificate cheater.pdf path/to/repo --name "Alice Example" --team "The Gardeners" --cheater

Imprint