Sécurité : - ical_url : str → SecretStr | None (masquage dans str/repr/model_dump_json) - En-têtes Authorization/Proxy-Authorization : masquage complet de la valeur - _URL_PATTERN : insensible à la casse (HTTPS:// reconnu) - redact_url() : masquage du nom d'utilisateur (userinfo complet) Configuration : - Sous-configs : Field(default_factory=...) pour rechargement à chaque appel - Suppression du singleton settings (injection de dépendances) - .env.example : ajout AI_PROVIDER et CALDAV_CALENDAR_PATH - Guide : BLOG_RSS_ENABLED → BLOG_ENABLED, AI_MODEL=None par défaut - .secrets.baseline : ligne décalée 5112 → 5117 (faux positif audité) - pre-commit : ajout de pytest aux additional_dependencies du hook mypy Tests : 15 tests (config + redaction) couvrant rechargement, masquage SecretStr, en-têtes Authorization, URL auth intégrée et casse variable. Co-authored-by: opencode/coder <coder@agents.invalid> Co-authored-by: opencode/test-engineer <test-engineer@agents.invalid>
50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
# --- Pronote ---
|
|
PRONOTE_ICAL_URL=https://college.ent/pronote/ical/Edt_Jean.ics?icalsecurise=REPLACE_ME&version=2024
|
|
PRONOTE_USERNAME=parent.dupont
|
|
PRONOTE_PASSWORD=your_secure_password
|
|
PRONOTE_ENT=monbureaunumerique
|
|
|
|
# Sources (auto = essayer iCal d'abord, puis pronotepy)
|
|
PRONOTE_AGENDA_SOURCE=auto
|
|
PRONOTE_HOMEWORK_SOURCE=auto
|
|
PRONOTE_MESSAGES_SOURCE=pronotepy
|
|
|
|
# --- CalDAV ---
|
|
CALDAV_URL=https://caldav.example.com/calendars/user/pronote/
|
|
CALDAV_USERNAME=user@example.com
|
|
CALDAV_PASSWORD=your_caldav_password
|
|
CALDAV_CALENDAR_PATH=/pronote-sync/
|
|
|
|
# Fenêtre de synchronisation (jours)
|
|
SYNC_PAST_DAYS=7
|
|
SYNC_FUTURE_DAYS=30
|
|
|
|
# --- Agenda théorique ---
|
|
THEORETICAL_AGENDA_PATH=./data/theoretical.ics
|
|
|
|
# --- XMPP ---
|
|
XMPP_ENABLED=false
|
|
XMPP_JID=user@example.com
|
|
XMPP_PASSWORD=your_xmpp_password
|
|
XMPP_HOST=example.com
|
|
XMPP_PORT=5222
|
|
XMPP_TO=parent@example.com
|
|
XMPP_RESOURCE=pronote-sync
|
|
XMPP_USE_TLS=true
|
|
XMPP_TIMEOUT=30
|
|
|
|
# --- IA (optionnelle) ---
|
|
AI_ENABLED=true
|
|
AI_PROVIDER=openai
|
|
AI_BASE_URL=https://api.openai.com/v1
|
|
AI_API_KEY=your_ai_api_key
|
|
# AI_MODEL=gpt-4o-mini # exemple recommandé, non activé par défaut
|
|
|
|
# --- Blog ---
|
|
BLOG_ENABLED=false
|
|
BLOG_RSS_URL=https://blogpeda.ac-bordeaux.fr/cjeliote/?feed=rss2
|
|
|
|
# --- Divers ---
|
|
DRY_RUN=false
|
|
LOG_LEVEL=INFO
|