Skip to content

Commit 0126d30

Browse files
authored
Merge pull request from GHSA-77vh-xpmg-72qh
Advisory fix 2
2 parents d600991 + e3885ce commit 0126d30

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

image-index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
1717

1818
- **`mediaType`** *string*
1919

20-
This property is *reserved* for use, to [maintain compatibility][matrix].
21-
When used, this field contains the media type of this document, which differs from the [descriptor](descriptor.md#properties) use of `mediaType`.
20+
This property SHOULD be used and [remain compatible][matrix] with earlier versions of this specification and with other similar external formats.
21+
When used, this field MUST contain the media type `application/vnd.oci.image.index.v1+json`.
22+
This field usage differs from the [descriptor](descriptor.md#properties) use of `mediaType`.
2223

2324
- **`manifests`** *array of objects*
2425

manifest.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Unlike the [image index](image-index.md), which contains information about a set
2222

2323
- **`mediaType`** *string*
2424

25-
This property is *reserved* for use, to [maintain compatibility](media-types.md#compatibility-matrix).
26-
When used, this field contains the media type of this document, which differs from the [descriptor](descriptor.md#properties) use of `mediaType`.
25+
This property SHOULD be used and [remain compatible](media-types.md#compatibility-matrix) with earlier versions of this specification and with other similar external formats.
26+
When used, this field MUST contain the media type `application/vnd.oci.image.manifest.v1+json`.
27+
This field usage differs from the [descriptor](descriptor.md#properties) use of `mediaType`.
2728

2829
- **`config`** *[descriptor](descriptor.md)*
2930

specs-go/v1/index.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import "github.com/opencontainers/image-spec/specs-go"
2121
type Index struct {
2222
specs.Versioned
2323

24+
// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
25+
MediaType string `json:"mediaType,omitempty"`
26+
2427
// Manifests references platform specific manifests.
2528
Manifests []Descriptor `json:"manifests"`
2629

specs-go/v1/manifest.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import "github.com/opencontainers/image-spec/specs-go"
2020
type Manifest struct {
2121
specs.Versioned
2222

23+
// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
24+
MediaType string `json:"mediaType,omitempty"`
25+
2326
// Config references a configuration object for a container, by digest.
2427
// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
2528
Config Descriptor `json:"config"`

specs-go/version.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ const (
2222
// VersionMinor is for functionality in a backwards-compatible manner
2323
VersionMinor = 0
2424
// VersionPatch is for backwards-compatible bug fixes
25-
VersionPatch = 1
25+
VersionPatch = 2
2626

2727
// VersionDev indicates development branch. Releases will be empty string.
28-
VersionDev = ""
28+
VersionDev = "-dev"
2929
)
3030

3131
// Version is the specification version that the package types support.

0 commit comments

Comments
 (0)