pub enum ArgumentSource {
Literal(String),
Parameter {
name: String,
},
EnvVar {
name: String,
},
Interpolated,
Unknown,
}Expand description
Where a function argument originates — the key taint abstraction.
Detectors don’t need full taint analysis. They just need to know where a function argument came from.
Variants§
Literal(String)
Hardcoded literal string — generally safe.
Parameter
Comes from function parameter — potentially user/LLM-controlled.
EnvVar
Comes from environment variable.
Interpolated
Constructed via string formatting/concatenation — dangerous.
Unknown
Unable to determine statically.
Implementations§
Source§impl ArgumentSource
impl ArgumentSource
Sourcepub fn is_tainted(&self) -> bool
pub fn is_tainted(&self) -> bool
Whether this source is potentially attacker-controlled.
Trait Implementations§
Source§impl Clone for ArgumentSource
impl Clone for ArgumentSource
Source§fn clone(&self) -> ArgumentSource
fn clone(&self) -> ArgumentSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArgumentSource
impl Debug for ArgumentSource
Source§impl<'de> Deserialize<'de> for ArgumentSource
impl<'de> Deserialize<'de> for ArgumentSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ArgumentSource
impl PartialEq for ArgumentSource
Source§impl Serialize for ArgumentSource
impl Serialize for ArgumentSource
impl Eq for ArgumentSource
impl StructuralPartialEq for ArgumentSource
Auto Trait Implementations§
impl Freeze for ArgumentSource
impl RefUnwindSafe for ArgumentSource
impl Send for ArgumentSource
impl Sync for ArgumentSource
impl Unpin for ArgumentSource
impl UnsafeUnpin for ArgumentSource
impl UnwindSafe for ArgumentSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.