Show webhook outcomes on admin page#318
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR adds webhook event display and filtering to the admin page. The ChangesAdmin Webhook Event Display and Filtering
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
aunysillyme
left a comment
There was a problem hiding this comment.
No blockers from my review of the admin webhook outcomes page.
Evidence checked:
- Inspected
app/main.py; the/adminroute remains behind the existing admin cookie login path, adds boundedwebhook_limitvalidation, normalizes optionalwebhook_status, and queries onlyWebhookEventrows ordered by recent delivery data. - Inspected
app/templates/admin.html; the new admin table renders delivery id, event type, processed status, payload hash, and created timestamp, while avoiding webhook payload bodies, token values, and payout secrets. - Inspected
tests/test_security.py; the regression seeds multiple webhook outcomes, verifies unauthenticated admin access redirects, checks status filtering and limit behavior, asserts oversized limits return 422, and confirms a secret-like delivery string is not rendered from payload content. - Checked live PR metadata: hosted quality check is green, CodeRabbit reports no actionable findings, and the PR is mergeable.
I did not find a blocker. The change is focused on admin-only operational visibility and does not expose private keys, webhook payload bodies, deployment credentials, private vulnerability details, payout credentials, or MRWK price claims.
ayskobtw-lil
left a comment
There was a problem hiding this comment.
No blockers from my review.
Evidence checked:
- Inspected the PR diff for
app/main.py,app/templates/admin.html, andtests/test_security.pyvia GitHub's PR patch to avoid stale local-base noise. - Verified
/adminremains behind the existing admin cookie/OAuth path before any webhook event query is run. - Checked the new query path:
webhook_statusis trimmed/lowercased before filtering,webhook_limitis bounded by FastAPI validation, and events are ordered by recentcreated_at/delivery_idwith onlyWebhookEventsafe summary fields selected for display. - Inspected the template: it renders delivery id, event type, processed status, payload hash, and created timestamp only; it does not expose raw webhook payloads, token values, request bodies, or payout secrets.
- Reviewed the regression: it covers unauthenticated redirect, admin-only rendering, status filtering, limit behavior, safe hash display, and absence of a sentinel payload-body string.
Validation run on current PR head d09e38a:
python -m pytest tests/test_security.py::test_admin_bounty_form_requires_csrf_for_cookie_auth tests/test_security.py::test_admin_page_renders_safe_webhook_events_for_cookie_admin -q->2 passedpython -m ruff check app/main.py tests/test_security.py->All checks passed!python -m ruff format --check app/main.py tests/test_security.py->2 files already formatted
Refs #316
What changed:
/adminpage./admin; the existing admin-token-only API path is unchanged.webhook_statusfiltering and a boundedwebhook_limitselector.Maintainer impact:
Validation:
uv run --with pytest pytest tests/test_security.py::test_admin_bounty_form_requires_csrf_for_cookie_auth tests/test_security.py::test_admin_page_renders_safe_webhook_events_for_cookie_admin tests/test_security.py::test_admin_webhook_events_api_lists_and_filters_processing_outcomes -q-> 3 passed.uv run --with ruff ruff check app/main.py tests/test_security.py-> passed.uv run --with ruff ruff format --check app/main.py tests/test_security.py-> passed.uv run --with mypy mypy app-> success.git diff --check-> clean.No private keys, seed material, secrets, private vulnerability details, deployment credentials, webhook payload bodies, token values, payout details, or MRWK price claims are included.
Summary by CodeRabbit