News for hackers. Stuff that matters.
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Sunday November 08, 2026 @01:29PM (#50415726)
I’m working on a capability system for a language that can compile to js[1], pardon the mess.

[1] https://march-lang.org/docs/capabilities/#the-problem-they-s...

Re:I'm not a fan of Deno's security model (2024) by amluto on Sunday November 08, 2026 @01:43PM (#50415819)
If I’ve understood this correctly, you’re using “capability” to mean something kind of like what Linux means: there is a collection of capability types, and each type is a singleton. (And at least the beginning of your page does not clarify whether the distinction between “needs IO” and “Cap(IO)”.)

This is genuinely useful in a language, but I suspect it’s also pretty weak. Serious capability systems have capabilities that are instances of types, and two instances are not necessarily the same. For example, the capability to read one file is not the capability to read another file. Singletons may still exist: the capability to read the system clock could reasonably be a singleton. (Or not: one may reasonably debate whether the cycle counter and the realtime clock are instances of the same type or not, and you’ll find that mainstream languages have what amount to very different answers to this sort of question.)

Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Sunday November 08, 2026 @03:10PM (#50416645)
These are types. Cap(Io) is a type, and used to grant IO, but you can narrow to reads or writes of single files/folders, network requests to single URLs, and so on. Needs is a declaration of the necessary Cap grant. The compiler will error on permissions that aren’t granted.
Re:I'm not a fan of Deno's security model (2024) by kragen on Sunday November 08, 2026 @08:14PM (#50419715)
You probably shouldn't call it a "capability system" if you don't mean ocaps, because despite your best intentions, many people who are familiar with ocap systems will assume you are engaged in some sort of fraud.
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Sunday November 08, 2026 @09:09PM (#50420107)
It literally is a capability system it just isn’t OCAP because it’s a purely functional language and there are no objects. It’s heavily inspired by Eiffel and Pony. You declare capabilities you need and grant them where they’re allowed. It is coincidentally a lot like Bluefin for Haskell[1], and in that spirit I use them beyond security. For example behavioral promises like no_alloc and no_panic.

In your mind what makes it not a capability system?

[1] https://h2.jaguarpaw.co.uk/posts/bluefin-capability-system/

Re:I'm not a fan of Deno's security model (2024) by amluto on Sunday November 08, 2026 @11:24PM (#50421059)
You lost me. If I want to grant read to /etc/passwd, how do I do it without threading it through every call? Is it an implicit parameter system? Do you literally write “/etc/passwd” in the code?
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Monday November 09, 2026 @07:07AM (#50424486)
Authority grants are ambient at an and the compiler makes distinctions at the module level, though you can annotate a function. It’s most like a language called Austral.
Re:I'm not a fan of Deno's security model (2024) by kragen on Monday November 09, 2026 @03:17AM (#50422624)
It really sounds like you're describing an ambient-authority system, which separates designation from authority. Ocap systems don't separate designation from authority, and purely functional languages do have objects in the sense of "object" that the "o" in "ocap" stands for.
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Monday November 09, 2026 @07:11AM (#50424524)
You’re splitting a weird hair here, every single ocap language I’m aware of has objects in the sense of OOP. And o ap isn’t the only kind of capability system, Pony for example has two separate systems. March works a lot like Austral and Roc. Modules and functions need capacities which can be granted at an app root, a program can have multiple app roots to segregate authority on a machine or a cluster.

Again I said capability system and never claimed ocap.

Re:I'm not a fan of Deno's security model (2024) by kragen on Monday November 09, 2026 @11:59AM (#50428249)
You are rapidly burning through the presumption of good faith. This is not a hairsplitting distinction, but a completely different approach to computer security, and claiming that the difference is insignificant is strongly suggestive of a grift. CHERI's ocaps are largely capabilities to assembly-language memory regions, and Jonathan Rees's seminal ocap work was at the Scheme language level, which also doesn't have OO. Pony's ocaps are also not generally to OO objects.
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Monday November 09, 2026 @10:45PM (#50435803)
I honestly don't understand the confusion here. I never claimed it was an ocap system, I said it was inspired by Pony and Eiffel and similar to Austral's ambient authority which is often referred to as having a capability system. Though March allows caps to be narrowed at call sites. I also showed the implementation to one of the people who built Caja[1](ocap for JS) and they recognized it as a capability system, so I don't think anyone would be confused here.

Accusing me of grifting is uncharitable, and unnecessary. I simply don't understand this level of incivility over the term capability.

[1] https://github.com/googlearchive/caja

Re:I'm not a fan of Deno's security model (2024) by kragen on Tuesday November 10, 2026 @01:26AM (#50436781)
Imagine if someone was selling an aluminum bicycle lock and claiming that it was hardened steel, and when told that actually aluminum was not the same material as hardened steel, accused the poor guy of "splitting a weird hair", which to me is the point where incivility was introduced, by you, in order to attempt to discredit the information I was offering you.
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Tuesday November 10, 2026 @07:05AM (#50439149)
I’m not selling anything. I sad at the top “I’m working on”. You aren’t offering me any information I don’t know. I’ve read the 1966 paper that introduced the term.

Look at how you’re behaving in public and ask yourself if this is the kind of person you want to be.

Re:I'm not a fan of Deno's security model (2024) by sieve on Sunday November 08, 2026 @04:01PM (#50417201)
I have been exploring something on the lines of capsicum for my language+runtime and you want to balance usability and security. Too much friction and people WILL use --all like I do with Deno.

My current thinking is to freeze all caps on startup. pid-0 within the runtime has the max caps the application will ever have and it can parcel out subsets to other processes that need it.

This can show up on the ux side as a single permission request listing all the caps the application claims it needs with a default negative response.

Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Sunday November 08, 2026 @04:32PM (#50417529)
This is what I do by setting caps at compile time, they aren’t a runtime feature. You either compile out code without a grant or it errors.
Re:I'm not a fan of Deno's security model (2024) by sieve on Sunday November 08, 2026 @05:35PM (#50418178)
How will you allow permissions for a `ls` style tool? I want to be able to do `ls /etc`.
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Sunday November 08, 2026 @06:27PM (#50418813)
Probably on a directory read basis. I’d need to give it more thought.

Thanks for the thoughtful question!

Re:I'm not a fan of Deno's security model (2024) by amluto on Sunday November 08, 2026 @07:00PM (#50419129)
The tool parses its command line, claims the capabilities it needs, drops everything else, then runs.

Or the language it’s written in allows writing a function that takes a recursive enumerate capability on a directory plus a write capability to stdout.

A while back I sent a brain dump email to LKML about “path capabilities”. Maybe I’ll try to implement it.

Re:I'm not a fan of Deno's security model (2024) by sieve on Sunday November 08, 2026 @09:56PM (#50420458)
My current design idea lets the runtime collect all the requests till the application locks its set of demands. This entire set is presented to the user who can then approve/reject/approve-always

The runtime maintains state in the config directory so that approve-always works for `(hash(ls), dir_read(/etc))` without producing that question during the next `ls /etc`

Re:I'm not a fan of Deno's security model (2024) by thegagne on Sunday November 08, 2026 @04:19PM (#50417392)
Really like this and think we need something like this in every major language, especially to address supply chain attack stuff.

A couple of thoughts:

- would really like to have the option to make things more granular… things like “which dns/tls will this have access to?”, “which file/folder?” - probably would be helpful to have permissions to be kinda two sided, like “this function needs tls”, and then on the import side “allow this function tls access to this host in particular”.

Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Sunday November 08, 2026 @04:29PM (#50417495)
It can be file and url level granular, there’s a capabilities page that mentions that[1]. Caps and needs are the two sides. A module function needs File.write, and you can grant a narrower cap to a single folder or file.

[1] https://march-lang.org/docs/capabilities/#choosing-the-right...

Re:I'm not a fan of Deno's security model (2024) by thegagne on Monday November 09, 2026 @12:49AM (#50421543)
Cool!

I did look for “url” on that page and came up empty, then read it with my own eyes and didn’t see it, and even passed it to Claude and it also couldn’t find an answer for my query:

> Take a look at and see if there’s a way to limit fetching from a particular hostname over https. https://march-lang.org/docs/capabilities

What I would like to be able to do is to say “only let this imported function talk to https://example.com/*”, and deny any tcp connections other than the dns lookup and https calls to that domain.

Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Monday November 09, 2026 @08:13AM (#50425149)
Sorry the docs aren’t 100% there yet, the language is still pre-1.0. You can do that but it’s not well documented.
Re:I'm not a fan of Deno's security model (2024) by ch4s3 on Monday November 09, 2026 @10:16AM (#50426797)
I have a draft PR open to enable something like

mod A do

  needs IO.NetConnect("example.com")
end

mod B do

  needs IO.NetConnect("foo.com", no_redirects)
end

Where A can call "example.com" but not "foo.com".