diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1bcf57..54b069f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: test: name: run tests and linters - uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-rust.yml@v3.1.16 + uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-rust.yml@v3.1.17 release: needs: test @@ -24,6 +24,6 @@ jobs: # Required by cosign keyless signing id-token: write - uses: kubewarden/github-actions/.github/workflows/reusable-release-policy-rust.yml@v3.1.16 + uses: kubewarden/github-actions/.github/workflows/reusable-release-policy-rust.yml@v3.1.17 with: oci-target: ghcr.io/kubewarden/policies/rancher-project-propagate-labels diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e0029d..1b49ecb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,4 +3,4 @@ name: Continuous integration jobs: test: name: run tests and linters - uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-rust.yml@v3.1.16 + uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-rust.yml@v3.1.17 diff --git a/Cargo.lock b/Cargo.lock index 98e363b..331edf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,6 +58,41 @@ dependencies = [ "serde", ] +[[package]] +name = "darling" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +dependencies = [ + "darling_core", + "quote", + "syn 1.0.109", +] + [[package]] name = "dashmap" version = "5.4.0" @@ -71,6 +106,37 @@ dependencies = [ "parking_lot_core", ] +[[package]] +name = "derive_builder" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "derive_builder_macro" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +dependencies = [ + "derive_builder_core", + "syn 1.0.109", +] + [[package]] name = "downcast" version = "0.11.0" @@ -95,6 +161,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -205,6 +277,18 @@ dependencies = [ "slab", ] +[[package]] +name = "getset" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "glob" version = "0.3.1" @@ -219,9 +303,15 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" @@ -235,12 +325,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.3", ] [[package]] @@ -260,9 +350,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "k8s-openapi" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301f367a36090b7dfdaac248ee3ed4f14a6a8292e7bec0f1c5e6e2e1f181cd33" +checksum = "550f99d93aa4c2b25de527bce492d772caf5e21d7ac9bd4b508ba781c8d91e30" dependencies = [ "base64", "chrono", @@ -274,15 +364,15 @@ dependencies = [ [[package]] name = "k8s-openapi-codegen-common" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8c817decb61805e07b6c0fa57517f81df27585fa43d0bcf98c369b846ef37b" +checksum = "9579d452aaaef56d9350f644f5c3a6512e3184160f8fb3eef984726e3777ccd7" [[package]] name = "k8s-openapi-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e144a696e4cbed00c6ad5f12ab19275192190d5f7fc4d6531aef53518f06c6d" +checksum = "332deac12a768dfb12cc69beed9611be2930c339e1324ad86da9edf82c6d21d7" dependencies = [ "k8s-openapi-codegen-common", "proc-macro2", @@ -292,9 +382,9 @@ dependencies = [ [[package]] name = "kubewarden-policy-sdk" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19701752dee8092ff54a1c4b6c4066911f21a16784274238b5f6823b6e4d017b" +checksum = "42ea9963d545a0a3d726e0e179bc154bc0161cb3779a62830462f07bfd5fca35" dependencies = [ "anyhow", "cfg-if", @@ -303,6 +393,7 @@ dependencies = [ "num", "num-derive", "num-traits", + "oci-spec", "serde", "serde_json", "serde_yaml", @@ -462,6 +553,19 @@ dependencies = [ "autocfg", ] +[[package]] +name = "oci-spec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8384f8eff13954bafafba991f1910779020456f9694de25e81a13da5b7de6309" +dependencies = [ + "derive_builder", + "getset", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "once_cell" version = "1.17.1" @@ -545,6 +649,30 @@ dependencies = [ "termtree", ] +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" version = "1.0.78" @@ -747,9 +875,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.30" +version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1bf28c79a99f70ee1f1d83d10c875d2e70618417fda01ad1785e027579d9d38" +checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ "indexmap", "itoa", @@ -804,6 +932,12 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + [[package]] name = "syn" version = "1.0.109" @@ -832,6 +966,26 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +[[package]] +name = "thiserror" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -886,6 +1040,12 @@ dependencies = [ "serde", ] +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + [[package]] name = "wapc-guest" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 41d8ca2..98c52a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,9 +11,9 @@ crate-type = ["cdylib"] [dependencies] anyhow = "1.0" -k8s-openapi-derive = "0.21.0" -k8s-openapi = { version = "0.21.0", features = ["schemars", "v1_29"] } -kubewarden-policy-sdk = "0.9.10" +k8s-openapi-derive = "0.21.1" +k8s-openapi = { version = "0.21.1", features = ["schemars", "v1_29"] } +kubewarden-policy-sdk = "0.9.11" lazy_static = "1.4" schemars = { version = "0.8", features = ["impl_json_schema"] } serde_json = "1.0"