-
Notifications
You must be signed in to change notification settings - Fork 350
Closed
Bug
Copy link
Labels
bugThis issue or pull request addresses broken functionalityThis issue or pull request addresses broken functionality
Description
Prerequisites
- This issue has an informative and human-readable title.
ScubaGear Version
1.7.1
Operating System
Windows 11
PowerShell Version
5.1
M365 Environment and License(s)
M365Envrionment: commercial, gcc, gcchigh, dod
🐛 Summary
ScubaConfigValidator currently fails configuration validation and blocks execution when a yaml references a product that is not explicitly used with the -ProductNames parameter, even when the YAML is otherwise valid and the product exists in the baseline.
This behavior prevents users from running ScubaGear when:
- The command line is overwriting the product names but the yaml contains additional products in Exclusions, OmitPolicy or AnnotatePolicies
- A misspelled product is in the yaml will error even if yet the product name does not have that product.
This appears to be over‑strict validation, as the configuration should allow the user to run it
Steps to reproduce
- Create a ScubaConfig yaml file with two annotate policies for two different products. (eg aad, defender)
Organization: contoso.com
OrgName: contoso
Description: "two product testenvironment"
ProductNames:
- aad
- defender
M365Environment: commercial
AnnotatePolicy:
MS.AAD.2.1v1:
Comment: "test this"
MS.DEFENDER.1.1v1:
Comment: "and this"- Run
Invoke-Scuba -ConfigFIlePath <path>\twoscubaproduct.yaml -ProductNames aad. - An error will come up stating "references product 'aad' which is not in the selected ProductNames..."
Expected behavior
It should be a warning and skip mismatched products and allow SCuBAGear to run, it should
validate only policies relevant to the selected products.
Output from Initialize-SCuBA (optional)

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue or pull request addresses broken functionalityThis issue or pull request addresses broken functionality
Type
Fields
Give feedbackFrequency
None yet