Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

features: add potentiallyUnsafeConfigAnnotations #1205

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions features.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions schema/features-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
},
"annotations": {
"$ref": "defs.json#/definitions/annotations"
},
"potentiallyUnsafeConfigAnnotations": {
"$ref": "defs.json#/definitions/ArrayOfStrings"
},
"linux": {
"$ref": "features-linux.json#/linux"
Expand Down
6 changes: 6 additions & 0 deletions specs-go/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading