Spaces:
Running
Running
# Import required libraries | |
import streamlit as st | |
import pandas as pd | |
def main(): | |
# Application title | |
st.title("Vulnerability Management Dashboard") | |
# File uploader allows user to add their own CSV | |
uploaded_file = st.file_uploader("Upload your vulnerability scan result (CSV format)", type="csv") | |
if uploaded_file is not None: | |
# Use pandas to read the CSV file | |
df = pd.read_csv(uploaded_file) | |
# Display the DataFrame. This could be replaced with a more sophisticated approach. | |
st.dataframe(df) | |
# Example: Display vulnerabilities by severity if your CSV contains a 'Severity' column | |
if 'Severity' in df.columns: | |
st.subheader("Vulnerabilities by Severity") | |
severity_count = df['Severity'].value_counts() | |
st.bar_chart(severity_count) | |
# Add more features like filtering based on columns, detailed analysis, etc. | |
if __name__ == "__main__": | |
main() | |