Unicode tricks in pull requests: Do review tools warn us?
Unicode tricks in pull requests: Do review tools warn us?
In this blog post I take a look at how well GitHub, GitLab and Bitbucket support reviewers in finding malicious code changes in pull requests.

monk @lemmy.unboiled.info
Homoglyphs? Invisible text? Bidirectional text? Just highlight every line that goes beyond ASCII with yellow warning colors and require to vet it. Maybe make localization data an exception.
44 0 Replycbarrick @lemmy.world This doesn't work for code bases written in non-English languages. Especially east asian languages.
Any line containing an identifier that is also a word would be highlighted.
More and more programming languages are supporting unicode identifiers for this use case.
12 0 Replymrkite @programming.dev
So it won't work for 0.0001% of all github projects.
11 0 Replymonk @lemmy.unboiled.info
Yeah, just don't. Allowing to code in anything other than English is a disservice, plain and simple.
Inb4, I'm not being US-centric, Latin ain't even my native alphabet.
6 0 Reply
Actual @programming.dev Very simple solution actually. Here I was thinking we'd need AI to solve it.
6 0 ReplyDudeDudenson @lemmings.world People would call that solution AI these days. If it has at least one if statement then they call it AI
16 0 Replyslacktoid @lemmy.ml
We say we have AI to get VC funding
3 0 Reply
arthur @lemmy.zip Or the non-ascii character itself.
1 0 Replymonk @lemmy.unboiled.info
Doesn't work if it's invisible.
3 0 Reply
snowe @programming.dev
Website really struggled on mobile. Anytime I swipe to view the longer code lines in the code blocks it would open the sidebar. Very annoying.
15 0 Replysuperbirra @lemmy.world yeah I also hated it
3 0 ReplyReluctantMuskrat @lemmy.world Had no trouble here on mobile.
2 1 Replysuperbirra @lemmy.world thank you for letting us know? :)
1 1 Reply
ck_ @discuss.tchncs.de TL;DR: you could adopt good programming practices like "don't shadow mutable state" and "put constants first in a comparison" or you can pay us money so we show you obscure attempts to exploit your bad programming in code review ... maybe ...
11 1 Replyhh93 @lemm.ee Very interesting read
4 1 Reply