diff --git a/features.md b/features.md index 18842e309..f1dc30b22 100644 --- a/features.md +++ b/features.md @@ -138,6 +138,18 @@ Annotations MUST be a key-value map that follows the same convention as the Key } ``` +## Unsafe annotation prefixes + +**`unsafeAnnotationPrefixes`** (array of strings, OPTIONAL) contains prefixes of the [`annotations` property of `config.json`](config.md#annotations) +that may change the behavior of the runtime. + +### Example +```json +"unsafeAnnotationPrefixes": [ + "org.systemd.property." +] +``` + # Example Here is a full example for reference. diff --git a/schema/features-schema.json b/schema/features-schema.json index 30246fa5b..ec6bc1fea 100644 --- a/schema/features-schema.json +++ b/schema/features-schema.json @@ -17,6 +17,9 @@ }, "annotations": { "$ref": "defs.json#/definitions/annotations" + }, + "unsafeAnnotationPrefixes": { + "$ref": "defs.json#/definitions/ArrayOfStrings" }, "linux": { "$ref": "features-linux.json#/linux" diff --git a/specs-go/features/features.go b/specs-go/features/features.go index 230e88f56..4aabcab60 100644 --- a/specs-go/features/features.go +++ b/specs-go/features/features.go @@ -24,6 +24,10 @@ type Features struct { // Annotations contains implementation-specific annotation strings, // such as the implementation version, and third-party extensions. Annotations map[string]string `json:"annotations,omitempty"` + + // UnsafeAnnotationPrefixes is the list of the unsafe prefixes of the annotations + // that may appear in `config.json`. + UnsafeAnnotationPrefixes []string `json:"unsafeAnnotationPrefixes,omitempty"` } // Linux is specific to Linux.