Skip to content

Upgrade embedded Unalix: security fixes + updated rulesets#11

Open
DigitalCyberSoft wants to merge 1 commit into
danielzting:mainfrom
DigitalCyberSoft:upgrade-unalix
Open

Upgrade embedded Unalix: security fixes + updated rulesets#11
DigitalCyberSoft wants to merge 1 commit into
danielzting:mainfrom
DigitalCyberSoft:upgrade-unalix

Conversation

@DigitalCyberSoft

@DigitalCyberSoft DigitalCyberSoft commented Apr 13, 2026

Copy link
Copy Markdown

The embedded Unalix hasn't been touched since Feb 2022. The ClearURLs ruleset was 33 providers behind upstream, and the library had a few security issues worth fixing (ReDoS in regex compilation, broken IPv6 parsing, recursive redirect with no depth limit in clear_url()).

This upgrades the embedded copy to our maintained fork at https://github.com/DigitalCyberSoft/Unalix and trims out everything the bot doesn't use (HTTP client, SSL, cookies, CA bundle, exceptions) since it only calls clear_url().

The big win is coverage. ClearURLs rules go from 173 to 206 providers, plus two new ruleset files add another 72 providers covering stuff ClearURLs hasn't picked up yet — gbraid, wbraid, msclkid, ttclid, li_fat_id, HubSpot, MailChimp, ConvertKit, and a handful of affiliate redirect services like Slack, CJ Affiliate, and Impact Radius. The full list is in the unalix_extended.json file.

Also ships detect_homograph() and a custom rules API (rulesets_from_dict) but neither is wired into the bot — just available if you want them later.

Zero changes to main.py. clear_url() signature is backward compatible.

…used code

Bundled Unalix was from Feb 2022 with known vulnerabilities and stale rules.
Rules: 173 -> 206 ClearURLs providers + 72 new (unalix.json + unalix_extended.json).
Removed unused HTTP client, SSL, cookies, CA bundle — bot only uses clear_url().
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