Skip to content
Merged
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
33 changes: 17 additions & 16 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ urlencoding = "2.1"
regex = "1"
hostname = "0.4"
hex = "0.4"
md-5 = "0.10"
md-5 = "0.11"
sha1 = "0.10"
dashmap = "6"
rustc-hash = "2"
Expand Down
2 changes: 1 addition & 1 deletion crates/eggsec-policy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde_json = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }
ipnetwork = { workspace = true }
sha2 = "0.10"
sha2 = "0.11"
uuid = { workspace = true }
hex = { workspace = true }
rustc-hash = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions crates/eggsec-python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ anyhow = { workspace = true }
rustc-hash = { workspace = true }
uuid = { workspace = true }
md-5 = { workspace = true }
hex = { workspace = true }
reqwest = { version = "0.13", features = ["rustls-no-provider"], default-features = false }
tokio-tungstenite = { version = "0.27", features = ["rustls-tls-native-roots"], optional = true }
futures = { version = "0.3", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/eggsec-python/src/checkpoint_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ fn default_execution_profile() -> String {
pub fn stable_digest(value: &str) -> String {
let mut hasher = Md5::new();
hasher.update(value.as_bytes());
format!("{:x}", hasher.finalize())
hex::encode(hasher.finalize())
}

/// Expected identity values for a pipeline resume.
Expand Down
2 changes: 1 addition & 1 deletion crates/eggsec-python/src/content_addressed_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl ArtifactQuery {
fn compute_md5_hex(data: &[u8]) -> String {
let mut hasher = Md5::new();
hasher.update(data);
format!("{:x}", hasher.finalize())
hex::encode(hasher.finalize())
}

// ---------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions crates/eggsec-python/src/streaming_reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl StreamingReporterPy {
.map(|t| t.elapsed().as_millis() as u64)
.unwrap_or(0);

let content_hash = format!("{:x}", self.hasher.finalize_reset());
let content_hash = hex::encode(self.hasher.finalize_reset());

// Close the file handle explicitly
self.output_file = None;
Expand Down Expand Up @@ -831,5 +831,5 @@ pub fn compute_content_hash(values: &[String]) -> String {
hasher.update(v.as_bytes());
hasher.update(b"\n");
}
format!("{:x}", hasher.finalize())
hex::encode(hasher.finalize())
}
4 changes: 2 additions & 2 deletions crates/eggsec-web-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ flate2.workspace = true
parking_lot = "0.12"

# HMAC/SHA256 for bundle signing
hmac = "0.12"
sha2 = "0.10"
hmac = "0.13"
sha2 = "0.11"

# Hex encoding for signatures and protobuf
hex = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions crates/eggsec-web-proxy/src/intercept/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl EvidenceBundle {
/// * `key` - HMAC signing key (bytes)
/// * `key_id` - Optional key identifier for tracking
pub fn sign(&mut self, key: &[u8], key_id: Option<&str>) -> Result<()> {
use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use sha2::Sha256;

type HmacSha256 = Hmac<Sha256>;
Expand All @@ -203,7 +203,7 @@ impl EvidenceBundle {
/// Returns `Ok(true)` if the signature is valid, `Ok(false)` if invalid,
/// or `Err` if the bundle is unsigned or verification fails.
pub fn verify(&self, key: &[u8]) -> Result<bool> {
use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use sha2::Sha256;

type HmacSha256 = Hmac<Sha256>;
Expand Down
4 changes: 2 additions & 2 deletions crates/eggsec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ quick-xml = { version = "0.42", features = ["serialize"] }
ipnetwork.workspace = true
hickory-resolver.workspace = true
hostname.workspace = true
sha2 = "0.10"
sha2 = "0.11"
md-5.workspace = true
hmac = "0.12"
hmac = "0.13"
hex.workspace = true
rustc-hash = { workspace = true }
subtle = "2"
Expand Down
2 changes: 1 addition & 1 deletion crates/eggsec/src/agent/alerts/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::time::{Duration, Instant};

use anyhow::{Context, Result};
use chrono::Utc;
use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use sha2::Sha256;

use crate::agent::channels::{
Expand Down
2 changes: 1 addition & 1 deletion crates/eggsec/src/fuzzer/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl ResponseDiffer {

let mut hasher = Sha256::new();
hasher.update(body);
let body_hash = format!("{:x}", hasher.finalize());
let body_hash = hex::encode(hasher.finalize());

let mut header_snaps = Vec::new();
let mut etag = None;
Expand Down
4 changes: 2 additions & 2 deletions crates/eggsec/src/notify/webhook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serde::{Deserialize, Serialize};
use crate::config::{WebhookConfig, WebhookEvent};
use crate::utils::create_http_client;
use anyhow::Result;
use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use rustc_hash::FxHashMap;
use sha2::Sha256;

Expand Down Expand Up @@ -632,7 +632,7 @@ mod tests {

#[test]
fn test_hmac_signature_generation() {
use hmac::{Hmac, Mac};
use hmac::{Hmac, KeyInit, Mac};
use sha2::Sha256;

let secret = SensitiveString::new("test-secret-key");
Expand Down
Loading