Files
rengine/api/app/config.py
T
Yogesh OjhaandClaude Fable 5.1 ca32cc62f3 feat(connectors): browsing lands in the endpoints inventory
Proxy observations are written as endpoint rows with source proxy into the
target's covering scan; a target without a census scan gets a Browsing run,
and finalize replays recorded shapes into a new census scan. "Seen by a
scan" is host plus path shape (new endpoints.shape column, backfilled),
with parameter differences reported as their own notice and unseen claimed
only when a settled scan covers the target.

Removed the scan trigger, sessions and coverage surfaces. The jar is served
from binaries/, the setup dialog derives the endpoint from the browser
origin, scans dispatch one run per target with the chosen scan context, and
manual findings mask credential headers. Endpoints page gains Browsed and
Not browsed filters; the Burp tab gains a host line, a notices table with
Open in reNgine, and a report dialog with notes and a result.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PMmqqNaMMjCJWzGG49Xc1i
2026-09-12 16:39:23 +05:30

60 lines
1.6 KiB
Python

from functools import lru_cache
from pydantic import field_validator
from shared.config import BaseAppSettings
class Settings(BaseAppSettings):
API_V1_PREFIX: str = "/api/v1"
CORS_ORIGINS: list[str] = ["http://localhost:5173"] # noqa: RUF012
SECRET_KEY: str = "change-me-in-production-use-openssl-rand-hex-32" # noqa: S105
ALGORITHM: str = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
REFRESH_TOKEN_EXPIRE_DAYS: int = 7
GLOBAL_RATE_LIMIT_PER_MINUTE: int = 600
TRUSTED_PROXIES: str = ""
CLIENTS_DIR: str = "/app/binaries"
ADMIN_EMAIL: str = "admin@rengine.local"
ADMIN_USERNAME: str = "rengine"
ADMIN_PASSWORD: str = "rengine@123" # noqa: S105
@property
def database_url(self) -> str:
return self.database_url_async
@field_validator("SECRET_KEY")
@classmethod
def validate_secret_key(cls, v: str, info) -> str:
if (
not info.data.get("DEBUG", False)
and v == "change-me-in-production-use-openssl-rand-hex-32"
):
msg = (
"SECRET_KEY must be set in production. "
"Generate one with: openssl rand -hex 32"
)
raise ValueError(msg)
return v
@field_validator("ADMIN_PASSWORD")
@classmethod
def validate_admin_password(cls, v: str, info) -> str:
if not info.data.get("DEBUG", False) and v == "rengine@123":
msg = "ADMIN_PASSWORD must be changed from default value in production"
raise ValueError(msg)
return v
@lru_cache
def get_settings() -> Settings:
return Settings()
settings = get_settings()