diff --git a/Cargo.lock b/Cargo.lock
index d763f9e6..811fb832 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -186,13 +186,13 @@ dependencies = [
[[package]]
name = "async-global-executor"
-version = "2.4.0"
+version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b4353121d5644cdf2beb5726ab752e79a8db1ebb52031770ec47db31d245526"
+checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c"
dependencies = [
"async-channel 2.1.1",
"async-executor",
- "async-io 2.2.1",
+ "async-io 2.2.2",
"async-lock 3.2.0",
"blocking",
"futures-lite 2.1.0",
@@ -221,9 +221,9 @@ dependencies = [
[[package]]
name = "async-io"
-version = "2.2.1"
+version = "2.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6d3b15875ba253d1110c740755e246537483f152fa334f91abd7fe84c88b3ff"
+checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7"
dependencies = [
"async-lock 3.2.0",
"cfg-if",
@@ -303,7 +303,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -320,7 +320,7 @@ checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -502,7 +502,7 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec"
[[package]]
name = "burrego"
version = "0.3.4"
-source = "git+https://github.com/kubewarden/policy-evaluator?tag=v0.12.2#f43d8b2b9f21b4f9053058fc957649b8bbe7551e"
+source = "git+https://github.com/kubewarden/policy-evaluator?tag=v0.13.0#5df5c76c4c8e4295c0e1a1573b01e9c427ee033b"
dependencies = [
"base64 0.21.5",
"chrono",
@@ -850,18 +850,18 @@ dependencies = [
[[package]]
name = "cranelift-bforest"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b5bb9245ec7dcc04d03110e538d31f0969d301c9d673145f4b4d5c3478539a3"
+checksum = "8e7e56668d2263f92b691cb9e4a2fcb186ca0384941fe420484322fa559c3329"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebb18d10e5ddac43ba4ca8fd4e310938569c3e484cc01b6372b27dc5bb4dfd28"
+checksum = "2a9ff61938bf11615f55b80361288c68865318025632ea73c65c0b44fa16283c"
dependencies = [
"bumpalo",
"cranelift-bforest",
@@ -880,33 +880,33 @@ dependencies = [
[[package]]
name = "cranelift-codegen-meta"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a3ce6d22982c1b9b6b012654258bab1a13947bb12703518bef06b1a4867c3d6"
+checksum = "50656bf19e3d4a153b404ff835b8b59e924cfa3682ebe0d3df408994f37983f6"
dependencies = [
"cranelift-codegen-shared",
]
[[package]]
name = "cranelift-codegen-shared"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47220fd4f9a0ce23541652b6f16f83868d282602c600d14934b2a4c166b4bd80"
+checksum = "388041deeb26109f1ea73c1812ea26bfd406c94cbce0bb5230aa44277e43b209"
[[package]]
name = "cranelift-control"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed5a4c42672aea9b6e820046b52e47a1c05d3394a6cdf4cb3c3c4b702f954bd2"
+checksum = "b39b7c512ffac527e5b5df9beae3d67ab85d07dca6d88942c16195439fedd1d3"
dependencies = [
"arbitrary",
]
[[package]]
name = "cranelift-entity"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b4e9a3296fc827f9d35135dc2c0c8dd8d8359eb1ef904bae2d55d5bcb0c9f94"
+checksum = "fdb25f573701284fe2bcf88209d405342125df00764b396c923e11eafc94d892"
dependencies = [
"serde",
"serde_derive",
@@ -914,9 +914,9 @@ dependencies = [
[[package]]
name = "cranelift-frontend"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "33ec537d0f0b8e084517f3e7bfa1d89af343d7c7df455573fca9f272d4e01267"
+checksum = "e57374fd11d72cf9ffb85ff64506ed831440818318f58d09f45b4185e5e9c376"
dependencies = [
"cranelift-codegen",
"log",
@@ -926,15 +926,15 @@ dependencies = [
[[package]]
name = "cranelift-isle"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45bab6d69919d210a50331d35cc6ce111567bc040aebac63a8ae130d0400a075"
+checksum = "ae769b235f6ea2f86623a3ff157cc04a4ff131dc9fe782c2ebd35f272043581e"
[[package]]
name = "cranelift-native"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f32e81605f352cf37af5463f11cd7deec7b6572741931a8d372f7fdd4a744f5d"
+checksum = "3dc7bfb8f13a0526fe20db338711d9354729b861c336978380bb10f7f17dd207"
dependencies = [
"cranelift-codegen",
"libc",
@@ -943,9 +943,9 @@ dependencies = [
[[package]]
name = "cranelift-wasm"
-version = "0.101.4"
+version = "0.102.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0edaa4cbec1bc787395c074233df2652dd62f3e29d3ee60329514a0a51e6b045"
+checksum = "2c5f41a4af931b756be05af0dd374ce200aae2d52cea16b0beb07e8b52732c35"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
@@ -953,7 +953,7 @@ dependencies = [
"itertools 0.10.5",
"log",
"smallvec",
- "wasmparser 0.115.0",
+ "wasmparser 0.116.1",
"wasmtime-types",
]
@@ -1072,7 +1072,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -1129,7 +1129,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -1151,7 +1151,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5"
dependencies = [
"darling_core 0.20.3",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -1184,7 +1184,7 @@ checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -1300,6 +1300,12 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "downcast"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1"
+
[[package]]
name = "dyn-clone"
version = "1.0.16"
@@ -1512,6 +1518,12 @@ dependencies = [
"percent-encoding",
]
+[[package]]
+name = "fragile"
+version = "2.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
+
[[package]]
name = "fs-set-times"
version = "0.20.1"
@@ -1607,7 +1619,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -2135,6 +2147,15 @@ dependencies = [
"either",
]
+[[package]]
+name = "itertools"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
+dependencies = [
+ "either",
+]
+
[[package]]
name = "itertools"
version = "0.12.0"
@@ -2152,9 +2173,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "ittapi"
-version = "0.3.5"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "25a5c0b993601cad796222ea076565c5d9f337d35592f8622c753724f06d7271"
+checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1"
dependencies = [
"anyhow",
"ittapi-sys",
@@ -2163,9 +2184,9 @@ dependencies = [
[[package]]
name = "ittapi-sys"
-version = "0.3.5"
+version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cb7b5e473765060536a660eed127f758cf1a810c73e49063264959c60d1727d9"
+checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc"
dependencies = [
"cc",
]
@@ -2302,7 +2323,7 @@ dependencies = [
"jsonpath_lib",
"k8s-openapi",
"kube-core",
- "pem 3.0.2",
+ "pem 3.0.3",
"pin-project",
"rustls",
"rustls-pemfile",
@@ -2552,6 +2573,45 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "mockall"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1a978c8292954bcb9347a4e28772c0a0621166a1598fc1be28ac0076a4bb810e"
+dependencies = [
+ "cfg-if",
+ "downcast",
+ "fragile",
+ "lazy_static",
+ "mockall_derive",
+ "predicates",
+ "predicates-tree",
+]
+
+[[package]]
+name = "mockall_derive"
+version = "0.12.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad2765371d0978ba4ace4ebef047baa62fc068b431e468444b5610dd441c639b"
+dependencies = [
+ "cfg-if",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.40",
+]
+
+[[package]]
+name = "mockall_double"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1ca96e5ac35256ae3e13536edd39b172b88f41615e1d7b653c8ad24524113e8"
+dependencies = [
+ "cfg-if",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.40",
+]
+
[[package]]
name = "multer"
version = "2.1.0"
@@ -2646,7 +2706,7 @@ checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -3080,9 +3140,9 @@ dependencies = [
[[package]]
name = "pem"
-version = "3.0.2"
+version = "3.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3163d2912b7c3b52d651a055f2c7eec9ba5cd22d26ef75b8dd3a59980b185923"
+checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310"
dependencies = [
"base64 0.21.5",
"serde",
@@ -3226,7 +3286,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -3304,8 +3364,8 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0"
[[package]]
name = "policy-evaluator"
-version = "0.12.2"
-source = "git+https://github.com/kubewarden/policy-evaluator?tag=v0.12.2#f43d8b2b9f21b4f9053058fc957649b8bbe7551e"
+version = "0.13.0"
+source = "git+https://github.com/kubewarden/policy-evaluator?tag=v0.13.0#5df5c76c4c8e4295c0e1a1573b01e9c427ee033b"
dependencies = [
"anyhow",
"base64 0.21.5",
@@ -3386,6 +3446,8 @@ dependencies = [
"itertools 0.12.0",
"k8s-openapi",
"lazy_static",
+ "mockall",
+ "mockall_double",
"num_cpus",
"opentelemetry",
"opentelemetry-otlp",
@@ -3399,7 +3461,9 @@ dependencies = [
"serde",
"serde_json",
"serde_yaml",
+ "sha2",
"tempfile",
+ "thiserror",
"tokio",
"tracing",
"tracing-futures",
@@ -3461,6 +3525,33 @@ version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
+[[package]]
+name = "predicates"
+version = "3.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0"
+dependencies = [
+ "anstyle",
+ "itertools 0.11.0",
+ "predicates-core",
+]
+
+[[package]]
+name = "predicates-core"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
+
+[[package]]
+name = "predicates-tree"
+version = "1.0.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
+dependencies = [
+ "predicates-core",
+ "termtree",
+]
+
[[package]]
name = "primeorder"
version = "0.13.6"
@@ -3837,7 +3928,7 @@ dependencies = [
"regex",
"relative-path",
"rustc_version",
- "syn 2.0.39",
+ "syn 2.0.40",
"unicode-ident",
]
@@ -4099,7 +4190,7 @@ checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -4171,7 +4262,7 @@ dependencies = [
"darling 0.20.3",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -4438,9 +4529,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.39"
+version = "2.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a"
+checksum = "13fa70a4ee923979ffb522cacce59d34421ebdea5625e1073c4326ef9d2dd42e"
dependencies = [
"proc-macro2",
"quote",
@@ -4509,6 +4600,12 @@ dependencies = [
"windows-sys 0.48.0",
]
+[[package]]
+name = "termtree"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
+
[[package]]
name = "thiserror"
version = "1.0.50"
@@ -4526,7 +4623,7 @@ checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -4620,7 +4717,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -4796,7 +4893,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -5088,8 +5185,7 @@ dependencies = [
[[package]]
name = "wapc"
version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b27ae434134e725e4d7d2d41e52e4c70f974d312dd96392c443875385d85a6c"
+source = "git+https://github.com/flavio/wapc-rs/?branch=expose-wasmtime-provider-pre#af803159547d0d0d710c0ab7b1fd31363a54249e"
dependencies = [
"log",
"parking_lot",
@@ -5145,9 +5241,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasi-cap-std-sync"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fd94e147b273348ec68ae412b8bc17a4d372b9e070535b98e3e2c5a3ffd8e83"
+checksum = "a4328de5cf2a0debfc48216fe9c2747badc64957837641f5836cd8b3d48d73f0"
dependencies = [
"anyhow",
"async-trait",
@@ -5168,9 +5264,9 @@ dependencies = [
[[package]]
name = "wasi-common"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d5166f7432ee36d06aa9f9bd7990a00330401fdbc75be7887ea952a299b9a19"
+checksum = "84f6774ec9e464b7373f683bc57ff87fcca5fd26a7d6bdb7438fb2f56a545aa6"
dependencies = [
"anyhow",
"bitflags 2.4.1",
@@ -5207,7 +5303,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
"wasm-bindgen-shared",
]
@@ -5241,7 +5337,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -5254,9 +5350,9 @@ checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f"
[[package]]
name = "wasm-encoder"
-version = "0.35.0"
+version = "0.36.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ca90ba1b5b0a70d3d49473c5579951f3bddc78d47b59256d2f9d4922b150aca"
+checksum = "822b645bf4f2446b949776ffca47e2af60b167209ffb70814ef8779d299cd421"
dependencies = [
"leb128",
]
@@ -5285,9 +5381,9 @@ dependencies = [
[[package]]
name = "wasmparser"
-version = "0.115.0"
+version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e06c0641a4add879ba71ccb3a1e4278fd546f76f1eafb21d8f7b07733b547cd5"
+checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50"
dependencies = [
"indexmap 2.1.0",
"semver",
@@ -5315,9 +5411,9 @@ dependencies = [
[[package]]
name = "wasmtime"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca54f6090ce46973f33a79f265924b204f248f91aec09229bce53d19d567c1a6"
+checksum = "642e12d108e800215263e3b95972977f473957923103029d7d617db701d67ba4"
dependencies = [
"anyhow",
"async-trait",
@@ -5338,8 +5434,8 @@ dependencies = [
"serde_derive",
"serde_json",
"target-lexicon",
- "wasm-encoder 0.35.0",
- "wasmparser 0.115.0",
+ "wasm-encoder 0.36.2",
+ "wasmparser 0.116.1",
"wasmtime-cache",
"wasmtime-component-macro",
"wasmtime-component-util",
@@ -5355,18 +5451,18 @@ dependencies = [
[[package]]
name = "wasmtime-asm-macros"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54984bc0b5689da87a43d7c181d23092b4d5cfcbb7ae3eb6b917dd55865d95e6"
+checksum = "beada8bb15df52503de0a4c58de4357bfd2f96d9a44a6e547bad11efdd988b47"
dependencies = [
"cfg-if",
]
[[package]]
name = "wasmtime-cache"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a4df7655bb73b592189033ab046aa47c1da486d70bc9c1ebf45e55ac030bdf4"
+checksum = "aba5bf44d044d25892c03fb3534373936ee204141ff92bac8297787ac7f22318"
dependencies = [
"anyhow",
"base64 0.21.5",
@@ -5384,14 +5480,14 @@ dependencies = [
[[package]]
name = "wasmtime-component-macro"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64de99fb7c4c383832b85efcaae95f7094a5c505d80146227ce97ab436cbac68"
+checksum = "56ccba556991465cca68d5a54769684bcf489fb532059da55105f851642d52c1"
dependencies = [
"anyhow",
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
"wasmtime-component-util",
"wasmtime-wit-bindgen",
"wit-parser",
@@ -5399,15 +5495,15 @@ dependencies = [
[[package]]
name = "wasmtime-component-util"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f9141a8df069e106eee0c3a8173c0809cf1a4b5630628cfb1f25ab114720093"
+checksum = "05492a177a6006cb73f034d6e9a6fad6da55b23c4398835cb0012b5fa51ecf67"
[[package]]
name = "wasmtime-cranelift"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cf3cee8be02f5006d21b773ffd6802f96a0b7d661ff2ad8a01fb93df458b1aa"
+checksum = "fe2e7532f1d6adbcc57e69bb6a7c503f0859076d07a9b4b6aabe8021ff8a05fd"
dependencies = [
"anyhow",
"cfg-if",
@@ -5422,7 +5518,7 @@ dependencies = [
"object",
"target-lexicon",
"thiserror",
- "wasmparser 0.115.0",
+ "wasmparser 0.116.1",
"wasmtime-cranelift-shared",
"wasmtime-environ",
"wasmtime-versioned-export-macros",
@@ -5430,9 +5526,9 @@ dependencies = [
[[package]]
name = "wasmtime-cranelift-shared"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "420fd2a69bc162957f4c94f21c7fa08ecf60d916f4e87b56332507c555da381d"
+checksum = "8c98d5378a856cbf058d36278627dfabf0ed68a888142958c7ae8e6af507dafa"
dependencies = [
"anyhow",
"cranelift-codegen",
@@ -5446,9 +5542,9 @@ dependencies = [
[[package]]
name = "wasmtime-environ"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb6a445ce2b2810127caee6c1b79b8da4ae57712b05556a674592c18b7500a14"
+checksum = "a6d33a9f421da810a070cd56add9bc51f852bd66afbb8b920489d6242f15b70e"
dependencies = [
"anyhow",
"cranelift-entity",
@@ -5460,8 +5556,8 @@ dependencies = [
"serde_derive",
"target-lexicon",
"thiserror",
- "wasm-encoder 0.35.0",
- "wasmparser 0.115.0",
+ "wasm-encoder 0.36.2",
+ "wasmparser 0.116.1",
"wasmprinter",
"wasmtime-component-util",
"wasmtime-types",
@@ -5469,10 +5565,11 @@ dependencies = [
[[package]]
name = "wasmtime-fiber"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "345a8b061c9eab459e10b9112df9fc357d5a9e8b5b1004bc5fc674fba9be6d2a"
+checksum = "404741f4c6d7f4e043be2e8b466406a2aee289ccdba22bf9eba6399921121b97"
dependencies = [
+ "anyhow",
"cc",
"cfg-if",
"rustix 0.38.28",
@@ -5483,9 +5580,9 @@ dependencies = [
[[package]]
name = "wasmtime-jit"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f0f6586c61125fbfc13c3108c3dd565d21f314dd5bac823b9a5b7ab576d21f1"
+checksum = "8d0994a86d6dca5f7d9740d7f2bd0568be06d2014a550361dc1c397d289d81ef"
dependencies = [
"addr2line",
"anyhow",
@@ -5510,9 +5607,9 @@ dependencies = [
[[package]]
name = "wasmtime-jit-debug"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "109a9e46afe33580b952b14a4207354355f19bcdf0b47485b397b68409eaf553"
+checksum = "4e0c4b74e606d1462d648631d5bc328e3d5b14e7f9d3ff93bc6db062fb8c5cd8"
dependencies = [
"object",
"once_cell",
@@ -5522,9 +5619,9 @@ dependencies = [
[[package]]
name = "wasmtime-jit-icache-coherence"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f67e6be36375c39cff57ed3b137ab691afbf2d9ba8ee1c01f77888413f218749"
+checksum = "3090a69ba1476979e090aa7ed4bc759178bafdb65b22f98b9ba24fc6e7e578d5"
dependencies = [
"cfg-if",
"libc",
@@ -5533,9 +5630,8 @@ dependencies = [
[[package]]
name = "wasmtime-provider"
-version = "1.11.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "559e7c5b79fbee0619789b0b51d8dae7a6efe46abfb2f3d90e1e2082ec49b6b0"
+version = "1.12.0"
+source = "git+https://github.com/flavio/wapc-rs/?branch=expose-wasmtime-provider-pre#af803159547d0d0d710c0ab7b1fd31363a54249e"
dependencies = [
"anyhow",
"cfg-if",
@@ -5552,9 +5648,9 @@ dependencies = [
[[package]]
name = "wasmtime-runtime"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d07986b2327b5e7f535ed638fbde25990fc8f85400194fda0d26db71c7b685e"
+checksum = "b993ac8380385ed67bf71b51b9553edcf1ab0801b78a805a067de581b9a3e88a"
dependencies = [
"anyhow",
"cc",
@@ -5570,7 +5666,7 @@ dependencies = [
"rand",
"rustix 0.38.28",
"sptr",
- "wasm-encoder 0.35.0",
+ "wasm-encoder 0.36.2",
"wasmtime-asm-macros",
"wasmtime-environ",
"wasmtime-fiber",
@@ -5582,33 +5678,33 @@ dependencies = [
[[package]]
name = "wasmtime-types"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e810a0d2e869abd1cb42bd232990f6bd211672b3d202d2ae7e70ffb97ed70ea3"
+checksum = "8b5778112fcab2dc3d4371f4203ab8facf0c453dd94312b0a88dd662955e64e0"
dependencies = [
"cranelift-entity",
"serde",
"serde_derive",
"thiserror",
- "wasmparser 0.115.0",
+ "wasmparser 0.116.1",
]
[[package]]
name = "wasmtime-versioned-export-macros"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3"
+checksum = "f50f51f8d79bfd2aa8e9d9a0ae7c2d02b45fe412e62ff1b87c0c81b07c738231"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
name = "wasmtime-wasi"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e6730a2853226292cee755a36549dd1a443b324cf99319cb390af1afed6cb8a"
+checksum = "eff3f4ad191a5e6d002bb5bffa3e2931a58984da9b30e57b48f353848748cf80"
dependencies = [
"anyhow",
"async-trait",
@@ -5641,16 +5737,16 @@ dependencies = [
[[package]]
name = "wasmtime-winch"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1c1b6abbba5a01739bef9f00a87b419414a7dd99b795823d93fb12fc2bf994a"
+checksum = "d638e7c72447253485fe131523e7465ca318c0455c826eb4f5f612fb67b7de90"
dependencies = [
"anyhow",
"cranelift-codegen",
"gimli",
"object",
"target-lexicon",
- "wasmparser 0.115.0",
+ "wasmparser 0.116.1",
"wasmtime-cranelift-shared",
"wasmtime-environ",
"winch-codegen",
@@ -5658,9 +5754,9 @@ dependencies = [
[[package]]
name = "wasmtime-wit-bindgen"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d214ca7513d76af2872ad5bba4b0dcc0225821931745fdcb4fc30dd34bc3bf7"
+checksum = "4b804dfd3d0c0d6d37aa21026fe7772ba1a769c89ee4f5c4f13b82d91d75216f"
dependencies = [
"anyhow",
"heck",
@@ -5670,9 +5766,9 @@ dependencies = [
[[package]]
name = "wasmtime-wmemcheck"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9dafab2db172a53e23940e0fa3078c202f567ee5f13f4b42f66b694fab43c658"
+checksum = "9b6060bc082cc32d9a45587c7640e29e3c7b89ada82677ac25d87850aaccb368"
[[package]]
name = "wast"
@@ -5749,9 +5845,9 @@ checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10"
[[package]]
name = "wiggle"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f6ce56a4019ce3d8592c298029a75abe6887d1c95a078a4c53ec77a0628262d"
+checksum = "f91028b241e692fdf30627ac10ba9d5ac378353ea4119b4f904ac95177057a44"
dependencies = [
"anyhow",
"async-trait",
@@ -5764,28 +5860,28 @@ dependencies = [
[[package]]
name = "wiggle-generate"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e585a4b1e84195031c77d8484af99cd93f129f45d519e83cb8cc75e9a420cfd3"
+checksum = "5e8b3d76531994513671b2ec3b29fd342bf041e2282945bb6c52eebe6aa9e7da"
dependencies = [
"anyhow",
"heck",
"proc-macro2",
"quote",
"shellexpand",
- "syn 2.0.39",
+ "syn 2.0.40",
"witx",
]
[[package]]
name = "wiggle-macro"
-version = "14.0.4"
+version = "15.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6f321dbce722989d65c3082dba479fa392c7b7a1a4c3adc2a39545dd5aa452f"
+checksum = "c189fe00c67f61bb330827f2abab1af9b5925c7929535cd13a68d265ec20b02d"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
"wiggle-generate",
]
@@ -5822,9 +5918,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "winch-codegen"
-version = "0.12.4"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f112bebb367a544d20c254083798087f22ceeb426168a970b955e8436f749dca"
+checksum = "0c792487f4dc42733d182a72e75d718b1a563cedcc1599ff0a9ed683c33e8bb7"
dependencies = [
"anyhow",
"cranelift-codegen",
@@ -5832,7 +5928,7 @@ dependencies = [
"regalloc2",
"smallvec",
"target-lexicon",
- "wasmparser 0.115.0",
+ "wasmparser 0.116.1",
"wasmtime-environ",
]
@@ -6065,9 +6161,9 @@ dependencies = [
[[package]]
name = "wit-parser"
-version = "0.12.2"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43771ee863a16ec4ecf9da0fc65c3bbd4a1235c8e3da5f094b562894843dfa76"
+checksum = "15df6b7b28ce94b8be39d8df5cb21a08a4f3b9f33b631aedb4aa5776f785ead3"
dependencies = [
"anyhow",
"id-arena",
@@ -6132,7 +6228,7 @@ checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
@@ -6152,7 +6248,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.39",
+ "syn 2.0.40",
]
[[package]]
diff --git a/Cargo.toml b/Cargo.toml
index c710f3d0..4c9b3026 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -28,11 +28,13 @@ opentelemetry = { version = "0.21", default-features = false, features = [
] }
opentelemetry_sdk = { version = "0.21", features = ["rt-tokio"] }
procfs = "0.16"
-policy-evaluator = { git = "https://github.com/kubewarden/policy-evaluator", tag = "v0.12.2" }
+policy-evaluator = { git = "https://github.com/kubewarden/policy-evaluator", tag = "v0.13.0" }
rayon = "1.8"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9.27"
+sha2 = "0.10"
+thiserror = "1.0"
tokio = { version = "^1", features = ["full"] }
tracing = "0.1"
tracing-futures = "0.2"
@@ -43,8 +45,10 @@ warp = { version = "0.3.6", default_features = false, features = [
"tls",
] }
semver = { version = "1.0.20", features = ["serde"] }
+mockall_double = "0.3"
[dev-dependencies]
+mockall = "0.12"
rstest = "0.18"
tempfile = "3.8.1"
reqwest = { version = "0.11", default_features = false, features = [
diff --git a/e2e-tests/test_data/policies.yaml b/e2e-tests/test_data/policies.yaml
index 2485ac32..bf16f2ee 100644
--- a/e2e-tests/test_data/policies.yaml
+++ b/e2e-tests/test_data/policies.yaml
@@ -77,3 +77,26 @@ raw-mutation-wasi:
- "banana"
- "carrot"
defaultResource: "hay"
+
+apparmor:
+ url: ghcr.io/kubewarden/tests/apparmor-psp:v0.1.13
+ allowedToMutate: false
+ settings:
+ allowed_profiles:
+ - runtime/default
+
+psp-user-group:
+ url: ghcr.io/kubewarden/tests/user-group-psp:v0.4.9
+ allowedToMutate: true
+ settings:
+ run_as_user:
+ rule: MustRunAs
+ ranges:
+ - min: 1000
+ max: 2000
+ run_as_group:
+ rule: RunAsAny
+ overwrite: false
+ supplemental_groups:
+ rule: RunAsAny
+ overwrite: false
diff --git a/src/config.rs b/src/config.rs
index 62c98311..eb39b4b5 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -2,6 +2,7 @@ use anyhow::{anyhow, Result};
use clap::ArgMatches;
use lazy_static::lazy_static;
+use policy_evaluator::policy_evaluator::PolicySettings;
use policy_evaluator::policy_fetcher::sources::{read_sources_file, Sources};
use policy_evaluator::policy_fetcher::verify::config::{
read_verification_file, LatestVerificationConfig, VerificationConfigV1,
@@ -231,7 +232,7 @@ pub struct Policy {
}
impl Policy {
- pub fn settings_to_json(&self) -> Result