Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
c77c4bf
Merge pull request #35 from kantselovich/RPM-2
Mar 20, 2015
2ccf1e7
Merge branch 'master' into release-next after 0.0.5 release
Mar 23, 2015
c739b7a
Create pyproject.toml and modern project structure (WO-004)
alekhyaakkiraju-droid Aug 7, 2026
add3f19
Implement ConfigManager with pydantic-settings and validation (WO-005)
alekhyaakkiraju-droid Aug 7, 2026
a6d4ed2
Implement structured logging with structlog (WO-006)
alekhyaakkiraju-droid Aug 7, 2026
357709c
Add Prometheus metrics instrumentation module (WO-007)
alekhyaakkiraju-droid Aug 7, 2026
4c39dc8
Remove hardcoded credentials from source code (WO-008)
alekhyaakkiraju-droid Aug 7, 2026
16af00f
Implement syslog IP allowlisting and validation (WO-009)
alekhyaakkiraju-droid Aug 7, 2026
d8fe6f6
Replace PickleType profile columns with JSON (WO-010)
alekhyaakkiraju-droid Aug 7, 2026
7889af9
(WO-011) Migrate core modules to Python 3.12 syntax
alekhyaakkiraju-droid Aug 7, 2026
51c2dd5
(WO-012) Migrate test suite to unittest.mock
alekhyaakkiraju-droid Aug 7, 2026
018d408
(WO-011) Fix SonarCloud security findings in readCSV.py
alekhyaakkiraju-droid Aug 7, 2026
46af51e
Merge wo-011-py312-migration: include SonarCloud security fix
alekhyaakkiraju-droid Aug 7, 2026
6bac360
Merge pull request #13 from alekhyaakkiraju-droid/wo-012-unittest-mock
alekhyaakkiraju-droid Aug 7, 2026
24f302e
(WO-013) Replace Twisted UDP syslog listener with asyncio DatagramPro…
alekhyaakkiraju-droid Aug 7, 2026
3466cfe
(WO-014) Upgrade SQLAlchemy to 2.0 with modern patterns
alekhyaakkiraju-droid Aug 7, 2026
d2c2827
(WO-015) Eliminate global mutable state with dependency injection
alekhyaakkiraju-droid Aug 7, 2026
0ef1dad
(WO-016) Implement repository pattern for data access layer
alekhyaakkiraju-droid Aug 7, 2026
562828d
(WO-017) Rewrite AlertService with async SMTP and circuit breaker
alekhyaakkiraju-droid Aug 7, 2026
663f293
Merge pull request #18 from alekhyaakkiraju-droid/wo-017-alert-service
alekhyaakkiraju-droid Aug 7, 2026
ff7b8da
(WO-018) Fix naming conventions, typos, and enforce PEP 8
alekhyaakkiraju-droid Aug 7, 2026
e9b3d4d
fix(WO-018): remove one-time rename script to resolve Sonar S2083
alekhyaakkiraju-droid Aug 7, 2026
2bf2251
feat(WO-019): add allow-list validation for parsed syslog fields
alekhyaakkiraju-droid Aug 7, 2026
d22224c
fix(WO-019): wire field validation into parse_log_line return path
alekhyaakkiraju-droid Aug 7, 2026
918950e
feat(WO-020): add GitHub Actions CI/CD pipeline
alekhyaakkiraju-droid Aug 7, 2026
953566f
fix(WO-020): pin CI dependencies and use --only-binary for Sonar
alekhyaakkiraju-droid Aug 7, 2026
ea89b1d
Merge pull request #19 from alekhyaakkiraju-droid/wo-018-naming-pep8
alekhyaakkiraju-droid Aug 7, 2026
09c647d
Merge pull request #20 from alekhyaakkiraju-droid/wo-019-input-saniti…
alekhyaakkiraju-droid Aug 7, 2026
1c98f5d
fix(WO-020): resolve CI mypy and Sonar pip install findings
alekhyaakkiraju-droid Aug 7, 2026
f1ad907
Merge pull request #21 from alekhyaakkiraju-droid/wo-020-github-actions
alekhyaakkiraju-droid Aug 7, 2026
c029d9c
[WO-023] Add Dockerfile, docker-compose.yml, and container deployment…
Aug 7, 2026
a584036
[WO-023] User Story: WO-023 - Create Dockerfile for containerized dep…
Aug 7, 2026
6ecd2c7
[WO-024] Add systemd service unit file for bare-metal deployment
Aug 7, 2026
0e6b3be
fix(WO-023): resolve Sonar S8541/S8544 in Dockerfile
alekhyaakkiraju-droid Aug 7, 2026
e5a9fc7
fix(WO-023): drop pip install . to satisfy Sonar S8544
alekhyaakkiraju-droid Aug 7, 2026
4f4cc94
fix(WO-023): add pip hash locking for Sonar S8544
alekhyaakkiraju-droid Aug 7, 2026
a4e364d
Merge pull request #24 from alekhyaakkiraju-droid/forge/hacklog-0e55b…
alekhyaakkiraju-droid Aug 7, 2026
228a9d4
[WO-025] User Story: WO-025 - Implement audit logging for scoring and…
Aug 7, 2026
8479bfc
[WO-026] User Story: WO-026 - Implement data retention and automated …
Aug 7, 2026
3f63eea
[WO-027] User Story: WO-027 - Update README and create contributor do…
Aug 7, 2026
204b522
Merge pull request #25 from alekhyaakkiraju-droid/forge/hacklog-0e55b…
alekhyaakkiraju-droid Aug 7, 2026
4c3a333
[WO-028] Remove legacy files and deprecated Python 2 artifacts
Aug 7, 2026
ed2dfd5
Merge pull request #26 from alekhyaakkiraju-droid/forge/hacklog-0e55b…
alekhyaakkiraju-droid Aug 7, 2026
4e7646f
[WO-d9f64597] End-to-end integration test for full pipeline
alekhyaakkiraju-droid Aug 7, 2026
6fecd4e
Merge pull request #28 from alekhyaakkiraju-droid/wo-029-e2e-integration
alekhyaakkiraju-droid Aug 7, 2026
3396579
[WO-709d97fd] Modernize read_csv.py with parse_csv_datetime validatio…
alekhyaakkiraju-droid Aug 7, 2026
7799202
Merge pull request #29 from alekhyaakkiraju-droid/wo-035-readcsv-mode…
alekhyaakkiraju-droid Aug 7, 2026
d1450a6
[WO-b8802a73] Add logged CSV datetime validation, env-configurable fo…
alekhyaakkiraju-droid Aug 7, 2026
55d2afc
Merge pull request #30 from alekhyaakkiraju-droid/wo-036-csv-datetime…
alekhyaakkiraju-droid Aug 7, 2026
3971d0e
[WO-8b13aec7] Explicit None-skip and running-flag shutdown tests for …
alekhyaakkiraju-droid Aug 7, 2026
1abe1e2
Merge pull request #31 from alekhyaakkiraju-droid/wo-037-graceful-shu…
alekhyaakkiraju-droid Aug 7, 2026
3b90305
[WO-d8baa519] Add shutdown_complete logging, on_shutdown resource hoo…
alekhyaakkiraju-droid Aug 8, 2026
241b95d
Merge pull request #32 from alekhyaakkiraju-droid/wo-038-shutdown-cle…
alekhyaakkiraju-droid Aug 8, 2026
491f842
Add standardized dev run/stop scripts and Makefile (WO-039)
alekhyaakkiraju-droid Aug 8, 2026
ff83ba2
Merge pull request #33 from alekhyaakkiraju-droid/wo-039-dev-scripts
alekhyaakkiraju-droid Aug 8, 2026
e6dcac9
Fix scoring subscore cap normalization and add WO-040 tests (WO-040)
alekhyaakkiraju-droid Aug 8, 2026
abcc577
Merge pull request #34 from alekhyaakkiraju-droid/wo-040-scoring-norm…
alekhyaakkiraju-droid Aug 8, 2026
badcd98
Refactor parse_log_line to use SyslogMsg host/data (WO-041)
alekhyaakkiraju-droid Aug 8, 2026
1f5ce8c
Merge pull request #35 from alekhyaakkiraju-droid/wo-041-parse-syslog…
alekhyaakkiraju-droid Aug 8, 2026
06b92b9
Document legacy run/stop script removal and add WO-042 tests (WO-042)
alekhyaakkiraju-droid Aug 8, 2026
fa56792
Merge pull request #36 from alekhyaakkiraju-droid/wo-042-legacy-scrip…
alekhyaakkiraju-droid Aug 8, 2026
9586d45
Add WO-043 SyslogMsg parser contract verification (WO-043)
alekhyaakkiraju-droid Aug 8, 2026
209cf1b
Merge pull request #37 from alekhyaakkiraju-droid/wo-043-parse-syslog…
alekhyaakkiraju-droid Aug 8, 2026
b0a02ed
Consolidate profile entities into unified Profile model (WO-044)
alekhyaakkiraju-droid Aug 8, 2026
32fb94b
Merge pull request #38 from alekhyaakkiraju-droid/wo-044-unified-profile
alekhyaakkiraju-droid Aug 8, 2026
ad9e4c1
Fix CI workflow syntax and restore green build on master.
alekhyaakkiraju-droid Aug 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Version control
.git
.gitignore

# Python bytecode
__pycache__/
*.py[cod]
*.pyo
*.pyd
*.so

# Build artefacts
*.egg-info/
*.egg
dist/
build/
wheels/
sdist/

# Virtual environments
.venv/
venv/
env/
ENV/

# Test infrastructure (not needed in the image)
tests/
.pytest_cache/
.coverage
.tox/
nosetests.xml

# Type-checking caches
.mypy_cache/
.ruff_cache/

# IDE / editor artefacts
.idea/
.vscode/
*.swp
*.swo

# Secrets (never bake into the image)
.env
.env.local
*.pem
*.key

# CI/CD configuration
.github/
.travis.yml

# Legacy packaging that is not needed for Docker builds
hacklog.spec
scripts/

# Documentation and data samples (reduce image context size)
doc/
data/

# Database files
*.db
*.sqlite
*.sqlite3
hacklog/hacklog.db

# Miscellaneous
*.log
*.pid
CHANGES
42 changes: 42 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Hacklog environment configuration
# Copy to .env and fill in required secrets before starting the application.

# --- Required SMTP secrets ---
HACKLOG_SMTP_USER=<your-smtp-username>
HACKLOG_SMTP_PASSWORD=<your-smtp-password>
HACKLOG_SMTP_SENDER=<your-smtp-sender@example.com>
HACKLOG_SMTP_HOST=smtp.gmail.com
HACKLOG_SMTP_PORT=587
HACKLOG_ALERT_RECIPIENT=<your-alert-recipient@example.com>
# HACKLOG_ALLOWED_CIDRS=10.0.0.0/8,192.168.0.0/16

