Repository navigation
Description
Problem
On v5, the Discord posts hive sends carry no allowed_mentions. Anyone who can open an issue in a managed repo controls text that hive reposts. A title such as RFC: @everyone β¦, or one containing <@&ROLE_ID>, therefore pings the whole server or the whole role when hive posts it.
The most direct path is the RFC lifecycle notifier (#14616 / #14617, v5 only). rfcnotify.Format puts the raw issue title into RFC opened: #N <title> β¦. That line goes to #architecture-rfcs through Bot.SendMessageTo. Any issue whose title starts with RFC qualifies.
#9128 fixed this class of bug in #9214 (4980b73bb, suppress mentions in outbound chat notifications). That issue was scoped "v6 only, do not backport". The RFC notifier landed on v5 afterwards and reuses the unfixed v5 sender.
Where (v5)
| Path | Payload today | v6 equivalent |
|---|---|---|
src/pkg/discord/bot.go:201 SendMessageTo: the only bot POST; SendMessage and the drain queue go through it |
{"content": β¦} |
bot.go:183 adds "allowed_mentions": {"parse": []} |
src/pkg/notify/notify.go:155 sendDiscordWebhook |
{"content": β¦, "flags": SUPPRESS_EMBEDS} |
notify.go:166 adds "allowed_mentions": {"parse": []} |
Untrusted text that reaches these senders includes:
- RFC titles (
src/cmd/hive/rfcnotify_wire.go:85) - notifier messages built from issue titles and agent output
Fix
Port #9214's two payload changes to v5. Add "allowed_mentions": {"parse": []} to both payloads.
- Literal
@everyone,@hereand<@β¦>text still appears in the post; it just no longer pings anyone. - The fix leaves message wording alone and needs no config change.
- The bot never pings deliberately on
v5, so nothing is lost.
Acceptance
- A test on
SendMessageToasserts that the request body hasallowed_mentions.parse == []. Use thehttptestserver pattern fromsrc/pkg/discord/bot_test.go. - A matching test on
sendDiscordWebhookasserts the same. - An RFC titled
RFC: @everyone testposts the literal text and pings nobody. changelog.d/security-discord-suppress-mentions.mdfragment.
Related
- π [v6] chat: untrusted text reaches Slack/Discord unescaped β
<!channel>/<!here>,@everyone, role/user mentions from issue titles or agent summaries mass-ping the channelΒ #9128 / fix(v6): suppress mentions in outbound chat notificationsΒ #9214: the same fix onv6. - π RFC: Richer RFC publishing to Discord #architecture-rfcs β summary cards, one thread per RFC, dedupΒ #15869: the RFC for richer RFC publishing to Discord. That RFC assumes this fix lands first; this issue should not wait for it.
Activity
hivecommons-hive commentedon Oct 30, 2026
π Claimed by agent
scanner(agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Oct 30, 2026
π Claim by agent
scannerreleased (holding agent relaunched).github-actions commentedon Oct 30, 2026
@hanthor this issue was closed by @hivecommons-hive[bot] as completed.
If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it β check your running version against the fix before concluding the fix failed.
If you are still seeing the problem, comment
/reopenand it will be reopened for you β you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.hivecommons-hive commentedon Oct 30, 2026
Fixed by #15874 (#15874, merged). Closing because Hive's PR claim metadata says this PR was the full fix.