Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions glean-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ env_logger = { version = "0.10.0", default-features = false, optional = true }
malloc_size_of_derive = "0.1.3"
malloc_size_of = { version = "0.2.2", package = "wr_malloc_size_of", default-features = false, features = ["once_cell"] }
rusqlite = { version = "0.37.0", features = ["bundled"] }
rmp-serde = "1.3.1"

[target.'cfg(target_os = "android")'.dependencies]
android_logger = { version = "0.12.0", default-features = false }
Expand Down
20 changes: 20 additions & 0 deletions glean-core/benchmark/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions glean-core/src/database/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl Database {
|row| {
let id: String = row.get(0)?;
let blob: Vec<u8> = row.get(1)?;
let blob: Metric = bincode::deserialize(&blob)
let blob: Metric = rmp_serde::from_slice(&blob)
.map_err(|_| FromSqlError::InvalidType)?;
Ok((id, blob))
},
Expand Down Expand Up @@ -237,7 +237,7 @@ impl Database {
"#;

let mut stmt = tx.prepare_cached(insert_sql)?;
let encoded = bincode::serialize(&metric).expect("IMPOSSIBLE: Serializing metric failed");
let encoded = rmp_serde::to_vec(&metric).expect("IMPOSSIBLE: Serializing metric failed");
stmt.execute(params![key, storage_name, lifetime.as_str(), encoded])?;

Ok(())
Expand Down Expand Up @@ -317,7 +317,7 @@ impl Database {

if let Ok(Some(row)) = rows.next() {
let blob: Vec<u8> = row.get(0)?;
let old_value = bincode::deserialize(&blob).ok();
let old_value = rmp_serde::from_slice(&blob).ok();
transform(old_value)
} else {
transform(None)
Expand All @@ -337,7 +337,7 @@ impl Database {
{
let mut stmt = tx.prepare_cached(insert_sql)?;
let encoded =
bincode::serialize(&new_value).expect("IMPOSSIBLE: Serializing metric failed");
rmp_serde::to_vec(&new_value).expect("IMPOSSIBLE: Serializing metric failed");
stmt.execute(params![key, storage_name, lifetime.as_str(), encoded])?;
}

Expand Down
32 changes: 24 additions & 8 deletions supply-chain/imports.lock
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,12 @@ criteria = "safe-to-deploy"
delta = "0.7.1 -> 0.8.0"
notes = "Minor updates, using new Rust features like `const`, no major changes."

[[audits.bytecode-alliance.audits.num-traits]]
who = "Andrew Brown <andrew.brown@intel.com>"
criteria = "safe-to-deploy"
version = "0.2.19"
notes = "As advertised: a numeric library. The only `unsafe` is from some float-to-int conversions, which seems expected."

[[audits.bytecode-alliance.audits.percent-encoding]]
who = "Alex Crichton <alex@alexcrichton.com>"
criteria = "safe-to-deploy"
Expand Down Expand Up @@ -2064,7 +2070,7 @@ who = "Jan-Erik Rediger <jrediger@mozilla.com>"
criteria = "safe-to-deploy"
user-id = 111105 # Mark Hammond (mhammond)
start = "2025-03-18"
end = "2026-03-25"
end = "2027-04-23"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"

[[audits.mozilla.audits.android-tzdata]]
Expand Down Expand Up @@ -2409,13 +2415,6 @@ but convinced myself that any generated code will be entirely safe to deploy.
"""
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"

[[audits.mozilla.audits.num-traits]]
who = "Josh Stone <jistone@redhat.com>"
criteria = "safe-to-deploy"
version = "0.2.15"
notes = "All code written or reviewed by Josh Stone."
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"

[[audits.mozilla.audits.once_cell]]
who = "Erich Gubler <erichdongubler@gmail.com>"
criteria = "safe-to-deploy"
Expand Down Expand Up @@ -2472,6 +2471,23 @@ criteria = "safe-to-deploy"
version = "0.18.4"
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"

[[audits.mozilla.audits.rmp]]
who = "Ben Dean-Kawamura <bdk@mozilla.com>"
criteria = "safe-to-deploy"
version = "0.8.14"
notes = """
Very popular crate. 1 instance of unsafe code, which is used to adjust a slice to work around
lifetime issues. No network or file access.
"""
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"

[[audits.mozilla.audits.rmp-serde]]
who = "Ben Dean-Kawamura <bdk@mozilla.com>"
criteria = "safe-to-deploy"
version = "1.3.0"
notes = "Very popular crate. No unsafe code, network or file access."
aggregated-from = "https://hg.mozilla.org/mozilla-central/raw-file/tip/supply-chain/audits.toml"

[[audits.mozilla.audits.rusqlite]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
Expand Down
Loading