pub struct SecurityAnalysis {
pub is_read_only: bool,
pub tables_accessed: HashSet<String>,
pub fields_accessed: HashSet<String>,
pub has_aggregation: bool,
pub has_subqueries: bool,
pub estimated_complexity: Complexity,
pub potential_issues: Vec<SecurityIssue>,
pub estimated_rows: Option<u64>,
}Expand description
Security analysis of code.
Fields§
§is_read_only: boolWhether the code is read-only
tables_accessed: HashSet<String>Tables/types accessed
fields_accessed: HashSet<String>Fields accessed
has_aggregation: boolWhether the query has aggregations
has_subqueries: boolWhether the query has subqueries/nested operations
estimated_complexity: ComplexityEstimated complexity
potential_issues: Vec<SecurityIssue>Potential security issues found
estimated_rows: Option<u64>Estimated number of rows
Implementations§
Source§impl SecurityAnalysis
impl SecurityAnalysis
Sourcepub fn assess_risk(&self) -> RiskLevel
pub fn assess_risk(&self) -> RiskLevel
Assess the risk level based on the security analysis.
Trait Implementations§
Source§impl Clone for SecurityAnalysis
impl Clone for SecurityAnalysis
Source§fn clone(&self) -> SecurityAnalysis
fn clone(&self) -> SecurityAnalysis
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 SecurityAnalysis
impl Debug for SecurityAnalysis
Source§impl Default for SecurityAnalysis
impl Default for SecurityAnalysis
Source§fn default() -> SecurityAnalysis
fn default() -> SecurityAnalysis
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SecurityAnalysis
impl RefUnwindSafe for SecurityAnalysis
impl Send for SecurityAnalysis
impl Sync for SecurityAnalysis
impl Unpin for SecurityAnalysis
impl UnsafeUnpin for SecurityAnalysis
impl UnwindSafe for SecurityAnalysis
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