From f60b93e332f10e899f9b11b6fa46488ad9065d77 Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Sat, 17 Feb 2024 23:06:57 +0000 Subject: [PATCH] Initial changes to split `bestool` - Change into a workspace. - Create `beslib` - TODO: Move logic from `oldbestool` here. - Begin creating logical structure for `bestool` - a `beslib` frontend. - Add port enumeration function. Signed-off-by: Dom Rodriguez --- Cargo.lock | 455 ++++++++++++++++ Cargo.toml | 24 + src/beslib/Cargo.toml | 14 + chunk1.bin => src/beslib/blobs/chunk1.bin | Bin chunk2.bin => src/beslib/blobs/chunk2.bin | Bin .../beslib/blobs/programmer.bin | Bin src/beslib/src/boot.rs | 7 + src/beslib/src/boot/enums.rs | 127 +++++ src/beslib/src/lib.rs | 1 + src/beslib/supply-chain/audits.toml | 253 +++++++++ src/beslib/supply-chain/config.toml | 87 +++ src/beslib/supply-chain/imports.lock | 495 ++++++++++++++++++ src/bestool/Cargo.toml | 16 + src/bestool/src/command.rs | 24 + src/bestool/src/command/flash.rs | 21 + src/bestool/src/command/flash/read_flash.rs | 5 + src/bestool/src/command/flash/write_flash.rs | 5 + src/bestool/src/command/serial.rs | 22 + .../command/serial/enumerate_serial_ports.rs | 36 ++ src/bestool/src/command/serial/monitor.rs | 5 + src/bestool/src/main.rs | 39 ++ src/bestool/supply-chain/audits.toml | 253 +++++++++ src/bestool/supply-chain/config.toml | 87 +++ src/bestool/supply-chain/imports.lock | 495 ++++++++++++++++++ 24 files changed, 2471 insertions(+) create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 src/beslib/Cargo.toml rename chunk1.bin => src/beslib/blobs/chunk1.bin (100%) rename chunk2.bin => src/beslib/blobs/chunk2.bin (100%) rename programmer.bin => src/beslib/blobs/programmer.bin (100%) create mode 100644 src/beslib/src/boot.rs create mode 100644 src/beslib/src/boot/enums.rs create mode 100644 src/beslib/src/lib.rs create mode 100644 src/beslib/supply-chain/audits.toml create mode 100644 src/beslib/supply-chain/config.toml create mode 100644 src/beslib/supply-chain/imports.lock create mode 100644 src/bestool/Cargo.toml create mode 100644 src/bestool/src/command.rs create mode 100644 src/bestool/src/command/flash.rs create mode 100644 src/bestool/src/command/flash/read_flash.rs create mode 100644 src/bestool/src/command/flash/write_flash.rs create mode 100644 src/bestool/src/command/serial.rs create mode 100644 src/bestool/src/command/serial/enumerate_serial_ports.rs create mode 100644 src/bestool/src/command/serial/monitor.rs create mode 100644 src/bestool/src/main.rs create mode 100644 src/bestool/supply-chain/audits.toml create mode 100644 src/bestool/supply-chain/config.toml create mode 100644 src/bestool/supply-chain/imports.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..ca28eda --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,455 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys", +] + +[[package]] +name = "beslib" +version = "0.3.0" +dependencies = [ + "crc", + "serialport", +] + +[[package]] +name = "bestool" +version = "0.3.0" +dependencies = [ + "beslib", + "clap", + "crc", + "serialport", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" + +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "crc" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "io-kit-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4769cb30e5dcf1710fc6730d3e94f78c47723a014a567de385e113c737394640" +dependencies = [ + "core-foundation-sys", + "mach2", +] + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "libudev" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0" +dependencies = [ + "libc", + "libudev-sys", +] + +[[package]] +name = "libudev-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "mach2" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +dependencies = [ + "libc", +] + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", +] + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "regex" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serialport" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5a15d0be940df84846264b09b51b10b931fb2f275becb80934e3568a016828" +dependencies = [ + "bitflags 2.4.2", + "cfg-if", + "core-foundation-sys", + "io-kit-sys", + "libudev", + "mach2", + "nix", + "regex", + "scopeguard", + "unescaper", + "winapi", +] + +[[package]] +name = "strsim" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" + +[[package]] +name = "syn" +version = "2.0.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "unescaper" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0adf6ad32eb5b3cadff915f7b770faaac8f7ff0476633aa29eb0d9584d889d34" +dependencies = [ + "thiserror", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..d629564 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,24 @@ +[workspace] +resolver = "2" +members = [ + "src/beslib", + "src/bestool", +] + +[workspace.package] +authors = ["Ben V. Brown ", "Dom Rodriguez "] +edition = "2021" +homepage = "https://github.com/Ralim/bestool" +readme = "/README.md" +repository = "https://github.com/Ralim/bestool.git" +rust-version = "1.67.0" +version = "0.3.0" + +[workspace.dependencies] +clap = { version = "4.5.1", features = ["derive"] } +crc = "3.0.1" +serde = { version = "1.0.196", features = ["derive"] } +serde_json = "1.0.113" +serialport = "4.3.0" +tracing = "0.1.40" +tracing-subscriber = "0.3.18" diff --git a/src/beslib/Cargo.toml b/src/beslib/Cargo.toml new file mode 100644 index 0000000..adca061 --- /dev/null +++ b/src/beslib/Cargo.toml @@ -0,0 +1,14 @@ +[package] +authors = { workspace = true } +description = "Support library for `bestool`; a command-line utility for BES2300 chips." +edition = { workspace = true } +homepage = { workspace = true } +# license = { workspace = true } # TODO: Specify license with REUSE. +name = "beslib" +repository = { workspace = true } +rust-version = { workspace = true } +version = { workspace = true } + +[dependencies] +crc = { workspace = true } +serialport = { workspace = true } diff --git a/chunk1.bin b/src/beslib/blobs/chunk1.bin similarity index 100% rename from chunk1.bin rename to src/beslib/blobs/chunk1.bin diff --git a/chunk2.bin b/src/beslib/blobs/chunk2.bin similarity index 100% rename from chunk2.bin rename to src/beslib/blobs/chunk2.bin diff --git a/programmer.bin b/src/beslib/blobs/programmer.bin similarity index 100% rename from programmer.bin rename to src/beslib/blobs/programmer.bin diff --git a/src/beslib/src/boot.rs b/src/beslib/src/boot.rs new file mode 100644 index 0000000..760039b --- /dev/null +++ b/src/beslib/src/boot.rs @@ -0,0 +1,7 @@ +pub mod enums; +pub mod consts { + pub const BOOT_MAGIC_NUMBER: u32 = 0xBE57EC1C; + pub const BOOT_HASH_TYPE_MD5: u8 = 1; +} +pub const MAX_READ_DATA_LEN: u16 = 16; +pub const MAX_WRITE_DATA_LEN: u16 = 16; diff --git a/src/beslib/src/boot/enums.rs b/src/beslib/src/boot/enums.rs new file mode 100644 index 0000000..2352c0a --- /dev/null +++ b/src/beslib/src/boot/enums.rs @@ -0,0 +1,127 @@ +#![allow(non_camel_case_types)] + +#[derive(Debug, Default, PartialEq, Eq)] +pub enum MsgTypeKind { + TYPE_SYS = 0x00, + TYPE_READ = 0x01, + TYPE_WRITE = 0x02, + TYPE_BULK_READ = 0x03, + TYPE_EXT_WRITE = 0x04, + TYPE_BULK_WRITE_START = 0x05, + TYPE_BULK_WRITE_DATA = 0x06, + TYPE_NOTIF = 0x10, + TYPE_SYNC = 0x50, + TYPE_SIG_INFO = 0x51, + TYPE_SIG = 0x52, + TYPE_CODE_INFO = 0x53, + TYPE_CODE = 0x54, + TYPE_RUN = 0x55, + TYPE_SECTOR_SIZE = 0x60, + TYPE_ERASE_BURN_START = 0x61, + TYPE_ERASE_BURN_DATA = 0x62, + TYPE_OBSOLETED_63 = 0x63, + TYPE_OBSOLETED_64 = 0x64, + TYPE_FLASH_CMD = 0x65, + TYPE_GET_SECTOR_INFO = 0x66, + TYPE_SEC_REG_ERASE_BURN_START = 0x67, + TYPE_SEC_REG_ERASE_BURN_DATA = 0x68, + + // Extended types + TYPE_PROD_TEST = 0x81, + TYPE_RUNTIME_CMD = 0x82, + TYPE_BT_CALIB_CMD = 0x83, + TYPE_PROTO_EL = 0xA0, + + TYPE_INVALID = 0xFF, + + #[default] + Unknown, +} + +#[derive(Debug, Default, PartialEq, Eq)] +pub enum SysCmdKind { + SYS_CMD_REBOOT = 0xF1, + SYS_CMD_SHUTDOWN = 0xF2, + SYS_CMD_FLASH_BOOT = 0xF3, + SYS_CMD_SET_BOOTMODE = 0xE1, + SYS_CMD_CLR_BOOTMODE = 0xE2, + SYS_CMD_GET_BOOTMODE = 0xE3, + SYS_CMD_SET_DLD_RATE = 0xD1, + + #[default] + Unknown, +} + +#[derive(Debug, Default, PartialEq, Eq)] +pub enum ErrCodeKind { + ERR_NONE = 0x00, + ERR_LEN = 0x01, + ERR_CHECKSUM = 0x02, + ERR_NOT_SYNC = 0x03, + ERR_NOT_SEC = 0x04, + ERR_SYNC_WORD = 0x05, + ERR_SYS_CMD = 0x06, + ERR_DATA_ADDR = 0x07, + ERR_DATA_LEN = 0x08, + ERR_ACCESS_RIGHT = 0x09, + + ERR_TYPE_INVALID = 0x0F, + + ERR_BOOT_OK = 0x10, + ERR_BOOT_MAGIC = 0x11, + ERR_BOOT_SEC = 0x12, + ERR_BOOT_HASH_TYPE = 0x13, + ERR_BOOT_KEY_TYPE = 0x14, + ERR_BOOT_KEY_LEN = 0x15, + ERR_BOOT_SIG_LEN = 0x16, + ERR_BOOT_SIG = 0x17, + ERR_BOOT_CRC = 0x18, + ERR_BOOT_LEN = 0x19, + ERR_SIG_CODE_SIZE = 0x1A, + ERR_SIG_SIG_LEN = 0x1B, + ERR_SIG_INFO_MISSING = 0x1C, + ERR_BOOT_KEY_ID = 0x1D, + ERR_BOOT_HASH = 0x1E, + + ERR_CODE_OK = 0x20, + ERR_BOOT_MISSING = 0x21, + ERR_CODE_SIZE_SIG = 0x22, + ERR_CODE_ADDR_SIZE = 0x23, + ERR_CODE_INFO_MISSING = 0x24, + ERR_CODE_CRC = 0x25, + ERR_CODE_SIG = 0x26, + + ERR_CODE_MISSING = 0x31, + ERR_VERSION = 0x32, + + ERR_BURN_OK = 0x60, + ERR_SECTOR_SIZE = 0x61, + ERR_SECTOR_SEQ_OVERFLOW = 0x62, + ERR_BURN_INFO_MISSING = 0x63, + ERR_SECTOR_DATA_LEN = 0x64, + ERR_SECTOR_DATA_CRC = 0x65, + ERR_SECTOR_SEQ = 0x66, + ERR_ERASE_FLSH = 0x67, + ERR_BURN_FLSH = 0x68, + ERR_VERIFY_FLSH = 0x69, + ERR_FLASH_CMD = 0x6A, + + ERR_TYPE_MISMATCHED = 0xE1, + ERR_SEQ_MISMATCHED = 0xE2, + ERR_BUF_TOO_SMALL = 0xE3, + + ERR_INTERNAL = 0xFF, + + #[default] + Unknown, +} + +#[derive(Debug, Default, PartialEq, Eq)] +pub enum ParseState { + PARSE_HEADER, + PARSE_DATA, + PARSE_EXTRA, + + #[default] + Unknown, +} diff --git a/src/beslib/src/lib.rs b/src/beslib/src/lib.rs new file mode 100644 index 0000000..1fc13aa --- /dev/null +++ b/src/beslib/src/lib.rs @@ -0,0 +1 @@ +pub mod boot; diff --git a/src/beslib/supply-chain/audits.toml b/src/beslib/supply-chain/audits.toml new file mode 100644 index 0000000..29f91fd --- /dev/null +++ b/src/beslib/supply-chain/audits.toml @@ -0,0 +1,253 @@ + +# cargo-vet audits file + +[[audits.bitflags]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "2.4.1 -> 2.4.2" + +[[audits.io-kit-sys]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +version = "0.4.0" + +[[audits.pkg-config]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "0.3.26 -> 0.3.27" + +[[audits.pkg-config]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "0.3.29 -> 0.3.30" + +[[audits.serialport]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "4.2.2 -> 4.3.0" + +[[audits.strsim]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "0.10.0 -> 0.11.0" + +[[audits.unescaper]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +version = "0.1.4" + +[[trusted.aho-corasick]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-03-28" +end = "2024-11-26" + +[[trusted.anstream]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-16" +end = "2024-11-26" + +[[trusted.anstyle]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2022-05-18" +end = "2024-11-26" + +[[trusted.anstyle-parse]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-08" +end = "2024-11-26" + +[[trusted.anstyle-query]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-04-13" +end = "2024-11-26" + +[[trusted.anstyle-wincon]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-08" +end = "2024-11-26" + +[[trusted.clap]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2021-12-08" +end = "2024-11-26" + +[[trusted.clap_builder]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-28" +end = "2024-11-26" + +[[trusted.clap_derive]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2021-12-08" +end = "2024-11-26" + +[[trusted.clap_lex]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2022-04-15" +end = "2024-11-26" + +[[trusted.colorchoice]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-04-13" +end = "2024-11-26" + +[[trusted.libc]] +criteria = "safe-to-deploy" +user-id = 2915 # Amanieu d'Antras (Amanieu) +start = "2021-01-27" +end = "2024-11-26" + +[[trusted.mach2]] +criteria = "safe-to-deploy" +user-id = 51017 # Yuki Okushi (JohnTitor) +start = "2021-11-15" +end = "2025-02-17" + +[[trusted.memchr]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-07-07" +end = "2024-11-26" + +[[trusted.proc-macro2]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-04-23" +end = "2024-11-26" + +[[trusted.quote]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-04-09" +end = "2024-11-26" + +[[trusted.regex]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-02-27" +end = "2024-11-26" + +[[trusted.regex-automata]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-02-25" +end = "2024-11-26" + +[[trusted.regex-syntax]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-03-30" +end = "2024-11-26" + +[[trusted.scopeguard]] +criteria = "safe-to-deploy" +user-id = 2915 # Amanieu d'Antras (Amanieu) +start = "2020-02-16" +end = "2024-11-26" + +[[trusted.smallvec]] +criteria = "safe-to-deploy" +user-id = 2017 # Matt Brubeck (mbrubeck) +start = "2019-10-28" +end = "2024-11-26" + +[[trusted.syn]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-03-01" +end = "2024-11-26" + +[[trusted.thiserror]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-10-09" +end = "2024-11-26" + +[[trusted.thiserror-impl]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-10-09" +end = "2024-11-26" + +[[trusted.thread_local]] +criteria = "safe-to-deploy" +user-id = 2915 # Amanieu d'Antras (Amanieu) +start = "2019-09-07" +end = "2024-11-26" + +[[trusted.unicode-ident]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2021-10-02" +end = "2024-11-26" + +[[trusted.valuable]] +criteria = "safe-to-deploy" +user-id = 10 # Carl Lerche (carllerche) +start = "2022-01-03" +end = "2024-11-26" + +[[trusted.windows-sys]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-11-15" +end = "2024-11-26" + +[[trusted.windows-targets]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2022-09-09" +end = "2024-11-26" + +[[trusted.windows_aarch64_gnullvm]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2022-09-01" +end = "2024-11-26" + +[[trusted.windows_aarch64_msvc]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-11-05" +end = "2024-11-26" + +[[trusted.windows_i686_gnu]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-28" +end = "2024-11-26" + +[[trusted.windows_i686_msvc]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-27" +end = "2024-11-26" + +[[trusted.windows_x86_64_gnu]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-28" +end = "2024-11-26" + +[[trusted.windows_x86_64_gnullvm]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2022-09-01" +end = "2024-11-26" + +[[trusted.windows_x86_64_msvc]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-27" +end = "2024-11-26" diff --git a/src/beslib/supply-chain/config.toml b/src/beslib/supply-chain/config.toml new file mode 100644 index 0000000..ee79313 --- /dev/null +++ b/src/beslib/supply-chain/config.toml @@ -0,0 +1,87 @@ + +# cargo-vet config file + +[cargo-vet] +version = "0.9" + +[imports.bytecode-alliance] +url = "https://raw.githubusercontent.com/bytecodealliance/wasmtime/main/supply-chain/audits.toml" + +[imports.fermyon] +url = "https://raw.githubusercontent.com/fermyon/spin/main/supply-chain/audits.toml" + +[imports.google] +url = "https://raw.githubusercontent.com/google/supply-chain/main/audits.toml" + +[imports.isrg] +url = "https://raw.githubusercontent.com/divviup/libprio-rs/main/supply-chain/audits.toml" + +[imports.mozilla] +url = "https://raw.githubusercontent.com/mozilla/supply-chain/main/audits.toml" + +[imports.zcash] +url = "https://raw.githubusercontent.com/zcash/rust-ecosystem/main/supply-chain/audits.toml" + +[[exemptions.bitflags]] +version = "1.3.2" +criteria = "safe-to-deploy" + +[[exemptions.crc]] +version = "3.0.1" +criteria = "safe-to-deploy" + +[[exemptions.crc-catalog]] +version = "2.4.0" +criteria = "safe-to-deploy" + +[[exemptions.libudev]] +version = "0.3.0" +criteria = "safe-to-deploy" + +[[exemptions.libudev-sys]] +version = "0.1.4" +criteria = "safe-to-deploy" + +[[exemptions.nix]] +version = "0.26.4" +criteria = "safe-to-deploy" + +[[exemptions.once_cell]] +version = "1.18.0" +criteria = "safe-to-deploy" + +[[exemptions.serialport]] +version = "4.2.2" +criteria = "safe-to-deploy" + +[[exemptions.strsim]] +version = "0.10.0" +criteria = "safe-to-deploy" + +[[exemptions.tracing]] +version = "0.1.40" +criteria = "safe-to-deploy" + +[[exemptions.tracing-attributes]] +version = "0.1.27" +criteria = "safe-to-deploy" + +[[exemptions.tracing-core]] +version = "0.1.32" +criteria = "safe-to-deploy" + +[[exemptions.tracing-log]] +version = "0.2.0" +criteria = "safe-to-deploy" + +[[exemptions.winapi]] +version = "0.3.9" +criteria = "safe-to-deploy" + +[[exemptions.winapi-i686-pc-windows-gnu]] +version = "0.4.0" +criteria = "safe-to-deploy" + +[[exemptions.winapi-x86_64-pc-windows-gnu]] +version = "0.4.0" +criteria = "safe-to-deploy" diff --git a/src/beslib/supply-chain/imports.lock b/src/beslib/supply-chain/imports.lock new file mode 100644 index 0000000..595672a --- /dev/null +++ b/src/beslib/supply-chain/imports.lock @@ -0,0 +1,495 @@ + +# cargo-vet imports lock + +[[publisher.aho-corasick]] +version = "1.1.2" +when = "2023-10-09" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.anstream]] +version = "0.6.11" +when = "2024-01-18" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle]] +version = "1.0.6" +when = "2024-02-05" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle-parse]] +version = "0.2.3" +when = "2023-12-04" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle-query]] +version = "1.0.2" +when = "2023-12-08" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle-wincon]] +version = "3.0.2" +when = "2023-12-04" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap]] +version = "4.5.1" +when = "2024-02-16" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap_builder]] +version = "4.5.1" +when = "2024-02-16" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap_derive]] +version = "4.5.0" +when = "2024-02-08" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap_lex]] +version = "0.7.0" +when = "2024-02-08" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.colorchoice]] +version = "1.0.0" +when = "2023-04-13" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.core-foundation-sys]] +version = "0.8.4" +when = "2023-04-03" +user-id = 5946 +user-login = "jrmuizel" +user-name = "Jeff Muizelaar" + +[[publisher.libc]] +version = "0.2.146" +when = "2023-06-06" +user-id = 2915 +user-login = "Amanieu" +user-name = "Amanieu d'Antras" + +[[publisher.mach2]] +version = "0.4.2" +when = "2023-12-19" +user-id = 51017 +user-login = "JohnTitor" +user-name = "Yuki Okushi" + +[[publisher.memchr]] +version = "2.7.1" +when = "2023-12-28" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.proc-macro2]] +version = "1.0.78" +when = "2024-01-21" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.quote]] +version = "1.0.35" +when = "2024-01-02" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.regex]] +version = "1.10.3" +when = "2024-01-21" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.regex-automata]] +version = "0.4.5" +when = "2024-01-25" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.regex-syntax]] +version = "0.8.2" +when = "2023-10-14" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.scopeguard]] +version = "1.2.0" +when = "2023-07-17" +user-id = 2915 +user-login = "Amanieu" +user-name = "Amanieu d'Antras" + +[[publisher.smallvec]] +version = "1.13.1" +when = "2024-01-19" +user-id = 2017 +user-login = "mbrubeck" +user-name = "Matt Brubeck" + +[[publisher.syn]] +version = "2.0.49" +when = "2024-02-16" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.thiserror]] +version = "1.0.57" +when = "2024-02-11" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.thiserror-impl]] +version = "1.0.57" +when = "2024-02-11" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.thread_local]] +version = "1.1.7" +when = "2023-02-12" +user-id = 2915 +user-login = "Amanieu" +user-name = "Amanieu d'Antras" + +[[publisher.unicode-ident]] +version = "1.0.12" +when = "2023-09-13" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.valuable]] +version = "0.1.0" +when = "2022-01-03" +user-id = 10 +user-login = "carllerche" +user-name = "Carl Lerche" + +[[publisher.windows-sys]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows-targets]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_aarch64_gnullvm]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_aarch64_msvc]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_i686_gnu]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_i686_msvc]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_x86_64_gnu]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_x86_64_gnullvm]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_x86_64_msvc]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Jamey Sharp " +criteria = "safe-to-deploy" +delta = "2.1.0 -> 2.2.1" +notes = """ +This version adds unsafe impls of traits from the bytemuck crate when built +with that library enabled, but I believe the impls satisfy the documented +safety requirements for bytemuck. The other changes are minor. +""" + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "2.3.2 -> 2.3.3" +notes = """ +Nothing outside the realm of what one would expect from a bitflags generator, +all as expected. +""" + +[[audits.bytecode-alliance.audits.cfg-if]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "1.0.0" +notes = "I am the author of this crate." + +[[audits.bytecode-alliance.audits.core-foundation-sys]] +who = "Dan Gohman " +criteria = "safe-to-deploy" +delta = "0.8.4 -> 0.8.6" +notes = """ +The changes here are all typical bindings updates: new functions, types, and +constants. I have not audited all the bindings for ABI conformance. +""" + +[[audits.bytecode-alliance.audits.heck]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.4.0" +notes = "Contains `forbid_unsafe` and only uses `std::fmt` from the standard library. Otherwise only contains string manipulation." + +[[audits.bytecode-alliance.audits.libc]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.2.146 -> 0.2.147" +notes = "Only new type definitions and updating others for some platforms, no major changes" + +[[audits.bytecode-alliance.audits.libc]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.2.148 -> 0.2.149" +notes = "Lots of new functions and constants for new platforms and nothing out of the ordinary for what one would expect of the `libc` crate." + +[[audits.bytecode-alliance.audits.libc]] +who = "Dan Gohman " +criteria = "safe-to-deploy" +delta = "0.2.149 -> 0.2.151" +notes = "More new functions, types, and constants, as is usual for the `libc` crate, as well as various minor code cleanups." + +[[audits.bytecode-alliance.audits.libc]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.2.151 -> 0.2.153" +notes = "More bindings for more platforms. I have not verified that everything is exactly as-is on the platform as specified but nothing major is otherwise introduced as part of this bump." + +[[audits.bytecode-alliance.audits.nu-ansi-term]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.46.0" +notes = "one use of unsafe to call windows specific api to get console handle." + +[[audits.bytecode-alliance.audits.overload]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.1.1" +notes = "small crate, only defines macro-rules!, nicely documented as well" + +[[audits.bytecode-alliance.audits.pkg-config]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.3.25" +notes = "This crate shells out to the pkg-config executable, but it appears to sanitize inputs reasonably." + +[[audits.bytecode-alliance.audits.pkg-config]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.3.26 -> 0.3.29" +notes = """ +No `unsafe` additions or anything outside of the purview of the crate in this +change. +""" + +[[audits.bytecode-alliance.audits.sharded-slab]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.1.4" +notes = "I always really enjoy reading eliza's code, she left perfect comments at every use of unsafe." + +[[audits.bytecode-alliance.audits.tracing-subscriber]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.3.17" + +[audits.fermyon.audits] + +[[audits.google.audits.pin-project-lite]] +who = "David Koloski " +criteria = "safe-to-deploy" +version = "0.2.9" +notes = "Reviewed on https://fxrev.dev/824504" +aggregated-from = "https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/third_party/rust_crates/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.utf8parse]] +who = "David Koloski " +criteria = "safe-to-deploy" +version = "0.2.1" +notes = "Reviewed on https://fxrev.dev/904811" +aggregated-from = "https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/third_party/rust_crates/supply-chain/audits.toml?format=TEXT" + +[[audits.isrg.audits.once_cell]] +who = "Brandon Pitman " +criteria = "safe-to-deploy" +delta = "1.18.0 -> 1.19.0" + +[[audits.mozilla.wildcard-audits.core-foundation-sys]] +who = "Bobby Holley " +criteria = "safe-to-deploy" +user-id = 5946 # Jeff Muizelaar (jrmuizel) +start = "2020-10-14" +end = "2023-05-04" +renew = false +notes = "I've reviewed every source contribution that was neither authored nor reviewed by Mozilla." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Alex Franchuk " +criteria = "safe-to-deploy" +delta = "1.3.2 -> 2.0.2" +notes = "Removal of some unsafe code/methods. No changes to externals, just some refactoring (mostly internal)." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Nicolas Silva " +criteria = "safe-to-deploy" +delta = "2.0.2 -> 2.1.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Teodor Tanasoaia " +criteria = "safe-to-deploy" +delta = "2.2.1 -> 2.3.2" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "2.3.3 -> 2.4.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "2.4.0 -> 2.4.1" +notes = "Only allowing new clippy lints" +aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.heck]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.4.0 -> 0.4.1" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.lazy_static]] +who = "Nika Layzell " +criteria = "safe-to-deploy" +version = "1.4.0" +notes = "I have read over the macros, and audited the unsafe code." +aggregated-from = "https://raw.githubusercontent.com/mozilla/cargo-vet/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.libc]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.2.147 -> 0.2.148" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.log]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +version = "0.4.17" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.log]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "0.4.17 -> 0.4.18" +notes = "One dependency removed, others updated (which we don't rely on), some APIs (which we don't use) changed." +aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.pkg-config]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.3.25 -> 0.3.26" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.zcash.audits.log]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.4.18 -> 0.4.19" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.log]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.4.19 -> 0.4.20" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.pin-project-lite]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.2.9 -> 0.2.13" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.sharded-slab]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.1.4 -> 0.1.7" +notes = "Only change to an `unsafe` block is to fix a clippy lint." +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.tracing-subscriber]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.3.17 -> 0.3.18" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" diff --git a/src/bestool/Cargo.toml b/src/bestool/Cargo.toml new file mode 100644 index 0000000..bdb2a0b --- /dev/null +++ b/src/bestool/Cargo.toml @@ -0,0 +1,16 @@ +[package] +authors = { workspace = true } +description = "Command-line utility for BES2300 chips." +edition = { workspace = true } +homepage = { workspace = true } +# license = { workspace = true } # TODO: Specify license with REUSE. +name = "bestool" +repository = { workspace = true } +rust-version = { workspace = true } +version = { workspace = true } + +[dependencies] +beslib = { path = "../beslib" } +clap = { workspace = true } +crc = { workspace = true } +serialport = { workspace = true } diff --git a/src/bestool/src/command.rs b/src/bestool/src/command.rs new file mode 100644 index 0000000..0699277 --- /dev/null +++ b/src/bestool/src/command.rs @@ -0,0 +1,24 @@ +use std::io::Result; +use clap::Subcommand; + +pub(crate) mod flash; +pub(crate) mod serial; + +#[derive(Subcommand)] +#[command(infer_subcommands = true)] +pub(crate) enum BestoolCmd { + #[command(flatten)] + Flash(flash::Cmd), + + #[command(flatten)] + Serial(serial::Cmd), +} + +impl BestoolCmd { + pub(crate) fn run(self) -> Result<()> { + match self { + Self::Flash(flash) => flash.run(), + Self::Serial(serial) => serial.run(), + } + } +} diff --git a/src/bestool/src/command/flash.rs b/src/bestool/src/command/flash.rs new file mode 100644 index 0000000..076f10a --- /dev/null +++ b/src/bestool/src/command/flash.rs @@ -0,0 +1,21 @@ +use std::io::Result; +use clap::Subcommand; + +pub(crate) mod write_flash; +pub(crate) mod read_flash; + +#[derive(Subcommand, Debug)] +#[command(infer_subcommands = true)] +pub(crate) enum Cmd { + WriteFlash, // Use `(write_flash::Cmd)` (with args `--monitor`) + ReadFlash, // Use `(read_flash::Cmd)` +} + +impl Cmd { + pub(crate) fn run(self) -> Result<()> { + match self { + Self::WriteFlash => write_flash::run(), + Self::ReadFlash => read_flash::run(), + } + } +} diff --git a/src/bestool/src/command/flash/read_flash.rs b/src/bestool/src/command/flash/read_flash.rs new file mode 100644 index 0000000..ac68191 --- /dev/null +++ b/src/bestool/src/command/flash/read_flash.rs @@ -0,0 +1,5 @@ +use std::io::Result; + +pub(super) fn run() -> Result<()> { + unimplemented!() +} diff --git a/src/bestool/src/command/flash/write_flash.rs b/src/bestool/src/command/flash/write_flash.rs new file mode 100644 index 0000000..ac68191 --- /dev/null +++ b/src/bestool/src/command/flash/write_flash.rs @@ -0,0 +1,5 @@ +use std::io::Result; + +pub(super) fn run() -> Result<()> { + unimplemented!() +} diff --git a/src/bestool/src/command/serial.rs b/src/bestool/src/command/serial.rs new file mode 100644 index 0000000..f01fe5f --- /dev/null +++ b/src/bestool/src/command/serial.rs @@ -0,0 +1,22 @@ +use std::io::Result; + +use clap::Subcommand; + +pub(crate) mod enumerate_serial_ports; +pub(crate) mod monitor; + +#[derive(Subcommand, Debug)] +#[command(infer_subcommands = true)] +pub(crate) enum Cmd { + EnumerateSerialPorts, + Monitor, // Add `(monitor::Cmd)` here. +} + +impl Cmd { + pub(crate) fn run(self) -> Result<()> { + match self { + Self::EnumerateSerialPorts => enumerate_serial_ports::run(), + Self::Monitor => monitor::run(), + } + } +} diff --git a/src/bestool/src/command/serial/enumerate_serial_ports.rs b/src/bestool/src/command/serial/enumerate_serial_ports.rs new file mode 100644 index 0000000..5dee2c8 --- /dev/null +++ b/src/bestool/src/command/serial/enumerate_serial_ports.rs @@ -0,0 +1,36 @@ +use serialport::SerialPortType; +use std::io::Result; + +fn get_port_type(port: SerialPortType) -> Option { + match port { + #[cfg(windows)] + SerialPortType::UsbPort(info) => Some(format!("USB {:04X}:{:04X}", info.vid, info.pid)), + #[cfg(unix)] + SerialPortType::UsbPort(info) => Some(format!("USB {:04x}:{:04x}", info.vid, info.pid)), + SerialPortType::PciPort => Some(String::from("PCI")), + SerialPortType::BluetoothPort => Some(String::from("Bluetooth")), + SerialPortType::Unknown => None, + } +} + +pub fn run() -> Result<()> { + match serialport::available_ports() { + Ok(ports) => { + if ports.is_empty() { + eprintln!("No serial ports found"); + return Ok(()); + } + println!("Detected serial ports and their type:"); + for port in ports { + if let Some(port_type) = get_port_type(port.port_type) { + println!("{}\t[{}]", port.port_name, port_type); + } else { + continue; + } + } + } + Err(e) => eprintln!("Could not list ports due to {e:?}"), + } + + Ok(()) +} diff --git a/src/bestool/src/command/serial/monitor.rs b/src/bestool/src/command/serial/monitor.rs new file mode 100644 index 0000000..c743333 --- /dev/null +++ b/src/bestool/src/command/serial/monitor.rs @@ -0,0 +1,5 @@ +use std::io::Result; + +pub fn run() -> Result<()> { + unimplemented!() +} diff --git a/src/bestool/src/main.rs b/src/bestool/src/main.rs new file mode 100644 index 0000000..f6a89f1 --- /dev/null +++ b/src/bestool/src/main.rs @@ -0,0 +1,39 @@ +#![warn(clippy::pedantic, clippy::nursery)] + +use clap::Parser; +pub(crate) mod command; +use command::BestoolCmd; +use std::io::Result; + +const VERSION: &'static str = env!("CARGO_PKG_VERSION"); + +static HELP_TEMPLATE: &'static str = "\ +{before-help}{name} {version} +{author} +{about} + +{usage-heading} + {usage} + +{all-args}{after-help}"; + +#[derive(Parser)] +#[command( + author = "Ben V. Brown ", + version = VERSION, + help_template = HELP_TEMPLATE, +)] +struct Bestool { + #[command(subcommand)] + bestool: BestoolCmd, +} + +impl Bestool { + fn run(self) -> Result<()> { + self.bestool.run() + } +} + +fn main() -> Result<()> { + Ok(Bestool::parse().run()?) +} diff --git a/src/bestool/supply-chain/audits.toml b/src/bestool/supply-chain/audits.toml new file mode 100644 index 0000000..29f91fd --- /dev/null +++ b/src/bestool/supply-chain/audits.toml @@ -0,0 +1,253 @@ + +# cargo-vet audits file + +[[audits.bitflags]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "2.4.1 -> 2.4.2" + +[[audits.io-kit-sys]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +version = "0.4.0" + +[[audits.pkg-config]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "0.3.26 -> 0.3.27" + +[[audits.pkg-config]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "0.3.29 -> 0.3.30" + +[[audits.serialport]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "4.2.2 -> 4.3.0" + +[[audits.strsim]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +delta = "0.10.0 -> 0.11.0" + +[[audits.unescaper]] +who = "Ben V. Brown " +criteria = "safe-to-deploy" +version = "0.1.4" + +[[trusted.aho-corasick]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-03-28" +end = "2024-11-26" + +[[trusted.anstream]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-16" +end = "2024-11-26" + +[[trusted.anstyle]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2022-05-18" +end = "2024-11-26" + +[[trusted.anstyle-parse]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-08" +end = "2024-11-26" + +[[trusted.anstyle-query]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-04-13" +end = "2024-11-26" + +[[trusted.anstyle-wincon]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-08" +end = "2024-11-26" + +[[trusted.clap]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2021-12-08" +end = "2024-11-26" + +[[trusted.clap_builder]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-03-28" +end = "2024-11-26" + +[[trusted.clap_derive]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2021-12-08" +end = "2024-11-26" + +[[trusted.clap_lex]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2022-04-15" +end = "2024-11-26" + +[[trusted.colorchoice]] +criteria = "safe-to-deploy" +user-id = 6743 # Ed Page (epage) +start = "2023-04-13" +end = "2024-11-26" + +[[trusted.libc]] +criteria = "safe-to-deploy" +user-id = 2915 # Amanieu d'Antras (Amanieu) +start = "2021-01-27" +end = "2024-11-26" + +[[trusted.mach2]] +criteria = "safe-to-deploy" +user-id = 51017 # Yuki Okushi (JohnTitor) +start = "2021-11-15" +end = "2025-02-17" + +[[trusted.memchr]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-07-07" +end = "2024-11-26" + +[[trusted.proc-macro2]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-04-23" +end = "2024-11-26" + +[[trusted.quote]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-04-09" +end = "2024-11-26" + +[[trusted.regex]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-02-27" +end = "2024-11-26" + +[[trusted.regex-automata]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-02-25" +end = "2024-11-26" + +[[trusted.regex-syntax]] +criteria = "safe-to-deploy" +user-id = 189 # Andrew Gallant (BurntSushi) +start = "2019-03-30" +end = "2024-11-26" + +[[trusted.scopeguard]] +criteria = "safe-to-deploy" +user-id = 2915 # Amanieu d'Antras (Amanieu) +start = "2020-02-16" +end = "2024-11-26" + +[[trusted.smallvec]] +criteria = "safe-to-deploy" +user-id = 2017 # Matt Brubeck (mbrubeck) +start = "2019-10-28" +end = "2024-11-26" + +[[trusted.syn]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-03-01" +end = "2024-11-26" + +[[trusted.thiserror]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-10-09" +end = "2024-11-26" + +[[trusted.thiserror-impl]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2019-10-09" +end = "2024-11-26" + +[[trusted.thread_local]] +criteria = "safe-to-deploy" +user-id = 2915 # Amanieu d'Antras (Amanieu) +start = "2019-09-07" +end = "2024-11-26" + +[[trusted.unicode-ident]] +criteria = "safe-to-deploy" +user-id = 3618 # David Tolnay (dtolnay) +start = "2021-10-02" +end = "2024-11-26" + +[[trusted.valuable]] +criteria = "safe-to-deploy" +user-id = 10 # Carl Lerche (carllerche) +start = "2022-01-03" +end = "2024-11-26" + +[[trusted.windows-sys]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-11-15" +end = "2024-11-26" + +[[trusted.windows-targets]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2022-09-09" +end = "2024-11-26" + +[[trusted.windows_aarch64_gnullvm]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2022-09-01" +end = "2024-11-26" + +[[trusted.windows_aarch64_msvc]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-11-05" +end = "2024-11-26" + +[[trusted.windows_i686_gnu]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-28" +end = "2024-11-26" + +[[trusted.windows_i686_msvc]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-27" +end = "2024-11-26" + +[[trusted.windows_x86_64_gnu]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-28" +end = "2024-11-26" + +[[trusted.windows_x86_64_gnullvm]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2022-09-01" +end = "2024-11-26" + +[[trusted.windows_x86_64_msvc]] +criteria = "safe-to-deploy" +user-id = 64539 # Kenny Kerr (kennykerr) +start = "2021-10-27" +end = "2024-11-26" diff --git a/src/bestool/supply-chain/config.toml b/src/bestool/supply-chain/config.toml new file mode 100644 index 0000000..ee79313 --- /dev/null +++ b/src/bestool/supply-chain/config.toml @@ -0,0 +1,87 @@ + +# cargo-vet config file + +[cargo-vet] +version = "0.9" + +[imports.bytecode-alliance] +url = "https://raw.githubusercontent.com/bytecodealliance/wasmtime/main/supply-chain/audits.toml" + +[imports.fermyon] +url = "https://raw.githubusercontent.com/fermyon/spin/main/supply-chain/audits.toml" + +[imports.google] +url = "https://raw.githubusercontent.com/google/supply-chain/main/audits.toml" + +[imports.isrg] +url = "https://raw.githubusercontent.com/divviup/libprio-rs/main/supply-chain/audits.toml" + +[imports.mozilla] +url = "https://raw.githubusercontent.com/mozilla/supply-chain/main/audits.toml" + +[imports.zcash] +url = "https://raw.githubusercontent.com/zcash/rust-ecosystem/main/supply-chain/audits.toml" + +[[exemptions.bitflags]] +version = "1.3.2" +criteria = "safe-to-deploy" + +[[exemptions.crc]] +version = "3.0.1" +criteria = "safe-to-deploy" + +[[exemptions.crc-catalog]] +version = "2.4.0" +criteria = "safe-to-deploy" + +[[exemptions.libudev]] +version = "0.3.0" +criteria = "safe-to-deploy" + +[[exemptions.libudev-sys]] +version = "0.1.4" +criteria = "safe-to-deploy" + +[[exemptions.nix]] +version = "0.26.4" +criteria = "safe-to-deploy" + +[[exemptions.once_cell]] +version = "1.18.0" +criteria = "safe-to-deploy" + +[[exemptions.serialport]] +version = "4.2.2" +criteria = "safe-to-deploy" + +[[exemptions.strsim]] +version = "0.10.0" +criteria = "safe-to-deploy" + +[[exemptions.tracing]] +version = "0.1.40" +criteria = "safe-to-deploy" + +[[exemptions.tracing-attributes]] +version = "0.1.27" +criteria = "safe-to-deploy" + +[[exemptions.tracing-core]] +version = "0.1.32" +criteria = "safe-to-deploy" + +[[exemptions.tracing-log]] +version = "0.2.0" +criteria = "safe-to-deploy" + +[[exemptions.winapi]] +version = "0.3.9" +criteria = "safe-to-deploy" + +[[exemptions.winapi-i686-pc-windows-gnu]] +version = "0.4.0" +criteria = "safe-to-deploy" + +[[exemptions.winapi-x86_64-pc-windows-gnu]] +version = "0.4.0" +criteria = "safe-to-deploy" diff --git a/src/bestool/supply-chain/imports.lock b/src/bestool/supply-chain/imports.lock new file mode 100644 index 0000000..595672a --- /dev/null +++ b/src/bestool/supply-chain/imports.lock @@ -0,0 +1,495 @@ + +# cargo-vet imports lock + +[[publisher.aho-corasick]] +version = "1.1.2" +when = "2023-10-09" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.anstream]] +version = "0.6.11" +when = "2024-01-18" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle]] +version = "1.0.6" +when = "2024-02-05" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle-parse]] +version = "0.2.3" +when = "2023-12-04" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle-query]] +version = "1.0.2" +when = "2023-12-08" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.anstyle-wincon]] +version = "3.0.2" +when = "2023-12-04" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap]] +version = "4.5.1" +when = "2024-02-16" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap_builder]] +version = "4.5.1" +when = "2024-02-16" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap_derive]] +version = "4.5.0" +when = "2024-02-08" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.clap_lex]] +version = "0.7.0" +when = "2024-02-08" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.colorchoice]] +version = "1.0.0" +when = "2023-04-13" +user-id = 6743 +user-login = "epage" +user-name = "Ed Page" + +[[publisher.core-foundation-sys]] +version = "0.8.4" +when = "2023-04-03" +user-id = 5946 +user-login = "jrmuizel" +user-name = "Jeff Muizelaar" + +[[publisher.libc]] +version = "0.2.146" +when = "2023-06-06" +user-id = 2915 +user-login = "Amanieu" +user-name = "Amanieu d'Antras" + +[[publisher.mach2]] +version = "0.4.2" +when = "2023-12-19" +user-id = 51017 +user-login = "JohnTitor" +user-name = "Yuki Okushi" + +[[publisher.memchr]] +version = "2.7.1" +when = "2023-12-28" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.proc-macro2]] +version = "1.0.78" +when = "2024-01-21" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.quote]] +version = "1.0.35" +when = "2024-01-02" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.regex]] +version = "1.10.3" +when = "2024-01-21" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.regex-automata]] +version = "0.4.5" +when = "2024-01-25" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.regex-syntax]] +version = "0.8.2" +when = "2023-10-14" +user-id = 189 +user-login = "BurntSushi" +user-name = "Andrew Gallant" + +[[publisher.scopeguard]] +version = "1.2.0" +when = "2023-07-17" +user-id = 2915 +user-login = "Amanieu" +user-name = "Amanieu d'Antras" + +[[publisher.smallvec]] +version = "1.13.1" +when = "2024-01-19" +user-id = 2017 +user-login = "mbrubeck" +user-name = "Matt Brubeck" + +[[publisher.syn]] +version = "2.0.49" +when = "2024-02-16" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.thiserror]] +version = "1.0.57" +when = "2024-02-11" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.thiserror-impl]] +version = "1.0.57" +when = "2024-02-11" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.thread_local]] +version = "1.1.7" +when = "2023-02-12" +user-id = 2915 +user-login = "Amanieu" +user-name = "Amanieu d'Antras" + +[[publisher.unicode-ident]] +version = "1.0.12" +when = "2023-09-13" +user-id = 3618 +user-login = "dtolnay" +user-name = "David Tolnay" + +[[publisher.valuable]] +version = "0.1.0" +when = "2022-01-03" +user-id = 10 +user-login = "carllerche" +user-name = "Carl Lerche" + +[[publisher.windows-sys]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows-targets]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_aarch64_gnullvm]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_aarch64_msvc]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_i686_gnu]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_i686_msvc]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_x86_64_gnu]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_x86_64_gnullvm]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[publisher.windows_x86_64_msvc]] +version = "0.52.0" +when = "2023-11-15" +user-id = 64539 +user-login = "kennykerr" +user-name = "Kenny Kerr" + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Jamey Sharp " +criteria = "safe-to-deploy" +delta = "2.1.0 -> 2.2.1" +notes = """ +This version adds unsafe impls of traits from the bytemuck crate when built +with that library enabled, but I believe the impls satisfy the documented +safety requirements for bytemuck. The other changes are minor. +""" + +[[audits.bytecode-alliance.audits.bitflags]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "2.3.2 -> 2.3.3" +notes = """ +Nothing outside the realm of what one would expect from a bitflags generator, +all as expected. +""" + +[[audits.bytecode-alliance.audits.cfg-if]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "1.0.0" +notes = "I am the author of this crate." + +[[audits.bytecode-alliance.audits.core-foundation-sys]] +who = "Dan Gohman " +criteria = "safe-to-deploy" +delta = "0.8.4 -> 0.8.6" +notes = """ +The changes here are all typical bindings updates: new functions, types, and +constants. I have not audited all the bindings for ABI conformance. +""" + +[[audits.bytecode-alliance.audits.heck]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +version = "0.4.0" +notes = "Contains `forbid_unsafe` and only uses `std::fmt` from the standard library. Otherwise only contains string manipulation." + +[[audits.bytecode-alliance.audits.libc]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.2.146 -> 0.2.147" +notes = "Only new type definitions and updating others for some platforms, no major changes" + +[[audits.bytecode-alliance.audits.libc]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.2.148 -> 0.2.149" +notes = "Lots of new functions and constants for new platforms and nothing out of the ordinary for what one would expect of the `libc` crate." + +[[audits.bytecode-alliance.audits.libc]] +who = "Dan Gohman " +criteria = "safe-to-deploy" +delta = "0.2.149 -> 0.2.151" +notes = "More new functions, types, and constants, as is usual for the `libc` crate, as well as various minor code cleanups." + +[[audits.bytecode-alliance.audits.libc]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.2.151 -> 0.2.153" +notes = "More bindings for more platforms. I have not verified that everything is exactly as-is on the platform as specified but nothing major is otherwise introduced as part of this bump." + +[[audits.bytecode-alliance.audits.nu-ansi-term]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.46.0" +notes = "one use of unsafe to call windows specific api to get console handle." + +[[audits.bytecode-alliance.audits.overload]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.1.1" +notes = "small crate, only defines macro-rules!, nicely documented as well" + +[[audits.bytecode-alliance.audits.pkg-config]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.3.25" +notes = "This crate shells out to the pkg-config executable, but it appears to sanitize inputs reasonably." + +[[audits.bytecode-alliance.audits.pkg-config]] +who = "Alex Crichton " +criteria = "safe-to-deploy" +delta = "0.3.26 -> 0.3.29" +notes = """ +No `unsafe` additions or anything outside of the purview of the crate in this +change. +""" + +[[audits.bytecode-alliance.audits.sharded-slab]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.1.4" +notes = "I always really enjoy reading eliza's code, she left perfect comments at every use of unsafe." + +[[audits.bytecode-alliance.audits.tracing-subscriber]] +who = "Pat Hickey " +criteria = "safe-to-deploy" +version = "0.3.17" + +[audits.fermyon.audits] + +[[audits.google.audits.pin-project-lite]] +who = "David Koloski " +criteria = "safe-to-deploy" +version = "0.2.9" +notes = "Reviewed on https://fxrev.dev/824504" +aggregated-from = "https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/third_party/rust_crates/supply-chain/audits.toml?format=TEXT" + +[[audits.google.audits.utf8parse]] +who = "David Koloski " +criteria = "safe-to-deploy" +version = "0.2.1" +notes = "Reviewed on https://fxrev.dev/904811" +aggregated-from = "https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/third_party/rust_crates/supply-chain/audits.toml?format=TEXT" + +[[audits.isrg.audits.once_cell]] +who = "Brandon Pitman " +criteria = "safe-to-deploy" +delta = "1.18.0 -> 1.19.0" + +[[audits.mozilla.wildcard-audits.core-foundation-sys]] +who = "Bobby Holley " +criteria = "safe-to-deploy" +user-id = 5946 # Jeff Muizelaar (jrmuizel) +start = "2020-10-14" +end = "2023-05-04" +renew = false +notes = "I've reviewed every source contribution that was neither authored nor reviewed by Mozilla." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Alex Franchuk " +criteria = "safe-to-deploy" +delta = "1.3.2 -> 2.0.2" +notes = "Removal of some unsafe code/methods. No changes to externals, just some refactoring (mostly internal)." +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Nicolas Silva " +criteria = "safe-to-deploy" +delta = "2.0.2 -> 2.1.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Teodor Tanasoaia " +criteria = "safe-to-deploy" +delta = "2.2.1 -> 2.3.2" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "2.3.3 -> 2.4.0" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.bitflags]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "2.4.0 -> 2.4.1" +notes = "Only allowing new clippy lints" +aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.heck]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.4.0 -> 0.4.1" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.lazy_static]] +who = "Nika Layzell " +criteria = "safe-to-deploy" +version = "1.4.0" +notes = "I have read over the macros, and audited the unsafe code." +aggregated-from = "https://raw.githubusercontent.com/mozilla/cargo-vet/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.libc]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.2.147 -> 0.2.148" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.log]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +version = "0.4.17" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.mozilla.audits.log]] +who = "Jan-Erik Rediger " +criteria = "safe-to-deploy" +delta = "0.4.17 -> 0.4.18" +notes = "One dependency removed, others updated (which we don't rely on), some APIs (which we don't use) changed." +aggregated-from = "https://raw.githubusercontent.com/mozilla/glean/main/supply-chain/audits.toml" + +[[audits.mozilla.audits.pkg-config]] +who = "Mike Hommey " +criteria = "safe-to-deploy" +delta = "0.3.25 -> 0.3.26" +aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml" + +[[audits.zcash.audits.log]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.4.18 -> 0.4.19" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.log]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.4.19 -> 0.4.20" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.pin-project-lite]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.2.9 -> 0.2.13" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.sharded-slab]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.1.4 -> 0.1.7" +notes = "Only change to an `unsafe` block is to fix a clippy lint." +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml" + +[[audits.zcash.audits.tracing-subscriber]] +who = "Jack Grigg " +criteria = "safe-to-deploy" +delta = "0.3.17 -> 0.3.18" +aggregated-from = "https://raw.githubusercontent.com/zcash/zcash/master/qa/supply-chain/audits.toml"