mirror of
https://github.com/containers/image.git
synced 2025-04-18 19:44:05 +03:00
fix(deps): update module github.com/santhosh-tekuri/jsonschema/v5 to v6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
1fe90d9557
commit
e34a243785
2
go.mod
2
go.mod
@ -29,7 +29,7 @@ require (
|
||||
github.com/opencontainers/selinux v1.11.1
|
||||
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f
|
||||
github.com/proglottis/gpgme v0.1.4
|
||||
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1
|
||||
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1
|
||||
github.com/secure-systems-lab/go-securesystemslib v0.9.0
|
||||
github.com/sigstore/fulcio v1.6.6
|
||||
github.com/sigstore/rekor v1.3.9
|
||||
|
6
go.sum
6
go.sum
@ -70,6 +70,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
|
||||
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
|
||||
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
|
||||
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
|
||||
github.com/docker/cli v28.0.1+incompatible h1:g0h5NQNda3/CxIsaZfH4Tyf6vpxFth7PYl3hgCPOKzs=
|
||||
github.com/docker/cli v28.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
|
||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||
@ -292,8 +294,8 @@ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4=
|
||||
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY=
|
||||
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1 h1:PKK9DyHxif4LZo+uQSgXNqs0jj5+xZwwfKHgph2lxBw=
|
||||
github.com/santhosh-tekuri/jsonschema/v6 v6.0.1/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
|
||||
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.9.0 h1:rf1HIbL64nUpEIZnjLZ3mcNEL9NBPB0iuVjyxvq3LZc=
|
||||
|
@ -1,6 +1,7 @@
|
||||
package signature
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"os"
|
||||
@ -10,7 +11,7 @@ import (
|
||||
|
||||
"github.com/containers/image/v5/version"
|
||||
"github.com/opencontainers/go-digest"
|
||||
"github.com/santhosh-tekuri/jsonschema/v5"
|
||||
"github.com/santhosh-tekuri/jsonschema/v6"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@ -96,8 +97,7 @@ func successfullyUnmarshalUntrustedSignature(t *testing.T, schema *jsonschema.Sc
|
||||
err := json.Unmarshal(input, &s)
|
||||
require.NoError(t, err, inputString)
|
||||
|
||||
var rawInput any
|
||||
err = json.Unmarshal(input, &rawInput)
|
||||
rawInput, err := jsonschema.UnmarshalJSON(bytes.NewReader(input))
|
||||
require.NoError(t, err, inputString)
|
||||
err = schema.Validate(rawInput)
|
||||
assert.NoError(t, err, inputString)
|
||||
@ -113,8 +113,7 @@ func assertUnmarshalUntrustedSignatureFails(t *testing.T, schema *jsonschema.Sch
|
||||
err := json.Unmarshal(input, &s)
|
||||
assert.Error(t, err, inputString)
|
||||
|
||||
var rawInput any
|
||||
err = json.Unmarshal(input, &rawInput)
|
||||
rawInput, err := jsonschema.UnmarshalJSON(bytes.NewReader(input))
|
||||
if err == nil {
|
||||
err := schema.Validate(rawInput)
|
||||
assert.Error(t, err, inputString)
|
||||
@ -130,7 +129,7 @@ func TestUnmarshalJSON(t *testing.T) {
|
||||
schemaPath, err := filepath.Abs("../docs/atomic-signature-embedded-json.json")
|
||||
require.NoError(t, err)
|
||||
|
||||
schema, err := jsonschema.Compile("file://" + schemaPath)
|
||||
schema, err := jsonschema.NewCompiler().Compile("file://" + schemaPath)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Invalid input. Note that json.Unmarshal is guaranteed to validate input before calling our
|
||||
|
Loading…
x
Reference in New Issue
Block a user