Incorrect Permission Assignment for Critical Resource
ID |
scala.perm.scala_perm_rule_overlypermissivefilepermissioninline |
Severity |
low |
Resource |
Perm |
Language |
Scala |
Rationale
Overly permissive file permission
The following code illustrates a vulnerable pattern detected by this rule:
def dangerInline(path: Nothing): Unit = {
// VULNERABLE: Incorrect Permission Assignment for Critical Resource
Files.setPosixFilePermissions(path, PosixFilePermissions.fromString("rw-rw-rw-"))
}
Remediation
Follow secure coding practices and review the references below for detailed remediation guidance.
References
-
OWASP Top 10 2021 - A01 : Broken Access Control.