dalfox-rs 0.5.1

Type-safe asynchronous wrapper for the Dalfox XSS scanner (Dalfox ≥3) with JSON findings, stored XSS support, and multi-format result formatting
Documentation
//! # Dalfox-RS
//!
//! A type-safe, asynchronous Rust wrapper for the [Dalfox](https://github.com/hahwul/dalfox)
//! XSS Scanner.
//!
//! This crate orchestrates the Dalfox Go binary, streaming its JSON output directly into
//! heavily typed Rust structs, making XSS scanning inside Rust projects
//! highly composable and panic-free.
//!
//! ## Features
//!
//! - **Dalfox v3 CLI**: scan, file, and pipe modes with typed builder configuration.
//! - **JSON envelope parsing**: batch scans deserialize `findings` from one JSON document.
//! - **Streaming callbacks**: `*_streaming` methods use `--format jsonl` for per-finding lines.
//! - **Stored XSS**: `--sxss` / `--sxss-url` support on `dalfox scan`.
//! - **Multi-format output**: JSON, CSV, Markdown, and plain text.
//! - **Diagnostic capture**: stderr, parse errors, exit codes all preserved.
//!
//! ## Example
//!
//! ```rust,no_run
//! use dalfox_rs::{Dalfox, DalfoxResult};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//!     let runner = Dalfox::builder()
//!         .request_timeout(10)
//!         .scan_deadline(300)
//!         .workers(100)
//!         .build();
//!
//!     let result: DalfoxResult = runner.scan_url("http://example.com?q=test").await?;
//!
//!     for finding in &result.findings {
//!         println!("Found XSS! {}", finding);
//!     }
//!
//!     // Check for parse issues (schema changed?)
//!     if result.has_parse_errors() {
//!         eprintln!("Warning: {} lines failed to parse", result.parse_errors.len());
//!     }
//!
//!     Ok(())
//! }
//! ```
#![warn(missing_docs)]

/// Builder configuration for Dalfox scanning.
pub mod builder;
/// Error variants specific to Dalfox execution.
pub mod error;
/// The core asynchronous executor and scan modes.
pub mod runner;
/// Strictly-typed structs for Dalfox's JSON response, enums, and output formatting.
pub mod types;

pub use builder::DalfoxBuilder;
pub use error::DalfoxError;
pub use runner::DalfoxRunner;
pub use types::{DalfoxFinding, DalfoxResult, EventType, Method, OutputFormat, Severity};

/// Entry point to configure a Dalfox scan.
///
/// # Examples
///
/// ```rust
/// use dalfox_rs::Dalfox;
///
/// let runner = Dalfox::builder()
///     .request_timeout(10)
///     .workers(50)
///     .build();
/// ```
pub struct Dalfox;

impl Dalfox {
    /// Creates a new configuration builder.
    pub fn builder() -> DalfoxBuilder {
        DalfoxBuilder::new()
    }
}