Stage 6 of 6

Capstone Project

Stage 06 — Capstone Project: SecureSIEM (Security Log Analyzer)

Welcome to the capstone. In this stage you will apply everything you learned in Stages 01–05 to build a complete, portfolio-worthy cybersecurity tool: SecureSIEM.

SecureSIEM is a command-line tool that:


Learning Outcomes

By the end of Stage 06, you will be able to:


Project Structure

This stage uses a clean, testable module layout:

stage_06/
├── src/
│   ├── __init__.py
│   ├── main.py           # Entry point, coordinates modules
│   ├── cli.py            # Command-line interface
│   ├── log_parser.py     # Log file parsing
│   ├── detection.py      # Threat detection rules
│   ├── enrichment.py     # IP geolocation API
│   ├── cache.py          # Response caching
│   ├── reports.py        # Report generation
│   └── models.py         # Data classes (LogEntry, Finding, AnalysisReport)
├── tests/
│   ├── __init__.py
│   ├── test_parser.py
│   ├── test_detection.py
│   ├── test_enrichment.py
│   ├── test_cache.py
│   └── test_reports.py
├── data/
│   ├── sample_apache.log
│   ├── sample_ssh.log
│   └── sample_auth.log
├── .github/workflows/ci.yml
├── pyproject.toml
├── README.md
└── .gitignore

Quickstart

1) Create and activate a virtual environment

Windows (PowerShell):

python -m venv .venv
.\.venv\Scripts\Activate.ps1

macOS / Linux:

python3 -m venv .venv
source .venv/bin/activate

2) Install in editable mode (with dev dependencies)

From inside stage_06/:

pip install -e ".[dev]"

3) Run tests

pytest -v

4) Run SecureSIEM

Show help:

securesiem --help

Analyze a file:

securesiem analyze --input data/sample_apache.log --verbose

Analyze + enrich + export JSON:

securesiem analyze --input data/sample_apache.log --enrich --output report.json

Summary:

securesiem summary --input data/sample_ssh.log

Clear cache:

securesiem cache-clear

How SecureSIEM Works (Data Flow)

  1. CLI validates inputs and reads the target log file
  2. Parser converts log lines into LogEntry objects
  3. Detection rules convert entries into Finding objects
  4. Enrichment optionally adds geolocation context to findings (cached)
  5. Reporting prints results and optionally writes a JSON report

Acceptance Criteria (Minimum Bar)

You should meet these before calling Stage 06 complete:


Common Troubleshooting

ModuleNotFoundError: No module named 'src'

You are likely running from the wrong directory.

Enrichment returns None or missing fields

Windows PowerShell won’t activate the venv

Run PowerShell as Administrator, then:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

Next Extensions (Optional)

If you want to go beyond the baseline capstone:

← Previous Stage 6 of 6 Next →