-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from gardenlinux/add-signature-verification
Add signature verification
- Loading branch information
Showing
2 changed files
with
211 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package main | ||
|
||
type SignatureManifest struct { | ||
Layers []struct { | ||
Digest string `json:"digest"` | ||
Annotations struct { | ||
Signature string `json:"dev.cosignproject.cosign/signature"` | ||
} `json:"annotations"` | ||
} `json:"layers"` | ||
} | ||
|
||
type SignatureMessage struct { | ||
Critical struct { | ||
Identity struct { | ||
DockerReference string `json:"docker-reference"` | ||
} `json:"identity"` | ||
Image struct { | ||
DockerManifestDigest string `json:"docker-manifest-digest"` | ||
} `json:"image"` | ||
Type string `json:"type"` | ||
} `json:"critical"` | ||
} | ||
|
||
type Index struct { | ||
Manifests []struct { | ||
MediaType string `json:"mediaType"` | ||
Digest string `json:"digest"` | ||
Size int `json:"size"` | ||
Platform struct { | ||
Architecture string `json:"architecture"` | ||
Os string `json:"os"` | ||
} `json:"platform"` | ||
Annotations struct { | ||
Cname string `json:"cname"` | ||
Architecture string `json:"architecture"` | ||
FeatureSet string `json:"feature_set"` | ||
} `json:"annotations,omitempty"` | ||
} `json:"manifests"` | ||
} | ||
|
||
type Manifest struct { | ||
MediaType string `json:"mediaType"` | ||
Config struct { | ||
MediaType string `json:"mediaType"` | ||
Digest string `json:"digest"` | ||
Size int `json:"size"` | ||
} `json:"config"` | ||
Layers []struct { | ||
MediaType string `json:"mediaType"` | ||
Digest string `json:"digest"` | ||
Size uint64 `json:"size"` | ||
} `json:"layers"` | ||
} |