diff --git a/go.mod b/go.mod index aa333dc..6e16557 100644 --- a/go.mod +++ b/go.mod @@ -1,31 +1,74 @@ module github.com/sylabs/oci-tools -go 1.22.0 +go 1.22.7 require ( github.com/containerd/platforms v0.2.1 github.com/google/go-containerregistry v0.20.2 github.com/opencontainers/image-spec v1.1.0 github.com/sebdah/goldie/v2 v2.5.5 + github.com/sigstore/cosign/v2 v2.4.1 github.com/sylabs/sif/v2 v2.20.2 ) require ( + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/blang/semver v3.5.1+incompatible // indirect github.com/containerd/log v0.1.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect + github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46 // indirect github.com/docker/cli v27.1.1+incompatible // indirect - github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker-credential-helpers v0.7.0 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/docker/distribution v2.8.3+incompatible // indirect + github.com/docker/docker-credential-helpers v0.8.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/go-chi/chi v4.1.2+incompatible // indirect + github.com/go-jose/go-jose/v4 v4.0.4 // indirect + github.com/go-openapi/analysis v0.23.0 // indirect + github.com/go-openapi/errors v0.22.0 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/loads v0.22.0 // indirect + github.com/go-openapi/runtime v0.28.0 // indirect + github.com/go-openapi/spec v0.21.0 // indirect + github.com/go-openapi/strfmt v0.23.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/validate v0.24.0 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/klauspost/compress v1.17.9 // indirect + github.com/letsencrypt/boulder v0.0.0-20240620165639-de9c06129bec // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/sassoftware/relic v7.2.1+incompatible // indirect + github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect + github.com/sigstore/protobuf-specs v0.3.2 // indirect + github.com/sigstore/rekor v1.3.6 // indirect + github.com/sigstore/sigstore v1.8.11 // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/vbatts/tar-split v0.11.3 // indirect - golang.org/x/sync v0.2.0 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/theupdateframework/go-tuf v0.7.0 // indirect + github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 // indirect + github.com/vbatts/tar-split v0.11.5 // indirect + go.mongodb.org/mongo-driver v1.14.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.31.0 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 3185894..de5a18d 100644 --- a/go.sum +++ b/go.sum @@ -1,33 +1,95 @@ -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46 h1:2Dx4IHfC1yHWI12AxQDJM1QbRCDfk6M+blLzlZCXdrc= +github.com/cyberphone/json-canonicalization v0.0.0-20231011164504-785e29786b46/go.mod h1:uzvlm1mxhHkdfqitSA92i7Se+S9ksOn3a3qmv/kyOCw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2oNn0GkeZE= github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= +github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= +github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec= +github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= +github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E= +github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc= +github.com/go-openapi/analysis v0.23.0 h1:aGday7OWupfMs+LbmLZG4k0MYXIANxcuBTYUC03zFCU= +github.com/go-openapi/analysis v0.23.0/go.mod h1:9mz9ZWaSlV8TvjQHLl2mUW2PbZtemkE8yA5v22ohupo= +github.com/go-openapi/errors v0.22.0 h1:c4xY/OLxUBSTiepAg3j/MHuAv5mJhnf53LLMWFB+u/w= +github.com/go-openapi/errors v0.22.0/go.mod h1:J3DmZScxCDufmIMsdOuDHxJbdOGC0xtUynjIx092vXE= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/loads v0.22.0 h1:ECPGd4jX1U6NApCGG1We+uEozOAvXvJSF4nnwHZ8Aco= +github.com/go-openapi/loads v0.22.0/go.mod h1:yLsaTCS92mnSAZX5WWoxszLj0u+Ojl+Zs5Stn1oF+rs= +github.com/go-openapi/runtime v0.28.0 h1:gpPPmWSNGo214l6n8hzdXYhPuJcGtziTOgUpvsFWGIQ= +github.com/go-openapi/runtime v0.28.0/go.mod h1:QN7OzcS+XuYmkQLw05akXk0jRH/eZ3kb18+1KwW9gyc= +github.com/go-openapi/spec v0.21.0 h1:LTVzPc3p/RzRnkQqLRndbAzjY0d0BCL72A6j3CdL9ZY= +github.com/go-openapi/spec v0.21.0/go.mod h1:78u6VdPw81XU44qEWGhtr982gJ5BWg2c0I5XwVMotYk= +github.com/go-openapi/strfmt v0.23.0 h1:nlUS6BCqcnAk0pyhi9Y+kdDVZdZMHfEKQiS4HaMgO/c= +github.com/go-openapi/strfmt v0.23.0/go.mod h1:NrtIpfKtWIygRkKVsxh7XQMDQW5HKQl6S5ik2elW+K4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3BumrGD58= +github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= +github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U= +github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.20.2 h1:B1wPJ1SN/S7pB+ZAimcciVD+r+yV/l/DSArMxlbwseo= github.com/google/go-containerregistry v0.20.2/go.mod h1:z38EKdKh4h7IP2gSfUUqEvalZBqs6AoLeWfUy34nQC8= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 h1:TMtDYDHKYY15rFihtRfck/bfFqNfvcabqvXAFQfAUpY= +github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= +github.com/jmhodges/clock v1.2.0 h1:eq4kys+NI0PLngzaHEe7AmPT90XMGIEySD1JfV1PDIs= +github.com/jmhodges/clock v1.2.0/go.mod h1:qKjhA7x7u/lQpPB1XAqX1b1lCI/w3/fNuYpI/ZjLynI= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/letsencrypt/boulder v0.0.0-20240620165639-de9c06129bec h1:2tTW6cDth2TSgRbAhD7yjZzTQmcN25sDRPEeinR51yQ= +github.com/letsencrypt/boulder v0.0.0-20240620165639-de9c06129bec/go.mod h1:TmwEoGCwIti7BCeJ9hescZgRtatxRE+A72pCoPfmcfk= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -35,44 +97,97 @@ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2sz github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg= +github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sassoftware/relic v7.2.1+incompatible h1:Pwyh1F3I0r4clFJXkSI8bOyJINGqpgjJU3DYAZeI05A= +github.com/sassoftware/relic v7.2.1+incompatible/go.mod h1:CWfAxv73/iLZ17rbyhIEq3K9hs5w6FpNMdUT//qR+zk= github.com/sebdah/goldie/v2 v2.5.5 h1:rx1mwF95RxZ3/83sdS4Yp7t2C5TCokvWP4TBRbAyEWY= github.com/sebdah/goldie/v2 v2.5.5/go.mod h1:oZ9fp0+se1eapSRjfYbsV/0Hqhbuu3bJVvKI/NNtssI= +github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA= +github.com/secure-systems-lab/go-securesystemslib v0.8.0/go.mod h1:UH2VZVuJfCYR8WgMlCU1uFsOUU+KeyrTWcSS73NBOzU= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sigstore/cosign/v2 v2.4.1 h1:b8UXEfJFks3hmTwyxrRNrn6racpmccUycBHxDMkEPvU= +github.com/sigstore/cosign/v2 v2.4.1/go.mod h1:GvzjBeUKigI+XYnsoVQDmMAsMMc6engxztRSuxE+x9I= +github.com/sigstore/protobuf-specs v0.3.2 h1:nCVARCN+fHjlNCk3ThNXwrZRqIommIeNKWwQvORuRQo= +github.com/sigstore/protobuf-specs v0.3.2/go.mod h1:RZ0uOdJR4OB3tLQeAyWoJFbNCBFrPQdcokntde4zRBA= +github.com/sigstore/rekor v1.3.6 h1:QvpMMJVWAp69a3CHzdrLelqEqpTM3ByQRt5B5Kspbi8= +github.com/sigstore/rekor v1.3.6/go.mod h1:JDTSNNMdQ/PxdsS49DJkJ+pRJCO/83nbR5p3aZQteXc= +github.com/sigstore/sigstore v1.8.11 h1:tEqeQqbT+awtM87ec9KEeSUxT/AFvJNawneYJyAkFrQ= +github.com/sigstore/sigstore v1.8.11/go.mod h1:fdrFQosxCQ4wTL5H1NrZcQkqQ72AQbPjtpcL2QOGKV0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/sylabs/sif/v2 v2.20.2 h1:HGEPzauCHhIosw5o6xmT3jczuKEuaFzSfdjAsH33vYw= github.com/sylabs/sif/v2 v2.20.2/go.mod h1:WyYryGRaR4Wp21SAymm5pK0p45qzZCSRiZMFvUZiuhc= -github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= -github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= -github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +github.com/theupdateframework/go-tuf v0.7.0 h1:CqbQFrWo1ae3/I0UCblSbczevCCbS31Qvs5LdxRWqRI= +github.com/theupdateframework/go-tuf v0.7.0/go.mod h1:uEB7WSY+7ZIugK6R1hiBMBjQftaFzn7ZCDJcp1tCUug= +github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399 h1:e/5i7d4oYZ+C1wj2THlRK+oAhjeS/TRQwMfkIuet3w0= +github.com/titanous/rocacheck v0.0.0-20171023193734-afe73141d399/go.mod h1:LdwHTNJT99C5fTAzDz0ud328OgXz+gierycbcIx2fRs= +github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= +github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= +go.mongodb.org/mongo-driver v1.14.0 h1:P98w8egYRjYe3XDjxhYJagTokP/H6HzlsnojRgZRd80= +go.mongodb.org/mongo-driver v1.14.0/go.mod h1:Vzb0Mk/pa7e6cWw85R4F/endUC3u0U9jGcNU603k65c= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 h1:BulPr26Jqjnd4eYDVe+YvyR7Yc2vJGkO5/0UxD0/jZU= +google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= +google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/sourcesink/cosign.go b/pkg/sourcesink/cosign.go new file mode 100644 index 0000000..daef654 --- /dev/null +++ b/pkg/sourcesink/cosign.go @@ -0,0 +1,77 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "context" + "fmt" + + "github.com/google/go-containerregistry/pkg/name" + v1 "github.com/google/go-containerregistry/pkg/v1" + cosignoci "github.com/sigstore/cosign/v2/pkg/oci" + cosignremote "github.com/sigstore/cosign/v2/pkg/oci/remote" +) + +// SignedDescriptor provides access to cosign signatures stored against it. +type SignedDescriptor interface { + // CosignImages checks for image manifests providing cosign signatures & + // attestations that are associated with the image or index with the descriptor + // If image manifests providing cosign signatures and / or attestations + // exist, then these images are returned in a name.Reference -> v1.Image map. + // + // If recursive is true, then if the descriptor is an index, we also check for + // signatures and attestations for each of its associated manifests. + // + // In the returned map, the images are referenced as '_cosign:', where + // matches the tag at src. The '_cosign' repository placeholder string + // is used instead of any original registry & repository names. + CosignImages(ctx context.Context, recursive bool) ([]ReferencedImage, error) + // SignedImage wraps an image Descriptor as a cosign oci.SignedImage, + // allowing access to signatures and attestations stored alongside the image. + SignedImage(context.Context) (cosignoci.SignedImage, error) + // SignedImageIndex wraps an image index Descriptor as a cosign oci.SignedImageIndex, + // allowing access to signatures and attestations stored alongside the image. + SignedImageIndex(context.Context) (cosignoci.SignedImageIndex, error) +} + +// CosignPlaceholderRepo is a placeholder repository name for cosign images. +const CosignPlaceholderRepo = "_cosign" + +type ReferencedImage struct { + Ref name.Reference + Img v1.Image +} + +func NumDescriptorsForCosign(imgs []ReferencedImage) (int64, error) { + descCount := int64(0) + for _, ri := range imgs { + ls, err := ri.Img.Layers() + if err != nil { + return 0, err + } + descCount += int64(len(ls) + 2) + } + return descCount, nil +} + +//nolint:gochecknoglobals +var cosignSuffixes = []string{ + cosignremote.SignatureTagSuffix, + cosignremote.AttestationTagSuffix, +} + +func CosignTag(h v1.Hash, suffix string) string { + return fmt.Sprint(h.Algorithm, "-", h.Hex, ".", suffix) +} + +func CosignRef(imgDigest v1.Hash, imgRef name.Reference, suffix string, opts ...name.Option) (name.Reference, error) { + t := CosignTag(imgDigest, suffix) + repo := CosignPlaceholderRepo + if imgRef != nil { + repo = imgRef.Context().Name() + } + opts = append(opts, name.WithDefaultRegistry("")) + return name.ParseReference(repo+":"+t, opts...) +} diff --git a/pkg/sourcesink/cosign_sif.go b/pkg/sourcesink/cosign_sif.go new file mode 100644 index 0000000..0ba39a0 --- /dev/null +++ b/pkg/sourcesink/cosign_sif.go @@ -0,0 +1,278 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "bytes" + "context" + "errors" + "log/slog" + + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/match" + "github.com/google/go-containerregistry/pkg/v1/partial" + cosignoci "github.com/sigstore/cosign/v2/pkg/oci" + cosignempty "github.com/sigstore/cosign/v2/pkg/oci/empty" + cosignremote "github.com/sigstore/cosign/v2/pkg/oci/remote" + cosignsignature "github.com/sigstore/cosign/v2/pkg/oci/signature" + "github.com/sylabs/oci-tools/pkg/sif" +) + +var _ SignedDescriptor = &sifDescriptor{} + +// CosignImages checks for image manifests providing cosign signatures & +// attestations that are associated with the image or index with the descriptor +// If image manifests providing cosign signatures and / or attestations +// exist, then these images are returned in a name.Reference -> v1.Image map. +// +// If recursive is true, then if the descriptor is an index, we also check for +// signatures and attestations for each of its associated manifests. +// +// In the returned map, the images are referenced as '_cosign:', where +// matches the tag at src. The '_cosign' repository placeholder string +// is used instead of any original registry & repository names. +func (d *sifDescriptor) CosignImages(_ context.Context, recursive bool) ([]ReferencedImage, error) { + csImgs := []ReferencedImage{} + + // Targets lists digests to check for the existence of associated signatures / images. + targets := []v1.Hash{d.descriptor.Digest} + + if d.MediaType().IsIndex() && recursive { + rmf, err := d.RawManifest() + if err != nil { + return nil, err + } + mf, err := v1.ParseIndexManifest(bytes.NewBuffer(rmf)) + if err != nil { + return nil, err + } + for _, m := range mf.Manifests { + targets = append(targets, m.Digest) + } + } + + for _, target := range targets { + for _, suffix := range cosignSuffixes { + csRef, err := CosignRef(target, nil, suffix) + if err != nil { + return nil, err + } + slog.Debug("checking for cosign image", slog.String("ref", csRef.Name())) + csImg, err := d.ofi.Image(match.Name(csRef.Name())) + if err == nil { + slog.Debug("found cosign image", slog.String("ref", csRef.Name())) + csImgs = append(csImgs, ReferencedImage{Ref: csRef, Img: csImg}) + continue + } + if errors.Is(err, sif.ErrNoMatch) { + continue + } + return nil, err + } + } + return csImgs, nil +} + +// SignedImage returns an image Descriptor as a cosign oci.SignedImage, allowing +// access to signatures and attestations stored alongside the image in the SIF. +func (d *sifDescriptor) SignedImage(ctx context.Context) (cosignoci.SignedImage, error) { + img, err := d.Image() + if err != nil { + return nil, err + } + + cosignImages, err := d.CosignImages(ctx, false) + if err != nil { + return nil, err + } + + return &sifSignedimage{ + Image: img, + cosignImages: cosignImages, + }, nil +} + +type sifSigs struct { + v1.Image +} + +var _ cosignoci.Signatures = (*sifSigs)(nil) + +func (s *sifSigs) Get() ([]cosignoci.Signature, error) { + m, err := s.Manifest() + if err != nil { + return nil, err + } + signatures := make([]cosignoci.Signature, 0, len(m.Layers)) + for _, desc := range m.Layers { + layer, err := s.Image.LayerByDigest(desc.Digest) + if err != nil { + return nil, err + } + signatures = append(signatures, cosignsignature.New(layer, desc)) + } + return signatures, nil +} + +type sifSignedimage struct { + v1.Image + cosignImages []ReferencedImage +} + +var _ cosignoci.SignedImage = (*sifSignedimage)(nil) + +func (i *sifSignedimage) Signatures() (cosignoci.Signatures, error) { + h, err := i.Digest() + if err != nil { + return nil, err + } + return i.signatures(h, cosignremote.SignatureTagSuffix) +} + +func (i *sifSignedimage) Attestations() (cosignoci.Signatures, error) { + h, err := i.Digest() + if err != nil { + return nil, err + } + return i.signatures(h, cosignremote.AttestationTagSuffix) +} + +func (i *sifSignedimage) signatures(digest v1.Hash, suffix string) (cosignoci.Signatures, error) { + ref, err := CosignRef(digest, nil, suffix) + if err != nil { + return nil, err + } + for _, csi := range i.cosignImages { + if csi.Ref == ref { + return &sifSigs{Image: csi.Img}, nil + } + } + return cosignempty.Signatures(), nil +} + +var errUnsupportedAttachment = errors.New("cosign attachments are not supported") + +func (i *sifSignedimage) Attachment(_ string) (cosignoci.File, error) { + return nil, errUnsupportedAttachment +} + +// SignedImageIndex returns an image index Descriptor as a cosign +// oci.SignedImageIndex, allowing access to signatures and attestations stored +// alongside the image in the SIF. +func (d *sifDescriptor) SignedImageIndex(ctx context.Context) (cosignoci.SignedImageIndex, error) { + if !d.MediaType().IsIndex() { + return nil, ErrUnsupportedMediaType + } + idx, err := d.ImageIndex() + if err != nil { + return nil, err + } + + cosignImages, err := d.CosignImages(ctx, false) + if err != nil { + return nil, err + } + + return &sifSignedImageIndex{ + v1Index: idx, + ofi: d.ofi, + cosignImages: cosignImages, + }, nil +} + +type v1Index v1.ImageIndex + +type sifSignedImageIndex struct { + v1Index + ofi *sif.OCIFileImage + cosignImages []ReferencedImage +} + +var _ cosignoci.SignedImageIndex = (*sifSignedImageIndex)(nil) + +func (i *sifSignedImageIndex) Signatures() (cosignoci.Signatures, error) { + h, err := i.Digest() + if err != nil { + return nil, err + } + return i.signatures(h, cosignremote.SignatureTagSuffix) +} + +func (i *sifSignedImageIndex) Attestations() (cosignoci.Signatures, error) { + h, err := i.Digest() + if err != nil { + return nil, err + } + return i.signatures(h, cosignremote.AttestationTagSuffix) +} + +func (i *sifSignedImageIndex) SignedImage(h v1.Hash) (cosignoci.SignedImage, error) { + img, err := i.ofi.Image(match.Digests(h)) + if err != nil { + return nil, err + } + d, err := partial.Descriptor(img) + if err != nil { + return nil, err + } + mf, err := img.RawManifest() + if err != nil { + return nil, err + } + parent, err := i.Digest() + if err != nil { + return nil, err + } + sd := &sifDescriptor{ + descriptor: *d, + Manifest: mf, + ofi: i.ofi, + parent: &parent, // must be able to traverse index.json -> parent index -> image in OCIDescriptor.Image() + } + return sd.SignedImage(context.Background()) +} + +func (i *sifSignedImageIndex) SignedImageIndex(h v1.Hash) (cosignoci.SignedImageIndex, error) { + img, err := i.ofi.Index(match.Digests(h)) + if err != nil { + return nil, err + } + d, err := partial.Descriptor(img) + if err != nil { + return nil, err + } + mf, err := img.RawManifest() + if err != nil { + return nil, err + } + parent, err := i.Digest() + if err != nil { + return nil, err + } + sd := &sifDescriptor{ + descriptor: *d, + Manifest: mf, + ofi: i.ofi, + parent: &parent, // must be able to traverse index.json -> parent index -> image in OCIDescriptor.Image() + } + return sd.SignedImageIndex(context.Background()) +} + +func (i *sifSignedImageIndex) signatures(digest v1.Hash, suffix string) (cosignoci.Signatures, error) { + ref, err := CosignRef(digest, nil, suffix) + if err != nil { + return nil, err + } + for _, csi := range i.cosignImages { + if csi.Ref == ref { + return &sifSigs{Image: csi.Img}, nil + } + } + return cosignempty.Signatures(), nil +} + +func (i *sifSignedImageIndex) Attachment(_ string) (cosignoci.File, error) { + return nil, errUnsupportedAttachment +} diff --git a/pkg/sourcesink/cosign_sif_test.go b/pkg/sourcesink/cosign_sif_test.go new file mode 100644 index 0000000..731889a --- /dev/null +++ b/pkg/sourcesink/cosign_sif_test.go @@ -0,0 +1,214 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "context" + "testing" + + cosignoci "github.com/sigstore/cosign/v2/pkg/oci" +) + +func Test_sifDescriptor_CosignImages(t *testing.T) { + tests := []struct { + name string + src string + recursive bool + wantCount int + }{ + { + name: "Image", + src: corpus.SIF(t, "hello-world-cosign-manifest"), + recursive: false, + wantCount: 2, // 1 signature, 1 attestation against image + }, + { + name: "IndexOnly", + src: corpus.SIF(t, "hello-world-cosign-manifest-list"), + recursive: false, + wantCount: 2, // 1 signature, 1 attestation against index + }, + { + name: "IndexRecursive", + src: corpus.SIF(t, "hello-world-cosign-manifest-list"), + recursive: true, + wantCount: 11, // 1 signature, 1 attestation against index + 1 signature against each referenced image (9 total) + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := SIFFromPath(tt.src) + if err != nil { + t.Fatal(err) + } + d, err := s.Get(context.Background()) + if err != nil { + t.Fatal(err) + } + + sd, ok := d.(SignedDescriptor) + if !ok { + t.Fatal("could not upgrade Descriptor to SignedDescriptor") + } + + got, err := sd.CosignImages(context.Background(), tt.recursive) + if err != nil { + t.Fatal(err) + } + + if len(got) != tt.wantCount { + t.Errorf("Got %d cosign images, expected %d", len(got), tt.wantCount) + } + }) + } +} + +//nolint:dupl +func Test_sifDescriptor_SignedImage(t *testing.T) { + tests := []struct { + name string + src string + wantSignatures int + wantAttestations int + }{ + { + name: "UnsignedImage", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + wantSignatures: 0, + wantAttestations: 0, + }, + { + name: "SignedImage", + src: corpus.SIF(t, "hello-world-cosign-manifest"), + wantSignatures: 1, + wantAttestations: 1, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := SIFFromPath(tt.src) + if err != nil { + t.Fatal(err) + } + d, err := s.Get(context.Background()) + if err != nil { + t.Fatal(err) + } + + sd, ok := d.(SignedDescriptor) + if !ok { + t.Fatal("could not upgrade Descriptor to SignedDescriptor") + } + + si, err := sd.SignedImage(context.Background()) + if err != nil { + t.Fatal(err) + } + checkSignedImage(t, si, tt.wantSignatures, tt.wantAttestations) + }) + } +} + +func checkSignedImage(t *testing.T, si cosignoci.SignedImage, wantSigs, wantAtts int) { + t.Helper() + sig, err := si.Signatures() + if err != nil { + t.Fatal(err) + } + sigs, err := sig.Get() + if err != nil { + t.Fatal(err) + } + if len(sigs) != wantSigs { + t.Errorf("Got %d cosign signatures, expected %d", len(sigs), wantSigs) + } + + att, err := si.Attestations() + if err != nil { + t.Fatal(err) + } + atts, err := att.Get() + if err != nil { + t.Fatal(err) + } + if len(atts) != wantAtts { + t.Errorf("Got %d cosign attestations, expected %d", len(atts), wantAtts) + } +} + +//nolint:dupl +func Test_sifDescriptor_SignedImageIndex(t *testing.T) { + tests := []struct { + name string + src string + wantSignatures int + wantAttestations int + }{ + { + name: "UnsignedIndex", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + wantSignatures: 0, + wantAttestations: 0, + }, + { + name: "SignedIndex", + src: corpus.SIF(t, "hello-world-cosign-manifest-list"), + wantSignatures: 1, + wantAttestations: 1, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := SIFFromPath(tt.src) + if err != nil { + t.Fatal(err) + } + d, err := s.Get(context.Background()) + if err != nil { + t.Fatal(err) + } + + sd, ok := d.(SignedDescriptor) + if !ok { + t.Fatal("could not upgrade Descriptor to SignedDescriptor") + } + + sii, err := sd.SignedImageIndex(context.Background()) + if err != nil { + t.Fatal(err) + } + checkSignedImageIndex(t, sii, tt.wantSignatures, tt.wantAttestations) + }) + } +} + +func checkSignedImageIndex(t *testing.T, sii cosignoci.SignedImageIndex, wantSigs, wantAtts int) { + t.Helper() + sig, err := sii.Signatures() + if err != nil { + t.Fatal(err) + } + sigs, err := sig.Get() + if err != nil { + t.Fatal(err) + } + if len(sigs) != wantSigs { + t.Errorf("Got %d cosign signatures, expected %d", len(sigs), wantSigs) + } + + att, err := sii.Attestations() + if err != nil { + t.Fatal(err) + } + atts, err := att.Get() + if err != nil { + t.Fatal(err) + } + if len(atts) != wantAtts { + t.Errorf("Got %d cosign attestations, expected %d", len(atts), wantAtts) + } +} diff --git a/pkg/sourcesink/sif.go b/pkg/sourcesink/sif.go new file mode 100644 index 0000000..51a0517 --- /dev/null +++ b/pkg/sourcesink/sif.go @@ -0,0 +1,425 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "context" + "errors" + "fmt" + "io" + "log/slog" + + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/empty" + "github.com/google/go-containerregistry/pkg/v1/match" + "github.com/google/go-containerregistry/pkg/v1/partial" + "github.com/google/go-containerregistry/pkg/v1/types" + imagespec "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/sylabs/oci-tools/pkg/instrumented" + "github.com/sylabs/oci-tools/pkg/ociplatform" + ocisif "github.com/sylabs/oci-tools/pkg/sif" + "github.com/sylabs/sif/v2/pkg/sif" +) + +// sifSourceSink is used to retrieve/write images and indexes from/to a SIF file. +type sifSourceSink struct { + ofi *ocisif.OCIFileImage + opts options +} + +var _ SourceSink = &sifSourceSink{} + +func handleOptionsSIF(opts ...Option) (*sifSourceSink, error) { + ss := sifSourceSink{ + opts: options{}, + } + for _, opt := range opts { + if err := opt(&ss.opts); err != nil { + return nil, err + } + } + + return &ss, nil +} + +// SIFFromPath returns a sifSourceSink backed by an existing SIF file at src. +func SIFFromPath(src string, opts ...Option) (SourceSink, error) { + s, err := handleOptionsSIF(opts...) + if err != nil { + return nil, err + } + + fi, err := sif.LoadContainerFromPath(src) + if err != nil { + return nil, err + } + + s.ofi, err = ocisif.FromFileImage(fi) + if err != nil { + return nil, err + } + + return s, err +} + +// SIFEmpty will create a new, empty SIF file at dst, with a specified capacity +// of descriptors, and return a sifSourceSink that can be used to write/read +// to/from it. +func SIFEmpty(dst string, descriptors int64, opts ...Option) (SourceSink, error) { + s, err := handleOptionsSIF(opts...) + if err != nil { + return nil, err + } + if err := ocisif.Write(dst, empty.Index, ocisif.OptWriteWithSpareDescriptorCapacity(descriptors)); err != nil { + return nil, err + } + + fi, err := sif.LoadContainerFromPath(dst) + if err != nil { + return nil, err + } + s.ofi, err = ocisif.FromFileImage(fi) + if err != nil { + return nil, err + } + return s, nil +} + +var _ Descriptor = &sifDescriptor{} + +// sifDescriptor wraps a v1.Descriptor, providing methods to access the image or +// index to which it pertains, and the associated manifest, from an underlying +// SIF file. +type sifDescriptor struct { + descriptor v1.Descriptor + Manifest []byte + + ofi *ocisif.OCIFileImage + parent *v1.Hash // digest of parent index if descriptor is not referenced in the RootIndex directly. + + instrumentationLogger *slog.Logger +} + +// RawManifest returns the manifest of the image or index described by this +// descriptor. +func (d *sifDescriptor) RawManifest() ([]byte, error) { + return d.Manifest, nil +} + +// MediaType returns the types.MediaType of this descriptor. +func (d *sifDescriptor) MediaType() types.MediaType { + return d.descriptor.MediaType +} + +// Image returns a v1.Image directly if the descriptor is associated with an +// OCI image, or an image for the local platform if the descriptor is +// associated with an OCI ImageIndex. +func (d *sifDescriptor) Image() (v1.Image, error) { + switch { + case d.descriptor.MediaType.IsImage(): + var ( + img v1.Image + err error + ) + if d.parent == nil { + img, err = d.ofi.Image(match.Digests(d.descriptor.Digest)) + if err != nil { + return nil, err + } + } else { + ii, err := d.ofi.Index(match.Digests(*d.parent)) + if err != nil { + return nil, err + } + img, err = ii.Image(d.descriptor.Digest) + if err != nil { + return nil, err + } + } + if d.instrumentationLogger != nil { + return instrumented.Image(img, d.instrumentationLogger) + } + return img, nil + + case d.descriptor.MediaType.IsIndex(): + ii, err := d.ofi.Index(match.Digests(d.descriptor.Digest)) + if err != nil { + return nil, err + } + p := ociplatform.DefaultPlatform() + ims, err := partial.FindImages(ii, ociplatform.Matcher(p)) + if err != nil { + return nil, err + } + if n := len(ims); n == 0 { + return nil, ErrNoManifest + } else if n > 1 { + return nil, ErrMultipleManifests + } + if d.instrumentationLogger != nil { + return instrumented.Image(ims[0], d.instrumentationLogger) + } + return ims[0], nil + + default: + return nil, ErrUnsupportedMediaType + } +} + +// ImageIndex returns a v1.ImageIndex if the descriptor is associated with +// an OCI ImageIndex. +func (d *sifDescriptor) ImageIndex() (v1.ImageIndex, error) { + if !d.descriptor.MediaType.IsIndex() { + return nil, ErrUnsupportedMediaType + } + ii, err := d.ofi.Index(match.Digests(d.descriptor.Digest)) + if err != nil { + return nil, err + } + if d.instrumentationLogger != nil { + return instrumented.Index(ii, d.instrumentationLogger) + } + return ii, err +} + +// getMatcher returns a Matcher that selects descriptors from an OCI layout +// index.json according to the getOpts provided. +func getMatcher(o getOpts) match.Matcher { + return func(desc v1.Descriptor) bool { + // Specified digest must match if provided. + if o.digest != nil && desc.Digest != *o.digest { + return false + } + + if o.reference != nil { + // Specified reference must match if provided. + if desc.Annotations != nil || desc.Annotations[imagespec.AnnotationRefName] != o.reference.Name() { + return false + } + } else { + // Otherwise, no ref.name annotation is set. + if desc.Annotations != nil && desc.Annotations[imagespec.AnnotationRefName] != "" { + return false + } + } + + // If desc is an image, then must satisfy platform if specified. + if o.platform != nil && desc.MediaType.IsImage() { + return desc.Platform != nil && ociplatform.DescriptorSatisfies(desc, *o.platform) + } + return true + } +} + +// Get will find an image or index in the SIF file that matches the requirements +// specified by opts. If GetWithPlatform is specified then the Descriptor +// returned will always be an image that satisfies the platform. Otherwise, the +// Descriptor returned can be an image or an index. +func (o *sifSourceSink) Get(_ context.Context, opts ...GetOpt) (Descriptor, error) { + gOpts := getOpts{} + for _, opt := range opts { + if err := opt(&gOpts); err != nil { + return nil, err + } + } + + ds, err := o.ofi.FindManifests(getMatcher(gOpts)) + if err != nil { + return nil, err + } + if len(ds) == 0 { + return nil, ErrNoManifest + } + if len(ds) > 1 { + return nil, ErrMultipleManifests + } + + mt := ds[0].MediaType + switch { + case mt.IsImage(): + img, err := o.ofi.Image(match.Digests(ds[0].Digest)) + if err != nil { + return nil, err + } + if gOpts.platform != nil { + if err := ociplatform.EnsureImageSatisfies(img, *gOpts.platform); err != nil { + return nil, err + } + } + mf, err := img.RawManifest() + if err != nil { + return nil, err + } + return &sifDescriptor{ + descriptor: ds[0], + Manifest: mf, + ofi: o.ofi, + instrumentationLogger: o.opts.instrumentationLogger, + }, nil + case mt.IsIndex(): + ii, err := o.ofi.Index(match.Digests(ds[0].Digest)) + if err != nil { + return nil, err + } + // Platform wasn't requested - return the index itself. + if gOpts.platform == nil { + mf, err := ii.RawManifest() + if err != nil { + return nil, err + } + return &sifDescriptor{ + descriptor: ds[0], + Manifest: mf, + ofi: o.ofi, + instrumentationLogger: o.opts.instrumentationLogger, + }, nil + } + // Platform was requested - find an image in the index. + return o.imageFromIndex(ii, gOpts.platform) + default: + return nil, fmt.Errorf("%w: %v", ErrUnsupportedMediaType, mt) + } +} + +func (o *sifSourceSink) imageFromIndex(ii v1.ImageIndex, p *v1.Platform) (Descriptor, error) { + iiDigest, err := ii.Digest() + if err != nil { + return nil, err + } + ims, err := partial.FindImages(ii, ociplatform.Matcher(p)) + if err != nil { + return nil, err + } + if n := len(ims); n == 0 { + return nil, ErrNoManifest + } else if n > 1 { + return nil, ErrMultipleManifests + } + d, err := partial.Descriptor(ims[0]) + if err != nil { + return nil, err + } + mf, err := ims[0].RawManifest() + if err != nil { + return nil, err + } + return &sifDescriptor{ + descriptor: *d, + Manifest: mf, + ofi: o.ofi, + parent: &iiDigest, // must be able to traverse index.json -> parent index -> image in OCIDescriptor.Image() + }, nil +} + +// Write will append an image or index w to the SIF file associated with the +// sifSourceSink. +func (o *sifSourceSink) Write(_ context.Context, w Writable, opts ...WriteOpt) error { + wOpts := writeOpts{} + for _, opt := range opts { + if err := opt(&wOpts); err != nil { + return err + } + } + + appendOpts := []ocisif.AppendOpt{} + if wOpts.reference != nil { + appendOpts = append(appendOpts, ocisif.OptAppendReference(wOpts.reference)) + } + + if img, ok := w.(v1.Image); ok { + return o.ofi.AppendImage(img, appendOpts...) + } + + if ii, ok := w.(v1.ImageIndex); ok { + return o.ofi.AppendIndex(ii, appendOpts...) + } + + return ErrUnsupportedMediaType +} + +// NumDescriptorsForImage returns the number of descriptors required to store img. +func NumDescriptorsForImage(img v1.Image) (int64, error) { + ls, err := img.Layers() + if err != nil { + return 0, err + } + + return int64(len(ls) + 2), nil +} + +// NumDescriptorsForIndex returns the number of descriptors required to store ii. +func NumDescriptorsForIndex(ii v1.ImageIndex) (int64, error) { + index, err := ii.IndexManifest() + if err != nil { + return 0, err + } + + var count int64 + + for _, desc := range index.Manifests { + //nolint:exhaustive // Exhaustive cases not appropriate. + switch desc.MediaType { + case types.DockerManifestList, types.OCIImageIndex: + ii, err := ii.ImageIndex(desc.Digest) + if err != nil { + return 0, err + } + + n, err := NumDescriptorsForIndex(ii) + if err != nil { + return 0, err + } + + count += n + + case types.DockerManifestSchema2, types.OCIManifestSchema1: + img, err := ii.Image(desc.Digest) + if err != nil { + return 0, err + } + + n, err := NumDescriptorsForImage(img) + if err != nil { + return 0, err + } + + count += n + + default: + count++ + } + } + + return count + 1, nil +} + +var ( + errSIFBlobNoDigest = errors.New("a digest must be provided to get a blob") + errSIFBlobReference = errors.New("a reference cannot be provided when getting a blob") + errSIFBlobPlatform = errors.New("a platform cannot be provided when getting a blob") +) + +// Blob returns an io.Readcloser for the content of the blob with a digest +// specified using the GetWithDigest option. +func (o *sifSourceSink) Blob(_ context.Context, opts ...GetOpt) (io.ReadCloser, error) { + gOpts := getOpts{} + for _, opt := range opts { + if err := opt(&gOpts); err != nil { + return nil, err + } + } + + if gOpts.reference != nil { + return nil, errSIFBlobReference + } + if gOpts.platform != nil { + return nil, errSIFBlobPlatform + } + if gOpts.digest == nil { + return nil, errSIFBlobNoDigest + } + + return o.ofi.Blob(*gOpts.digest) +} diff --git a/pkg/sourcesink/sif_test.go b/pkg/sourcesink/sif_test.go new file mode 100644 index 0000000..5ab7e2b --- /dev/null +++ b/pkg/sourcesink/sif_test.go @@ -0,0 +1,377 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "context" + "errors" + "io" + "log/slog" + "os" + "path/filepath" + "testing" + + "github.com/google/go-containerregistry/pkg/name" + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/sebdah/goldie/v2" + "github.com/sylabs/oci-tools/pkg/ociplatform" + "github.com/sylabs/oci-tools/test" +) + +//nolint:gochecknoglobals +var corpus = test.NewCorpus(filepath.Join("..", "..", "test")) + +func TestSIFFromPath(t *testing.T) { + tests := []struct { + name string + src string + opts []Option + wantErr error + }{ + { + name: "Defaults", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + }, + { + name: "WithInstrumentationLogs", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []Option{OptWithInstrumentationLogs(slog.Default())}, + wantErr: nil, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, err := SIFFromPath(tt.src, tt.opts...) + if !errors.Is(err, tt.wantErr) { + t.Fatalf("SIFFromPath() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func TestSIFGet(t *testing.T) { + imgDigest := v1.Hash{Algorithm: "sha256", Hex: "432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338"} + idxDigest := v1.Hash{Algorithm: "sha256", Hex: "00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed"} + + tests := []struct { + name string + src string + opts []GetOpt + wantErr error + }{ + { + name: "ImageDefaults", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{}, + wantErr: nil, + }, + { + name: "ImagePlatform", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{GetWithPlatform(v1.Platform{OS: "Linux", Architecture: "arm64"})}, + wantErr: nil, + }, + { + name: "ImageBadPlatform", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{GetWithPlatform(v1.Platform{OS: "Linux", Architecture: "m68k"})}, + wantErr: ErrNoManifest, + }, + { + name: "ImageDigest", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{GetWithDigest(imgDigest)}, + wantErr: nil, + }, + { + name: "ImageBadDigest", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{GetWithDigest(v1.Hash{})}, + wantErr: ErrNoManifest, + }, + { + name: "IndexDefaults", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + opts: []GetOpt{}, + wantErr: nil, + }, + { + name: "IndexPlatform", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + opts: []GetOpt{GetWithPlatform(v1.Platform{OS: "Linux", Architecture: "arm64", Variant: "v8"})}, + wantErr: nil, + }, + { + name: "IndexBadPlatform", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + opts: []GetOpt{GetWithPlatform(v1.Platform{OS: "Linux", Architecture: "m68k"})}, + wantErr: ErrNoManifest, + }, + { + name: "IndexDigest", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + opts: []GetOpt{GetWithDigest(idxDigest)}, + wantErr: nil, + }, + { + name: "IndexBadDigest", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + opts: []GetOpt{GetWithDigest(v1.Hash{})}, + wantErr: ErrNoManifest, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := SIFFromPath(tt.src) + if err != nil { + t.Fatalf("SIFFromPath() error = %v", err) + } + d, err := s.Get(context.Background(), tt.opts...) + if !errors.Is(err, tt.wantErr) { + t.Fatalf("Get() error = %v, wantErr %v", err, tt.wantErr) + } + + if err != nil { + return + } + + mf, err := d.RawManifest() + if err != nil { + t.Fatalf("RawManifest() error = %v", err) + } + g := goldie.New(t, goldie.WithTestNameForDir(true)) + g.Assert(t, tt.name, mf) + }) + } +} + +func TestSIFDescriptorImage(t *testing.T) { + tests := []struct { + name string + src string + wantPlatform v1.Platform + }{ + { + name: "FromImage", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + wantPlatform: v1.Platform{OS: "Linux", Architecture: "arm64", Variant: "v8"}, + }, + { + name: "FromIndex", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + wantPlatform: *ociplatform.DefaultPlatform(), + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := SIFFromPath(tt.src) + if err != nil { + t.Fatalf("SIFFromPath() error = %v", err) + } + d, err := s.Get(context.Background()) + if err != nil { + t.Fatalf(".Get() error = %v", err) + } + + img, err := d.Image() + if err != nil { + t.Fatalf(".Image() error = %v", err) + } + + if err := ociplatform.EnsureImageSatisfies(img, tt.wantPlatform); err != nil { + t.Fatalf("Image does not satisfy expected platform %v", tt.wantPlatform) + } + }) + } +} + +func TestSIFDescriptorImageIndex(t *testing.T) { + tests := []struct { + name string + src string + wantErr error + }{ + { + name: "FromImage", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + wantErr: ErrUnsupportedMediaType, + }, + { + name: "FromIndex", + src: corpus.SIF(t, "hello-world-docker-v2-manifest-list"), + wantErr: nil, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := SIFFromPath(tt.src) + if err != nil { + t.Fatalf("SIFFromPath() error = %v", err) + } + d, err := s.Get(context.Background()) + if err != nil { + t.Fatalf(".Get() error = %v", err) + } + + _, err = d.ImageIndex() + if !errors.Is(err, tt.wantErr) { + t.Fatalf(".ImageIndex() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func TestSIFEmpty(t *testing.T) { + tests := []struct { + name string + opts []Option + wantErr error + }{ + { + name: "Defaults", + }, + { + name: "WithInstrumentationLogs", + opts: []Option{OptWithInstrumentationLogs(slog.Default())}, + wantErr: nil, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + path := filepath.Join(t.TempDir(), "test.sif") + _, err := SIFEmpty(path, 16, tt.opts...) + if !errors.Is(err, tt.wantErr) { + t.Fatalf("SIFEmpty() error = %v, wantErr %v", err, tt.wantErr) + } + }) + } +} + +func TestSIFWrite(t *testing.T) { + tests := []struct { + name string + write Writable + descriptors int64 + opts []WriteOpt + }{ + { + name: "ImageDefaults", + write: corpus.Image(t, "hello-world-docker-v2-manifest"), + descriptors: 4, + opts: []WriteOpt{}, + }, + { + name: "ImageWithReference", + write: corpus.Image(t, "hello-world-docker-v2-manifest"), + descriptors: 4, + opts: []WriteOpt{WriteWithReference(name.MustParseReference("my:image", name.WithDefaultRegistry("")))}, + }, + { + name: "IndexDefaults", + write: corpus.ImageIndex(t, "hello-world-docker-v2-manifest-list"), + descriptors: 32, + opts: []WriteOpt{}, + }, + { + name: "IndexWithReference", + write: corpus.ImageIndex(t, "hello-world-docker-v2-manifest-list"), + descriptors: 32, + opts: []WriteOpt{WriteWithReference(name.MustParseReference("my:image", name.WithDefaultRegistry("")))}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + path := filepath.Join(t.TempDir(), "test.sif") + + s, err := SIFEmpty(path, tt.descriptors) + if err != nil { + t.Fatalf("SIFEmpty() error = %v", err) + } + err = s.Write(context.Background(), tt.write, tt.opts...) + if err != nil { + t.Fatalf(".Write() error = %v", err) + } + + index, err := os.ReadFile(path) + if err != nil { + t.Fatalf("while reading test.sif: %v", err) + } + g := goldie.New(t, goldie.WithTestNameForDir(true)) + g.Assert(t, tt.name, index) + }) + } +} + +func TestSIFBlob(t *testing.T) { + tests := []struct { + name string + src string + opts []GetOpt + wantErr error + }{ + { + name: "ImageConfig", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{GetWithDigest( + v1.Hash{Algorithm: "sha256", Hex: "46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4"})}, + wantErr: nil, + }, + { + name: "ImageLayer", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{GetWithDigest( + v1.Hash{Algorithm: "sha256", Hex: "7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01"})}, + wantErr: nil, + }, + { + name: "ErrNoDigest", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{}, + wantErr: errSIFBlobNoDigest, + }, + { + name: "ErrPlatform", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{ + GetWithDigest(v1.Hash{Algorithm: "sha256", Hex: "7050e35b49f5e348c4809f5eff95842962cb813f32062d3bbdd35c750dd7d01"}), + GetWithPlatform(*ociplatform.DefaultPlatform()), + }, + wantErr: errSIFBlobPlatform, + }, + { + name: "ErrReference", + src: corpus.SIF(t, "hello-world-docker-v2-manifest"), + opts: []GetOpt{ + GetWithDigest(v1.Hash{Algorithm: "sha256", Hex: "7050e35b49f5e348c4809f5eff95842962cb813f32062d3bbdd35c750dd7d01"}), + GetWithReference(name.MustParseReference("test")), + }, + wantErr: errSIFBlobReference, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + s, err := SIFFromPath(tt.src) + if err != nil { + t.Fatalf("OCIFromPath() error = %v", err) + } + rc, err := s.Blob(context.Background(), tt.opts...) + if !errors.Is(err, tt.wantErr) { + t.Fatalf("Get() error = %v, wantErr %v", err, tt.wantErr) + } + + if err != nil { + return + } + + b, err := io.ReadAll(rc) + if err != nil { + t.Fatalf("ReadAll error: %v", err) + } + + g := goldie.New(t, goldie.WithTestNameForDir(true)) + g.Assert(t, tt.name, b) + }) + } +} diff --git a/pkg/sourcesink/sink.go b/pkg/sourcesink/sink.go new file mode 100644 index 0000000..58a0061 --- /dev/null +++ b/pkg/sourcesink/sink.go @@ -0,0 +1,42 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "context" + + "github.com/google/go-containerregistry/pkg/name" +) + +// Writable can represent a v1.Image or v1.ImageIndex. Consumers of a Writable +// will cast to one of these types. +type Writable interface { + RawManifest() ([]byte, error) +} + +// Sink implements methods to write images and indexes to a specific type of +// storage, and location. +type Sink interface { + Write(ctx context.Context, w Writable, opts ...WriteOpt) error +} + +// writeOpts holds options that should apply across to a single Write operation +// against a sink. +type writeOpts struct { + reference name.Reference +} + +// WriteOpt sets an option that applies to a single Write operation against a +// sink. +type WriteOpt func(*writeOpts) error + +// WriteWithReference will set a reference for the image or index written, at +// the destination. +func WriteWithReference(r name.Reference) WriteOpt { + return func(o *writeOpts) error { + o.reference = r + return nil + } +} diff --git a/pkg/sourcesink/source.go b/pkg/sourcesink/source.go new file mode 100644 index 0000000..0e5d789 --- /dev/null +++ b/pkg/sourcesink/source.go @@ -0,0 +1,92 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "context" + "errors" + "io" + + "github.com/google/go-containerregistry/pkg/name" + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/types" +) + +// Descriptor wraps a v1.Descriptor, providing methods to access the image or +// index to which it pertains, and the associated manifest. +type Descriptor interface { + // RawManifest returns the manifest of the image or index described by this + // descriptor. + RawManifest() ([]byte, error) + // MediaType returns the types.MediaType of this descriptor. + MediaType() types.MediaType + // Image returns a v1.Image directly if the descriptor is associated with an + // OCI image, or an image for the local platform if the descriptor is + // associated with an OCI ImageIndex. + Image() (v1.Image, error) + // ImageIndex returns a v1.ImageIndex if the descriptor is associated with + // an OCI ImageIndex. + ImageIndex() (v1.ImageIndex, error) +} + +// Source implements methods to read images and indexes from a specific type of +// storage, and location. +type Source interface { + // Get will find an image or index at the source that matches the + // requirements specified by opts. The image or index is returned as a + // Descriptor. + Get(ctx context.Context, opts ...GetOpt) (Descriptor, error) + // Blob will return an io.ReadCloser that provides the content of the blob + // specified via opts. + Blob(ctx context.Context, opts ...GetOpt) (io.ReadCloser, error) +} + +// getOpts holds options that should apply across to a single Get operation +// against a source. +type getOpts struct { + platform *v1.Platform + digest *v1.Hash + reference name.Reference +} + +// GetOpt sets an option that applies to a single Get operation against a +// source. +type GetOpt func(*getOpts) error + +// GetPlatform overrides the platform when choosing an image. +func GetWithPlatform(p v1.Platform) GetOpt { + return func(o *getOpts) error { + o.platform = &p + return nil + } +} + +// GetDigest sets the digest of the image or index to retrieve. +func GetWithDigest(d v1.Hash) GetOpt { + return func(o *getOpts) error { + o.digest = &d + return nil + } +} + +// GetReference sets the name.ref of the image or index to retrieve. +func GetWithReference(r name.Reference) GetOpt { + return func(o *getOpts) error { + o.reference = r + return nil + } +} + +var ( + // ErrNoManifest is returned when no manifests that satisfy provided + // criteria are found in a source. + ErrNoManifest = errors.New("no matching image / index found") + // ErrMultipleManifests is returned when more than one manifest that + // satisfies provided criteria is found in a source. + ErrMultipleManifests = errors.New("multiple matching images / indices found") + // ErrUnsupportedMediaType is returned when an operation is attempted + // against an OCI media type that does not support it. + ErrUnsupportedMediaType = errors.New("unsupported media type") +) diff --git a/pkg/sourcesink/sourcesink.go b/pkg/sourcesink/sourcesink.go new file mode 100644 index 0000000..1d93f5b --- /dev/null +++ b/pkg/sourcesink/sourcesink.go @@ -0,0 +1,34 @@ +// Copyright 2024-2025 Sylabs Inc. All rights reserved. +// +// SPDX-License-Identifier: Apache-2.0 + +package sourcesink + +import ( + "log/slog" +) + +// SourceSink implements methods to read / write images and indexes from / to a +// specific type of storage, and location. +type SourceSink interface { + Source + Sink +} + +// options holds options that should apply across multiple Get / Write +// operations against a source or sink. +type options struct { + instrumentationLogger *slog.Logger +} + +// Option sets an option that applies across multiple Get / Write operations against +// a source or sink. +type Option func(*options) error + +// OptWithInstrumentationLogs adds instrumentation of operations against the underlying image. +func OptWithInstrumentationLogs(l *slog.Logger) Option { + return func(o *options) error { + o.instrumentationLogger = l + return nil + } +} diff --git a/pkg/sourcesink/testdata/TestSIFBlob/ImageConfig.golden b/pkg/sourcesink/testdata/TestSIFBlob/ImageConfig.golden new file mode 100644 index 0000000..902a739 --- /dev/null +++ b/pkg/sourcesink/testdata/TestSIFBlob/ImageConfig.golden @@ -0,0 +1 @@ +{"architecture":"arm64","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:cc0fff24c4ece63ade5d9f549e42c926cf569112c4f5c439a4a57f3f33f5588b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"b2af51419cbf516f3c99b877a64906b21afedc175bd3cd082eb5798e2f277bb4","container_config":{"Hostname":"b2af51419cbf","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:cc0fff24c4ece63ade5d9f549e42c926cf569112c4f5c439a4a57f3f33f5588b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2022-03-19T16:12:58.923371954Z","docker_version":"20.10.12","history":[{"created":"2022-03-19T16:12:58.834095198Z","created_by":"/bin/sh -c #(nop) COPY file:a79dd5bda1e77203401956a93401d3aef45221fc750295a4291896f3386f4f54 in / "},{"created":"2022-03-19T16:12:58.923371954Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:efb53921da3394806160641b72a2cbd34ca1a9a8345ac670a85a04ad3d0e3507"]},"variant":"v8"} \ No newline at end of file diff --git a/pkg/sourcesink/testdata/TestSIFBlob/ImageLayer.golden b/pkg/sourcesink/testdata/TestSIFBlob/ImageLayer.golden new file mode 100644 index 0000000..c93dccf Binary files /dev/null and b/pkg/sourcesink/testdata/TestSIFBlob/ImageLayer.golden differ diff --git a/pkg/sourcesink/testdata/TestSIFGet/ImageDefaults.golden b/pkg/sourcesink/testdata/TestSIFGet/ImageDefaults.golden new file mode 100644 index 0000000..01e8098 --- /dev/null +++ b/pkg/sourcesink/testdata/TestSIFGet/ImageDefaults.golden @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1485, + "digest": "sha256:46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3208, + "digest": "sha256:7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01" + } + ] +} \ No newline at end of file diff --git a/pkg/sourcesink/testdata/TestSIFGet/ImageDigest.golden b/pkg/sourcesink/testdata/TestSIFGet/ImageDigest.golden new file mode 100644 index 0000000..01e8098 --- /dev/null +++ b/pkg/sourcesink/testdata/TestSIFGet/ImageDigest.golden @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1485, + "digest": "sha256:46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3208, + "digest": "sha256:7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01" + } + ] +} \ No newline at end of file diff --git a/pkg/sourcesink/testdata/TestSIFGet/ImagePlatform.golden b/pkg/sourcesink/testdata/TestSIFGet/ImagePlatform.golden new file mode 100644 index 0000000..01e8098 --- /dev/null +++ b/pkg/sourcesink/testdata/TestSIFGet/ImagePlatform.golden @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1485, + "digest": "sha256:46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3208, + "digest": "sha256:7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01" + } + ] +} \ No newline at end of file diff --git a/pkg/sourcesink/testdata/TestSIFGet/IndexDefaults.golden b/pkg/sourcesink/testdata/TestSIFGet/IndexDefaults.golden new file mode 100644 index 0000000..b691c34 --- /dev/null +++ b/pkg/sourcesink/testdata/TestSIFGet/IndexDefaults.golden @@ -0,0 +1 @@ +{"manifests":[{"digest":"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"amd64","os":"linux"},"size":525},{"digest":"sha256:6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v5"},"size":525},{"digest":"sha256:40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v7"},"size":525},{"digest":"sha256:432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm64","os":"linux","variant":"v8"},"size":525},{"digest":"sha256:995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"386","os":"linux"},"size":525},{"digest":"sha256:eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"mips64le","os":"linux"},"size":525},{"digest":"sha256:3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"ppc64le","os":"linux"},"size":525},{"digest":"sha256:98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"riscv64","os":"linux"},"size":525},{"digest":"sha256:c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"s390x","os":"linux"},"size":525}],"mediaType":"application\/vnd.docker.distribution.manifest.list.v2+json","schemaVersion":2} \ No newline at end of file diff --git a/pkg/sourcesink/testdata/TestSIFGet/IndexDigest.golden b/pkg/sourcesink/testdata/TestSIFGet/IndexDigest.golden new file mode 100644 index 0000000..b691c34 --- /dev/null +++ b/pkg/sourcesink/testdata/TestSIFGet/IndexDigest.golden @@ -0,0 +1 @@ +{"manifests":[{"digest":"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"amd64","os":"linux"},"size":525},{"digest":"sha256:6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v5"},"size":525},{"digest":"sha256:40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v7"},"size":525},{"digest":"sha256:432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm64","os":"linux","variant":"v8"},"size":525},{"digest":"sha256:995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"386","os":"linux"},"size":525},{"digest":"sha256:eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"mips64le","os":"linux"},"size":525},{"digest":"sha256:3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"ppc64le","os":"linux"},"size":525},{"digest":"sha256:98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"riscv64","os":"linux"},"size":525},{"digest":"sha256:c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"s390x","os":"linux"},"size":525}],"mediaType":"application\/vnd.docker.distribution.manifest.list.v2+json","schemaVersion":2} \ No newline at end of file diff --git a/pkg/sourcesink/testdata/TestSIFGet/IndexPlatform.golden b/pkg/sourcesink/testdata/TestSIFGet/IndexPlatform.golden new file mode 100644 index 0000000..01e8098 --- /dev/null +++ b/pkg/sourcesink/testdata/TestSIFGet/IndexPlatform.golden @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1485, + "digest": "sha256:46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3208, + "digest": "sha256:7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01" + } + ] +} \ No newline at end of file diff --git a/pkg/sourcesink/testdata/TestSIFWrite/ImageDefaults.golden b/pkg/sourcesink/testdata/TestSIFWrite/ImageDefaults.golden new file mode 100644 index 0000000..461fa19 Binary files /dev/null and b/pkg/sourcesink/testdata/TestSIFWrite/ImageDefaults.golden differ diff --git a/pkg/sourcesink/testdata/TestSIFWrite/ImageWithReference.golden b/pkg/sourcesink/testdata/TestSIFWrite/ImageWithReference.golden new file mode 100644 index 0000000..c7f060a Binary files /dev/null and b/pkg/sourcesink/testdata/TestSIFWrite/ImageWithReference.golden differ diff --git a/pkg/sourcesink/testdata/TestSIFWrite/IndexDefaults.golden b/pkg/sourcesink/testdata/TestSIFWrite/IndexDefaults.golden new file mode 100644 index 0000000..6319acd Binary files /dev/null and b/pkg/sourcesink/testdata/TestSIFWrite/IndexDefaults.golden differ diff --git a/pkg/sourcesink/testdata/TestSIFWrite/IndexWithReference.golden b/pkg/sourcesink/testdata/TestSIFWrite/IndexWithReference.golden new file mode 100644 index 0000000..6314f74 Binary files /dev/null and b/pkg/sourcesink/testdata/TestSIFWrite/IndexWithReference.golden differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed b/test/images/hello-world-cosign-manifest-list/blobs/sha256/00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed new file mode 100755 index 0000000..b691c34 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed @@ -0,0 +1 @@ +{"manifests":[{"digest":"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"amd64","os":"linux"},"size":525},{"digest":"sha256:6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v5"},"size":525},{"digest":"sha256:40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm","os":"linux","variant":"v7"},"size":525},{"digest":"sha256:432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"arm64","os":"linux","variant":"v8"},"size":525},{"digest":"sha256:995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"386","os":"linux"},"size":525},{"digest":"sha256:eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"mips64le","os":"linux"},"size":525},{"digest":"sha256:3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"ppc64le","os":"linux"},"size":525},{"digest":"sha256:98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"riscv64","os":"linux"},"size":525},{"digest":"sha256:c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861","mediaType":"application\/vnd.docker.distribution.manifest.v2+json","platform":{"architecture":"s390x","os":"linux"},"size":525}],"mediaType":"application\/vnd.docker.distribution.manifest.list.v2+json","schemaVersion":2} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/02623e64de6f2252401a401a36d9e6db7d66a9c1d1bf134053d5c4c978b3376d b/test/images/hello-world-cosign-manifest-list/blobs/sha256/02623e64de6f2252401a401a36d9e6db7d66a9c1d1bf134053d5c4c978b3376d new file mode 100644 index 0000000..1929267 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/02623e64de6f2252401a401a36d9e6db7d66a9c1d1bf134053d5c4c978b3376d @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/04341b189be695acecd201a36cdf9dd99b8b0c338075000f555d5adf8e9c0547 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/04341b189be695acecd201a36cdf9dd99b8b0c338075000f555d5adf8e9c0547 new file mode 100644 index 0000000..5d62fb6 Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/04341b189be695acecd201a36cdf9dd99b8b0c338075000f555d5adf8e9c0547 differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/0473adddc4b4a6b8456d5077fa12d08de36239e713c704fa0151abffb1bb0126 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/0473adddc4b4a6b8456d5077fa12d08de36239e713c704fa0151abffb1bb0126 new file mode 100644 index 0000000..9ff4340 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/0473adddc4b4a6b8456d5077fa12d08de36239e713c704fa0151abffb1bb0126 @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/04d584bf278d95c3bdf6aebdadd9ee552e8c9b35d60e8f1247bd9ee0260313e1 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/04d584bf278d95c3bdf6aebdadd9ee552e8c9b35d60e8f1247bd9ee0260313e1 new file mode 100644 index 0000000..1232226 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/04d584bf278d95c3bdf6aebdadd9ee552e8c9b35d60e8f1247bd9ee0260313e1 @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:f85bca573013bd8d0ecb52d851dcf98581f35d46c64aa049558a04dc5e4401fe"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/155c39610faa3bae95d5bd0435194b1ae66c861c2aca8a7692e752e9acfaa696 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/155c39610faa3bae95d5bd0435194b1ae66c861c2aca8a7692e752e9acfaa696 new file mode 100644 index 0000000..b6fc903 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/155c39610faa3bae95d5bd0435194b1ae66c861c2aca8a7692e752e9acfaa696 @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:6569af6e782a5c31546c763f138b327cf641e4d537fc9bc453f52b46f19ec3ff"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/165760e771f0d295a89c06ad50659133315b485ac68647119775b37578eaf629 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/165760e771f0d295a89c06ad50659133315b485ac68647119775b37578eaf629 new file mode 100644 index 0000000..01447b6 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/165760e771f0d295a89c06ad50659133315b485ac68647119775b37578eaf629 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:b61d5036614f79e5610341829b1cb96b55a1ce7060e4bdc57ac196d93b2dee63"},"layers":[{"mediaType":"application/vnd.dsse.envelope.v1+json","size":680,"digest":"sha256:bf4cb7b5c44789f31a104b99ae53cf38992f33e084dd97b132957c5101e643ec","annotations":{"dev.cosignproject.cosign/signature":"","predicateType":"https://cosign.sigstore.dev/attestation/v1"}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/16692a792468762200c57d0aa0cbe380ccf2b16a23a00543dd69bd8fb1dc4fae b/test/images/hello-world-cosign-manifest-list/blobs/sha256/16692a792468762200c57d0aa0cbe380ccf2b16a23a00543dd69bd8fb1dc4fae new file mode 100644 index 0000000..b53fceb --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/16692a792468762200c57d0aa0cbe380ccf2b16a23a00543dd69bd8fb1dc4fae @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:4f923680062bbea891b21ccd6e561597e7b358abfdbf58167d6a8f2fcd035c0a"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:e58c180ca4d73dc4b0a65122c4502dd8674c6fe0f904ca02509c2fdf24e137e4","annotations":{"dev.cosignproject.cosign/signature":"MEQCIBvQ9MCugZYfLkEljUAgheYC4eu9jsOgijXAIlAjv84SAiBmpKRcgzn55Ewf0YjKIuemX4CXPWW5uiYfftX3qMLMrg=="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/1e4c6e59fe9ed668252140571494bb844e424bb48c2eceefed73434eb9a84dc3 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/1e4c6e59fe9ed668252140571494bb844e424bb48c2eceefed73434eb9a84dc3 new file mode 100644 index 0000000..eebfd02 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/1e4c6e59fe9ed668252140571494bb844e424bb48c2eceefed73434eb9a84dc3 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:fa9dfc3e3e2a35077691b46087565b3433a7447f3eff39b96cdbbcbb568db94b"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:0473adddc4b4a6b8456d5077fa12d08de36239e713c704fa0151abffb1bb0126","annotations":{"dev.cosignproject.cosign/signature":"MEQCIHgsbQoaSvCrNHFwYqhxSfgBW7nQi3qdFNeZyphMgpK5AiByT9v+DFnZWyS+OSpXmM3psuSC1+in7yhLWr16dWXWzw=="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/29a03bf1904f1d59ec50227bcbf64eb980e26fffd716e3f3205ed4a7e17e6493 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/29a03bf1904f1d59ec50227bcbf64eb980e26fffd716e3f3205ed4a7e17e6493 new file mode 100644 index 0000000..eb90dbf --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/29a03bf1904f1d59ec50227bcbf64eb980e26fffd716e3f3205ed4a7e17e6493 @@ -0,0 +1 @@ +{"architecture":"ppc64le","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:5517a5f16b947fafec2002881809a5798f6dea15680d3fcca1fb459f31f11aaf","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"6d3e77fdf98e3d063da72fbf9c00aa70eb24f8e34e702b9c7bcd20fb40c7bbab","container_config":{"Hostname":"6d3e77fdf98e","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:5517a5f16b947fafec2002881809a5798f6dea15680d3fcca1fb459f31f11aaf","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2023-03-13T16:29:40.50644322Z","docker_version":"20.10.23","history":[{"created":"2023-03-13T16:29:40.32077059Z","created_by":"/bin/sh -c #(nop) COPY file:3f80414426e41becdbb214f7a6d2e211f255be120a2409e43668203eafd069af in / "},{"created":"2023-03-13T16:29:40.50644322Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:fc37b056115d612a4d58475e5dc5532e12e8a179d9a5d548ef54ca79d8392471"]}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/2a16e122fe466459770f0defde1b59cacc61d3e491c8473c2b0a4f15b4d2fdcb b/test/images/hello-world-cosign-manifest-list/blobs/sha256/2a16e122fe466459770f0defde1b59cacc61d3e491c8473c2b0a4f15b4d2fdcb new file mode 100644 index 0000000..fb4d3d3 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/2a16e122fe466459770f0defde1b59cacc61d3e491c8473c2b0a4f15b4d2fdcb @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:a2d16425ea631d6254d948e176a92b4dc339add792996d06c83a53bea6898bbb"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:60ff2fae9751401b312ee38acb44ab0ec116b28edd090a54db3e9d3071749b6a","annotations":{"dev.cosignproject.cosign/signature":"MEYCIQDbvQCllrlIVbSSfhV0G0orK1SU0oLcfbN5LdqdiDVuwAIhAIPB96X56Y9duSgxksDKLUje0/naDneCH5u6lxiOfP4g"}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54 new file mode 100644 index 0000000..d3283db Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54 differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/3154f2b2183d33ec662331279255455bf3f61f2a95fcd17427eb858953422620 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3154f2b2183d33ec662331279255455bf3f61f2a95fcd17427eb858953422620 new file mode 100644 index 0000000..d7ac5ad --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3154f2b2183d33ec662331279255455bf3f61f2a95fcd17427eb858953422620 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:45ea150db157113f1e2946244c4d5d160f6708b4ee8731cda05ccd52b0fdac7b"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:02623e64de6f2252401a401a36d9e6db7d66a9c1d1bf134053d5c4c978b3376d","annotations":{"dev.cosignproject.cosign/signature":"MEQCIAcI6KszSm0PtCkB8x50wU27WcJ0HZGUImxtlRIfan1gAiALRzzUCe+E9bGX6yIwGFMEahHnpvRwANXrcJ9evn+07g=="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4 new file mode 100644 index 0000000..996f5c1 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1469, + "digest": "sha256:29a03bf1904f1d59ec50227bcbf64eb980e26fffd716e3f3205ed4a7e17e6493" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3929, + "digest": "sha256:54971af28fe60a8c72e395d92eab0451cf7ceece9cfe3650e4d4844243b2b24d" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/3374ed2b382445f1a06cf49cfb0e9322acb1a48c318620b89c9ae5e233d416b7 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3374ed2b382445f1a06cf49cfb0e9322acb1a48c318620b89c9ae5e233d416b7 new file mode 100644 index 0000000..f1f9528 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3374ed2b382445f1a06cf49cfb0e9322acb1a48c318620b89c9ae5e233d416b7 @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:958d0aa20c81ae813ef2ab5e8fea684ea95e4de11b6893ea50201bd6c8dfc3c3"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/36d89aa75357c8f99e359f8cabc0aae667d47d8f25ed51cbe66e148e3a77e19c b/test/images/hello-world-cosign-manifest-list/blobs/sha256/36d89aa75357c8f99e359f8cabc0aae667d47d8f25ed51cbe66e148e3a77e19c new file mode 100644 index 0000000..5795cca --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/36d89aa75357c8f99e359f8cabc0aae667d47d8f25ed51cbe66e148e3a77e19c @@ -0,0 +1 @@ +{"architecture":"386","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:5729fa03e3f3ba51f97b3dc5998dcf09262bf56658de670381dc6f859a507211","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"7553f3ecf1621f3c064b9c9368f2c1f0d7f342b92438ff348200daf296dbe6c2","container_config":{"Hostname":"7553f3ecf162","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:5729fa03e3f3ba51f97b3dc5998dcf09262bf56658de670381dc6f859a507211","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2022-03-22T23:18:38.347350662Z","docker_version":"20.10.12","history":[{"created":"2022-03-22T23:18:38.275131936Z","created_by":"/bin/sh -c #(nop) COPY file:1babbe3b37eb1154a832c225a92090691ababcfb0ed16f027eb3fe3c2e4ed27b in / "},{"created":"2022-03-22T23:18:38.347350662Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:3451c350c4c83ebc8885a9604fd7fd1446adffec9c2a96acf6801eb99019c1a2"]}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/3caa6dc69d0b73f21d29bfa75356395f2695a7abad34f010656740e90ddce399 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3caa6dc69d0b73f21d29bfa75356395f2695a7abad34f010656740e90ddce399 new file mode 100644 index 0000000..aafc79e Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/3caa6dc69d0b73f21d29bfa75356395f2695a7abad34f010656740e90ddce399 differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af b/test/images/hello-world-cosign-manifest-list/blobs/sha256/40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af new file mode 100644 index 0000000..c1258cb --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1483, + "digest": "sha256:7066d68bd2f224dbb7c3332da105b1dac81a75b47a869602096c27b6a75a525c" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 2993, + "digest": "sha256:04341b189be695acecd201a36cdf9dd99b8b0c338075000f555d5adf8e9c0547" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/40ddc5646e05a17eeb7caae99c144d94d1afe3fd201368777ef2ce29750f5738 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/40ddc5646e05a17eeb7caae99c144d94d1afe3fd201368777ef2ce29750f5738 new file mode 100644 index 0000000..3405bf6 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/40ddc5646e05a17eeb7caae99c144d94d1afe3fd201368777ef2ce29750f5738 @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338 new file mode 100644 index 0000000..01e8098 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1485, + "digest": "sha256:46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3208, + "digest": "sha256:7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/45ea150db157113f1e2946244c4d5d160f6708b4ee8731cda05ccd52b0fdac7b b/test/images/hello-world-cosign-manifest-list/blobs/sha256/45ea150db157113f1e2946244c4d5d160f6708b4ee8731cda05ccd52b0fdac7b new file mode 100644 index 0000000..36d3f75 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/45ea150db157113f1e2946244c4d5d160f6708b4ee8731cda05ccd52b0fdac7b @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:02623e64de6f2252401a401a36d9e6db7d66a9c1d1bf134053d5c4c978b3376d"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4 new file mode 100644 index 0000000..902a739 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4 @@ -0,0 +1 @@ +{"architecture":"arm64","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:cc0fff24c4ece63ade5d9f549e42c926cf569112c4f5c439a4a57f3f33f5588b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"b2af51419cbf516f3c99b877a64906b21afedc175bd3cd082eb5798e2f277bb4","container_config":{"Hostname":"b2af51419cbf","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:cc0fff24c4ece63ade5d9f549e42c926cf569112c4f5c439a4a57f3f33f5588b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2022-03-19T16:12:58.923371954Z","docker_version":"20.10.12","history":[{"created":"2022-03-19T16:12:58.834095198Z","created_by":"/bin/sh -c #(nop) COPY file:a79dd5bda1e77203401956a93401d3aef45221fc750295a4291896f3386f4f54 in / "},{"created":"2022-03-19T16:12:58.923371954Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:efb53921da3394806160641b72a2cbd34ca1a9a8345ac670a85a04ad3d0e3507"]},"variant":"v8"} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/4f923680062bbea891b21ccd6e561597e7b358abfdbf58167d6a8f2fcd035c0a b/test/images/hello-world-cosign-manifest-list/blobs/sha256/4f923680062bbea891b21ccd6e561597e7b358abfdbf58167d6a8f2fcd035c0a new file mode 100644 index 0000000..c84bfb7 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/4f923680062bbea891b21ccd6e561597e7b358abfdbf58167d6a8f2fcd035c0a @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:e58c180ca4d73dc4b0a65122c4502dd8674c6fe0f904ca02509c2fdf24e137e4"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/5004e9d559e7a75f42249ddeca4d5764fa4db05592a7a9a641e4ac37cc619ba1 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/5004e9d559e7a75f42249ddeca4d5764fa4db05592a7a9a641e4ac37cc619ba1 new file mode 100644 index 0000000..1987fa5 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/5004e9d559e7a75f42249ddeca4d5764fa4db05592a7a9a641e4ac37cc619ba1 @@ -0,0 +1 @@ +{"architecture":"mips64le","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:3ac6f4925cd994f08d51e346a272c63b8de3d099bc9a3a315e6cd2aff40ac96a","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"013e92274db6f063cd47953240ec4997ad495d6ddb52cee9e2ad778895e2fdb7","container_config":{"Hostname":"013e92274db6","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:3ac6f4925cd994f08d51e346a272c63b8de3d099bc9a3a315e6cd2aff40ac96a","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2022-03-19T06:38:10.482068091Z","docker_version":"20.10.12","history":[{"created":"2022-03-19T06:38:09.022057705Z","created_by":"/bin/sh -c #(nop) COPY file:9acd5b5706455a6fe3d36fc638bf68bead9cf9f0ac938fc68ec9e669f0d2f8c7 in / "},{"created":"2022-03-19T06:38:10.482068091Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:1de14bf941d802d2269f86583945dd7fc38005dcf92b4f2a69737d1e325c0e3d"]}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/54971af28fe60a8c72e395d92eab0451cf7ceece9cfe3650e4d4844243b2b24d b/test/images/hello-world-cosign-manifest-list/blobs/sha256/54971af28fe60a8c72e395d92eab0451cf7ceece9cfe3650e4d4844243b2b24d new file mode 100644 index 0000000..a661124 Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/54971af28fe60a8c72e395d92eab0451cf7ceece9cfe3650e4d4844243b2b24d differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/60ff2fae9751401b312ee38acb44ab0ec116b28edd090a54db3e9d3071749b6a b/test/images/hello-world-cosign-manifest-list/blobs/sha256/60ff2fae9751401b312ee38acb44ab0ec116b28edd090a54db3e9d3071749b6a new file mode 100644 index 0000000..26a501d --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/60ff2fae9751401b312ee38acb44ab0ec116b28edd090a54db3e9d3071749b6a @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/61941acdb959d25d7ad28f9483e9310f087c8f93d8d85d82be6883321b72f60b b/test/images/hello-world-cosign-manifest-list/blobs/sha256/61941acdb959d25d7ad28f9483e9310f087c8f93d8d85d82be6883321b72f60b new file mode 100644 index 0000000..a7b881e --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/61941acdb959d25d7ad28f9483e9310f087c8f93d8d85d82be6883321b72f60b @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:40ddc5646e05a17eeb7caae99c144d94d1afe3fd201368777ef2ce29750f5738"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b b/test/images/hello-world-cosign-manifest-list/blobs/sha256/6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b new file mode 100644 index 0000000..612585f --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1483, + "digest": "sha256:72d7b2a56244ff17b6ce61c658be0b98e790b14527d831414cc5d13bd68c0259" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3682, + "digest": "sha256:64e3c106413894c80284b439a0a7ab8152cc0c93a415d0746cd8aa9ba9bd9510" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/64e3c106413894c80284b439a0a7ab8152cc0c93a415d0746cd8aa9ba9bd9510 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/64e3c106413894c80284b439a0a7ab8152cc0c93a415d0746cd8aa9ba9bd9510 new file mode 100644 index 0000000..da5790d Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/64e3c106413894c80284b439a0a7ab8152cc0c93a415d0746cd8aa9ba9bd9510 differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/6569af6e782a5c31546c763f138b327cf641e4d537fc9bc453f52b46f19ec3ff b/test/images/hello-world-cosign-manifest-list/blobs/sha256/6569af6e782a5c31546c763f138b327cf641e4d537fc9bc453f52b46f19ec3ff new file mode 100644 index 0000000..7e2056e --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/6569af6e782a5c31546c763f138b327cf641e4d537fc9bc453f52b46f19ec3ff @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01 new file mode 100644 index 0000000..c93dccf Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01 differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/7066d68bd2f224dbb7c3332da105b1dac81a75b47a869602096c27b6a75a525c b/test/images/hello-world-cosign-manifest-list/blobs/sha256/7066d68bd2f224dbb7c3332da105b1dac81a75b47a869602096c27b6a75a525c new file mode 100644 index 0000000..3d84e42 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/7066d68bd2f224dbb7c3332da105b1dac81a75b47a869602096c27b6a75a525c @@ -0,0 +1 @@ +{"architecture":"arm","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:0a7499b1b135f9228c4b698ec3eb3cf22a26158ec5abfa876479369164931570","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"783bb761ac7a92cf940c195e6d2c07ce541bb9a40e38927bd06f93cfb0495f56","container_config":{"Hostname":"783bb761ac7a","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:0a7499b1b135f9228c4b698ec3eb3cf22a26158ec5abfa876479369164931570","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2023-01-03T00:58:00.044374661Z","docker_version":"20.10.17","history":[{"created":"2023-01-03T00:57:59.918635134Z","created_by":"/bin/sh -c #(nop) COPY file:064e3842b2c067a42e34f354951e44e733d8077cfb791d6847f4e653677d2f7e in / "},{"created":"2023-01-03T00:58:00.044374661Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:f30f4621b75c25a838c91d0cdd3803b0f2b2d27e048c8101a4669f4df6ba85f1"]},"variant":"v7"} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/72d7b2a56244ff17b6ce61c658be0b98e790b14527d831414cc5d13bd68c0259 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/72d7b2a56244ff17b6ce61c658be0b98e790b14527d831414cc5d13bd68c0259 new file mode 100644 index 0000000..53ff8c0 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/72d7b2a56244ff17b6ce61c658be0b98e790b14527d831414cc5d13bd68c0259 @@ -0,0 +1 @@ +{"architecture":"arm","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:1674a0c0d1546739e8fa1bff731c29a5d547eaa8daf4d4e979db1d40cbe80bc4","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"3c6ea796621df11bd24efd7da98f06d914f07ea2ca99c0410996753f671bd1ce","container_config":{"Hostname":"3c6ea796621d","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:1674a0c0d1546739e8fa1bff731c29a5d547eaa8daf4d4e979db1d40cbe80bc4","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2023-03-13T16:15:31.914816057Z","docker_version":"20.10.23","history":[{"created":"2023-03-13T16:15:31.705706441Z","created_by":"/bin/sh -c #(nop) COPY file:2b28186c8eb8bb7ee57e0b02055b51cb4023eac9161feab0338311b5a9ff6665 in / "},{"created":"2023-03-13T16:15:31.914816057Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:73d87907732885b6581d85fd1e9d209c7a628265eb0b4aff7a90b95e033ded9d"]},"variant":"v5"} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/781ea9e9358a3d6307205054d8fb0c6bd6e104d6e01b98adfebc1235173b94ec b/test/images/hello-world-cosign-manifest-list/blobs/sha256/781ea9e9358a3d6307205054d8fb0c6bd6e104d6e01b98adfebc1235173b94ec new file mode 100644 index 0000000..3e65c55 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/781ea9e9358a3d6307205054d8fb0c6bd6e104d6e01b98adfebc1235173b94ec @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:f30a18a9413fc29432347c81fc8ce7a3e8b28f9580a4cf1ea738c5525f0977f1"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/7f0d4fad461d1ac69488092b5914b5ec642133c0fb884539045de33fbcd2eadb b/test/images/hello-world-cosign-manifest-list/blobs/sha256/7f0d4fad461d1ac69488092b5914b5ec642133c0fb884539045de33fbcd2eadb new file mode 100644 index 0000000..09b9614 Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/7f0d4fad461d1ac69488092b5914b5ec642133c0fb884539045de33fbcd2eadb differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/897d8fbdf18b7e2eec4a53f4e1c60605cfe75000be6e7c2e1455490414829767 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/897d8fbdf18b7e2eec4a53f4e1c60605cfe75000be6e7c2e1455490414829767 new file mode 100644 index 0000000..6fd8586 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/897d8fbdf18b7e2eec4a53f4e1c60605cfe75000be6e7c2e1455490414829767 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:155c39610faa3bae95d5bd0435194b1ae66c861c2aca8a7692e752e9acfaa696"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:6569af6e782a5c31546c763f138b327cf641e4d537fc9bc453f52b46f19ec3ff","annotations":{"dev.cosignproject.cosign/signature":"MEQCIBb2bbJKoGuUJ/hQM0URJWwP63hnqJSG4JMyXZ/CbDelAiAdPaCXZRwqFAQIdCd3EMPIBg/gMJbIw8/lOOZrpA9cxA=="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/89815ad2fbca952d269f07f5dae3b03673cfea2d83b4c4582af8e47904d717fa b/test/images/hello-world-cosign-manifest-list/blobs/sha256/89815ad2fbca952d269f07f5dae3b03673cfea2d83b4c4582af8e47904d717fa new file mode 100644 index 0000000..1c67209 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/89815ad2fbca952d269f07f5dae3b03673cfea2d83b4c4582af8e47904d717fa @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:61941acdb959d25d7ad28f9483e9310f087c8f93d8d85d82be6883321b72f60b"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:40ddc5646e05a17eeb7caae99c144d94d1afe3fd201368777ef2ce29750f5738","annotations":{"dev.cosignproject.cosign/signature":"MEYCIQC7H0GxMqGJQTB3wzJH5fAlmjeg6v+a8SHRqKSLn2SrfgIhAOse16BZezpj9r//XVqp5D1Ua4t5RhAfIKke14oUngX5"}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/8ff188302c77050dcb64e08302f36c0a9f8133d36325d859a3023a97eff16879 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/8ff188302c77050dcb64e08302f36c0a9f8133d36325d859a3023a97eff16879 new file mode 100644 index 0000000..47c36ba --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/8ff188302c77050dcb64e08302f36c0a9f8133d36325d859a3023a97eff16879 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:781ea9e9358a3d6307205054d8fb0c6bd6e104d6e01b98adfebc1235173b94ec"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:f30a18a9413fc29432347c81fc8ce7a3e8b28f9580a4cf1ea738c5525f0977f1","annotations":{"dev.cosignproject.cosign/signature":"MEUCIQDEIOsnKrIAUAUB29hOGgOuQNzqsL2nMuJNJ4QcM3QbFQIgConva6Hn1fW8bnkeLVMQDFsDvwmHTnOpRHPt612S7Y0="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/958d0aa20c81ae813ef2ab5e8fea684ea95e4de11b6893ea50201bd6c8dfc3c3 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/958d0aa20c81ae813ef2ab5e8fea684ea95e4de11b6893ea50201bd6c8dfc3c3 new file mode 100644 index 0000000..bf93c7f --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/958d0aa20c81ae813ef2ab5e8fea684ea95e4de11b6893ea50201bd6c8dfc3c3 @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/97576b63fdca9f120886ae2a8dfab33089ccb778686ed6ce0c4e666d348402a9 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/97576b63fdca9f120886ae2a8dfab33089ccb778686ed6ce0c4e666d348402a9 new file mode 100644 index 0000000..e0eb648 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/97576b63fdca9f120886ae2a8dfab33089ccb778686ed6ce0c4e666d348402a9 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:fa552c1bfe5aa7859652795d78c358ae2816b527092acb225c31d08c88fba58b"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:fe0a7ee955986c6c86f05e52af8e1f701795c3862e3760d4421f468b2f0e082a","annotations":{"dev.cosignproject.cosign/signature":"MEUCIQDfBt/oR+IMoGTpzzh+bQ/fhU1RwQoRxVRUtVaCYJnT7AIgQ2PUqhDEtdoEArLociduB3p98zGKjepL3h8bgc/i6Mg="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849 new file mode 100644 index 0000000..c1151d4 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1471, + "digest": "sha256:b3593dab05491cdf5ee88c29bee36603c0df0bc34798eed5067f6e1335a9d391" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3000, + "digest": "sha256:3caa6dc69d0b73f21d29bfa75356395f2695a7abad34f010656740e90ddce399" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089 new file mode 100644 index 0000000..015ffd5 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1468, + "digest": "sha256:36d89aa75357c8f99e359f8cabc0aae667d47d8f25ed51cbe66e148e3a77e19c" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 2736, + "digest": "sha256:7f0d4fad461d1ac69488092b5914b5ec642133c0fb884539045de33fbcd2eadb" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/9a8c4a3156d3d8662e57276d274ebf2925db16611d707465beb0fb4032f73048 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/9a8c4a3156d3d8662e57276d274ebf2925db16611d707465beb0fb4032f73048 new file mode 100644 index 0000000..6839b51 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/9a8c4a3156d3d8662e57276d274ebf2925db16611d707465beb0fb4032f73048 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:3374ed2b382445f1a06cf49cfb0e9322acb1a48c318620b89c9ae5e233d416b7"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:958d0aa20c81ae813ef2ab5e8fea684ea95e4de11b6893ea50201bd6c8dfc3c3","annotations":{"dev.cosignproject.cosign/signature":"MEQCIErQTn+B1nAZTNI21UvQruf8qNrChJ2KNXXMN9U/xYrLAiAwK/t/nDg+H3Lo5py5PrnNJrxtAsj63bhqgyypOLclyw=="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/a2d16425ea631d6254d948e176a92b4dc339add792996d06c83a53bea6898bbb b/test/images/hello-world-cosign-manifest-list/blobs/sha256/a2d16425ea631d6254d948e176a92b4dc339add792996d06c83a53bea6898bbb new file mode 100644 index 0000000..e452239 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/a2d16425ea631d6254d948e176a92b4dc339add792996d06c83a53bea6898bbb @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:60ff2fae9751401b312ee38acb44ab0ec116b28edd090a54db3e9d3071749b6a"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/abc70fcc95b2f52b325d69cc5c259dd9babb40a9df152e88b286fada1d3248bd b/test/images/hello-world-cosign-manifest-list/blobs/sha256/abc70fcc95b2f52b325d69cc5c259dd9babb40a9df152e88b286fada1d3248bd new file mode 100644 index 0000000..4401b56 Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/abc70fcc95b2f52b325d69cc5c259dd9babb40a9df152e88b286fada1d3248bd differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/b3593dab05491cdf5ee88c29bee36603c0df0bc34798eed5067f6e1335a9d391 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/b3593dab05491cdf5ee88c29bee36603c0df0bc34798eed5067f6e1335a9d391 new file mode 100644 index 0000000..6c4d8ca --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/b3593dab05491cdf5ee88c29bee36603c0df0bc34798eed5067f6e1335a9d391 @@ -0,0 +1 @@ +{"architecture":"riscv64","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:1068f8c97468e4ea831a16a1b77bf6bb02523b9014d66292195dda5002f3b49f","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"44669466789c281844b427902cdf085bfb58bbb46fdbfe99a825db2a309364e4","container_config":{"Hostname":"44669466789c","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:1068f8c97468e4ea831a16a1b77bf6bb02523b9014d66292195dda5002f3b49f","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2021-09-23T21:24:50.101692955Z","docker_version":"20.10.7","history":[{"created":"2021-09-23T21:24:49.655520257Z","created_by":"/bin/sh -c #(nop) COPY file:84444ad88bd7fb1ac993a256408f10ce0befd4338385371c4b1943d8b219e0b4 in / "},{"created":"2021-09-23T21:24:50.101692955Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:86d357c4e1f53247f3338e8ec2d66987ff8fcd3e37f2d52fde187a15fa0671e7"]}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/b61d5036614f79e5610341829b1cb96b55a1ce7060e4bdc57ac196d93b2dee63 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/b61d5036614f79e5610341829b1cb96b55a1ce7060e4bdc57ac196d93b2dee63 new file mode 100644 index 0000000..4f4bbd7 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/b61d5036614f79e5610341829b1cb96b55a1ce7060e4bdc57ac196d93b2dee63 @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:bf4cb7b5c44789f31a104b99ae53cf38992f33e084dd97b132957c5101e643ec"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/bbc6052697e5fdcd1b311e0b3f65189ffbe354cf8ae97e7a55d588e855097174 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/bbc6052697e5fdcd1b311e0b3f65189ffbe354cf8ae97e7a55d588e855097174 new file mode 100644 index 0000000..d75a976 Binary files /dev/null and b/test/images/hello-world-cosign-manifest-list/blobs/sha256/bbc6052697e5fdcd1b311e0b3f65189ffbe354cf8ae97e7a55d588e855097174 differ diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/bf4cb7b5c44789f31a104b99ae53cf38992f33e084dd97b132957c5101e643ec b/test/images/hello-world-cosign-manifest-list/blobs/sha256/bf4cb7b5c44789f31a104b99ae53cf38992f33e084dd97b132957c5101e643ec new file mode 100644 index 0000000..2640aae --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/bf4cb7b5c44789f31a104b99ae53cf38992f33e084dd97b132957c5101e643ec @@ -0,0 +1 @@ +{"payloadType":"application/vnd.in-toto+json","payload":"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjAuMSIsInByZWRpY2F0ZVR5cGUiOiJodHRwczovL2Nvc2lnbi5zaWdzdG9yZS5kZXYvYXR0ZXN0YXRpb24vdjEiLCJzdWJqZWN0IjpbeyJuYW1lIjoiMTI3LjAuMC4xOjQ0OTQ5L2hlbGxvLXdvcmxkLWRvY2tlci12Mi1tYW5pZmVzdC1saXN0IiwiZGlnZXN0Ijp7InNoYTI1NiI6IjAwZTFlZTdjODk4YTJjMzkzZWEyZmU3NjgwOTM4ZjhkY2JlNTVlNTFmYmYwODAzMmNmMzczMjZhNjc3ZjkyZWQifX1dLCJwcmVkaWNhdGUiOnsiRGF0YSI6IntcbiAgICBcIm5hbWVcIjogXCJwYW5vcGxpYS10ZXN0XCJcbn1cbiIsIlRpbWVzdGFtcCI6IjIwMjQtMTAtMDlUMTM6Mjc6MTNaIn19","signatures":[{"keyid":"","sig":"MEUCIQCow5xHixfbQVMyBxl12/JJ5WBSxEsE6I+YZT/Q9CyOWQIgJYKSX7TX+LiWuD/xj9PPnaBP/TrZyC3f25p+XwlkYqU="}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861 new file mode 100644 index 0000000..b7cc82d --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1469, + "digest": "sha256:df5477cea5582b0ae6a31de2d1c9bbacb506091f42a3b0fe77a209006f409fd8" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3276, + "digest": "sha256:abc70fcc95b2f52b325d69cc5c259dd9babb40a9df152e88b286fada1d3248bd" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/dc285da8291208f50dced509a66c9673d6e4aea18e2d387d9c5fda634415dfc9 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/dc285da8291208f50dced509a66c9673d6e4aea18e2d387d9c5fda634415dfc9 new file mode 100644 index 0000000..e8e44c8 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/dc285da8291208f50dced509a66c9673d6e4aea18e2d387d9c5fda634415dfc9 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:04d584bf278d95c3bdf6aebdadd9ee552e8c9b35d60e8f1247bd9ee0260313e1"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":267,"digest":"sha256:f85bca573013bd8d0ecb52d851dcf98581f35d46c64aa049558a04dc5e4401fe","annotations":{"dev.cosignproject.cosign/signature":"MEQCIGwHmZEWB1MBs9BJqDa6douGq4ZVT5lGJBmGYgI8CH7IAiBLKq7MZk49XlZWczz0qN0zuDuETbCxSMTolASePTOjNA=="}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/df5477cea5582b0ae6a31de2d1c9bbacb506091f42a3b0fe77a209006f409fd8 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/df5477cea5582b0ae6a31de2d1c9bbacb506091f42a3b0fe77a209006f409fd8 new file mode 100644 index 0000000..227d37b --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/df5477cea5582b0ae6a31de2d1c9bbacb506091f42a3b0fe77a209006f409fd8 @@ -0,0 +1 @@ +{"architecture":"s390x","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:214c20be6ceaa7b24f8fa966550831a7f608c00cbb3408ac8f6171a222cacb14","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"f7ac7ed191763ba1d368b5b35d668adf6aad7ffabdea048634935eb900450c2e","container_config":{"Hostname":"f7ac7ed19176","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:214c20be6ceaa7b24f8fa966550831a7f608c00cbb3408ac8f6171a222cacb14","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2021-09-23T22:39:54.089350115Z","docker_version":"20.10.7","history":[{"created":"2021-09-23T22:39:53.962038173Z","created_by":"/bin/sh -c #(nop) COPY file:600d8ab1c71de7b59c96ed558afbed478d81ebf3ef7517c4c4f3757cc136475f in / "},{"created":"2021-09-23T22:39:54.089350115Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:9731f28beed099abd643f17ffb5aceea4cd916affaacc79261a98b9ddddd4a36"]}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/e58c180ca4d73dc4b0a65122c4502dd8674c6fe0f904ca02509c2fdf24e137e4 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/e58c180ca4d73dc4b0a65122c4502dd8674c6fe0f904ca02509c2fdf24e137e4 new file mode 100644 index 0000000..bdee112 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/e58c180ca4d73dc4b0a65122c4502dd8674c6fe0f904ca02509c2fdf24e137e4 @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392 new file mode 100644 index 0000000..fb59d4b --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1473, + "digest": "sha256:5004e9d559e7a75f42249ddeca4d5764fa4db05592a7a9a641e4ac37cc619ba1" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 4092, + "digest": "sha256:bbc6052697e5fdcd1b311e0b3f65189ffbe354cf8ae97e7a55d588e855097174" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/f30a18a9413fc29432347c81fc8ce7a3e8b28f9580a4cf1ea738c5525f0977f1 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/f30a18a9413fc29432347c81fc8ce7a3e8b28f9580a4cf1ea738c5525f0977f1 new file mode 100644 index 0000000..03ae8c7 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/f30a18a9413fc29432347c81fc8ce7a3e8b28f9580a4cf1ea738c5525f0977f1 @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4 new file mode 100644 index 0000000..10e6c84 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1469, + "digest": "sha256:feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 2479, + "digest": "sha256:2db29710123e3e53a794f2694094b9b4338aa9ee5c40b930cb8063a1be392c54" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/f85bca573013bd8d0ecb52d851dcf98581f35d46c64aa049558a04dc5e4401fe b/test/images/hello-world-cosign-manifest-list/blobs/sha256/f85bca573013bd8d0ecb52d851dcf98581f35d46c64aa049558a04dc5e4401fe new file mode 100644 index 0000000..2659073 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/f85bca573013bd8d0ecb52d851dcf98581f35d46c64aa049558a04dc5e4401fe @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/fa552c1bfe5aa7859652795d78c358ae2816b527092acb225c31d08c88fba58b b/test/images/hello-world-cosign-manifest-list/blobs/sha256/fa552c1bfe5aa7859652795d78c358ae2816b527092acb225c31d08c88fba58b new file mode 100644 index 0000000..621a869 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/fa552c1bfe5aa7859652795d78c358ae2816b527092acb225c31d08c88fba58b @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:fe0a7ee955986c6c86f05e52af8e1f701795c3862e3760d4421f468b2f0e082a"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/fa9dfc3e3e2a35077691b46087565b3433a7447f3eff39b96cdbbcbb568db94b b/test/images/hello-world-cosign-manifest-list/blobs/sha256/fa9dfc3e3e2a35077691b46087565b3433a7447f3eff39b96cdbbcbb568db94b new file mode 100644 index 0000000..72fffce --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/fa9dfc3e3e2a35077691b46087565b3433a7447f3eff39b96cdbbcbb568db94b @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:0473adddc4b4a6b8456d5077fa12d08de36239e713c704fa0151abffb1bb0126"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/fe0a7ee955986c6c86f05e52af8e1f701795c3862e3760d4421f468b2f0e082a b/test/images/hello-world-cosign-manifest-list/blobs/sha256/fe0a7ee955986c6c86f05e52af8e1f701795c3862e3760d4421f468b2f0e082a new file mode 100644 index 0000000..ab9a8a1 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/fe0a7ee955986c6c86f05e52af8e1f701795c3862e3760d4421f468b2f0e082a @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:44949/hello-world-docker-v2-manifest-list"},"image":{"docker-manifest-digest":"sha256:eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/blobs/sha256/feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412 b/test/images/hello-world-cosign-manifest-list/blobs/sha256/feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412 new file mode 100644 index 0000000..b85269e --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/blobs/sha256/feb5d9fea6a5e9606aa995e879d862b825965ba48de054caab5ef356dc6b3412 @@ -0,0 +1 @@ +{"architecture":"amd64","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:b9935d4e8431fb1a7f0989304ec86b3329a99a25f5efdc7f09f3f8c41434ca6d","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"8746661ca3c2f215da94e6d3f7dfdcafaff5ec0b21c9aff6af3dc379a82fbc72","container_config":{"Hostname":"8746661ca3c2","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:b9935d4e8431fb1a7f0989304ec86b3329a99a25f5efdc7f09f3f8c41434ca6d","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2021-09-23T23:47:57.442225064Z","docker_version":"20.10.7","history":[{"created":"2021-09-23T23:47:57.098990892Z","created_by":"/bin/sh -c #(nop) COPY file:50563a97010fd7ce1ceebd1fa4f4891ac3decdf428333fb2683696f4358af6c2 in / "},{"created":"2021-09-23T23:47:57.442225064Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:e07ee1baac5fae6a26f30cabfe54a36d3402f96afda318fe0a96cec4ca393359"]}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/index.json b/test/images/hello-world-cosign-manifest-list/index.json new file mode 100755 index 0000000..a0597ac --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/index.json @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","manifests":[{"mediaType":"application/vnd.docker.distribution.manifest.list.v2+json","size":2069,"digest":"sha256:00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed"},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":512,"digest":"sha256:165760e771f0d295a89c06ad50659133315b485ac68647119775b37578eaf629","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed.att"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:1e4c6e59fe9ed668252140571494bb844e424bb48c2eceefed73434eb9a84dc3","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-00e1ee7c898a2c393ea2fe7680938f8dcbe55e51fbf08032cf37326a677f92ed.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:2a16e122fe466459770f0defde1b59cacc61d3e491c8473c2b0a4f15b4d2fdcb","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-3209b9aec056b296ea55b2af7757d078bf92e55a3ea29c5fdef5c785bcef09c4.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:9a8c4a3156d3d8662e57276d274ebf2925db16611d707465beb0fb4032f73048","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-40d0cfd0861719208ff9f7747ab3f97844eeca509df705db44a736df863b76af.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:3154f2b2183d33ec662331279255455bf3f61f2a95fcd17427eb858953422620","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:8ff188302c77050dcb64e08302f36c0a9f8133d36325d859a3023a97eff16879","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-6253ef1af25aabd67777a01c686e7c69ee612961db34c8b90da079e5473be83b.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:897d8fbdf18b7e2eec4a53f4e1c60605cfe75000be6e7c2e1455490414829767","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-98c9722322be649df94780d3fbe594fce7996234b259f27eac9428b84050c849.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:dc285da8291208f50dced509a66c9673d6e4aea18e2d387d9c5fda634415dfc9","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-995efde2e81b21d1ea7066aa77a59298a62a9e9fbb4b77f36c189774ec9b1089.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:89815ad2fbca952d269f07f5dae3b03673cfea2d83b4c4582af8e47904d717fa","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-c7b6944911848ce39b44ed660d95fb54d69bbd531de724c7ce6fc9f743c0b861.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:97576b63fdca9f120886ae2a8dfab33089ccb778686ed6ce0c4e666d348402a9","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-eb11b1a194ff8e236a01eff392c4e1296a53b0fb4780d8b0382f7996a15d5392.sig"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:16692a792468762200c57d0aa0cbe380ccf2b16a23a00543dd69bd8fb1dc4fae","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-f54a58bc1aac5ea1a25d796ae155dc228b3f0e11d046ae276b39c4bf2f13d8c4.sig"}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest-list/oci-layout b/test/images/hello-world-cosign-manifest-list/oci-layout new file mode 100755 index 0000000..224a869 --- /dev/null +++ b/test/images/hello-world-cosign-manifest-list/oci-layout @@ -0,0 +1,3 @@ +{ + "imageLayoutVersion": "1.0.0" +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338 b/test/images/hello-world-cosign-manifest/blobs/sha256/432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338 new file mode 100644 index 0000000..01e8098 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338 @@ -0,0 +1,16 @@ +{ + "schemaVersion": 2, + "mediaType": "application/vnd.docker.distribution.manifest.v2+json", + "config": { + "mediaType": "application/vnd.docker.container.image.v1+json", + "size": 1485, + "digest": "sha256:46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4" + }, + "layers": [ + { + "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 3208, + "digest": "sha256:7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01" + } + ] +} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4 b/test/images/hello-world-cosign-manifest/blobs/sha256/46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4 new file mode 100644 index 0000000..902a739 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/46331d942d6350436f64e614d75725f6de3bb5c63e266e236e04389820a234c4 @@ -0,0 +1 @@ +{"architecture":"arm64","config":{"Hostname":"","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/hello"],"Image":"sha256:cc0fff24c4ece63ade5d9f549e42c926cf569112c4f5c439a4a57f3f33f5588b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":null},"container":"b2af51419cbf516f3c99b877a64906b21afedc175bd3cd082eb5798e2f277bb4","container_config":{"Hostname":"b2af51419cbf","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"/hello\"]"],"Image":"sha256:cc0fff24c4ece63ade5d9f549e42c926cf569112c4f5c439a4a57f3f33f5588b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2022-03-19T16:12:58.923371954Z","docker_version":"20.10.12","history":[{"created":"2022-03-19T16:12:58.834095198Z","created_by":"/bin/sh -c #(nop) COPY file:a79dd5bda1e77203401956a93401d3aef45221fc750295a4291896f3386f4f54 in / "},{"created":"2022-03-19T16:12:58.923371954Z","created_by":"/bin/sh -c #(nop) CMD [\"/hello\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:efb53921da3394806160641b72a2cbd34ca1a9a8345ac670a85a04ad3d0e3507"]},"variant":"v8"} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/51a5ebe9c08828b74e4c6b65c2398591df2288eacbe411bc97a9e39ef104b99a b/test/images/hello-world-cosign-manifest/blobs/sha256/51a5ebe9c08828b74e4c6b65c2398591df2288eacbe411bc97a9e39ef104b99a new file mode 100644 index 0000000..900958a --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/51a5ebe9c08828b74e4c6b65c2398591df2288eacbe411bc97a9e39ef104b99a @@ -0,0 +1 @@ +{"payloadType":"application/vnd.in-toto+json","payload":"eyJfdHlwZSI6Imh0dHBzOi8vaW4tdG90by5pby9TdGF0ZW1lbnQvdjAuMSIsInByZWRpY2F0ZVR5cGUiOiJodHRwczovL2Nvc2lnbi5zaWdzdG9yZS5kZXYvYXR0ZXN0YXRpb24vdjEiLCJzdWJqZWN0IjpbeyJuYW1lIjoiMTI3LjAuMC4xOjM5NzAzL2hlbGxvLXdvcmxkLWRvY2tlci12Mi1tYW5pZmVzdCIsImRpZ2VzdCI6eyJzaGEyNTYiOiI0MzJmOTgyNjM4YjNhZWZhYjczY2M1OGFiMjhmNWMxNmU5NmZkYjUwNGU4YzEzNGZjNThkZmY0YmFlOGJmMzM4In19XSwicHJlZGljYXRlIjp7IkRhdGEiOiJ7XG4gICAgXCJuYW1lXCI6IFwicGFub3BsaWEtdGVzdFwiXG59XG4iLCJUaW1lc3RhbXAiOiIyMDI0LTEwLTA5VDEzOjI3OjEyWiJ9fQ==","signatures":[{"keyid":"","sig":"MEUCIE/hcHIYmayaoQreqa83ZazMWm1fj0o4G0g+Au7pJXUUAiEAhpsDoQg9MQeD6tifuEGoJGernxBLmXdwgFIllTXheiw="}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01 b/test/images/hello-world-cosign-manifest/blobs/sha256/7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01 new file mode 100644 index 0000000..c93dccf Binary files /dev/null and b/test/images/hello-world-cosign-manifest/blobs/sha256/7050e35b49f5e348c4809f5eff915842962cb813f32062d3bbdd35c750dd7d01 differ diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/8fa40880617d755574fbb0a06c67d69d1efb2ce06bd3a76ef2d06aeefd861d58 b/test/images/hello-world-cosign-manifest/blobs/sha256/8fa40880617d755574fbb0a06c67d69d1efb2ce06bd3a76ef2d06aeefd861d58 new file mode 100644 index 0000000..f36ae93 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/8fa40880617d755574fbb0a06c67d69d1efb2ce06bd3a76ef2d06aeefd861d58 @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:bbfb5811b9c372086df099d763e00380ea89957b527694c98327fc1a96bf9464"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/a6ad4f8c0122fd2eb192cb0ee52f1a11c07fcc9f70796b2bc7cc939e9b9c65ea b/test/images/hello-world-cosign-manifest/blobs/sha256/a6ad4f8c0122fd2eb192cb0ee52f1a11c07fcc9f70796b2bc7cc939e9b9c65ea new file mode 100644 index 0000000..1514166 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/a6ad4f8c0122fd2eb192cb0ee52f1a11c07fcc9f70796b2bc7cc939e9b9c65ea @@ -0,0 +1 @@ +{"architecture":"","created":"0001-01-01T00:00:00Z","history":[{"created":"0001-01-01T00:00:00Z"}],"os":"","rootfs":{"type":"layers","diff_ids":["sha256:51a5ebe9c08828b74e4c6b65c2398591df2288eacbe411bc97a9e39ef104b99a"]},"config":{}} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/bbfb5811b9c372086df099d763e00380ea89957b527694c98327fc1a96bf9464 b/test/images/hello-world-cosign-manifest/blobs/sha256/bbfb5811b9c372086df099d763e00380ea89957b527694c98327fc1a96bf9464 new file mode 100644 index 0000000..ac79157 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/bbfb5811b9c372086df099d763e00380ea89957b527694c98327fc1a96bf9464 @@ -0,0 +1 @@ +{"critical":{"identity":{"docker-reference":"127.0.0.1:39703/hello-world-docker-v2-manifest"},"image":{"docker-manifest-digest":"sha256:432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338"},"type":"cosign container image signature"},"optional":null} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/e2138afe1d1bb80dd0348ed1c5a0bb784568249aa9c64b57c75055c548e58281 b/test/images/hello-world-cosign-manifest/blobs/sha256/e2138afe1d1bb80dd0348ed1c5a0bb784568249aa9c64b57c75055c548e58281 new file mode 100644 index 0000000..a619df6 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/e2138afe1d1bb80dd0348ed1c5a0bb784568249aa9c64b57c75055c548e58281 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:a6ad4f8c0122fd2eb192cb0ee52f1a11c07fcc9f70796b2bc7cc939e9b9c65ea"},"layers":[{"mediaType":"application/vnd.dsse.envelope.v1+json","size":676,"digest":"sha256:51a5ebe9c08828b74e4c6b65c2398591df2288eacbe411bc97a9e39ef104b99a","annotations":{"dev.cosignproject.cosign/signature":"","predicateType":"https://cosign.sigstore.dev/attestation/v1"}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/blobs/sha256/f764ee0fbe0e49555602e3c34e82be58a63da388204d93f948710c74a9730682 b/test/images/hello-world-cosign-manifest/blobs/sha256/f764ee0fbe0e49555602e3c34e82be58a63da388204d93f948710c74a9730682 new file mode 100644 index 0000000..de9149a --- /dev/null +++ b/test/images/hello-world-cosign-manifest/blobs/sha256/f764ee0fbe0e49555602e3c34e82be58a63da388204d93f948710c74a9730682 @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.manifest.v1+json","config":{"mediaType":"application/vnd.oci.image.config.v1+json","size":233,"digest":"sha256:8fa40880617d755574fbb0a06c67d69d1efb2ce06bd3a76ef2d06aeefd861d58"},"layers":[{"mediaType":"application/vnd.dev.cosign.simplesigning.v1+json","size":262,"digest":"sha256:bbfb5811b9c372086df099d763e00380ea89957b527694c98327fc1a96bf9464","annotations":{"dev.cosignproject.cosign/signature":"MEYCIQCvk/Hm0uRosi3yQQ4T5TnBkI0MFdydeKtVpDhA5IatGgIhAJ0DgXgf9qKP/sQqdCaSIff3tmm3rS5PjANp3WCG/bJ4"}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/index.json b/test/images/hello-world-cosign-manifest/index.json new file mode 100755 index 0000000..05a9d82 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/index.json @@ -0,0 +1 @@ +{"schemaVersion":2,"mediaType":"application/vnd.oci.image.index.v1+json","manifests":[{"mediaType":"application/vnd.docker.distribution.manifest.v2+json","size":525,"digest":"sha256:432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338"},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":512,"digest":"sha256:e2138afe1d1bb80dd0348ed1c5a0bb784568249aa9c64b57c75055c548e58281","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338.att"}},{"mediaType":"application/vnd.oci.image.manifest.v1+json","size":558,"digest":"sha256:f764ee0fbe0e49555602e3c34e82be58a63da388204d93f948710c74a9730682","annotations":{"org.opencontainers.image.ref.name":"_cosign:sha256-432f982638b3aefab73cc58ab28f5c16e96fdb504e8c134fc58dff4bae8bf338.sig"}}]} \ No newline at end of file diff --git a/test/images/hello-world-cosign-manifest/oci-layout b/test/images/hello-world-cosign-manifest/oci-layout new file mode 100755 index 0000000..224a869 --- /dev/null +++ b/test/images/hello-world-cosign-manifest/oci-layout @@ -0,0 +1,3 @@ +{ + "imageLayoutVersion": "1.0.0" +} \ No newline at end of file