cisagov / ScubaGear

Automation to assess the state of your M365 tenant against CISA's baselines
https://www.cisa.gov/resources-tools/services/secure-cloud-business-applications-scuba-project
Creative Commons Zero v1.0 Universal
1.76k stars 226 forks source link

Validate the parameters passed into the Scuba config file #1437

Open buidav opened 1 day ago

buidav commented 1 day ago

🐛 Summary

Currently if someone use the config file to run Invoke-SCuBA the parameters will bypass the initial validation sets of the parameters at the top of Invoke-SCuBA

To reproduce

Add a parameter that you know will error out to scubaconfig.yaml Invoke-SCuBA -ConfigFilePath scubaconfig.yaml

Observe the error message.

Expected behavior

For ScubaGear, to validate the parameters passed into the config file on read rather than being enforced down the line.

Any helpful log output or screenshots

Example passing in an invalid -ProductNames within the config file. The error is caught down the line at Invoke-Connection Image