What is this? This project demonstrates practical Python and SQL skills for security professionals. It uses 3 example spreadsheets that simulate real daily routines of security professionals (incidents, vulnerabilities, phishing campaigns) and then uses Python and SQL to create an executive dashboard.
Why it matters: Shows how to automate security reporting by combining Python's data processing with SQL's querying power - replacing manual Excel work with reproducible code.
# Download the project files
git clone https://github.com/ThiagoMaria-SecurityIT/security-dashboard-Python-SQL.git
cd security-dashboard# Create virtual environment (keeps packages organized)
python -m venv venv
# Activate it:
# Windows: venv\Scripts\activate
# Mac/Linux: source venv/bin/activateInstall: pip install -r requirements.txt
or
pip install pandas matplotlib seaborn openpyxl# Make sure these 3 files are in the folder:
# 1. incident_trend_dashboard.csv
# 2. vulnerability_hotspots.csv
# 3. phishing_campaign_roi.csv
python security_dashboard_loader.pyData Files (Simulated Real Security Data):
incident_trend_dashboard.csv- 50 security incidents from a port companyvulnerability_hotspots.csv- Vulnerability scan resultsphishing_campaign_roi.csv- Phishing test campaigns and results
Code File:
security_dashboard_loader.py- Main script that does everything
After running the script, you'll get:
security_dashboard_latest.png- Professional 7-chart dashboarddashboard_query_results.xlsx- All the data in Excelsecurity_analysis.db- SQLite database for your own queries
Dashboard shows:
- Incident response times (MTTR) over months
- Most common attack types (pie chart)
- Departments with most vulnerabilities (bar chart)
- Phishing click rate trends
- Vulnerability aging heatmap
- Executive summary with recommendations
The project demonstrates this workflow:
CSV Files → Python loads → SQL Database → SQL Queries → Python Charts
Simple example from the code:
# Python loads CSV
import pandas as pd
data = pd.read_csv('incidents.csv')
# Python sends to SQL database
data.to_sql('incidents', database_connection)
# SQL queries the data, Python makes charts
results = pd.read_sql_query("""
SELECT month, COUNT(*) as incidents
FROM incidents
GROUP BY month
""", database_connection)
results.plot(kind='bar') # Python visualizationFor Security Professionals:
- Automate your monthly security reports
- Show trends to management with clear visuals
- Track if security improvements are working
For Python/SQL Learners:
- See how SQL queries filter data before visualization
- Learn pandas for data processing
- Create professional charts with matplotlib
- Build a complete project from data to dashboard
Want to try with real security data?
- Export your incident/vulnerability/phishing data to CSV
- Replace the 3 example CSV files (keep similar column names)
- Run the same script - it works with your data!
| Problem | Fix |
|---|---|
| "Module not found" | Run pip install pandas matplotlib seaborn openpyxl |
| CSV files missing | Download all 3 CSV files to same folder |
| Dashboard looks wrong | Make sure all 3 CSV files are in correct format |
This project was developed through an AI-human collaborative process using DeepSeek as a coding assistant. The workflow illustrates how modern security professionals can leverage AI tools effectively:
Development Approach:
- Human Direction: Security domain expertise, project requirements, and strategic oversight
- AI Assistance: Code generation, syntax suggestions, and implementation details
- Collaborative Review: Iterative refinement with human validation at each stage
Transparency Points:
- The core concept, security metrics, and dashboard requirements were human-defined
- AI assisted with Python/SQL implementation, code optimization, and error handling
- All generated code was reviewed, tested, and validated for security best practices
- The final solution represents a synthesis of human expertise and AI productivity tools
Why This Matters: This project serves as a case study in responsible AI-assisted development - demonstrating how security professionals can maintain oversight while benefiting from AI coding assistance.
MIT License - free to use, modify, and share.
This project shows real-world Python+SQL skills - for my Python and SQL portfolio, data analysis, and automating security reports!
Thiago Maria - From Brazil to the World 🌎
Senior Information Security Professional | Security Risk & Compliance Specialist | AI Security Researcher | Software Developer | Post-Quantum Cryptography Enthusiast
My passion for programming and my professional background in security analysis led me to create this GitHub account to share my knowledge of security information, cybersecurity, Python, and AI development practices. My work primarily focuses on prioritizing security in organizations while ensuring usability and productivity.
Core Philosophy: I believe in transparent AI collaboration - using artificial intelligence as a tool to enhance human expertise, not replace it. This project exemplifies how security professionals can maintain full oversight while leveraging AI for technical implementation.
Let's Connect:
👇🏽 Click on the badges below: