이 페이지는 아직 영어로 제공되지 않습니다. 번역 작업 중입니다.
현재 번역 프로젝트에 대한 질문이나 피드백이 있으신 경우 언제든지 연락주시기 바랍니다.

Metadata

ID: typescript-node-security/chmod-permissions

Language: TypeScript

Severity: Warning

Category: Security

CWE: 732

Description

Always make sure you restrict the permissions of your application files. Applications should not allow write and execution for other users, as it may leak data and information. Always restrict the number of users and applications that can access your application data.

Non-Compliant Code Examples

const fs = require('fs');
const fsPromises = fs.promises;

fs.chmodSync("/tmp/myfile", 0o777);
fsPromises.chmod("/tmp/fsPromises", 0o777);

Compliant Code Examples

const fs = require('fs');
const fsPromises = fs.promises;

fs.chmodSync(myPath, 0o770);
fsPromises.chmod("/tmp/fsPromises", 0o770);