From 6ea07d6ee5042e5b52d3248287d085bc4c76b845 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Oct 2026 14:14:04 +0000 Subject: [PATCH 1/4] Initial plan From e243d6aae56ce1bd09309d5f74fb2295a1bc80af Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Oct 2026 16:05:48 +0000 Subject: [PATCH 2/4] Add Rust Diesel SQL injection sink models with stock rust/sql-injection tests Co-authored-by: felickz <1760475+felickz@users.noreply.github.com> --- languages/rust/custom/models/diesel.model.yml | 9 + languages/rust/custom/models/qlpack.yml | 7 + languages/rust/custom/test/.gitignore | 8 + .../custom/test/SqlInjectionModels/Cargo.lock | 2736 +++++++++++++++++ .../SqlInjectionModels/SqlInjection.expected | 114 + .../SqlInjectionModels/SqlInjection.qlref | 3 + .../custom/test/SqlInjectionModels/main.rs | 102 + .../test/SqlInjectionModels/options.yml | 7 + .../test/default-threat-models.model.yml | 9 + languages/rust/custom/test/qlpack.yml | 8 + scripts/install-codeql-packs.sh | 4 +- 11 files changed, 3005 insertions(+), 2 deletions(-) create mode 100644 languages/rust/custom/models/diesel.model.yml create mode 100644 languages/rust/custom/models/qlpack.yml create mode 100644 languages/rust/custom/test/.gitignore create mode 100644 languages/rust/custom/test/SqlInjectionModels/Cargo.lock create mode 100644 languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected create mode 100644 languages/rust/custom/test/SqlInjectionModels/SqlInjection.qlref create mode 100644 languages/rust/custom/test/SqlInjectionModels/main.rs create mode 100644 languages/rust/custom/test/SqlInjectionModels/options.yml create mode 100644 languages/rust/custom/test/default-threat-models.model.yml create mode 100644 languages/rust/custom/test/qlpack.yml diff --git a/languages/rust/custom/models/diesel.model.yml b/languages/rust/custom/models/diesel.model.yml new file mode 100644 index 00000000..7fd26f36 --- /dev/null +++ b/languages/rust/custom/models/diesel.model.yml @@ -0,0 +1,9 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: sinkModel + data: + - ["::batch_execute", "Argument[0]", "sql-injection", "manual"] + - ["::sql", "Argument[0]", "sql-injection", "manual"] + - ["diesel::expression::sql_literal::sql", "Argument[0]", "sql-injection", "manual"] + - ["diesel::query_builder::functions::sql_query", "Argument[0]", "sql-injection", "manual"] diff --git a/languages/rust/custom/models/qlpack.yml b/languages/rust/custom/models/qlpack.yml new file mode 100644 index 00000000..439f2f1b --- /dev/null +++ b/languages/rust/custom/models/qlpack.yml @@ -0,0 +1,7 @@ +name: languages-rust-custom-models +version: 0.0.1 +library: true +extensionTargets: + codeql/rust-all: "*" +dataExtensions: + - "**/*.model.yml" diff --git a/languages/rust/custom/test/.gitignore b/languages/rust/custom/test/.gitignore new file mode 100644 index 00000000..bb5f2d8d --- /dev/null +++ b/languages/rust/custom/test/.gitignore @@ -0,0 +1,8 @@ +target/ + +# Generated by `codeql test run` for Rust tests (see `rust/extractor/src/qltest.rs` upstream) +Cargo.toml +/*/**/rust-toolchain.toml +lib.rs +.proc_macro/ +.lib/ diff --git a/languages/rust/custom/test/SqlInjectionModels/Cargo.lock b/languages/rust/custom/test/SqlInjectionModels/Cargo.lock new file mode 100644 index 00000000..d3b8f1d8 --- /dev/null +++ b/languages/rust/custom/test/SqlInjectionModels/Cargo.lock @@ -0,0 +1,2736 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "cc" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6651c9ed80effdc7db0ff72512157f901af5e3549e341e24b1dd4887d836d838" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core 0.10.1", +] + +[[package]] +name = "cmov" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9ea0ac24bc397ab3c98583a3c9ba74fa56b09a4449bbe172b9b1ddb016027a" + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "const-oid" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c" + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" + +[[package]] +name = "crossbeam-queue" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "ctutils" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03bb0e1cc970d482d121d9a1744999169b69a07470b3d644a7894e53fcaf4574" +dependencies = [ + "cmov", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "data-encoding" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid 0.9.6", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" + +[[package]] +name = "diesel" +version = "2.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe9f7eaef33febd60290c5a9f3b0571d03c4c04a24739cd64808ce30e65a5d3" +dependencies = [ + "diesel_derives", + "downcast-rs", + "libsqlite3-sys", + "sqlite-wasm-rs", + "time", +] + +[[package]] +name = "diesel_derives" +version = "2.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecbd51fb6c020672543641167efa4e6417ff7ad76849ed556ace3595e72de03a" +dependencies = [ + "diesel_table_macro_syntax", + "dsl_auto_type", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "diesel_table_macro_syntax" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe2444076b48641147115697648dc743c2c00b61adade0f01ce67133c7babe8c" +dependencies = [ + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common 0.1.7", + "subtle", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "const-oid 0.10.2", + "crypto-common 0.2.2", + "ctutils", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "downcast-rs" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" + +[[package]] +name = "dsl_auto_type" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd122633e4bef06db27737f21d3738fb89c8f6d5360d6d9d7635dda142a7757e" +dependencies = [ + "darling", + "either", + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" +dependencies = [ + "serde", +] + +[[package]] +name = "encoding_rs" +version = "0.8.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "fallible-iterator" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" + +[[package]] +name = "find-msvc-tools" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484" + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "rand_core 0.10.1", +] + +[[package]] +name = "h2" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 0.2.12", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http 0.2.12", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http 0.2.12", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac 0.12.1", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "hmac" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6303bc9732ae41b04cb554b844a762b4115a61bfaa81e3e83050991eeb56863f" +dependencies = [ + "digest 0.11.3", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.10", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "icu_collections" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0" + +[[package]] +name = "icu_properties" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa" + +[[package]] +name = "icu_provider" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "js-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" +dependencies = [ + "spin", +] + +[[package]] +name = "libc" +version = "0.2.190" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78" + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags", + "libc", + "plain", + "redox_syscall 0.9.4", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "md-5" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" +dependencies = [ + "cfg-if", + "digest 0.11.3", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.61.2", +] + +[[package]] +name = "multer" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http 0.2.12", + "httparse", + "log", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.8", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-integer" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags", +] + +[[package]] +name = "objc2-system-configuration" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7216bd11cbda54ccabcab84d523dc93b858ec75ecfb3a7d89513fa22464da396" +dependencies = [ + "objc2-core-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_shared", + "serde", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "postgres" +version = "0.19.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ad20e0aa0b24f5a394eab4f78c781d248982b22b25cecc7e3aa46a681605bd" +dependencies = [ + "bytes", + "fallible-iterator", + "futures-util", + "log", + "tokio", + "tokio-postgres", +] + +[[package]] +name = "postgres-protocol" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08808e3c483c46e999108051c78334f473d5adb59d78bb80a1268c7e6aa6c514" +dependencies = [ + "base64 0.22.1", + "byteorder", + "bytes", + "fallible-iterator", + "hmac 0.13.0", + "md-5 0.11.0", + "memchr", + "rand 0.10.3", + "sha2 0.11.1", + "stringprep", +] + +[[package]] +name = "postgres-types" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "851ca9db4932932d69f3ea811b1abe63087a0f740a47692619dd40d4899b68be" +dependencies = [ + "bytes", + "fallible-iterator", + "postgres-protocol", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_syscall" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "737970939a87c6fa31e7acad13307bccbb017a073b695b6089a2c484f929e20e" +dependencies = [ + "bitflags", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid 0.9.6", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rsqlite-vfs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353b74f9810d5b085b6c42c9d86a5f0fdb795553235cdd48753b32e3809d18a7" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "rustls" +version = "0.23.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "digest 0.11.3", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlite-wasm-rs" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "717e14271e332de37b8f7793913d53e2f952b3d21f96efd5880aea42a3c32d18" +dependencies = [ + "cc", + "rsqlite-vfs", +] + +[[package]] +name = "sqlx" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" +dependencies = [ + "base64 0.22.1", + "bytes", + "crc", + "crossbeam-queue", + "either", + "event-listener", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.5", + "hashlink", + "indexmap", + "log", + "memchr", + "once_cell", + "percent-encoding", + "rustls", + "serde", + "serde_json", + "sha2 0.10.9", + "smallvec", + "thiserror 2.0.21", + "tokio", + "tokio-stream", + "tracing", + "url", + "webpki-roots 0.26.11", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.119", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.9", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 2.0.119", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" +dependencies = [ + "atoi", + "base64 0.22.1", + "bitflags", + "byteorder", + "bytes", + "crc", + "digest 0.10.7", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac 0.12.1", + "itoa", + "log", + "md-5 0.10.6", + "memchr", + "once_cell", + "percent-encoding", + "rand 0.8.8", + "rsa", + "serde", + "sha1", + "sha2 0.10.9", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.21", + "tracing", + "whoami 1.6.1", +] + +[[package]] +name = "sqlx-postgres" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" +dependencies = [ + "atoi", + "base64 0.22.1", + "bitflags", + "byteorder", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac 0.12.1", + "home", + "itoa", + "log", + "md-5 0.10.6", + "memchr", + "once_cell", + "rand 0.8.8", + "serde", + "serde_json", + "sha2 0.10.9", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.21", + "tracing", + "whoami 1.6.1", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" +dependencies = [ + "atoi", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "thiserror 2.0.21", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "test" +version = "0.0.1" +dependencies = [ + "diesel", + "postgres", + "sqlx", + "tokio", + "warp", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce3335fa71841cda333a58d7615b03901380ecf09d59b3296d21f8bbac0dde4e" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2 0.6.5", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tokio-postgres" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a528f7d280f6d5b9cd149635c8705b0dd049754bc67d81d31fa25169a93809d3" +dependencies = [ + "async-trait", + "byteorder", + "bytes", + "fallible-iterator", + "futures-channel", + "futures-util", + "log", + "parking_lot", + "percent-encoding", + "phf", + "pin-project-lite", + "postgres-protocol", + "postgres-types", + "rand 0.10.3", + "socket2 0.6.5", + "tokio", + "tokio-util", + "whoami 2.1.3", +] + +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "libc", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.5.0", + "httparse", + "log", + "rand 0.8.8", + "sha1", + "thiserror 1.0.69", + "url", + "utf-8", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-normalization" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "want" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" +dependencies = [ + "try-lock", +] + +[[package]] +name = "warp" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "headers", + "http 0.2.12", + "hyper", + "log", + "mime", + "mime_guess", + "multer", + "percent-encoding", + "pin-project", + "scoped-tls", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-tungstenite", + "tokio-util", + "tower-service", + "tracing", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasi" +version = "0.14.7+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" +dependencies = [ + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasite" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66fe902b4a6b8028a753d5424909b764ccf79b7a209eac9bf97e59cda9f71a42" +dependencies = [ + "wasi 0.14.7+wasi-0.2.4", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.9", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.129" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.9", +] + +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "whoami" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite 0.1.0", +] + +[[package]] +name = "whoami" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626c4bac6755d76ffc12cb01b2eac751db1996b9e0041de9aa02c8c211ddc82c" +dependencies = [ + "libc", + "libredox", + "objc2-system-configuration", + "wasite 1.0.2", + "web-sys", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected b/languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected new file mode 100644 index 00000000..7ec93d21 --- /dev/null +++ b/languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected @@ -0,0 +1,114 @@ +#select +| main.rs:42:29:42:41 | &unsafe_query | main.rs:39:18:39:64 | ...::read_to_string(...) | main.rs:42:29:42:41 | &unsafe_query | This query depends on a $@. | main.rs:39:18:39:64 | ...::read_to_string(...) | user-provided value | +| main.rs:55:31:55:42 | unsafe_query | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:55:31:55:42 | unsafe_query | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | +| main.rs:56:36:56:95 | MacroExpr | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:56:36:56:95 | MacroExpr | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | +| main.rs:59:14:59:42 | MacroExpr | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:59:14:59:42 | MacroExpr | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | +| main.rs:62:61:62:90 | &... | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:62:61:62:90 | &... | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | +| main.rs:65:32:65:90 | &... | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:65:32:65:90 | &... | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | +| main.rs:85:35:85:101 | MacroExpr | main.rs:83:41:92:5 | \|...\| ... | main.rs:85:35:85:101 | MacroExpr | This query depends on a $@. | main.rs:83:41:92:5 | \|...\| ... | user-provided value | +edges +| main.rs:39:9:39:14 | db_key | main.rs:41:32:41:75 | MacroExpr | provenance | | +| main.rs:39:18:39:64 | ...::read_to_string(...) | main.rs:39:18:39:64 | ...::read_to_string(...) [Ok] | provenance | Src:MaD:534 | +| main.rs:39:18:39:64 | ...::read_to_string(...) [Ok] | main.rs:39:18:39:73 | ... .unwrap() | provenance | MaD:9445 | +| main.rs:39:18:39:73 | ... .unwrap() | main.rs:39:9:39:14 | db_key | provenance | | +| main.rs:41:9:41:20 | unsafe_query | main.rs:42:30:42:41 | unsafe_query | provenance | | +| main.rs:41:32:41:75 | ...::format(...) | main.rs:41:32:41:75 | { ... } | provenance | | +| main.rs:41:32:41:75 | ...::must_use(...) | main.rs:41:9:41:20 | unsafe_query | provenance | | +| main.rs:41:32:41:75 | MacroExpr | main.rs:41:32:41:75 | ...::format(...) | provenance | MaD:351 | +| main.rs:41:32:41:75 | { ... } | main.rs:41:32:41:75 | ...::must_use(...) | provenance | MaD:13301 | +| main.rs:42:29:42:41 | &unsafe_query [&ref] | main.rs:42:29:42:41 | &unsafe_query | provenance | Sink:MaD:248 | +| main.rs:42:30:42:41 | unsafe_query | main.rs:42:29:42:41 | &unsafe_query [&ref] | provenance | | +| main.rs:53:9:53:14 | db_key | main.rs:54:78:54:83 | db_key | provenance | | +| main.rs:53:9:53:14 | db_key | main.rs:56:44:56:94 | MacroExpr | provenance | | +| main.rs:53:9:53:14 | db_key | main.rs:59:22:59:41 | MacroExpr | provenance | | +| main.rs:53:9:53:14 | db_key | main.rs:62:70:62:89 | MacroExpr | provenance | | +| main.rs:53:9:53:14 | db_key | main.rs:65:41:65:89 | MacroExpr | provenance | | +| main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:53:18:53:64 | ...::read_to_string(...) [Ok] | provenance | Src:MaD:534 | +| main.rs:53:18:53:64 | ...::read_to_string(...) [Ok] | main.rs:53:18:53:73 | ... .unwrap() | provenance | MaD:9445 | +| main.rs:53:18:53:73 | ... .unwrap() | main.rs:53:9:53:14 | db_key | provenance | | +| main.rs:54:9:54:20 | unsafe_query | main.rs:55:31:55:42 | unsafe_query | provenance | Sink:MaD:3 | +| main.rs:54:24:54:90 | ... + ... | main.rs:54:24:54:96 | ... + ... | provenance | MaD:370 | +| main.rs:54:24:54:96 | ... + ... | main.rs:54:9:54:20 | unsafe_query | provenance | | +| main.rs:54:78:54:83 | db_key | main.rs:54:78:54:90 | db_key.trim() [&ref] | provenance | MaD:6228 | +| main.rs:54:78:54:90 | db_key.trim() [&ref] | main.rs:54:24:54:90 | ... + ... | provenance | MaD:371 | +| main.rs:56:44:56:94 | ...::format(...) | main.rs:56:44:56:94 | { ... } | provenance | | +| main.rs:56:44:56:94 | ...::must_use(...) | main.rs:56:36:56:95 | MacroExpr | provenance | Sink:MaD:3 | +| main.rs:56:44:56:94 | MacroExpr | main.rs:56:44:56:94 | ...::format(...) | provenance | MaD:351 | +| main.rs:56:44:56:94 | { ... } | main.rs:56:44:56:94 | ...::must_use(...) | provenance | MaD:13301 | +| main.rs:59:22:59:41 | ...::format(...) | main.rs:59:22:59:41 | { ... } | provenance | | +| main.rs:59:22:59:41 | ...::must_use(...) | main.rs:59:14:59:42 | MacroExpr | provenance | Sink:MaD:1 | +| main.rs:59:22:59:41 | MacroExpr | main.rs:59:22:59:41 | ...::format(...) | provenance | MaD:351 | +| main.rs:59:22:59:41 | { ... } | main.rs:59:22:59:41 | ...::must_use(...) | provenance | MaD:13301 | +| main.rs:62:61:62:90 | &... [&ref] | main.rs:62:61:62:90 | &... | provenance | Sink:MaD:2 | +| main.rs:62:62:62:90 | MacroExpr | main.rs:62:61:62:90 | &... [&ref] | provenance | | +| main.rs:62:70:62:89 | ...::format(...) | main.rs:62:70:62:89 | { ... } | provenance | | +| main.rs:62:70:62:89 | ...::must_use(...) | main.rs:62:62:62:90 | MacroExpr | provenance | | +| main.rs:62:70:62:89 | MacroExpr | main.rs:62:70:62:89 | ...::format(...) | provenance | MaD:351 | +| main.rs:62:70:62:89 | { ... } | main.rs:62:70:62:89 | ...::must_use(...) | provenance | MaD:13301 | +| main.rs:65:32:65:90 | &... [&ref] | main.rs:65:32:65:90 | &... | provenance | Sink:MaD:0 | +| main.rs:65:33:65:90 | MacroExpr | main.rs:65:32:65:90 | &... [&ref] | provenance | | +| main.rs:65:41:65:89 | ...::format(...) | main.rs:65:41:65:89 | { ... } | provenance | | +| main.rs:65:41:65:89 | ...::must_use(...) | main.rs:65:33:65:90 | MacroExpr | provenance | | +| main.rs:65:41:65:89 | MacroExpr | main.rs:65:41:65:89 | ...::format(...) | provenance | MaD:351 | +| main.rs:65:41:65:89 | { ... } | main.rs:65:41:65:89 | ...::must_use(...) | provenance | MaD:13301 | +| main.rs:83:41:92:5 | \|...\| ... | main.rs:83:42:83:62 | ...: String | provenance | Src:MaD:746 | +| main.rs:83:42:83:62 | ...: String | main.rs:85:43:85:100 | MacroExpr | provenance | | +| main.rs:85:43:85:100 | ...::format(...) | main.rs:85:43:85:100 | { ... } | provenance | | +| main.rs:85:43:85:100 | ...::must_use(...) | main.rs:85:35:85:101 | MacroExpr | provenance | Sink:MaD:3 | +| main.rs:85:43:85:100 | MacroExpr | main.rs:85:43:85:100 | ...::format(...) | provenance | MaD:351 | +| main.rs:85:43:85:100 | { ... } | main.rs:85:43:85:100 | ...::must_use(...) | provenance | MaD:13301 | +nodes +| main.rs:39:9:39:14 | db_key | semmle.label | db_key | +| main.rs:39:18:39:64 | ...::read_to_string(...) | semmle.label | ...::read_to_string(...) | +| main.rs:39:18:39:64 | ...::read_to_string(...) [Ok] | semmle.label | ...::read_to_string(...) [Ok] | +| main.rs:39:18:39:73 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:41:9:41:20 | unsafe_query | semmle.label | unsafe_query | +| main.rs:41:32:41:75 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:41:32:41:75 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:41:32:41:75 | MacroExpr | semmle.label | MacroExpr | +| main.rs:41:32:41:75 | { ... } | semmle.label | { ... } | +| main.rs:42:29:42:41 | &unsafe_query | semmle.label | &unsafe_query | +| main.rs:42:29:42:41 | &unsafe_query [&ref] | semmle.label | &unsafe_query [&ref] | +| main.rs:42:30:42:41 | unsafe_query | semmle.label | unsafe_query | +| main.rs:53:9:53:14 | db_key | semmle.label | db_key | +| main.rs:53:18:53:64 | ...::read_to_string(...) | semmle.label | ...::read_to_string(...) | +| main.rs:53:18:53:64 | ...::read_to_string(...) [Ok] | semmle.label | ...::read_to_string(...) [Ok] | +| main.rs:53:18:53:73 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:54:9:54:20 | unsafe_query | semmle.label | unsafe_query | +| main.rs:54:24:54:90 | ... + ... | semmle.label | ... + ... | +| main.rs:54:24:54:96 | ... + ... | semmle.label | ... + ... | +| main.rs:54:78:54:83 | db_key | semmle.label | db_key | +| main.rs:54:78:54:90 | db_key.trim() [&ref] | semmle.label | db_key.trim() [&ref] | +| main.rs:55:31:55:42 | unsafe_query | semmle.label | unsafe_query | +| main.rs:56:36:56:95 | MacroExpr | semmle.label | MacroExpr | +| main.rs:56:44:56:94 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:56:44:56:94 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:56:44:56:94 | MacroExpr | semmle.label | MacroExpr | +| main.rs:56:44:56:94 | { ... } | semmle.label | { ... } | +| main.rs:59:14:59:42 | MacroExpr | semmle.label | MacroExpr | +| main.rs:59:22:59:41 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:59:22:59:41 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:59:22:59:41 | MacroExpr | semmle.label | MacroExpr | +| main.rs:59:22:59:41 | { ... } | semmle.label | { ... } | +| main.rs:62:61:62:90 | &... | semmle.label | &... | +| main.rs:62:61:62:90 | &... [&ref] | semmle.label | &... [&ref] | +| main.rs:62:62:62:90 | MacroExpr | semmle.label | MacroExpr | +| main.rs:62:70:62:89 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:62:70:62:89 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:62:70:62:89 | MacroExpr | semmle.label | MacroExpr | +| main.rs:62:70:62:89 | { ... } | semmle.label | { ... } | +| main.rs:65:32:65:90 | &... | semmle.label | &... | +| main.rs:65:32:65:90 | &... [&ref] | semmle.label | &... [&ref] | +| main.rs:65:33:65:90 | MacroExpr | semmle.label | MacroExpr | +| main.rs:65:41:65:89 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:65:41:65:89 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:65:41:65:89 | MacroExpr | semmle.label | MacroExpr | +| main.rs:65:41:65:89 | { ... } | semmle.label | { ... } | +| main.rs:83:41:92:5 | \|...\| ... | semmle.label | \|...\| ... | +| main.rs:83:42:83:62 | ...: String | semmle.label | ...: String | +| main.rs:85:35:85:101 | MacroExpr | semmle.label | MacroExpr | +| main.rs:85:43:85:100 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:85:43:85:100 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:85:43:85:100 | MacroExpr | semmle.label | MacroExpr | +| main.rs:85:43:85:100 | { ... } | semmle.label | { ... } | +subpaths diff --git a/languages/rust/custom/test/SqlInjectionModels/SqlInjection.qlref b/languages/rust/custom/test/SqlInjectionModels/SqlInjection.qlref new file mode 100644 index 00000000..dcf21a24 --- /dev/null +++ b/languages/rust/custom/test/SqlInjectionModels/SqlInjection.qlref @@ -0,0 +1,3 @@ +query: queries/security/CWE-089/SqlInjection.ql +postprocess: + - utils/test/InlineExpectationsTestQuery.ql diff --git a/languages/rust/custom/test/SqlInjectionModels/main.rs b/languages/rust/custom/test/SqlInjectionModels/main.rs new file mode 100644 index 00000000..d28a50b9 --- /dev/null +++ b/languages/rust/custom/test/SqlInjectionModels/main.rs @@ -0,0 +1,102 @@ +use diesel::connection::SimpleConnection; +use diesel::prelude::*; +use std::fs; +use warp::Filter; + +diesel::table! { + some_table (id) { + id -> Integer, + key -> Text, + } +} + +#[derive(QueryableByName, Debug)] +#[diesel(table_name = some_table)] +pub struct DbItem { + id: i32, + key: String, +} + +// Warp path parameter (remote) formatted into a SQLx query inside an `async move` block +// returned from the `then` closure. The `warp` source and `sqlx` sink are both modeled +// upstream, but taint captured by the returned (and never locally awaited) async block +// does not reach its body, so this is a dataflow limitation rather than a missing model. +async fn warp_then_sqlx() { + let route = warp::path::param().then(|tainted_param: String| async move { + let pool = sqlx::SqlitePool::connect("sqlite::memory:").await.unwrap(); + let unsafe_query = format!("SELECT * FROM t WHERE key = '{}'", tainted_param); + let _ = sqlx::query(&unsafe_query).fetch_one(&pool).await; // $ MISSING: Alert[rust/sql-injection] + // GOOD: bound parameter + let _ = sqlx::query("SELECT * FROM t WHERE key = ?").bind(&tainted_param).fetch_one(&pool).await; + "ok" + }); + warp::serve(route).run(([127, 0, 0, 1], 3030)).await; +} + +// File content (local `file` threat model) formatted into a `postgres` query. Covered by the +// upstream `postgres` models once the `local` (or `file`) threat model is enabled. +fn postgres_file() -> Result<(), postgres::Error> { + let db_key = fs::read_to_string("/var/tmp/tainted_file.txt").unwrap(); // $ Source=pg + let mut client = postgres::Client::connect("host=localhost user=postgres", postgres::NoTls)?; + let unsafe_query = format!("SELECT foo FROM bar WHERE baz = {}", db_key); + for row in client.query(&unsafe_query, &[])? { // $ Alert[rust/sql-injection]=pg + let _foo: i32 = row.get("foo"); + } + // GOOD: bound parameter + let _ = client.query("SELECT foo FROM bar WHERE baz = $1", &[&db_key])?; + Ok(()) +} + +// File content (local `file` threat model) used to build Diesel raw SQL. +fn diesel_file() { + let mut conn = SqliteConnection::establish("/var/tmp/database.db").unwrap(); + let db_key = fs::read_to_string("/var/tmp/tainted_file.txt").unwrap(); // $ Source=diesel + let unsafe_query = "SELECT * FROM some_table WHERE key = '".to_owned() + db_key.trim() + "'"; + let _ = diesel::sql_query(unsafe_query).load::(&mut conn); // $ Alert[rust/sql-injection]=diesel + let _ = diesel::dsl::sql_query(format!("SELECT * FROM some_table WHERE key = '{}'", db_key)) // $ Alert[rust/sql-injection]=diesel + .load::(&mut conn); + let _ = diesel::sql_query("SELECT * FROM some_table WHERE ") + .sql(format!("key = '{}'", db_key)) // $ Alert[rust/sql-injection]=diesel + .load::(&mut conn); + let _ = some_table::table + .filter(diesel::dsl::sql::(&format!("key = '{}'", db_key))) // $ Alert[rust/sql-injection]=diesel + .select(some_table::id) + .load::(&mut conn); + let _ = conn.batch_execute(&format!("DELETE FROM some_table WHERE key = '{}'", db_key)); // $ Alert[rust/sql-injection]=diesel + // A `&str` produced by `trim()` does not propagate taint through `format!`; this is a + // standard library dataflow gap independent of the Diesel sink model. + let _ = diesel::sql_query(format!("SELECT * FROM some_table WHERE key = '{}'", db_key.trim())) // $ MISSING: Alert[rust/sql-injection]=diesel + .load::(&mut conn); + // GOOD: bound parameters / static SQL + let _ = diesel::sql_query("SELECT * FROM some_table WHERE key = ?") + .bind::(db_key.trim()) + .load::(&mut conn); + let _ = some_table::table + .filter(some_table::key.eq(db_key.trim())) + .select(some_table::id) + .load::(&mut conn); + let _ = conn.batch_execute("DELETE FROM some_table WHERE id = 1"); +} + +// Warp path parameter (remote) passed to Diesel raw SQL from a `map` closure. +async fn warp_map_diesel() { + let route = warp::path::param().map(|tainted_param: String| { + let mut conn = SqliteConnection::establish("/var/tmp/database.db").unwrap(); + let _ = diesel::sql_query(format!("SELECT * FROM some_table WHERE key = '{}'", tainted_param)) // $ Alert[rust/sql-injection]=warp + .load::(&mut conn); + // GOOD: bound parameter + let _ = diesel::sql_query("SELECT * FROM some_table WHERE key = ?") + .bind::(&tainted_param) + .load::(&mut conn); + "ok" + }); // $ Source=warp + warp::serve(route).run(([127, 0, 0, 1], 3031)).await; +} + +#[tokio::main] +async fn main() { + let _ = postgres_file(); + diesel_file(); + warp_map_diesel().await; + warp_then_sqlx().await; +} diff --git a/languages/rust/custom/test/SqlInjectionModels/options.yml b/languages/rust/custom/test/SqlInjectionModels/options.yml new file mode 100644 index 00000000..3fa45aa8 --- /dev/null +++ b/languages/rust/custom/test/SqlInjectionModels/options.yml @@ -0,0 +1,7 @@ +qltest_cargo_check: true +qltest_dependencies: + - diesel = { version = "2.2", features = ["sqlite"] } + - postgres = { version = "0.19" } + - sqlx = { version = "0.8", features = ["sqlite", "runtime-tokio-rustls"] } + - tokio = { version = "1.0", features = ["full"] } + - warp = { version = "0.3" } diff --git a/languages/rust/custom/test/default-threat-models.model.yml b/languages/rust/custom/test/default-threat-models.model.yml new file mode 100644 index 00000000..0e335d6f --- /dev/null +++ b/languages/rust/custom/test/default-threat-models.model.yml @@ -0,0 +1,9 @@ +# Enable the `local` threat model (e.g. `file`, `commandargs`, `environment`) for +# all tests in this pack, mirroring the upstream `codeql/rust-tests` pack. +# NOTE: Code scanning default setup only enables `remote` sources by default. +extensions: + - addsTo: + pack: codeql/threat-models + extensible: threatModelConfiguration + data: + - ["local", true, 0] diff --git a/languages/rust/custom/test/qlpack.yml b/languages/rust/custom/test/qlpack.yml new file mode 100644 index 00000000..047049c6 --- /dev/null +++ b/languages/rust/custom/test/qlpack.yml @@ -0,0 +1,8 @@ +name: languages-rust-custom-test +version: 0.0.1 +dependencies: + codeql/rust-queries: "*" + languages-rust-custom-models: ${workspace} +extractor: rust +dataExtensions: + - default-threat-models.model.yml diff --git a/scripts/install-codeql-packs.sh b/scripts/install-codeql-packs.sh index 03481a93..40ea78c9 100755 --- a/scripts/install-codeql-packs.sh +++ b/scripts/install-codeql-packs.sh @@ -13,7 +13,7 @@ Install CodeQL packs for all packs discovered in the CodeQL workspace. OPTIONS: --language Install packs only for the specified language Valid values: actions, cpp, csharp, go, java, javascript, - python, ruby + python, ruby, rust -h, --help Show this help message By default, the script installs packs for all languages in the workspace. @@ -44,7 +44,7 @@ while [[ $# -gt 0 ]]; do done ## Validate language if provided -VALID_LANGUAGES=("actions" "cpp" "csharp" "go" "java" "javascript" "python" "ruby") +VALID_LANGUAGES=("actions" "cpp" "csharp" "go" "java" "javascript" "python" "ruby" "rust") if [[ -n "${LANGUAGE}" ]]; then LANGUAGE_VALID=false for valid_lang in "${VALID_LANGUAGES[@]}"; do From ded2608d956b24505c67354c9f15111317470975 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Oct 2026 17:32:26 +0000 Subject: [PATCH 3/4] Add SQLx bound-parameter negative case for rescan finding Co-authored-by: felickz <1760475+felickz@users.noreply.github.com> --- languages/rust/custom/test/SqlInjectionModels/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/languages/rust/custom/test/SqlInjectionModels/main.rs b/languages/rust/custom/test/SqlInjectionModels/main.rs index d28a50b9..c126a6bb 100644 --- a/languages/rust/custom/test/SqlInjectionModels/main.rs +++ b/languages/rust/custom/test/SqlInjectionModels/main.rs @@ -100,3 +100,12 @@ async fn main() { warp_map_diesel().await; warp_then_sqlx().await; } + +// GOOD: file content (local `file` threat model) only reaches SQLx as a bound parameter. +async fn sqlx_file_bound(pool: &sqlx::SqlitePool) { + let db_key = fs::read_to_string("/var/tmp/tainted_file.txt").unwrap(); + let _ = sqlx::query("SELECT * FROM someTable WHERE key = $1") + .bind(db_key.trim()) + .fetch_one(pool) + .await; +} From 316fc02800b7201d5f7c27b89dcf10a039e94afa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 31 Oct 2026 06:04:56 +0000 Subject: [PATCH 4/4] Model trimmed string taint for SQLx interpolation before binding Co-authored-by: felickz <1760475+felickz@users.noreply.github.com> --- languages/rust/custom/models/core.model.yml | 8 ++ .../SqlInjectionModels/SqlInjection.expected | 117 ++++++++++++++---- .../custom/test/SqlInjectionModels/main.rs | 26 +++- 3 files changed, 121 insertions(+), 30 deletions(-) create mode 100644 languages/rust/custom/models/core.model.yml diff --git a/languages/rust/custom/models/core.model.yml b/languages/rust/custom/models/core.model.yml new file mode 100644 index 00000000..6e53c765 --- /dev/null +++ b/languages/rust/custom/models/core.model.yml @@ -0,0 +1,8 @@ +extensions: + - addsTo: + pack: codeql/rust-all + extensible: summaryModel + data: + # Also taint the returned value so format! retains taint from a trimmed string. + # The upstream summary only taints ReturnValue.Reference. + - ["::trim", "Argument[self].Reference", "ReturnValue", "taint", "manual"] diff --git a/languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected b/languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected index 7ec93d21..c2462faf 100644 --- a/languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected +++ b/languages/rust/custom/test/SqlInjectionModels/SqlInjection.expected @@ -5,58 +5,91 @@ | main.rs:59:14:59:42 | MacroExpr | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:59:14:59:42 | MacroExpr | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | | main.rs:62:61:62:90 | &... | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:62:61:62:90 | &... | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | | main.rs:65:32:65:90 | &... | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:65:32:65:90 | &... | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | +| main.rs:68:31:68:97 | MacroExpr | main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:68:31:68:97 | MacroExpr | This query depends on a $@. | main.rs:53:18:53:64 | ...::read_to_string(...) | user-provided value | | main.rs:85:35:85:101 | MacroExpr | main.rs:83:41:92:5 | \|...\| ... | main.rs:85:35:85:101 | MacroExpr | This query depends on a $@. | main.rs:83:41:92:5 | \|...\| ... | user-provided value | +| main.rs:117:25:117:37 | &unsafe_query | main.rs:115:18:115:64 | ...::read_to_string(...) | main.rs:117:25:117:37 | &unsafe_query | This query depends on a $@. | main.rs:115:18:115:64 | ...::read_to_string(...) | user-provided value | +| main.rs:122:25:122:38 | &trimmed_query | main.rs:115:18:115:64 | ...::read_to_string(...) | main.rs:122:25:122:38 | &trimmed_query | This query depends on a $@. | main.rs:115:18:115:64 | ...::read_to_string(...) | user-provided value | edges | main.rs:39:9:39:14 | db_key | main.rs:41:32:41:75 | MacroExpr | provenance | | -| main.rs:39:18:39:64 | ...::read_to_string(...) | main.rs:39:18:39:64 | ...::read_to_string(...) [Ok] | provenance | Src:MaD:534 | -| main.rs:39:18:39:64 | ...::read_to_string(...) [Ok] | main.rs:39:18:39:73 | ... .unwrap() | provenance | MaD:9445 | +| main.rs:39:18:39:64 | ...::read_to_string(...) | main.rs:39:18:39:64 | ...::read_to_string(...) [Ok] | provenance | Src:MaD:535 | +| main.rs:39:18:39:64 | ...::read_to_string(...) [Ok] | main.rs:39:18:39:73 | ... .unwrap() | provenance | MaD:9446 | | main.rs:39:18:39:73 | ... .unwrap() | main.rs:39:9:39:14 | db_key | provenance | | | main.rs:41:9:41:20 | unsafe_query | main.rs:42:30:42:41 | unsafe_query | provenance | | | main.rs:41:32:41:75 | ...::format(...) | main.rs:41:32:41:75 | { ... } | provenance | | | main.rs:41:32:41:75 | ...::must_use(...) | main.rs:41:9:41:20 | unsafe_query | provenance | | -| main.rs:41:32:41:75 | MacroExpr | main.rs:41:32:41:75 | ...::format(...) | provenance | MaD:351 | -| main.rs:41:32:41:75 | { ... } | main.rs:41:32:41:75 | ...::must_use(...) | provenance | MaD:13301 | -| main.rs:42:29:42:41 | &unsafe_query [&ref] | main.rs:42:29:42:41 | &unsafe_query | provenance | Sink:MaD:248 | +| main.rs:41:32:41:75 | MacroExpr | main.rs:41:32:41:75 | ...::format(...) | provenance | MaD:352 | +| main.rs:41:32:41:75 | { ... } | main.rs:41:32:41:75 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:42:29:42:41 | &unsafe_query [&ref] | main.rs:42:29:42:41 | &unsafe_query | provenance | Sink:MaD:249 | | main.rs:42:30:42:41 | unsafe_query | main.rs:42:29:42:41 | &unsafe_query [&ref] | provenance | | | main.rs:53:9:53:14 | db_key | main.rs:54:78:54:83 | db_key | provenance | | | main.rs:53:9:53:14 | db_key | main.rs:56:44:56:94 | MacroExpr | provenance | | | main.rs:53:9:53:14 | db_key | main.rs:59:22:59:41 | MacroExpr | provenance | | | main.rs:53:9:53:14 | db_key | main.rs:62:70:62:89 | MacroExpr | provenance | | | main.rs:53:9:53:14 | db_key | main.rs:65:41:65:89 | MacroExpr | provenance | | -| main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:53:18:53:64 | ...::read_to_string(...) [Ok] | provenance | Src:MaD:534 | -| main.rs:53:18:53:64 | ...::read_to_string(...) [Ok] | main.rs:53:18:53:73 | ... .unwrap() | provenance | MaD:9445 | +| main.rs:53:9:53:14 | db_key | main.rs:68:84:68:89 | db_key | provenance | | +| main.rs:53:18:53:64 | ...::read_to_string(...) | main.rs:53:18:53:64 | ...::read_to_string(...) [Ok] | provenance | Src:MaD:535 | +| main.rs:53:18:53:64 | ...::read_to_string(...) [Ok] | main.rs:53:18:53:73 | ... .unwrap() | provenance | MaD:9446 | | main.rs:53:18:53:73 | ... .unwrap() | main.rs:53:9:53:14 | db_key | provenance | | -| main.rs:54:9:54:20 | unsafe_query | main.rs:55:31:55:42 | unsafe_query | provenance | Sink:MaD:3 | -| main.rs:54:24:54:90 | ... + ... | main.rs:54:24:54:96 | ... + ... | provenance | MaD:370 | +| main.rs:54:9:54:20 | unsafe_query | main.rs:55:31:55:42 | unsafe_query | provenance | Sink:MaD:4 | +| main.rs:54:24:54:90 | ... + ... | main.rs:54:24:54:96 | ... + ... | provenance | MaD:371 | | main.rs:54:24:54:96 | ... + ... | main.rs:54:9:54:20 | unsafe_query | provenance | | -| main.rs:54:78:54:83 | db_key | main.rs:54:78:54:90 | db_key.trim() [&ref] | provenance | MaD:6228 | -| main.rs:54:78:54:90 | db_key.trim() [&ref] | main.rs:54:24:54:90 | ... + ... | provenance | MaD:371 | +| main.rs:54:78:54:83 | db_key | main.rs:54:78:54:90 | db_key.trim() | provenance | MaD:6229 | +| main.rs:54:78:54:83 | db_key | main.rs:54:78:54:90 | db_key.trim() [&ref] | provenance | MaD:6229 | +| main.rs:54:78:54:90 | db_key.trim() | main.rs:54:24:54:90 | ... + ... | provenance | MaD:372 | +| main.rs:54:78:54:90 | db_key.trim() [&ref] | main.rs:54:24:54:90 | ... + ... | provenance | MaD:372 | | main.rs:56:44:56:94 | ...::format(...) | main.rs:56:44:56:94 | { ... } | provenance | | -| main.rs:56:44:56:94 | ...::must_use(...) | main.rs:56:36:56:95 | MacroExpr | provenance | Sink:MaD:3 | -| main.rs:56:44:56:94 | MacroExpr | main.rs:56:44:56:94 | ...::format(...) | provenance | MaD:351 | -| main.rs:56:44:56:94 | { ... } | main.rs:56:44:56:94 | ...::must_use(...) | provenance | MaD:13301 | +| main.rs:56:44:56:94 | ...::must_use(...) | main.rs:56:36:56:95 | MacroExpr | provenance | Sink:MaD:4 | +| main.rs:56:44:56:94 | MacroExpr | main.rs:56:44:56:94 | ...::format(...) | provenance | MaD:352 | +| main.rs:56:44:56:94 | { ... } | main.rs:56:44:56:94 | ...::must_use(...) | provenance | MaD:13302 | | main.rs:59:22:59:41 | ...::format(...) | main.rs:59:22:59:41 | { ... } | provenance | | -| main.rs:59:22:59:41 | ...::must_use(...) | main.rs:59:14:59:42 | MacroExpr | provenance | Sink:MaD:1 | -| main.rs:59:22:59:41 | MacroExpr | main.rs:59:22:59:41 | ...::format(...) | provenance | MaD:351 | -| main.rs:59:22:59:41 | { ... } | main.rs:59:22:59:41 | ...::must_use(...) | provenance | MaD:13301 | -| main.rs:62:61:62:90 | &... [&ref] | main.rs:62:61:62:90 | &... | provenance | Sink:MaD:2 | +| main.rs:59:22:59:41 | ...::must_use(...) | main.rs:59:14:59:42 | MacroExpr | provenance | Sink:MaD:2 | +| main.rs:59:22:59:41 | MacroExpr | main.rs:59:22:59:41 | ...::format(...) | provenance | MaD:352 | +| main.rs:59:22:59:41 | { ... } | main.rs:59:22:59:41 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:62:61:62:90 | &... [&ref] | main.rs:62:61:62:90 | &... | provenance | Sink:MaD:3 | | main.rs:62:62:62:90 | MacroExpr | main.rs:62:61:62:90 | &... [&ref] | provenance | | | main.rs:62:70:62:89 | ...::format(...) | main.rs:62:70:62:89 | { ... } | provenance | | | main.rs:62:70:62:89 | ...::must_use(...) | main.rs:62:62:62:90 | MacroExpr | provenance | | -| main.rs:62:70:62:89 | MacroExpr | main.rs:62:70:62:89 | ...::format(...) | provenance | MaD:351 | -| main.rs:62:70:62:89 | { ... } | main.rs:62:70:62:89 | ...::must_use(...) | provenance | MaD:13301 | -| main.rs:65:32:65:90 | &... [&ref] | main.rs:65:32:65:90 | &... | provenance | Sink:MaD:0 | +| main.rs:62:70:62:89 | MacroExpr | main.rs:62:70:62:89 | ...::format(...) | provenance | MaD:352 | +| main.rs:62:70:62:89 | { ... } | main.rs:62:70:62:89 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:65:32:65:90 | &... [&ref] | main.rs:65:32:65:90 | &... | provenance | Sink:MaD:1 | | main.rs:65:33:65:90 | MacroExpr | main.rs:65:32:65:90 | &... [&ref] | provenance | | | main.rs:65:41:65:89 | ...::format(...) | main.rs:65:41:65:89 | { ... } | provenance | | | main.rs:65:41:65:89 | ...::must_use(...) | main.rs:65:33:65:90 | MacroExpr | provenance | | -| main.rs:65:41:65:89 | MacroExpr | main.rs:65:41:65:89 | ...::format(...) | provenance | MaD:351 | -| main.rs:65:41:65:89 | { ... } | main.rs:65:41:65:89 | ...::must_use(...) | provenance | MaD:13301 | -| main.rs:83:41:92:5 | \|...\| ... | main.rs:83:42:83:62 | ...: String | provenance | Src:MaD:746 | +| main.rs:65:41:65:89 | MacroExpr | main.rs:65:41:65:89 | ...::format(...) | provenance | MaD:352 | +| main.rs:65:41:65:89 | { ... } | main.rs:65:41:65:89 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:68:39:68:96 | ...::format(...) | main.rs:68:39:68:96 | { ... } | provenance | | +| main.rs:68:39:68:96 | ...::must_use(...) | main.rs:68:31:68:97 | MacroExpr | provenance | Sink:MaD:4 | +| main.rs:68:39:68:96 | MacroExpr | main.rs:68:39:68:96 | ...::format(...) | provenance | MaD:352 | +| main.rs:68:39:68:96 | { ... } | main.rs:68:39:68:96 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:68:84:68:89 | db_key | main.rs:68:84:68:96 | db_key.trim() | provenance | MaD:6229 | +| main.rs:68:84:68:96 | db_key.trim() | main.rs:68:39:68:96 | MacroExpr | provenance | | +| main.rs:83:41:92:5 | \|...\| ... | main.rs:83:42:83:62 | ...: String | provenance | Src:MaD:747 | | main.rs:83:42:83:62 | ...: String | main.rs:85:43:85:100 | MacroExpr | provenance | | | main.rs:85:43:85:100 | ...::format(...) | main.rs:85:43:85:100 | { ... } | provenance | | -| main.rs:85:43:85:100 | ...::must_use(...) | main.rs:85:35:85:101 | MacroExpr | provenance | Sink:MaD:3 | -| main.rs:85:43:85:100 | MacroExpr | main.rs:85:43:85:100 | ...::format(...) | provenance | MaD:351 | -| main.rs:85:43:85:100 | { ... } | main.rs:85:43:85:100 | ...::must_use(...) | provenance | MaD:13301 | +| main.rs:85:43:85:100 | ...::must_use(...) | main.rs:85:35:85:101 | MacroExpr | provenance | Sink:MaD:4 | +| main.rs:85:43:85:100 | MacroExpr | main.rs:85:43:85:100 | ...::format(...) | provenance | MaD:352 | +| main.rs:85:43:85:100 | { ... } | main.rs:85:43:85:100 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:115:9:115:14 | db_key | main.rs:116:32:116:93 | MacroExpr | provenance | | +| main.rs:115:9:115:14 | db_key | main.rs:121:78:121:83 | db_key | provenance | | +| main.rs:115:18:115:64 | ...::read_to_string(...) | main.rs:115:18:115:64 | ...::read_to_string(...) [Ok] | provenance | Src:MaD:535 | +| main.rs:115:18:115:64 | ...::read_to_string(...) [Ok] | main.rs:115:18:115:73 | ... .unwrap() | provenance | MaD:9446 | +| main.rs:115:18:115:73 | ... .unwrap() | main.rs:115:9:115:14 | db_key | provenance | | +| main.rs:116:9:116:20 | unsafe_query | main.rs:117:26:117:37 | unsafe_query | provenance | | +| main.rs:116:32:116:93 | ...::format(...) | main.rs:116:32:116:93 | { ... } | provenance | | +| main.rs:116:32:116:93 | ...::must_use(...) | main.rs:116:9:116:20 | unsafe_query | provenance | | +| main.rs:116:32:116:93 | MacroExpr | main.rs:116:32:116:93 | ...::format(...) | provenance | MaD:352 | +| main.rs:116:32:116:93 | { ... } | main.rs:116:32:116:93 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:117:25:117:37 | &unsafe_query [&ref] | main.rs:117:25:117:37 | &unsafe_query | provenance | Sink:MaD:325 | +| main.rs:117:26:117:37 | unsafe_query | main.rs:117:25:117:37 | &unsafe_query [&ref] | provenance | | +| main.rs:121:9:121:21 | trimmed_query | main.rs:122:26:122:38 | trimmed_query | provenance | | +| main.rs:121:33:121:90 | ...::format(...) | main.rs:121:33:121:90 | { ... } | provenance | | +| main.rs:121:33:121:90 | ...::must_use(...) | main.rs:121:9:121:21 | trimmed_query | provenance | | +| main.rs:121:33:121:90 | MacroExpr | main.rs:121:33:121:90 | ...::format(...) | provenance | MaD:352 | +| main.rs:121:33:121:90 | { ... } | main.rs:121:33:121:90 | ...::must_use(...) | provenance | MaD:13302 | +| main.rs:121:78:121:83 | db_key | main.rs:121:78:121:90 | db_key.trim() | provenance | MaD:6229 | +| main.rs:121:78:121:90 | db_key.trim() | main.rs:121:33:121:90 | MacroExpr | provenance | | +| main.rs:122:25:122:38 | &trimmed_query [&ref] | main.rs:122:25:122:38 | &trimmed_query | provenance | Sink:MaD:325 | +| main.rs:122:26:122:38 | trimmed_query | main.rs:122:25:122:38 | &trimmed_query [&ref] | provenance | | nodes | main.rs:39:9:39:14 | db_key | semmle.label | db_key | | main.rs:39:18:39:64 | ...::read_to_string(...) | semmle.label | ...::read_to_string(...) | @@ -78,6 +111,7 @@ nodes | main.rs:54:24:54:90 | ... + ... | semmle.label | ... + ... | | main.rs:54:24:54:96 | ... + ... | semmle.label | ... + ... | | main.rs:54:78:54:83 | db_key | semmle.label | db_key | +| main.rs:54:78:54:90 | db_key.trim() | semmle.label | db_key.trim() | | main.rs:54:78:54:90 | db_key.trim() [&ref] | semmle.label | db_key.trim() [&ref] | | main.rs:55:31:55:42 | unsafe_query | semmle.label | unsafe_query | | main.rs:56:36:56:95 | MacroExpr | semmle.label | MacroExpr | @@ -104,6 +138,13 @@ nodes | main.rs:65:41:65:89 | ...::must_use(...) | semmle.label | ...::must_use(...) | | main.rs:65:41:65:89 | MacroExpr | semmle.label | MacroExpr | | main.rs:65:41:65:89 | { ... } | semmle.label | { ... } | +| main.rs:68:31:68:97 | MacroExpr | semmle.label | MacroExpr | +| main.rs:68:39:68:96 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:68:39:68:96 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:68:39:68:96 | MacroExpr | semmle.label | MacroExpr | +| main.rs:68:39:68:96 | { ... } | semmle.label | { ... } | +| main.rs:68:84:68:89 | db_key | semmle.label | db_key | +| main.rs:68:84:68:96 | db_key.trim() | semmle.label | db_key.trim() | | main.rs:83:41:92:5 | \|...\| ... | semmle.label | \|...\| ... | | main.rs:83:42:83:62 | ...: String | semmle.label | ...: String | | main.rs:85:35:85:101 | MacroExpr | semmle.label | MacroExpr | @@ -111,4 +152,26 @@ nodes | main.rs:85:43:85:100 | ...::must_use(...) | semmle.label | ...::must_use(...) | | main.rs:85:43:85:100 | MacroExpr | semmle.label | MacroExpr | | main.rs:85:43:85:100 | { ... } | semmle.label | { ... } | +| main.rs:115:9:115:14 | db_key | semmle.label | db_key | +| main.rs:115:18:115:64 | ...::read_to_string(...) | semmle.label | ...::read_to_string(...) | +| main.rs:115:18:115:64 | ...::read_to_string(...) [Ok] | semmle.label | ...::read_to_string(...) [Ok] | +| main.rs:115:18:115:73 | ... .unwrap() | semmle.label | ... .unwrap() | +| main.rs:116:9:116:20 | unsafe_query | semmle.label | unsafe_query | +| main.rs:116:32:116:93 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:116:32:116:93 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:116:32:116:93 | MacroExpr | semmle.label | MacroExpr | +| main.rs:116:32:116:93 | { ... } | semmle.label | { ... } | +| main.rs:117:25:117:37 | &unsafe_query | semmle.label | &unsafe_query | +| main.rs:117:25:117:37 | &unsafe_query [&ref] | semmle.label | &unsafe_query [&ref] | +| main.rs:117:26:117:37 | unsafe_query | semmle.label | unsafe_query | +| main.rs:121:9:121:21 | trimmed_query | semmle.label | trimmed_query | +| main.rs:121:33:121:90 | ...::format(...) | semmle.label | ...::format(...) | +| main.rs:121:33:121:90 | ...::must_use(...) | semmle.label | ...::must_use(...) | +| main.rs:121:33:121:90 | MacroExpr | semmle.label | MacroExpr | +| main.rs:121:33:121:90 | { ... } | semmle.label | { ... } | +| main.rs:121:78:121:83 | db_key | semmle.label | db_key | +| main.rs:121:78:121:90 | db_key.trim() | semmle.label | db_key.trim() | +| main.rs:122:25:122:38 | &trimmed_query | semmle.label | &trimmed_query | +| main.rs:122:25:122:38 | &trimmed_query [&ref] | semmle.label | &trimmed_query [&ref] | +| main.rs:122:26:122:38 | trimmed_query | semmle.label | trimmed_query | subpaths diff --git a/languages/rust/custom/test/SqlInjectionModels/main.rs b/languages/rust/custom/test/SqlInjectionModels/main.rs index c126a6bb..1a48d1d2 100644 --- a/languages/rust/custom/test/SqlInjectionModels/main.rs +++ b/languages/rust/custom/test/SqlInjectionModels/main.rs @@ -63,9 +63,9 @@ fn diesel_file() { .select(some_table::id) .load::(&mut conn); let _ = conn.batch_execute(&format!("DELETE FROM some_table WHERE key = '{}'", db_key)); // $ Alert[rust/sql-injection]=diesel - // A `&str` produced by `trim()` does not propagate taint through `format!`; this is a - // standard library dataflow gap independent of the Diesel sink model. - let _ = diesel::sql_query(format!("SELECT * FROM some_table WHERE key = '{}'", db_key.trim())) // $ MISSING: Alert[rust/sql-injection]=diesel + // Trimming whitespace does not sanitize SQL syntax. The summary preserves taint + // when the resulting string is formatted into raw SQL. + let _ = diesel::sql_query(format!("SELECT * FROM some_table WHERE key = '{}'", db_key.trim())) // $ Alert[rust/sql-injection]=diesel .load::(&mut conn); // GOOD: bound parameters / static SQL let _ = diesel::sql_query("SELECT * FROM some_table WHERE key = ?") @@ -109,3 +109,23 @@ async fn sqlx_file_bound(pool: &sqlx::SqlitePool) { .fetch_one(pool) .await; } + +// Binding a value does not sanitize SQL text that already contains untrusted input. +async fn sqlx_file_interpolated_then_bound(pool: &sqlx::SqlitePool) { + let db_key = fs::read_to_string("/var/tmp/tainted_file.txt").unwrap(); // $ Source=sqlx + let unsafe_query = format!("SELECT * FROM some_table WHERE key = '{}' AND id = ?", db_key); + let _ = sqlx::query(&unsafe_query) // $ Alert[rust/sql-injection]=sqlx + .bind(db_key.trim()) + .fetch_one(pool) + .await; + let trimmed_query = format!("SELECT * FROM some_table WHERE key = '{}'", db_key.trim()); + let _ = sqlx::query(&trimmed_query) // $ Alert[rust/sql-injection]=sqlx + .bind(db_key.trim()) + .fetch_one(pool) + .await; + // GOOD: the untrusted value appears only in a bound parameter, not in the SQL text. + let _ = sqlx::query("SELECT * FROM some_table WHERE key = ?") + .bind(db_key.trim()) + .fetch_one(pool) + .await; +}