mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-20 23:31:31 +02:00
- Added new definitions for dashboard windows and stale target management. - Expanded domain definitions to include additional public second-level domains. - Created rescan models and logic to handle asset rechecks based on previous scan results. - Implemented new scan scopes (FULL and FOCUSED) to differentiate between complete scans and focused rescans. - Developed asset seed stage to initiate scans from previously identified assets. - Enhanced scan factory and resolution services to support new scanning configurations and seed assets. - Updated existing scan models and services to accommodate new features and ensure compatibility. - Added logging and error handling for focused rescans during scan finalization.
34 lines
720 B
Python
34 lines
720 B
Python
"""Windows and caps for the project dashboard."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import timedelta
|
|
from enum import StrEnum
|
|
|
|
|
|
class DashboardWindow(StrEnum):
|
|
DAY = "24h"
|
|
WEEK = "7d"
|
|
MONTH = "30d"
|
|
|
|
|
|
WINDOW_DELTAS: dict[str, timedelta] = {
|
|
DashboardWindow.DAY.value: timedelta(days=1),
|
|
DashboardWindow.WEEK.value: timedelta(days=7),
|
|
DashboardWindow.MONTH.value: timedelta(days=30),
|
|
}
|
|
DEFAULT_WINDOW = DashboardWindow.WEEK.value
|
|
|
|
STALE_DAYS = 30
|
|
EXPIRING_DAYS = 30
|
|
SERIES_DAYS = 30
|
|
RUNS_PER_TARGET = 25
|
|
QUEUE_LIMIT = 40
|
|
CHANGES_LIMIT = 40
|
|
EXPOSURE_TOP = 8
|
|
DISCOVERY_LIMIT = 40
|
|
ITEMS_CAP = 100
|
|
|
|
EXPIRED_CERT_QUERY = "cert:expired and is:live"
|
|
EXPIRING_CERT_QUERY = "cert:expiring"
|