1
0
mirror of https://github.com/opencontainers/runtime-spec.git synced 2025-04-18 20:04:01 +03:00

features: add potentiallyUnsafeConfigAnnotations

Fix issue 1202

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2023-05-16 20:00:03 +09:00
parent 6331715093
commit 5e98fec96d
No known key found for this signature in database
GPG Key ID: 49524C6F9F638F1A
3 changed files with 27 additions and 0 deletions

View File

@ -140,6 +140,24 @@ The current version of the spec do not provide a way to enumerate the possible v
}
```
## <a name="featuresPotentiallyUnsafeConfigAnnotations" />Unsafe annotations in `config.json`
**`potentiallyUnsafeConfigAnnotations`** (array of strings, OPTIONAL) contains values of [`annotations` property of `config.json`](config.md#annotations)
that may potentially change the behavior of the runtime.
A value that ends with "." is interpreted as a prefix of annotations.
### Example
```json
"potentiallyUnsafeConfigAnnotations": [
"com.example.foo.bar",
"org.systemd.property."
]
```
The example above matches `com.example.foo.bar`, `org.systemd.property.ExecStartPre`, etc.
The example does not match `com.example.foo.bar.baz`.
# Example
Here is a full example for reference.

View File

@ -17,6 +17,9 @@
},
"annotations": {
"$ref": "defs.json#/definitions/annotations"
},
"potentiallyUnsafeConfigAnnotations": {
"$ref": "defs.json#/definitions/ArrayOfStrings"
},
"linux": {
"$ref": "features-linux.json#/linux"

View File

@ -24,6 +24,12 @@ 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"`
// PotentiallyUnsafeConfigAnnotations the list of the potential unsafe annotations
// that may appear in `config.json`.
//
// A value that ends with "." is interpreted as a prefix of annotations.
PotentiallyUnsafeConfigAnnotations []string `json:"potentiallyUnsafeConfigAnnotations,omitempty"`
}
// Linux is specific to Linux.