Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsedSpaceOnly, SkipHardwareTest, HardwareEncryption properties cannot be set to False #12

Closed
MartinVokurek opened this issue May 27, 2018 · 1 comment · Fixed by #42
Closed
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@MartinVokurek
Copy link
Contributor

When defining xBLBitlocker or xBLAutoBitlocker resources, UsedSpace, SkipHardwareTest or HardwareEncryption Boolean properties can be defined, but no matter if they are defined as $True or $False, they are always processed as $True during Enable-Bitlocker.
That is because the properties are tested for existence on lines 133-156 of BitlockerCommon.ps1. And if they exist, they are hardcoded to $true in $params hashtable

I'm not sure what was the original idea here, because I can see that Enable-Bitlocker defines these parameters as switches, therefore if present, they are assumed true. And the README says the parameters behave "the same as in Enable-Bitlocker"

However, for me personally, this is incorrect behavior of DSC resource, because the resource happily accepts e.g. UsedSpaceOnly=$false, yet it silently passes UsedSpaceOnly=$true to Enable-Bitlocker, creating possible significant security issue.

@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels May 28, 2018
@johlju
Copy link
Member

johlju commented May 28, 2018

Sounds like a bug that has sneaked passed because there are no unit tests in this resource module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants