Commit Graph

8 Commits

Author SHA1 Message Date
Lorenzo Venerandi
e1c1b4d953 chore: update Dockerfile and requirements for Python 3.13, enhance error handling in config and tracker modules 2026-03-01 21:52:27 +01:00
Lorenzo Venerandi
5d38ea45a8 starting full refactor with FastAPI routes + HTMX and AlpineJS on client side 2026-02-17 13:09:01 +01:00
Phillip Tarrant
72a213387e fixing requirements file to versioned pull for request 2026-01-10 15:17:16 -06:00
Phillip Tarrant
0e0639ba8b adding requests to requirements 2026-01-10 15:14:17 -06:00
Patrick Di Fazio
5d25fb9d6b added requests 2026-01-10 21:37:16 +01:00
Phillip Tarrant
7d9f0616b7 Add background task to export suspicious IPs to text file
- Implement export-malicious-ips task that queries distinct IPs flagged
    as is_suspicious from database and writes to exports/malicious_ips.txt
  - Add exports volume mount to docker-compose.yaml for host persistence
  - Update entrypoint.sh to fix ownership of exports directory for krawl user
  - Update Dockerfile to create /app/exports directory during build

Other tasks can be added by creating them in the tasks dir using the same setup as this task.
All tasks *MUST* include a TASK_CONFIG dict and a main method in the file to work correctly.
2026-01-05 11:54:02 -06:00
Phillip Tarrant
7bd9d5055c fixing merge issues with main 2026-01-03 14:40:31 -06:00
Phillip Tarrant
f1c142c53d feat: add SQLite persistent storage for request logging
- Add SQLAlchemy-based database layer for persistent storage
  - Create models for access_logs, credential_attempts, attack_detections, ip_stats
  - Include fields for future GeoIP and reputation enrichment
  - Implement sanitization utilities to protect against malicious payloads
  - Fix XSS vulnerability in dashboard template (HTML escape all user data)
  - Add DATABASE_PATH and DATABASE_RETENTION_DAYS config options
  - Dual storage: in-memory for dashboard performance + SQLite for persistence

  New files:
  - src/models.py - SQLAlchemy ORM models
  - src/database.py - DatabaseManager singleton
  - src/sanitizer.py - Input sanitization and HTML escaping
  - requirements.txt - SQLAlchemy dependency

  Security protections:
  - Parameterized queries via SQLAlchemy ORM
  - Field length limits to prevent storage exhaustion
  - Null byte and control character stripping
  - HTML escaping on dashboard output
2025-12-28 10:43:32 -06:00