News for hackers. Stuff that matters.
Re:Dozens of malicious PyPI packages discovered targeting de... by bernawil on Wednesday November 02, 2022 @09:36PM (#33445621)
A resource access model for dependencies doesn't make much sense to me, there's basically only 2 things you want to gate access for libraries: filesystem and network. And it's all-in. A library that needs network access may be legit today and after an update start exfiltrating data to a different url. It seems easier to grep for fs and network calls in the library code than any of that.
Re:Dozens of malicious PyPI packages discovered targeting de... by jononor on Friday November 04, 2022 @04:32PM (#33473366)
Restricting a process to only be able to access opt-in list of directories underneath the project directory would be useful. Assuming one uses a venv, and all the dependencies are contained there. Then one might want some data folder. And have at least prevented dels from scraping user-wide secrets.
Re:Dozens of malicious PyPI packages discovered targeting de... by bernawil on Saturday November 05, 2022 @12:13AM (#33477890)
You're describing a chroot jail. key there is "process". Dealing with processes permissions is the OS's job.

A if a language wants to deal in library's security it should strive to make static analysis possible. Eg: the language guarantees that network and filesystem calls can only be done with a single function, statically so I can audit that leftpad indeed doesn't make network calls .