C#

C#

Made by DeepSource

Filesystem related permissions specified are too broad CS-S1000

Security
Critical
a01 a04 cwe-276 cwe-732 cwe-266 sans top 25 owasp top 10

It is always recommended that you grant only the minimum required permissions to the necessary user accounts rather than providing complete control to everyone. Giving full control may lead to unintended access that may put your organization and any potentially sensitive information at risk. Consider limiting the scope of the permissions.

Bad Practice

new FileSystemAccessRule("Everyone", FileSystemRights.FullControl, AccessControlType.Allow)

Recommended

new FileSystemAccessRule(userAccount, FileSystemRights.Read, AccessControlType.Allow)

Reference