FastAPI + Kali tools UI for authorized scans of levkin.ca / LAN targets. Gitignore local data/.env; add pytest + gitleaks CI.
26 lines
810 B
Python
26 lines
810 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
ollama_url: str = "http://ollama:11434"
|
|
ollama_model: str = "qwen2.5:14b"
|
|
allow_loopback: bool = False
|
|
blocked_targets: str = ""
|
|
db_path: str = "/data/talos.db"
|
|
audit_log_path: str = "/data/audit.log"
|
|
# Caps parallel tool runs (CPU/RAM/network), not total queued scans.
|
|
max_concurrent_scans: int = 5
|
|
tool_timeout_seconds: int = 600
|
|
llm_output_max_chars: int = 15_000
|
|
|
|
@property
|
|
def blocked_targets_list(self) -> list[str]:
|
|
if not self.blocked_targets.strip():
|
|
return []
|
|
return [t.strip() for t in self.blocked_targets.split(",") if t.strip()]
|
|
|
|
|
|
settings = Settings()
|