GoogleCloudPlatform / GoogleCloudPlatform/deploymentmanager-samples
Disallow unexpected properties
- Dominant language
- Jinja
- Stars
- 951
- Forks
- 700
- PR merge metrics
- No merged PRs in 30d
Description
Currently, the CFT schemas allow arbitrary fields to be set. This can be dangerous, especially with config languages like YAML. Customers can easily introduce typos or a misindentations, etc causing unexpected behaviours and vulnerabilities.
Please consider adding "additionalProperties: false" to all schemas.
See: https://json-schema.org/understanding-json-schema/reference/object.html
> The additionalProperties keyword is used to control the handling of extra stuff, that is, properties whose names are not listed in the properties keyword. By default any additional properties are allowed.
>The additionalProperties keyword may be either a boolean or an object. If additionalProperties is a boolean and set to false, no additional properties will be allowed.
/cc @ocsig
Contributor guide
Assessment
This issue has not been assessed yet.