Usage of permissive file permission ('other')

Description

Granting overly permissive file permissions, especially to 'other', poses a significant security risk by potentially exposing sensitive information to unauthorized users.

Remediations

  • Do keep file permissions as restrictive as necessary. Opt for granting privileges to 'groups' rather than 'other' to minimize the risk of unauthorized access.
    permissions.add(PosixFilePermission.GROUP_WRITE)

References

Associated CWE

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=java_lang_file_permission_others

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=java_lang_file_permission_others