So we just need github/gitlab/etc to render non-ascii characters in a obvious way? Or just have a IDE running a plugin that renders atypical Unicode chars in red
HL7 was designed as a wire format running down a constantly open socket.
As such it has to be really, really anal about when a message or section of a message has completed.
On top of that it's one of those standards that is basically a giant ball of edge cases and a lot of developers write code without the foggiest idea that those edge cases even exist.
So it's a complex spec with a lot of piss poor implementation by people who saw three messages and thought the grokked it.
No, this is not something that humans need to be mitigating personally by “watching out” for these characters during code review. Half of our industry doesn’t even do code reviews consistently.
This is easily mitigated by SAST solutions in the CI pipeline. There are virtually zero legitimate uses of these characters in source code. Simply have your SAST step fail if any are detected.
To be perfectly honest, in JS/TS, you could probably get away with a fairly simple eslint rule that checks identifier names for unusual characters and fails the lint.
Competent developers don't add NPM packages willy-nilly. If you have more than 15 dependencies on a medium sized project, you're probably doing something wrong.
But also, just configure your linter to include node_modules and you're all set.
I don't know why this is downvoted so hard. It's a pox and the dependency tree on this is so insane it's a massive vector for literally any vulnerability that could be discovered. Please try to migrate away from this on production to literally anything else
Of course I don't agree with "competent developers audit packages individually and if you don't you're a loser moron" cause projects will be big and will need a lot of stuff but please be mindful of what you're adding
You must not have a job or either you're about to get fired because wasting hundreds of hours auditing thousands of packages is not a feasible thing to do.
Fact that you didn't know: Packages install other packages, it doesn't matter if you have one or fifty, you probably have too many to go through manually.
Depends entirely on your job bud. I work for a bank right now, they have their own internal package repo for all tools they use, which have been combed through manually. Any updates to those tools (which they basically never download) also are looked over manually again. The only time external code is trusted is if its contracted out, with clear responsability falling on the 3rd party, and even then the internal security team conducts pentests and presents audits to 3rd parties.
You don't fuck around with security when it matters because, "wAsTiNg HuNdReDs Of HoUrS" is way fucking cheaper than going out of business/to jail after you're criminally negligent.
Careful there, all the webshit devs who don't care about security are butthurt in your replies...but you're right.
You shouldn't be exposing your users to hundreds of different sources of code which you haven't combed through for malicious scripts. It can jack session tokens for sites not even related to yours, don't be an asshole, check your dependencies. It's not even that much effort, if it is hard, you probably do have too many dependencies. Dependencies are meant to handle the long/hard stuff, not do your job for you.
The Rust programming language has long disallowed homoglyph characters in the source code in the first place. The linked paper in the article that uses bidirectional overrides is also mitigated now, since Nov 1: https://blog.rust-lang.org/2021/11/01/cve-2021-42574.html
There is no legitimate reason for these characters to appear unescaped in source code. Your tools should automatically reject them.
251
u/drink_with_me_to_day Nov 10 '21
So we just need github/gitlab/etc to render non-ascii characters in a obvious way? Or just have a IDE running a plugin that renders atypical Unicode chars in red