Skip to content

feat: add job monitoring, auth security, payload encryption, and virus scanning - #597

Merged
ritaifeoluwa merged 4 commits into
SmartDropLabs:mainfrom
gotethry:fix-monitoring-auth-encryption-scanning
Oct 19, 2026
Merged

ritaifeoluwa merged 4 commits into
SmartDropLabs:mainfrom
gotethry:fix-monitoring-auth-encryption-scanning

Conversation

@gotethry

Copy link
Copy Markdown
Contributor

What

Comprehensive security and observability improvements for SmartDrop backend: background job monitoring, brute force protection, webhook payload encryption, and file upload virus scanning.

Issues Resolved

Closes #575
Closes #573
Closes #572
Closes #574

Changes

#575 - [performance] No background job monitoring

Added centralized health monitoring for background jobs via /health/jobs endpoint. Jobs register their health status (price_refresh, webhook_retry, airdrop_expiry) enabling operators to detect stalled jobs and failures.

#573 - [security] No brute force protection

Integrated account lockout mechanism into login flow. Failed attempts are tracked and accounts are locked after threshold, preventing credential stuffing attacks while maintaining constant-time response.

#572 - [enhancement] Add webhook payload encryption

Implemented AES-256-GCM encryption for webhook payloads using keys derived from webhook secrets. Receivers can decrypt using the same secret, preventing payload interception.

#574 - [bug] File upload not virus-scanned

Added virus scanning service with pluggable backend support (ClamAV, log-only). Uploaded files are scanned before acceptance and infected files are rejected with audit logging.

Adds centralized health monitoring for background jobs via /health/jobs endpoint.
- Registers price refresh, webhook retry, and airdrop expiry jobs
- Provides job health status with stalled/error detection
- Enables operators to monitor job health independently

Resolves SmartDropLabs#575
Integrates account lockout mechanism into login flow to prevent brute force attacks.
- Checks lockout status before password verification
- Records failed attempts and locks account after threshold
- Resets failed attempts counter on successful login
- Prevents credential stuffing via exponential backoff

Resolves SmartDropLabs#573
Encrypts webhook payloads using AES-256-GCM derived from webhook secret.
- Prevents payload interception and man-in-the-middle attacks
- Receiver can decrypt using same webhook secret
- Adds X-Webhook-Encrypted header to indicate encrypted payload
- Graceful fallback if encryption fails

Resolves SmartDropLabs#572
Adds virus scanning service with pluggable backend support.
- Scans uploaded files before acceptance
- Supports ClamAV and log-only backends
- Rejects infected files with detailed error response
- Logs all scan operations for audit trail

Resolves SmartDropLabs#574
@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@gotethry Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ritaifeoluwa
ritaifeoluwa merged commit 2065270 into SmartDropLabs:main Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants