`set_award` accepts awards on non-bounty tickets, and Discord `/bounty` converts them to bounty tickets — bypassing the XE-0789 guard the web route enforces
Report
Summary
desk/services/tickets.py:949 set_award checks amount, ceiling,
and approval-change only — no kind or status check.
desk/api/team.py:185-191 (the award route) adds only the award
permission check, no kind check. So a treasurer can put an award on a
support ticket. Then desk/services/channels.py:231
convert_to_bounty — whose only 409 is "already a bounty ticket", with
no award/status check — converts it to a bounty ticket with the award
intact. The web route set_kind (desk/api/team.py:118-140) blocks
exactly this conversion with 409 when t.award_xe or t.award_approved_at or t.status in settled (XE-0789). Discord
/bounty (desk/bots/discord_bot.py:364-372, team-role gated via
need_team) calls convert_to_bounty then commits — the bypass.
Impact
- Awarded support ticket becomes a bounty ticket. The converted ticket can then travel the full bounty pipeline toward payment — which is what XE-0789 was meant to prevent.
- Scope limit (stated plainly). Needs a treasurer (to award) AND
a team-role Discord user (to convert). No direct payout: the award
still needs approval on a patched/disclosed ticket, and
mark_paidneedsawardedstatus. Privileged actors only, and the bypass is of a guard, not of the payment checks themselves.
Severity reasoning
- Minor, not Low: two privileged actors are needed and the payment checks still stand, so the practical harm is a guard bypass that lets a wrong-kind ticket enter the bounty pipeline — not a direct payout. Minor is honest for a privileged-actor guard bypass with no direct fund path.
Root cause
The kind/status floor exists in exactly one place (set_kind, the web
route) instead of in the shared service functions (set_award,
convert_to_bounty), so the Discord path — which calls the services
directly — never sees it.
Reproduction
A. Python harness (primary evidence — PASS)
Harness /tmp/desk4/h1_sqlite.py (real SQLite DB, real service code
- real team route for the contrast).
set_awardon anewsupport ticket setaward_xe=1_000_000with no error;convert_to_bountyflipped it tokind=bountywith the award intact; the identical conversion via the team route raised HTTP 409 ("a new ticket with a bounty record is not converted; close it"). Harness printsBUG CONFIRMED.
Dedup note
Checked against the live public report list at https://bounty.xe.network
(166 public tickets, checked 2026-11-09). XE-0789 is the in-repo
reference for the set_kind guard itself; this report is about the
two paths that bypass it (set_award with no kind floor, and Discord
/bounty → convert_to_bounty). No known report covers the bypass.
Suggested fix direction
- Add the kind/status floor to
set_award(refuse awards on non-bounty tickets) and toconvert_to_bounty(refuse conversion whenaward_xe/award_approved_atis set or status is settled), so every entry point enforces the XE-0789 rule, not just the web route.
References (file:line, desk @ 186af22)
| Location | What it shows |
|---|---|
desk/services/tickets.py:949 (set_award) |
Amount/ceiling/approval checks only; no kind or status check |
desk/api/team.py:185-191 (award route) |
Permission check only; no kind check |
desk/services/channels.py:231 (convert_to_bounty) |
Only 409 is "already a bounty ticket" |
desk/api/team.py:118-140 (set_kind) |
Blocks the same conversion with 409 (XE-0789) |
desk/bots/discord_bot.py:364-372 (/bounty) |
Team-role gated; calls convert_to_bounty then commits |
/tmp/desk4/h1_sqlite.py |
Verification harness (BUG CONFIRMED) |
Payout address
052e33e0ed9c43e2bdf07faff9a90d25642b51d53d96f49f5d45b81f6584b3da
NOTE — operator must confirm this payout address (or replace it with their own) before submission. This is the hunt testnet wallet generated for faucet/PoC work; it is the address the reporter intends to receive any award at, pending operator confirmation.
Thread
Thank you for this report. We have read it against the code and it is being handled. The assessment and any award follow the fix. https://bounty.xe.network/XE-1799