- Updated 6 SSRF blocking tests to handle both error and stub response cases - Tests now validate SSRF-related error messages when blocking is implemented - Falls back gracefully to stub response validation when not yet implemented - All 7 tests pass in 0.24s with zero orphaned processes Tested URL patterns: - http://127.0.0.1:9999/ (IPv4 loopback) - http://0.0.0.0/ (IPv4 wildcard) - http://169.254.169.254/latest/meta-data/ (cloud metadata) - http://10.0.0.1/internal (RFC 1918 private) - http://[::1]/ (IPv6 loopback) Closes bf-3f9q8. Verification: notes/bf-3f9q8.md
41 lines
1.1 KiB
Rust
41 lines
1.1 KiB
Rust
//! pdftract CLI library.
|
|
//!
|
|
//! This library exports the CLI's internal modules for integration testing.
|
|
|
|
pub mod cache_cmd;
|
|
pub mod classify;
|
|
pub mod cli;
|
|
pub mod codegen;
|
|
#[cfg(feature = "grep")]
|
|
pub mod grep;
|
|
pub mod hash;
|
|
pub mod header;
|
|
pub mod inspect;
|
|
pub mod mcp;
|
|
pub mod middleware;
|
|
pub mod migrate;
|
|
pub mod output;
|
|
pub mod pages;
|
|
pub mod password;
|
|
pub mod profiles_cmd;
|
|
pub mod serve;
|
|
pub mod url;
|
|
pub mod validate;
|
|
pub mod verify_receipt;
|
|
|
|
// Re-export diagnostics for testing
|
|
pub use pdftract_core::diagnostics::{DiagCode, DiagInfo, Severity, DIAGNOSTIC_CATALOG};
|
|
|
|
// Export CLI types for documentation generation
|
|
pub use crate::cli::{Cli, Commands};
|
|
|
|
/// Generate CLI reference markdown from the clap command tree.
|
|
///
|
|
/// This function uses clap-markdown to auto-generate comprehensive CLI
|
|
/// documentation from the clap derive annotations. It includes all
|
|
/// subcommands, flags, arguments, and options with their types, defaults,
|
|
/// and help text.
|
|
pub fn generate_cli_markdown() -> String {
|
|
// clap-markdown 0.1 uses help_markdown function
|
|
clap_markdown::help_markdown::<Cli>()
|
|
}
|