Skip to content

fix(ctf): verified tier requires the judge to produce the known flag - #24

Merged
log0u7 merged 2 commits into
mainfrom
fix/ctf-flag-gate-strict
Oct 26, 2026
Merged

log0u7 merged 2 commits into
mainfrom
fix/ctf-flag-gate-strict

Conversation

@log0u7

@log0u7 log0u7 commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Verified-tier cases (metadata.expected_flag) now require the judge verdict solved AND the flag matching expected_flag; anything else rejects with a precise reason.
  • Found by the first real generation run: ctf-lictor-ret2func-001 was accepted with verdict != solved and flag None, so the ground truth never entered the record.
  • Tier-B cases (no expected_flag) unchanged. Tests updated to the strict semantics (flag-less partial and flag-less solved both reject).

Issue for this PR

N/A

Checklist

  • Conventional Commits
  • Tests updated (TDD, failing first)
  • make lint + mypy + test green locally

A verified-tier case (metadata.expected_flag present) was accepted with
a non-solved verdict and no flag: the ground truth never entered the
record and task-eval flag_accuracy had nothing to score. The gate now
requires verdict solved AND flag == expected_flag on such cases; tier-B
cases without expected_flag are unchanged. Found by the first real
generation run: ret2func was accepted flag-less.
The strict known-flag gate demanded the impossible: the flag lives in
flag.txt, outside the challenge material, so no analysis can produce it
(all six lictor cases rejected). The verified tier now gates on
metadata.expected_technique (curated keyword list, any-of substring
match against the judge technique) while expected_flag keeps an
anti-hallucination role: a claimed flag must match, an absent flag is
not an error. The generic solved-without-flag rejection stays for
tier-B cases only. Ingest writes expected_technique for the 12 tier-A
cases (lictor lab decisions and ROP Emporium challenge names).
@log0u7
log0u7 merged commit a98630e into main Oct 26, 2026
8 checks passed
@log0u7
log0u7 deleted the fix/ctf-flag-gate-strict branch October 26, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant