A CTFd plugin that filters challenges by team track (red-team / blue-team).
Designed for Operation Vercors where two parallel tracks exist:
- Red Team (GRANITE STORM) — 50 attacker challenges
- Blue Team (VEM-CERT) — 45 defender challenges
- Teams choose their track at creation time via an extended team creation form
- An
after_requesthook filtersGET /api/v1/challengesto show only challenges whose category starts with the team's track prefix ("Red Team"or"Blue Team") - Direct access to individual challenges (
/api/v1/challenges/<id>) from the wrong track returns 404 - CSS theming changes the navbar and accent colors based on the team's track
- An admin page at
/admin/track_filterlets admins view and reassign team tracks
Mount the track_filter/ directory into CTFd's plugins folder:
# docker-compose.yml
ctfd:
volumes:
- ./CTFd-TrackFilter/track_filter:/opt/CTFd/CTFd/plugins/track_filterThe plugin auto-creates its database table (team_tracks) on first load.
Challenges must use category prefixes matching the track:
Red Team — reconnaissanceBlue Team — forensics[Optional] Red Team — bonus(optional prefix is stripped before matching)
cd CTFd-TrackFilter
PYTHONPATH=. python3 -m pytest tests/ -vTests run standalone with a minimal Flask+SQLAlchemy environment (no CTFd installation required).