Replies: 5 comments 1 reply
-
Not possible. Dependencies are checked at runtime; so either you have to run the dependency and see what it asks, or read through the codebase.
What do you mean? Do you mean specific perms for a specific dependency?
again, not possible. The whole |
Beta Was this translation helpful? Give feedback.
-
My understading of Deno and it's eco system is very shallow and barely beyond the documentation pages. It seems that Should it not be possible to break up the runtime validation into a 2-step for fine grained control and manageability?
The generated list can be inspected, modified as necessary, and used to run programs in the permissions regime the user deems acceptable. For people who are happy with the current state of affairs, they can continue with The For example, from nest.land installation guide,
Does it really get much worse than this? A package manager whose job it is to download and upload arbit blobs of code To be fair, this is from a good citizen that is well-meaning and well-documented. In the next paragraph, they make permissions claims necessary. The "audit your dependencies" recommendation, much like a paper-raincoat, seems designed to fail. Well technically, I can run the program without permissions, wait for the complaints and then grant them, but that's Am I alone here in feeling a bit naked from a security perspective?
Yes - an ability to attribute "this permission" was requested from "that dependency". |
Beta Was this translation helpful? Give feedback.
-
The only realistic solution is #10183 which would turn permission prompting on by default. Currently, instead of passing |
Beta Was this translation helpful? Give feedback.
-
I was going off the "Dependencies are checked at runtime so it is not possible" point made by @crowlKats At the risk of exposing my obtuseness, I created a simple repl.it as a POC, to demonstrate what I was intending. file: samples\reader\reader.tsIs a sample deno file with a call each to file: src\callee.tsIs the extractor - that uses a transformation pass to inspect and extract all calls that need permission grants. Obviously, it'll need to be extended to deal with all the permissions and full programs. And if we get that far, to integrate The module could be implemented as a 3rd party module, but then it would not be possible to use the permissions.json as OutputThe sample output (on stdout for now):
I am still wrapping my head around moving to deno from npm-land. If I am missing something, or just being a fool, please let me know and I'll stop. |
Beta Was this translation helpful? Give feedback.
-
I am new to deno, so this is somewhat of a mix between a noob-question and a feature request.
Hopefully an issue is the right way to start.
The security aspects of the deno runtime are particularly attractive to me.
However, so many of the modules I am exploring seem to default to a
deno install -Afq ...
It's a bit disappointing to see that the first thing one does is to actually disable the security sandbox.
But then, looking at the current command line required to make this work with fine grained permissions, its clear
this is easier said than done. In general, the finer control one desires, the more unwieldy it becomes.
As a newcomer attracted to the security messaging, I'd like a better UX for
All of these look unwieldy if not impossible to accomplish with current tooling.
Wonder if any thought has been given to allowing the developer to register a permission at point of use
and then generate a list of permissions required as an auxiliary artifact -
permissions.json
orpermissions.yml
.This would keep with the single file philosophy of deno but solve the manageability issues raised above.
Something along the lines of:
And then from the cli
which would generate a white list required and append it to a
permissions.json|yml
file at point of use.The file can then be used to provide the end consumer the UX desired - by the deno CLI or 3rd parties.
It seems deno is doing most of hard work of tracking and validating. Just that the end user has no insight,
resulting in
deno install -Afq ...
Beta Was this translation helpful? Give feedback.
All reactions