Files
beads/cmd/bd
Steve Yegge ae5a4ac6ea Add security tests for WriteFile permissions in doctor command
Resolves bd-ee1: Add security tests for WriteFile permissions in doctor command

Added comprehensive security tests for the FixGitignore function to verify:
- Files are created with 0600 permissions (secure, owner-only read/write)
- Existing files with insecure permissions are fixed
- Read-only files can be updated (permissions fixed first)
- File ownership is correct
- Permissions are enforced even on systems that respect umask

Also improved FixGitignore implementation to:
- Handle read-only files by fixing permissions before writing
- Explicitly set permissions after write to ensure 0600 regardless of umask
- Maintain secure permissions throughout the operation

Tests verify the gosec G306 security concern is properly addressed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:19:14 -08:00
..
2025-11-09 14:53:59 -08:00
2025-11-09 14:53:59 -08:00
2025-11-17 10:12:46 -07:00
2025-11-21 19:01:42 -05:00
2025-11-22 00:11:45 -08:00
2025-11-23 17:16:27 -08:00