Re:3500 packages uploaded to PyPI, pointing to a malicious URL
by vel0city on Tuesday March 02, 2021 @02:57PM
(#26319759)
Software that I can't put data into or take data out of isn't very useful. You can mitigate the splash damage something could do and reduce the attack surface, but at some point I'm probably going to be feeding that process some files or data stream and I'm going to have it write out some files or data stream. Those data entry and exit points are still exploitable, or acting on the data stream could be harmful. Sandboxing is good to do, but ultimately isn't the solution to the problem of malicious code. Otherwise its pretty much just a space heater.
[ Parent
| on HN ]
Re:3500 packages uploaded to PyPI, pointing to a malicious URL
by contravariant on Tuesday March 02, 2021 @06:56PM
(#26322944)
I can kind of see what you're getting at but a pure function can both accept and return data without any risk of this data leaking anywhere unintended.
Re:3500 packages uploaded to PyPI, pointing to a malicious URL
by vel0city on Tuesday March 02, 2021 @10:38PM
(#26324437)
Data leaking isn't the only thing you may be worried about. What about a random number generator designed as a pure function that skews a certain way reducing your cryptographic integrity? What if what looks like a pure function from the outside you're using for some range estimate on some ballistic payload is able to detect its in a live fire scenario and changes its outputs leading to inaccurate detonation? We're talking about malicious external packages/libraries and what not coming in, assuming everything is a pure function in the compiled black box of obfuscated code probably isn't a winning strategy on keeping your system secure. Of course, everyone's threat profile and the risks of failure vary greatly based on the application being deployed.