Skip to content

Commit

Permalink
Merge pull request from GHSA-77vh-xpmg-72qh
Browse files Browse the repository at this point in the history
Advisory fix 2
  • Loading branch information
vbatts authored Nov 17, 2021
2 parents d600991 + e3885ce commit 0126d30
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions image-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ For the media type(s) that this document is compatible with, see the [matrix][ma

- **`mediaType`** *string*

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

- **`manifests`** *array of objects*

Expand Down
5 changes: 3 additions & 2 deletions manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Unlike the [image index](image-index.md), which contains information about a set

- **`mediaType`** *string*

This property is *reserved* for use, to [maintain compatibility](media-types.md#compatibility-matrix).
When used, this field contains the media type of this document, which differs from the [descriptor](descriptor.md#properties) use of `mediaType`.
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.
When used, this field MUST contain the media type `application/vnd.oci.image.manifest.v1+json`.
This field usage differs from the [descriptor](descriptor.md#properties) use of `mediaType`.

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

Expand Down
3 changes: 3 additions & 0 deletions specs-go/v1/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import "github.com/opencontainers/image-spec/specs-go"
type Index struct {
specs.Versioned

// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
MediaType string `json:"mediaType,omitempty"`

// Manifests references platform specific manifests.
Manifests []Descriptor `json:"manifests"`

Expand Down
3 changes: 3 additions & 0 deletions specs-go/v1/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import "github.com/opencontainers/image-spec/specs-go"
type Manifest struct {
specs.Versioned

// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
MediaType string `json:"mediaType,omitempty"`

// Config references a configuration object for a container, by digest.
// The referenced configuration object is a JSON blob that the runtime uses to set up the container.
Config Descriptor `json:"config"`
Expand Down
4 changes: 2 additions & 2 deletions specs-go/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const (
// VersionMinor is for functionality in a backwards-compatible manner
VersionMinor = 0
// VersionPatch is for backwards-compatible bug fixes
VersionPatch = 1
VersionPatch = 2

// VersionDev indicates development branch. Releases will be empty string.
VersionDev = ""
VersionDev = "-dev"
)

// Version is the specification version that the package types support.
Expand Down

0 comments on commit 0126d30

Please sign in to comment.