Add RFC 9116 compliant security.txt endpoint

- Implement /.well-known/security.txt endpoint for security vulnerability reporting
- Add SECURITY_CONTACT environment variable support
- Include proper HTTP headers (Content-Type, Cache-Control)
- Set automatic expiration date and preferred languages
- Add comprehensive security policy information
- Update .env.example with SECURITY_CONTACT variable
- Document security.txt endpoint in README.md with usage examples
- Follow RFC 9116 standard for responsible disclosure
This commit is contained in:
2025-09-30 19:28:29 +02:00
parent 2402afff13
commit 2dcfb8e2ee
3 changed files with 48 additions and 0 deletions

View File

@@ -187,6 +187,7 @@ docker run -d \
-**Stornierungsfrist**: Konfigurierbare Mindestfrist vor dem Termin (MIN_STORNO_TIMESPAN)
- 📋 **Impressum/Datenschutz**: Rechtliche Seiten mit konfigurierbaren Daten
- 🔐 **Admin-Panel**: Geschützter Bereich für Inhaber
- 🛡️ **Security.txt**: RFC 9116 konformer Endpoint für Sicherheitsmeldungen
## Admin-Zugang
@@ -201,3 +202,24 @@ Nach dem Setup kannst du dich mit den in der `.env` konfigurierten Admin-Credent
- Das Passwort wird als Base64-Hash in der `.env` Datei gespeichert
- Verwende ein sicheres Passwort und generiere den entsprechenden Hash
- Die `.env` Datei sollte niemals in das Repository committet werden
### Security.txt Endpoint
Die Anwendung bietet einen RFC 9116 konformen Security.txt Endpoint unter `/.well-known/security.txt`:
- **Kontakt**: Konfigurierbar über `SECURITY_CONTACT` Umgebungsvariable
- **Ablauf**: Automatisch gesetzt auf Ende des aktuellen Jahres
- **Sprachen**: Deutsch und Englisch bevorzugt
- **Caching**: 24 Stunden Cache-Header für bessere Performance
**Beispiel-Konfiguration:**
```env
SECURITY_CONTACT=security@stargirlnails.de
```
**Zugriff:**
```bash
curl https://your-domain.com/.well-known/security.txt
```
Dies ermöglicht Sicherheitsforschern, Sicherheitslücken verantwortungsvoll zu melden.