权限


【Permissions】

权限可用于控制 Node.js 进程可以访问哪些系统资源,或进程可以对这些资源执行哪些操作。

【Permissions can be used to control what system resources the Node.js process has access to or what actions the process can take with those resources.】

  • 基于进程的权限 控制 Node.js 进程对资源的访问。资源可以完全允许或拒绝,或者可以控制与其相关的操作。例如,可以允许文件系统读取,同时拒绝写入。此功能不能防止恶意代码。根据 Node.js 的 安全策略,Node.js 信任任何被要求运行的代码。

权限模型实现了一种“安全带”方法,它可以防止受信任的代码在未经明确授权的情况下意外更改文件或使用资源。但在存在恶意代码的情况下,它并不能提供安全保障。恶意代码可以绕过权限模型,执行任意代码,而不受权限模型施加的限制。

【The permission model implements a "seat belt" approach, which prevents trusted code from unintentionally changing files or using resources that access has not explicitly been granted to. It does not provide security guarantees in the presence of malicious code. Malicious code can bypass the permission model and execute arbitrary code without the restrictions imposed by the permission model.】

如果你发现潜在的安全漏洞,请参考我们的 安全策略

【If you find a potential security vulnerability, please refer to our Security Policy.】