Skip to content

fix(config): negate `HasSecurePerms` and fix workaround on windows

px requested to merge 8LWXpg/cli:main into main
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA

Description

While !1569 (merged) make HasSecurePerms always returns true on Windows, it actually checks if file mode != 0o600 on non-Windows, so returning true make it always fails file permission check on windows.

This merge request negated return value in perms.go and negated checking HasSecurePerms in config_file.go

Related Issues

#7588

How has this been tested?

Built locally

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by px

Merge request reports