Use restrictive file permissions
Recipe ID
org.openrewrite.golang.codequality.UseRestrictiveFilePermissionsArtifactgithub.com/moderneinc/recipes-goReplace 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.
Single recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.golang.codequality.UseRestrictiveFilePermissionsIf the recipe isn’t available locally, install it with:
mod config recipes go install github.com/moderneinc/recipes-go