GoogleCloudPlatform / config-validator

Golang library which provides functionality to evaluate GCP resources against Rego-based policies
Apache License 2.0
45 stars 36 forks source link

Sanitize ancestry before validating an asset in ReviewAsset #184

Closed melinath closed 2 years ago

melinath commented 2 years ago

SanitizeAncestry fills in the ancestors / ancestry path fields if one of them is empty; ValidateAsset requires that the ancestry path is set. This means that in practice, an ancestry path must always be set. This seems unintentional, and it means that callers like terraform-validator and cft-scorecard have to work around this behavior.