# --- Optional metrics overrides ---
# HACKLOG_METRICS_ENABLED=false
# HACKLOG_METRICS_PORT=9090

# --- Optional syslog listener overrides ---
# HACKLOG_SYSLOG_BIND_ADDRESS=127.0.0.1
# HACKLOG_SYSLOG_PORT=10514
# HACKLOG_SYSLOG_MAX_MESSAGE_SIZE=8192
# HACKLOG_SYSLOG_RATE_LIMIT_PER_SOURCE=100

# --- Optional database overrides ---
# HACKLOG_DATABASE_DB_URL=sqlite:///hacklog.db
# HACKLOG_DATABASE_POOL_SIZE=5

# --- Optional security overrides ---
# HACKLOG_SECURITY_ALLOWED_SOURCE_CIDRS=10.0.0.0/8,192.168.0.0/16

# --- Optional scoring overrides (defaults match legacy algorithm.py constants) ---
# HACKLOG_SCORING_HOURS_WEIGHT=10
# HACKLOG_SCORING_DAYS_WEIGHT=10
# HACKLOG_SCORING_SERVER_WEIGHT=15
# HACKLOG_SCORING_SUCCESS_WEIGHT=35
# HACKLOG_SCORING_VPN_WEIGHT=0
# HACKLOG_SCORING_INTERNAL_WEIGHT=10
# HACKLOG_SCORING_EXTERNAL_WEIGHT=15
# HACKLOG_SCORING_IP_WEIGHT=15
# HACKLOG_SCORING_CRITICAL_THRESHOLD=50
# HACKLOG_SCORING_SCARY_THRESHOLD=30
# HACKLOG_SCORING_SCARE_COUNT_LIMIT=2
# HACKLOG_SCORING_SCARE_DATE_EXPIRE_DAYS=1
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches: [main, master, release-next]
pull_request:
branches: [main, master, release-next]

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
quality:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: "pip install --only-binary=:all: -r requirements-ci.txt"

- name: Ruff
run: ruff check hacklog/ tests/

- name: Black
run: black --check hacklog/ tests/

- name: isort
run: isort --check hacklog/ tests/

- name: Mypy (typed modules)
run: >-
mypy hacklog/validators.py hacklog/security.py hacklog/metrics.py
--disallow-untyped-defs --ignore-missing-imports --follow-imports=skip
--disable-error-code=no-redef --disable-error-code=no-any-return

- name: Bandit
run: bandit -ll -ii -r hacklog/

- name: Pytest
env:
PYTHONPATH: ${{ github.workspace }}:${{ github.workspace }}/hacklog
run: pytest tests/ --cov=hacklog --cov-report=xml
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,15 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject
.forge-commit-ready
.forge/project-id
.forge/hook-version
.cursor/hooks.json
.cursor/hooks/
.cursor/rules/forge-workflow.mdc
.claude/
CLAUDE.md

# Local dev server artifacts
.hacklog-dev.pid
var/log/
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

Loading