feat: Add Windows disk encryption (BitLocker) check#484
Conversation
Ref: teamniteo/pareto#842 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
08f6e88 to
b7d0298
Compare
🚀 Dev Builds AvailableDevelopment builds for this PR are available in the workflow artifacts. Available builds:
Download the |
There was a problem hiding this comment.
Pull request overview
This PR adds BitLocker disk encryption checking functionality for Windows systems. The implementation queries BitLocker volume status via PowerShell, prioritizes the OS volume's encryption status, and correctly handles various edge cases including single/multiple volumes and JSON parsing scenarios.
Changes:
- Added
DiskEncryptioncheck implementation for Windows that queries BitLocker via PowerShell - Registered the new check under the "System Integrity" claim category
- Added comprehensive test suite covering 9 scenarios including edge cases
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| checks/windows/disk_encryption.go | New check implementation that queries BitLocker status via PowerShell, with proper JSON parsing and prioritization logic for OS volumes |
| checks/windows/disk_encryption_test.go | Comprehensive test suite covering all scenarios including encrypted/unencrypted volumes, errors, and edge cases |
| claims/checks_windows.go | Registered DiskEncryption check under "System Integrity" claim |
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files
|
Summary
Get-BitLockerVolumevia PowerShell, prioritizes OS volume encryption statusRef: https://github.com/teamniteo/pareto/issues/842
Test plan
go test ./...)🤖 Generated with Claude Code