#[non_exhaustive]pub enum Risk {
Low,
Medium,
High,
Critical,
}Expand description
How dangerous a particular ambient authority call is.
Risk levels are ordered: Low < Medium < High < Critical. The CLI’s --min-risk
and --fail-on flags use this ordering to filter and gate findings.
§Assignment rationale
| Level | Meaning | Examples |
|---|---|---|
Low | Read-only metadata, unlikely to leak secrets | fs::metadata, env::current_dir |
Medium | Can read data or create resources | fs::read, env::var, File::open |
High | Can write, delete, or open network connections | fs::write, TcpStream::connect |
Critical | Can destroy data or execute arbitrary code | remove_dir_all, Command::new |
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Low
Read-only metadata or low-impact queries.
Medium
Can read sensitive data or create resources.
High
Can write data, delete files, or open network connections.
Critical
Can destroy data or execute arbitrary code.
Implementations§
Trait Implementations§
Source§impl Ord for Risk
impl Ord for Risk
Source§impl PartialOrd for Risk
impl PartialOrd for Risk
impl Copy for Risk
impl Eq for Risk
impl StructuralPartialEq for Risk
Auto Trait Implementations§
impl Freeze for Risk
impl RefUnwindSafe for Risk
impl Send for Risk
impl Sync for Risk
impl Unpin for Risk
impl UnsafeUnpin for Risk
impl UnwindSafe for Risk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more