C#

C#

By DeepSource

Filesystem related permissions specified are too broadCS-S1000

Security

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.

Examples

Bad Practice

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

Recommended

[Flags]
new FileSystemAccessRule(userAccount, FileSystemRights.Read, AccessControlType.Allow)

Reference