-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Nitriding key sync support #364
base: main
Are you sure you want to change the base?
Conversation
.instance_names | ||
.iter() | ||
.position(|name| name == instance_name) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
// Get base time for calculating curren epochs | ||
let now = time::OffsetDateTime::now_utc() | ||
.replace_millisecond(0) | ||
.expect("failed to remove millisecond component from OffsetDateTime"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
for epoch in config.first_epoch..current_epoch { | ||
server | ||
.puncture(epoch) | ||
.expect("Failed to puncture obsolete epoch"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
if !self.is_leader.initialized() { | ||
self.is_leader | ||
.set(false) | ||
.expect("failed to set leader status"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
None => { | ||
let new_instance = | ||
OPRFInstance::new(&self.config, &instance_name, false) | ||
.expect("Could not initialize PPOPRF state"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
|
||
instance_guard | ||
.as_mut() | ||
.unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
if !self.is_leader.initialized() { | ||
self.is_leader | ||
.set(true) | ||
.expect("failed to set leader status"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
} | ||
let mut private_keys = OPRFKeysRef::default(); | ||
for (instance_name, instance) in &mut server_guards { | ||
let instance = instance.as_ref().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon @bcaller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
[puLL-Merge] - brave/star-randsrv@364 DescriptionThis PR introduces significant changes to the STAR randomness webservice, primarily focusing on enabling key synchronization between leader and worker enclaves. The changes include modifications to the server structure, handling of PPOPRF instances, and the addition of new endpoints for key management. The PR also updates dependencies and improves error handling. Possible Issues
Security Hotspots
ChangesChanges
These changes significantly alter the structure and behavior of the application, particularly in how it manages PPOPRF instances and synchronizes keys between leader and worker enclaves. The new functionality requires careful review to ensure it maintains the security and correctness guarantees of the original implementation. |
.instance_names | ||
.iter() | ||
.position(|name| name == instance_name) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
// Get base time for calculating curren epochs | ||
let now = time::OffsetDateTime::now_utc() | ||
.replace_millisecond(0) | ||
.expect("failed to remove millisecond component from OffsetDateTime"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
for epoch in config.first_epoch..current_epoch { | ||
server | ||
.puncture(epoch) | ||
.expect("Failed to puncture obsolete epoch"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
if !self.is_leader.initialized() { | ||
self.is_leader | ||
.set(false) | ||
.expect("failed to set leader status"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
None => { | ||
let new_instance = | ||
OPRFInstance::new(&self.config, &instance_name, false) | ||
.expect("Could not initialize PPOPRF state"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
|
||
instance_guard | ||
.as_mut() | ||
.unwrap() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
if !self.is_leader.initialized() { | ||
self.is_leader | ||
.set(true) | ||
.expect("failed to set leader status"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
} | ||
let mut private_keys = OPRFKeysRef::default(); | ||
for (instance_name, instance) in &mut server_guards { | ||
let instance = instance.as_ref().unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
[semgrep] expect
or unwrap
called in function returning a Result
Source: https://semgrep.dev/r/trailofbits.rs.panic-in-function-returning-result.panic-in-function-returning-result
Cc @thypon
No description provided.