GoogleCloudPlatform / GoogleCloudPlatform/deploymentmanager-samples

Disallow unexpected properties

Open
#413 2 comments 0 reactions 0 assignees View on GitHub
cloud-foundations Feature Request
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.