MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / download_zap_report

Function download_zap_report

webapp_modern.py:17606–17639  ·  view source on GitHub ↗

Download ZAP scan report

()

Source from the content-addressed store, hash-verified

17604 report_text += "------------------\n"
17605 report_text += f"Actor: {attr.get('actor_name', 'Unknown')}\n"
17606 report_text += f"Sophistication: {attr.get('sophistication', 'Unknown')}\n"
17607 report_text += f"Motivation: {attr.get('motivation', 'Unknown')}\n"
17608 report_text += f"Geographic Origin: {attr.get('geographic_origin', 'Unknown')}\n\n"
17609
17610 if report_content.get('recommended_actions'):
17611 report_text += "RECOMMENDED ACTIONS\n"
17612 report_text += "-------------------\n"
17613 for action in report_content['recommended_actions']:
17614 report_text += f"• {action}\n"
17615 report_text += "\n"
17616 else:
17617 report_text += "RECOMMENDED ACTIONS\n"
17618 report_text += "-------------------\n"
17619 report_text += "• Review target for legitimate business purpose\n"
17620 report_text += "• Monitor for unusual activity\n"
17621 report_text += "• Apply standard security controls\n\n"
17622
17623 if report_content.get('exploitation_prediction'):
17624 pred = report_content['exploitation_prediction']
17625 report_text += "EXPLOITATION PREDICTION\n"
17626 report_text += "-----------------------\n"
17627 report_text += f"Likelihood: {pred.get('exploitation_likelihood', 0) * 100:.1f}%\n"
17628 report_text += f"Timeline: {pred.get('predicted_timeline_days', 'Unknown')} days\n"
17629 report_text += f"Confidence: {pred.get('confidence', 0) * 100:.1f}%\n\n"
17630
17631 report_text += f"""REPORT METADATA
17632---------------
17633Generated by: Ragnar Threat Intelligence System
17634Report ID: {hashlib.md5(report_content['target'].encode()).hexdigest()[:12]}
17635Timestamp: {report_content['generated_at']}
17636
17637This report contains threat intelligence analysis based on multiple sources.
17638For questions or additional analysis, contact your security team.
17639"""
17640
17641 return report_text.encode('utf-8')
17642

Callers

nothing calls this directly

Calls 4

generate_zap_reportMethod · 0.80
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected