Skip to content

V2.1.1#304

Merged
arumes31 merged 4 commits into
mainfrom
v2.1.1
Jul 7, 2026
Merged

V2.1.1#304
arumes31 merged 4 commits into
mainfrom
v2.1.1

Conversation

@arumes31

@arumes31 arumes31 commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added history filters for status and source IP, with pagination and live updates preserving filter state.
    • Expanded dashboard stats to show DLQ and No Action counts.
    • Added clearer payload-too-large handling for web requests.
  • Bug Fixes

    • Improved stats accuracy by separating failed, DLQ, and non-action records.
    • Strengthened webhook ingestion protections for invalid tokens, bad signatures, blocked IPs, and oversized requests.
    • Added safer session and task time-limit handling to reduce stuck jobs.
  • Documentation

    • Expanded the operational runbook with service health, incident handling, and audit guidance.

@arumes31
arumes31 merged commit 42640e1 into main Jul 7, 2026
4 of 5 checks passed
@arumes31
arumes31 deleted the v2.1.1 branch July 7, 2026 07:32
@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d82d2b3b-ebd6-4133-a0e5-3c639eb199f4

📥 Commits

Reviewing files that changed from the base of the PR and between 3da90d2 and 19aea7c.

📒 Files selected for processing (13)
  • .github/workflows/ci.yml
  • .gitignore
  • docs/RUNBOOK.md
  • hookwise/__init__.py
  • hookwise/api.py
  • hookwise/auth.py
  • hookwise/models.py
  • hookwise/tasks.py
  • migrations/versions/c4e5f6a7b8c9_add_history_filter_indexes.py
  • templates/history.html
  • templates/index.html
  • tests/test_stats_and_history_filters.py
  • tests/test_webhook_ingestion_guards.py

📝 Walkthrough

Walkthrough

This PR adds status/source_ip filtering to the history view and splits DLQ/non-action metrics from failed stats, backed by new database indexes and a migration. It also hardens session cookies and request size limits with a 413 handler, adds Celery task timeout guards, audit logs failed logins, adds CI vulnerability/migration-drift checks, and adds a runbook plus tests.

Changes

History and stats filtering

Layer / File(s) Summary
WebhookLog indexing
hookwise/models.py, migrations/versions/c4e5f6a7b8c9_add_history_filter_indexes.py
Adds an indexed source_ip column and a composite config_id/status/created_at index, with a migration to create/drop them.
/history and /api/stats logic
hookwise/api.py
/history accepts and applies status/source_ip filters; /api/stats separates dlq_today and non_action_today from failed_today and returns them.
History filter UI and dashboard cards
templates/history.html, templates/index.html
Adds filter controls, filter-aware pagination, live-tail suppression when filtered, and new DLQ/No Action stat cards updated via refreshStats().
Regression tests
tests/test_stats_and_history_filters.py
Seeds data and verifies stats split and history filter behaviors.

Security hardening, ops guards, and CI checks

Layer / File(s) Summary
Session/payload hardening
hookwise/__init__.py
Sets HTTPOnly/SameSite/Secure session cookies, MAX_CONTENT_LENGTH, and a 413 error handler.
Celery task timeouts
hookwise/tasks.py
Applies soft/hard task time limits from environment with clamping and warnings.
Failed login audit logging
hookwise/auth.py
Logs login_2fa_failed and login_failed audit events.
Webhook ingestion guard tests
tests/test_webhook_ingestion_guards.py
Verifies bearer/HMAC/IP-allowlist/payload-size guard behaviors.
CI checks and runbook
.github/workflows/ci.yml, docs/RUNBOOK.md, .gitignore
Adds non-blocking dependency audit and migration-drift CI steps, an operational runbook, and ignore rules.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant HistoryPage as history.html
  participant HistoryAPI as /history
  participant WebhookLogDB as WebhookLog

  Browser->>HistoryPage: select status/source-ip filter
  HistoryPage->>HistoryAPI: GET /history?status=...&source_ip=...
  HistoryAPI->>WebhookLogDB: query filtered by status/source_ip
  WebhookLogDB-->>HistoryAPI: matching rows
  HistoryAPI-->>HistoryPage: rendered filtered results
Loading

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v2.1.1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant