import streamlit as st import pandas as pd import subprocess # Create the data data = { "Reference": ["Motlagh et al.", "Divakaran et al.", "Yao et al.", "Yigit et al.", "Coelho et al.", "Novelli et al.", "LLM4Security"], "Year": [2024, 2024, 2023, 2024, 2024, 2024, 2024], "Scope": ["Security application", "Security application", "Security application, Security of LLM", "Security application, Security of LLM", "Security application", "Security application", "Security application"], "Dimensions": ["Task", "Task", "Model, Task", "Task", "Task, Domain specific technique", "Task, Model, Domain specific technique", "Model, Task, Domain specific technique, Data"], "Time frame": ["2022-2023", "2020-2024", "2019-2024", "2020-2024", "2021-2023", "2020-2024", "2020-2024"], "Papers": ["Not specified", "Not specified", 281, "Not specified", 19, "Not specified", 127] } # Streamlit UI st.title("🔒 LLMs for Cyber Security: State-of-the-Art Surveys") st.write("This app is based on the paper: [Large Language Models for Cyber Security](https://arxiv.org/pdf/2405.04760v3). It showcases LLMs in the cybersecurity landscape.") # Display the table df = pd.DataFrame(data) st.write(df) # Mermaid graph visualization for LLM in security mermaid_code = ''' graph TD; A[LLMs in Security] --> B[Security Application] B --> C[Task] B --> D[Model] D --> E[Domain-Specific Techniques] E --> F[Data] ''' st.subheader("🛡️ Security Model Visualization with Mermaid") st.markdown(f"```mermaid\n{mermaid_code}\n```") # Scrollable content for additional insights st.markdown("""

Scroll Through for More Insights:

""", unsafe_allow_html=True) # Simulate running a security audit using pip-audit st.subheader("🔍 Run Python Dependency Security Audit") # Define a button for auditing if st.button('Run pip-audit for Security Check'): with st.spinner('Running security audit...'): result = subprocess.run(['pip-audit'], capture_output=True, text=True) st.code(result.stdout) # AI Tips for Reducing Security Risks with Pair Programming st.subheader("🤖 AI Pair Programming: Security Recommendations") st.markdown(""" - **Reduce Code Complexity**: AI can recommend code simplification strategies. - **Minimize Attack Surface**: AI can simulate attacks and highlight vulnerable points. - **Automate Security Scans**: Use tools like `pip-audit` for continuous CVE checks. """) # Add Azure deployment details (not operational in this demo) st.subheader("Azure Deployment Information") st.write(""" - **Azure Container Apps**: Easily deploy and scale your app with Azure Container Apps. - **Azure Container Registry**: Store and manage container images. - **Cosmos DB**: Use Cosmos DB to store security audit results and logs. """)