News for hackers. Stuff that matters.
Re:Python 3.12.0 from a supply chain security perspective by syrusakbary on Thursday October 05, 2023 @10:06AM (#37778794)
This is great. On a related note, we recently compiled Python 3.12.0 to WebAssembly: using it should shield almost any use case of malicious behavior even on external untrusted modules.

https://wasmer.io/python/python

Run it locally and see that filesystem access and network are completely sandboxed by default! :)

  wasmer run python/python
Re:Python 3.12.0 from a supply chain security perspective by adolph on Thursday October 05, 2023 @11:58AM (#37780288)
> recently compiled Python 3.12.0 to WebAssembly

Any chain is as strong as its weakest link.

Re:Python 3.12.0 from a supply chain security perspective by gizmo686 on Thursday October 05, 2023 @12:21PM (#37780568)
But not all composition is a chain.

A sandboxed solution is at least as strong as the sandbox.

Re:Python 3.12.0 from a supply chain security perspective by miohtama on Thursday October 05, 2023 @12:48PM (#37780910)
What’s benefit of this over running Python in a container like Docker?

I know Docker is not 100% watertight, but it’s very unlikely a normal user encounters trojaned Python code that tries to break out from a container.

The run-time penalty for using WebAssembly for Python is pretty severe at the moment, at least what I have tried.

Re:Python 3.12.0 from a supply chain security perspective by chalsprhebaodu on Thursday October 05, 2023 @01:22PM (#37781326)
I’ve personally never been hit by a Trojaned Python project, why use any container or jail at all?
Re:Python 3.12.0 from a supply chain security perspective by kjok on Thursday October 05, 2023 @01:43PM (#37781594)
Re:Python 3.12.0 from a supply chain security perspective by hifromwork on Thursday October 05, 2023 @07:26PM (#37785510)
Is this sarcasm? Hard to tell on the internet sometimes. Anyway:

* It's scary enough to be hit one time. It's no fun to have one's all passwords, accounts and keys stolen, and sometimes have files encrypted with a ransom demand on top of that.

* Ideally we'd like to have a secure-by-default world, where the mere act of installing a dependency or running a helper script doesn't compromise your whole system. We're almost there with our phones, we just need to rethink our desktops too.

Of course I don't say you should use containers/sandboxes. It's a tradeoff everyone has to make, but there are many reasons some people (me included) prefer to sandbox everything as much as reasonably possible.

Re:Python 3.12.0 from a supply chain security perspective by onesphere on Thursday October 05, 2023 @08:01PM (#37785753)
Shouldn't the OS already do containering with its processes (based on user)?

That's kind of the [functional context] approach I take with: https://github.com/matrixApi/encapsule

Re:Python 3.12.0 from a supply chain security perspective by miohtama on Friday October 06, 2023 @08:59AM (#37790197)
Desktop and server operating system do not prevent any process to access file system. Any process can effectively steal any work you have on your file system, and also perform malware attacks by encrypting your files.

This is not true for mobile operating systems like Android and iOS where processes cannot know about other processes or access file system.

Re:Python 3.12.0 from a supply chain security perspective by insanitybit on Friday October 06, 2023 @09:22AM (#37790450)
The typical User in linux is pretty unconstrained. They can view a lot of global resources, perform arbitrary system calls, view other processes, other users, etc. It's not really a tight sandbox.

That's why Linux offers other, more powerful mechanisms for sandboxing such as namespaces, which are the backbone of containers.

Re:Python 3.12.0 from a supply chain security perspective by kjok on Thursday October 05, 2023 @01:07PM (#37781160)
Sandboxing is always good. However, the problem is figuring out accurate per-module policies (what to allow/disallow) For example, a default block-all network policy would also block legitimate functionality.
Re:Python 3.12.0 from a supply chain security perspective by hoosieree on Thursday October 05, 2023 @01:52PM (#37781717)
That's just a matter of perspective. My laptop is already perfectly isolated from your laptop, thank you very much.
Re:Python 3.12.0 from a supply chain security perspective by hifromwork on Thursday October 05, 2023 @07:23PM (#37785482)
Hugged to death?

    500: INTERNAL_SERVER_ERROR
    Code: FUNCTION_INVOCATION_FAILED
    ID: arn1::tpcjw-1696548167206-a333e98b1ba8