← 返回技术雷达
Hacker News tech

I'm not a fan of Deno's security model (2024)

Hacker News 热议:I'm not a fan of Deno's security model (2024)(73 赞 / 32 评论,来源 goldstein.lol)

原文开头节选

this has been bothering me for a while now, so I want to write down my thoughts so I can get it out of my head and move on. we’re gonna talk about how Deno approaches security, specifically with its permissions system, and why I think this approach is fundamentally insecure and misleading.

Deno is a language runtime for JavaScript. it consists of a standard library, a package manager, a TypeScript transpiler and a bunch of other stuff that’s not important for our story. it’s not a JavaScript implementation , so it does not interpret or compile JavaScript, it reuses V8 for that.

one of the flagship features of Deno is its permission system (it’s under the “Secure by default” header on their landing page ). the idea is simple: as JS code running in Deno needs the standard library to access the outside world, Deno can choose which accesses it allows or disallows, so when you run

shell deno run —allow-read = /tmp/dir —allow-run = uname code.ts the standard library will only allow code.ts to read /tmp/dir and run uname .

(以上为原文节选,完整内容见下方”原文来源”)

这条动态今日登上 Hacker News 首页(73 赞 / 32 评论,来源 goldstein.lol)。技术雷达每日自动聚合 AI 工程、后端架构、DevOps 方向的前沿动态;相关工程落地可浏览下方的相关服务与延伸阅读,或直接与我们团队交流。

原文来源: Hacker News

相关服务