Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ...
by detaro on Wednesday February 10, 2021 @10:27AM
(#26090401)
Indeed, being able to apply capabilities on a package level would be great, but I don't know many languages/environments that implement this as a first-class feature.
[ Parent
| on HN ]
Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ...
by newhouseb on Wednesday February 10, 2021 @11:40AM
(#26091423)
The WASM ecosystem is exploring this through the use of what they call "nanoprocesses" wherein libraries are wrapped into modules and provided access to nothing by default [1]. This seems to be more of a pattern and consequence of how WASM works than a specific feature.
1. https://hacks.mozilla.org/2019/11/announcing-the-bytecode-al... (ignore the title, it's irrelevant to the excellent explanation that constitutes 70% of the post)
Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ...
by ryukafalz on Wednesday February 10, 2021 @10:36AM
(#26090530)
Yeah. JavaScript is probably the closest to being there (with things like SES[0], LavaMoat[1], etc.) but we're not quite there yet. It's just shocking that this sort of thing is as seemingly obscure as it is; it's like the whole industry has collectively thrown up their hands and said code execution is unavoidably radioactively dangerous. (While simultaneously using package managers that... well.) But it doesn't have to be!
Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ...
by eecc on Wednesday February 10, 2021 @10:52AM
(#26090791)
Java does. Of course it’s never been used systematically and it has received precious little attention to DevOps ergonomics, but the infrastructure is there
Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ...
by bluetech on Wednesday February 10, 2021 @01:07PM
(#26092680)
Java actually doesn't need to add any features for it to support this, it needs to remove them. I recommend reading this excellect article: http://habitatchronicles.com/2017/05/what-are-capabilities/
The gist is:
Rule #1: All instance variables must be private
Rule #2: No mutable static state or statically accessible authority
Rule #3: No mutable state accessible across thread boundaries
Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ...
by detaro on Wednesday February 10, 2021 @11:12AM
(#26091060)
I didn't know that. Do you happen to have a link with more details at hand?
Re:Dependency Confusion: How I Hacked Into Apple, Microsoft ...
by dwohnitmok on Wednesday February 10, 2021 @10:59AM
(#26090900)
Safe Haskell is one in this vein (it's lower level and you would apply a capability layer on top), although like other past efforts on this front it's mostly languished in obscurity even among the Haskell community and is used by very few people.
The main hope at the moment seems to be JS.