refactor: modularize codebase and add 404 unit tests (#13)
All checks were successful
CI / Format (push) Successful in 4s
CI / Clippy (push) Successful in 4m19s
CI / Security Audit (push) Successful in 1m44s
CI / Detect Changes (push) Successful in 5s
CI / Tests (push) Successful in 5m15s
CI / Deploy Agent (push) Successful in 2s
CI / Deploy Dashboard (push) Successful in 2s
CI / Deploy Docs (push) Has been skipped
CI / Deploy MCP (push) Successful in 2s
All checks were successful
CI / Format (push) Successful in 4s
CI / Clippy (push) Successful in 4m19s
CI / Security Audit (push) Successful in 1m44s
CI / Detect Changes (push) Successful in 5s
CI / Tests (push) Successful in 5m15s
CI / Deploy Agent (push) Successful in 2s
CI / Deploy Dashboard (push) Successful in 2s
CI / Deploy Docs (push) Has been skipped
CI / Deploy MCP (push) Successful in 2s
This commit was merged in pull request #13.
This commit is contained in:
@@ -33,8 +33,15 @@ pub struct ToolRegistry {
|
||||
tools: HashMap<String, Box<dyn PentestTool>>,
|
||||
}
|
||||
|
||||
impl Default for ToolRegistry {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl ToolRegistry {
|
||||
/// Create a new registry with all built-in tools pre-registered.
|
||||
#[allow(clippy::expect_used)]
|
||||
pub fn new() -> Self {
|
||||
let http = reqwest::Client::builder()
|
||||
.danger_accept_invalid_certs(true)
|
||||
@@ -67,13 +74,10 @@ impl ToolRegistry {
|
||||
);
|
||||
|
||||
// New infrastructure / analysis tools
|
||||
register(&mut tools, Box::<dns_checker::DnsCheckerTool>::default());
|
||||
register(
|
||||
&mut tools,
|
||||
Box::new(dns_checker::DnsCheckerTool::new()),
|
||||
);
|
||||
register(
|
||||
&mut tools,
|
||||
Box::new(dmarc_checker::DmarcCheckerTool::new()),
|
||||
Box::<dmarc_checker::DmarcCheckerTool>::default(),
|
||||
);
|
||||
register(
|
||||
&mut tools,
|
||||
@@ -109,10 +113,7 @@ impl ToolRegistry {
|
||||
&mut tools,
|
||||
Box::new(openapi_parser::OpenApiParserTool::new(http.clone())),
|
||||
);
|
||||
register(
|
||||
&mut tools,
|
||||
Box::new(recon::ReconTool::new(http)),
|
||||
);
|
||||
register(&mut tools, Box::new(recon::ReconTool::new(http)));
|
||||
|
||||
Self { tools }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user