1#![deny(clippy::all)]
4#![warn(clippy::pedantic)]
5#![deny(missing_docs)]
6
7mod context;
8mod json;
9mod json_endpoint;
10mod repro;
11mod sarif;
12mod sarif_builder;
13#[cfg(not(target_arch = "wasm32"))]
14mod table;
15#[cfg(not(target_arch = "wasm32"))]
16mod table_rows;
17pub mod wire;
18
19#[cfg(test)]
20#[path = "repro_output_tests.rs"]
21mod repro_output_tests;
22
23#[cfg(test)]
24#[path = "context_output_tests.rs"]
25mod context_output_tests;
26
27pub use context::{BodySamplesBundle, ExchangeContext, HeadersBundle, ProbeContext};
28pub use json::{render_endpoint_verdict_json, render_json, render_scan_json};
29pub use parlov_elicit::ChainProvenance;
30pub use repro::build_curl;
31pub use sarif::{render_endpoint_verdict_sarif, render_sarif, render_scan_sarif};
32#[cfg(not(target_arch = "wasm32"))]
33pub use table::{render_endpoint_verdict_table, render_scan_table, render_table};
34
35use parlov_core::OracleResult;
36use serde::{Deserialize, Serialize};
37
38#[derive(Debug, Clone, Serialize, Deserialize)]
44#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
45pub struct ReproInfo {
46 pub baseline_curl: String,
48 pub probe_curl: String,
50}
51
52#[derive(Debug, Clone, Serialize, Deserialize)]
54#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))]
55pub struct ScanFinding {
56 pub target_url: String,
58 pub strategy_id: String,
60 pub strategy_name: String,
62 pub method: String,
64 pub result: OracleResult,
66 #[serde(default, skip_serializing_if = "Option::is_none")]
68 pub repro: Option<ReproInfo>,
69 pub probe: ProbeContext,
71 pub exchange: ExchangeContext,
74 #[serde(default, skip_serializing_if = "Option::is_none")]
78 pub chain_provenance: Option<ChainProvenance>,
79}