A Telegram bot that surfaces daily trending GitHub repositories exposed a sophisticated supply-chain trap disguised as the legitimate Microsoft Activation Scripts project.
The repository appeared in the bot’s feed on 26 September with 1774 stars, a clean description and matching tags. Its single README file contained an installation command written in reversed form: iex(irm(-join"…"[-1..-99])). PowerShell reversed the string at runtime, fetched a script from a lookalike domain and executed it immediately, bypassing both human review and simple link scanners.
The attacker’s account had been created only 94 seconds before the repository. The command mimicked the real one-liner used by genuine Microsoft Activation Scripts, increasing the chance that developers would paste it directly into a terminal.
Why obvious filters fail
Scanning 321 repositories sent by the bot between 15 July and 8 October showed that blocking any irm|iex pattern from non-GitHub domains would hide 38 legitimate projects, including codex and opencode, as well as installers for rustup and uv. Checking only account age also failed: on the day the trap appeared the account was already 34 days old.
Two independent signals proved effective. The first normalizes README text, removes invisible characters and backticks, then detects masked execution via reversed strings, base64, mshta, certutil, bitsadmin or -WindowStyle Hidden. The second flags one-time owners created less than 30 days before the repository when the repository contains less than 10 KB or only README and LICENSE files.
Both rules triggered exclusively on the malicious activator and were deployed on 9 October. The bot now replaces flagged repositories, explains the reason and removes the summary button.
Preventing LLM hallucinations
The same pipeline uses DeepSeek to generate one-sentence Russian summaries. A groundedness check adapted from the open-source KKKKhazix/AIHOT project rejects any Latin-capitalized word, number over two digits or percentage absent from the source text. After tuning, the filter reduced false rejections to five cases out of 303 summaries while catching real fabrications such as references to Ruby, Cypress and Scratch.
