e793b51e4fce227ca4b6a807fd65e044f9b2b3d0
webfortilog
Flask-based web application that converts WAF log files into aligned text reports or CSV exports.
Features
- Upload a UTF-8 log file where each line is a single record
- Parse shell-style
key=valueandkey="value with spaces"tokens - Support
vendormode with fixed columns andfullmode with dynamic columns - Filter by policy and severity with case-sensitive or case-insensitive partial matching
- Sort by combined datetime or severity ranking
- Preview results in the browser and download the generated file
- Run locally with Flask or in Docker with Gunicorn
Project structure
app/
services/
templates/
tests/
Dockerfile
pyproject.toml
wsgi.py
Local usage
Requirements
- Python 3.12
Install
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Run
export FLASK_APP=wsgi.py
flask run --debug
Open http://127.0.0.1:5000.
Test
pytest
Docker usage
Build
docker build -t webfortilog .
Run
docker run --rm -p 8000:8000 webfortilog
Open http://127.0.0.1:8000.
Docker Compose usage
Start the web app
docker compose up --build web
Run the test suite in a container
docker compose run --rm test
Notes
- Temporary output files are written to
instance/outputs - The application does not require a database
- Gunicorn is used as the production WSGI server