Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go/internal/auth: readNetrc: detect exposed .netrc files #38468
It is a common practice for security-conscious code to return an error when a file holding secret material is not stored safely.
For example, you may have already encountered an ssh error saying a user's private key has unsafe mode. Similarly, the python netrc library throws an exception when file permissions aren't sufficiently narrow.