MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / save_html

Method save_html

modules/ai/reporter.py:319–341  ·  view source on GitHub ↗

Save HTML report to file. Args: scan_results: List of scan results output_path: Output file path config: Report configuration ai_analysis: Optional AI analysis Returns: Path to saved file

(
        self,
        scan_results: list[ScanResult],
        output_path: str,
        config: Optional[ReportConfig] = None,
        ai_analysis: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

317 def save_html(
318 self,
319 scan_results: list[ScanResult],
320 output_path: str,
321 config: ReportConfig | None = None,
322 ai_analysis: str | None = None,
323 ) -> Path:
324 """Save HTML report to file.
325
326 Args:
327 scan_results: List of scan results
328 output_path: Output file path
329 config: Report configuration
330 ai_analysis: Optional AI analysis
331
332 Returns:
333 Path to saved file
334 """
335 html = self.generate_html(scan_results, config, ai_analysis)
336 path = Path(output_path)
337 path.write_text(html)
338 self.logger.info(f"Report saved to {path}")
339 return path
340
341 def generate_json(
342 self,
343 scan_results: list[ScanResult],
344 config: ReportConfig | None = None,

Callers 1

report_htmlFunction · 0.95

Calls 1

generate_htmlMethod · 0.95

Tested by

no test coverage detected