parlov-output 0.5.0

Output formatters for parlov: SARIF, terminal table, and raw JSON.
Documentation
//! Output formatters for parlov: terminal table, structured JSON, and SARIF v2.1.0.
//!
//! Formatters provided:
//! - [`render_table`]: human-readable terminal table via `comfy-table`.
//! - [`render_json`]: structured nested JSON (v1.0.0 schema) for single findings.
//! - [`render_scan_table`]: summary table for multi-strategy scan findings.
//! - [`render_scan_json`]: structured nested JSON (v1.0.0 schema) for scan findings.
//! - [`render_sarif`]: single `OracleResult` as SARIF v2.1.0.
//! - [`render_scan_sarif`]: `ScanFinding` slice as SARIF v2.1.0.

#![deny(clippy::all)]
#![warn(clippy::pedantic)]
#![deny(missing_docs)]

mod json;
mod sarif;
mod table;

pub use json::{render_json, render_scan_json};
pub use sarif::{render_sarif, render_scan_sarif};
pub use table::{render_scan_table, render_table};

use parlov_core::OracleResult;
use serde::{Deserialize, Serialize};

/// A single finding from a scan run -- one strategy applied to one method.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ScanFinding {
    /// Fully-qualified URL of the probed endpoint, e.g. `"https://api.example.com/users/1"`.
    pub target_url: String,
    /// Stable machine-readable strategy identifier, e.g. `"existence-get-200-404"`.
    pub strategy_id: String,
    /// Human-readable strategy display name, e.g. `"GET 200/404 existence"`.
    pub strategy_name: String,
    /// HTTP method used, e.g. `"GET"`.
    pub method: String,
    /// The oracle analysis result for this strategy/method combination.
    pub result: OracleResult,
}