mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-20 23:31:31 +02:00
- Implemented TargetEnrichmentStage for enriching targets with DNS, WHOIS, and BGP context. - Added VhostStage for virtual host discovery using host-header fuzzing. - Introduced WafDetectStage for fingerprinting web application firewalls. - Created configuration files for each new stage with relevant parameters. - Updated Dockerfile to copy stages instead of engines. - Enhanced existing tools and services for better integration with new stages. - Refactored task management in Celery to accommodate new stages and improve error handling.
52 lines
1.4 KiB
Python
52 lines
1.4 KiB
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class BaseAppSettings(BaseSettings):
|
|
APP_NAME: str = "reNgine"
|
|
DEBUG: bool = False
|
|
APP_VERSION: str = "3.0.0"
|
|
|
|
LOG_LEVEL: str = "INFO"
|
|
|
|
POSTGRES_HOST: str = "db"
|
|
POSTGRES_PORT: int = 5432
|
|
POSTGRES_USER: str = "rengine"
|
|
POSTGRES_PASSWORD: str = "rengine" # noqa: S105
|
|
POSTGRES_DB: str = "rengine"
|
|
|
|
@property
|
|
def database_url_async(self) -> str:
|
|
return (
|
|
f"postgresql+asyncpg://{self.POSTGRES_USER}:{self.POSTGRES_PASSWORD}"
|
|
f"@{self.POSTGRES_HOST}:{self.POSTGRES_PORT}/{self.POSTGRES_DB}"
|
|
)
|
|
|
|
@property
|
|
def database_url_sync(self) -> str:
|
|
return (
|
|
f"postgresql://{self.POSTGRES_USER}:{self.POSTGRES_PASSWORD}"
|
|
f"@{self.POSTGRES_HOST}:{self.POSTGRES_PORT}/{self.POSTGRES_DB}"
|
|
)
|
|
|
|
REDIS_HOST: str = "redis"
|
|
REDIS_PORT: int = 6379
|
|
REDIS_DB: int = 0
|
|
|
|
@property
|
|
def redis_url(self) -> str:
|
|
return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_DB}"
|
|
|
|
@property
|
|
def celery_broker_url(self) -> str:
|
|
return self.redis_url
|
|
|
|
@property
|
|
def celery_result_backend(self) -> str:
|
|
# the scan canvas chains groups, which celery runs as chords — those need a backend
|
|
return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_DB + 1}"
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
case_sensitive = True
|
|
extra = "ignore"
|