import streamlit as st import html from cybersecurity_pipeline import run_security_pipeline st.set_page_config(page_title="AgenticCyberOps", layout="wide") # Inject custom CSS for styling (make sure this string is not indented unexpectedly) st.markdown( """ """, unsafe_allow_html=True) st.markdown('
🔍 Cybersecurity Agent Dashboard
', unsafe_allow_html=True) st.sidebar.header("Agent Configuration") st.sidebar.markdown( """ **Allowed Scope:** The agent will only scan targets within its allowed scope. Currently, the allowed scope is set to (Universal links or any link): - **example.com** - **192.168.1.0/24** - **scanme.nmap.org**, etc... """ ) target = st.sidebar.text_input("Enter Target (e.g., example.com):", value="example.com") if st.sidebar.button("Run Security Scan"): with st.spinner("Running security scan..."): task_description = f"Scan {target} for open ports and directories" final_state = run_security_pipeline(task_description) final_report = final_state.get("final_report", "No report generated.") logs = final_state.get("logs", []) st.success("Security scan complete!") st.markdown('Final Security Audit Report
', unsafe_allow_html=True) # Escape HTML to display it as plain text escaped_report = html.escape(final_report) st.markdown(f'{escaped_report}Detailed Execution Logs
', unsafe_allow_html=True) st.text_area("Logs", "\n".join(logs), height=300)