Skip to content

Commit

Permalink
Produce a manifest with a non-zero config
Browse files Browse the repository at this point in the history
Some OCI registry implementations do not know how to handle completely
empty manifest config. ORAS knows what to do in this case.

See: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#guidance-for-an-empty-descriptor
  • Loading branch information
cbandy authored and simar7 committed Oct 11, 2024
1 parent ae293f3 commit c00f263
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
tags=(latest ${{ env.RELEASE_VERSION}} ${{env.MINOR_VERSION }} ${{ env.MAJOR_VERSION }})
for tag in ${tags[@]}; do
oras push ghcr.io/aquasecurity/trivy-policies:${tag} \
--config /dev/null:application/vnd.cncf.openpolicyagent.config.v1+json \
--artifact-type application/vnd.cncf.openpolicyagent.config.v1+json \
--annotation "org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
--annotation "org.opencontainers.image.revision=$GITHUB_SHA" \
bundle.tar.gz:application/vnd.cncf.openpolicyagent.layer.v1.tar+gzip
Expand All @@ -37,6 +37,6 @@ jobs:
tags=(latest ${{ env.RELEASE_VERSION}} ${{env.MINOR_VERSION }} ${{ env.MAJOR_VERSION }})
for tag in ${tags[@]}; do
oras push ghcr.io/${{ github.repository }}:${tag} \
--config /dev/null:application/vnd.cncf.openpolicyagent.config.v1+json \
--artifact-type application/vnd.cncf.openpolicyagent.config.v1+json \
bundle.tar.gz:application/vnd.cncf.openpolicyagent.layer.v1.tar+gzip
done
2 changes: 1 addition & 1 deletion scripts/verify-bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

var bundlePath = "bundle.tar.gz"
var OrasPush = []string{"--config", "/dev/null:application/vnd.cncf.openpolicyagent.config.v1+json", fmt.Sprintf("%s:application/vnd.cncf.openpolicyagent.layer.v1.tar+gzip", bundlePath)}
var OrasPush = []string{"--artifact-type", "application/vnd.cncf.openpolicyagent.config.v1+json", fmt.Sprintf("%s:application/vnd.cncf.openpolicyagent.layer.v1.tar+gzip", bundlePath)}
var supportedTrivyVersions = []string{"latest", "canary"} // TODO: add more versions

func createRegistryContainer(ctx context.Context) (testcontainers.Container, string) {
Expand Down

0 comments on commit c00f263

Please sign in to comment.