added filter to decide what challenges to include

This commit is contained in:
2026-11-05 15:42:52 +01:00
parent 4fac6ed86d
commit 09849d0ef6
11 changed files with 214 additions and 28 deletions
+9 -1
View File
@@ -30,6 +30,8 @@ STATUS_RE = re.compile(r"testing\s*ready|tested|ready|poc(?:\s*draft)?|planning"
STATUS_ICON = {"Planning": "⚪", "PoC Draft": "🟠", "Testing Ready": "🟡",
"Tested": "🔵", "Ready": "🟢", None: "❔"}
BLOCKED_ICON = "⛔"
# what challenges.yml can say about a repo, and how the reports call it
SELECTIONS = {"included": "included", "abandoned": "abandoned", "postponed": "left for another CTF"}
CATEGORIES = ["crypto", "pwn", "web", "rev", "misc", "osint", "forensic", "hardware"]
DIFFICULTIES = ["intro", "easy", "medium", "hard"]
DIFF_RE = re.compile(r"intro|easy|medium|hard", re.I)
@@ -90,7 +92,9 @@ class Challenge:
repo: Repo
name: str = ""
fields: dict = field(default_factory=dict)
# filled in by overview.collect(), see checks.py
# filled in by overview.collect(), see selection.py and checks.py
selection: str | None = None # None: not in challenges.yml
skip_checks: list = field(default_factory=list)
problems: list = field(default_factory=list) # readme_problems()
blockers: list = field(default_factory=list) # repo_blockers()
@@ -131,6 +135,10 @@ class Challenge:
first = CATEGORY_SPLIT_RE.split(raw)[0].strip().lower()
return first or None
@property
def included(self) -> bool:
return self.selection == "included"
@property
def claims_testable(self) -> bool:
"""The README says Testing Ready or beyond; checks.is_testable() also asks the repo."""