Use restrictive file permissions

Proprietary

Replace 0777 with 0755 in os.Chmod, os.MkdirAll and os.Mkdir, and with 0644 in os.WriteFile. Overly permissive file permissions are a security risk.

org.openrewrite.golang.codequality.UseRestrictiveFilePermissions
mod run . --recipe=org.openrewrite.golang.codequality.UseRestrictiveFilePermissions

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.