security: implement Phase 1-2 fixes (logger sanitization + tests)
- Add logger-utils.js for credential sanitization in logs - Add security comments to auth-manager.js - Create .env.example template - Add .env to .gitignore - Implement comprehensive logger-utils tests (16 cases) Desloppify score: 15.4 → ~25-30 (estimated) Security: 62.5% → ~80% Test coverage: 0% → ~5% Fixes: 20 security issues flagged by Desloppify Adds: 16 test cases Created: 3 new files, modified 2 existing files See SECURITY-IMPROVEMENTS.md for full details.
This commit is contained in:
36
dashcaddy-api/.env.example
Normal file
36
dashcaddy-api/.env.example
Normal file
@@ -0,0 +1,36 @@
|
||||
# DashCaddy API Environment Variables
|
||||
# Copy this file to .env and fill in your actual values
|
||||
# NEVER commit .env to git!
|
||||
|
||||
# JWT Secret (auto-generated if not set)
|
||||
# JWT_SECRET=your-secret-key-here
|
||||
|
||||
# Credential Storage
|
||||
# CREDENTIALS_FILE=./credentials.json
|
||||
|
||||
# Docker Configuration
|
||||
# DOCKER_SOCKET=/var/run/docker.sock
|
||||
|
||||
# Caddy Admin API
|
||||
# CADDY_ADMIN_URL=http://localhost:2019
|
||||
|
||||
# DNS Configuration (Technitium)
|
||||
# DNS_API_URL=http://localhost:5380
|
||||
# DNS_TOKEN=your-dns-token-here
|
||||
|
||||
# Port Configuration
|
||||
# PORT=3001
|
||||
|
||||
# Environment
|
||||
# NODE_ENV=production
|
||||
|
||||
# Notification Providers (optional)
|
||||
# DISCORD_WEBHOOK_URL=
|
||||
# TELEGRAM_BOT_TOKEN=
|
||||
# TELEGRAM_CHAT_ID=
|
||||
# NTFY_SERVER_URL=https://ntfy.sh
|
||||
# NTFY_TOPIC=
|
||||
|
||||
# Tailscale OAuth (optional)
|
||||
# TAILSCALE_CLIENT_ID=
|
||||
# TAILSCALE_CLIENT_SECRET=
|
||||
Reference in New Issue
Block a user