use crate::error::CoreError; use crate::models::dast::{DastFinding, DastTarget}; /// Context passed to DAST agents containing discovered information #[derive(Debug, Clone, Default)] pub struct DastContext { /// Discovered endpoints from crawling pub endpoints: Vec, /// Technologies detected during recon pub technologies: Vec, /// Existing SAST findings for prioritization pub sast_hints: Vec, } /// An endpoint discovered during crawling #[derive(Debug, Clone)] pub struct DiscoveredEndpoint { pub url: String, pub method: String, pub parameters: Vec, pub content_type: Option, pub requires_auth: bool, } /// A parameter on a discovered endpoint #[derive(Debug, Clone)] pub struct EndpointParameter { pub name: String, /// "query", "body", "header", "path", "cookie" pub location: String, pub param_type: Option, pub example_value: Option, } /// Trait for DAST testing agents (injection, XSS, auth bypass, etc.) #[allow(async_fn_in_trait)] pub trait DastAgent: Send + Sync { /// Agent name (e.g., "sql_injection", "xss", "auth_bypass") fn name(&self) -> &str; /// Run the agent against a target with discovered context async fn run( &self, target: &DastTarget, context: &DastContext, ) -> Result, CoreError>; }