forked from Safe-Harbor-Cybersecurity/LLMGuardian
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
212 lines (148 loc) · 5.42 KB
/
.env.example
File metadata and controls
212 lines (148 loc) · 5.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
# LLMGuardian Environment Configuration
# Copy this file to .env and update with your actual values
# =============================================================================
# SECURITY CONFIGURATION
# =============================================================================
# Risk threshold for security checks (1-10, higher = more strict)
SECURITY_RISK_THRESHOLD=7
# Confidence threshold for detection (0.0-1.0)
SECURITY_CONFIDENCE_THRESHOLD=0.7
# Maximum token length for processing
SECURITY_MAX_TOKEN_LENGTH=2048
# Rate limit for requests (requests per minute)
SECURITY_RATE_LIMIT=100
# Enable security logging
SECURITY_ENABLE_LOGGING=true
# Enable audit mode (logs all requests and responses)
SECURITY_AUDIT_MODE=false
# Maximum request size in bytes (default: 1MB)
SECURITY_MAX_REQUEST_SIZE=1048576
# Token expiry time in seconds (default: 1 hour)
SECURITY_TOKEN_EXPIRY=3600
# Comma-separated list of allowed AI models
SECURITY_ALLOWED_MODELS=gpt-3.5-turbo,gpt-4,claude-3-opus,claude-3-sonnet
# =============================================================================
# API CONFIGURATION
# =============================================================================
# API base URL (if using external API)
API_BASE_URL=
# API version
API_VERSION=v1
# API timeout in seconds
API_TIMEOUT=30
# Maximum retry attempts for failed requests
API_MAX_RETRIES=3
# Backoff factor for retry delays
API_BACKOFF_FACTOR=0.5
# SSL certificate verification
API_VERIFY_SSL=true
# Maximum batch size for bulk operations
API_MAX_BATCH_SIZE=50
# API Keys (add your actual keys here)
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
HUGGINGFACE_API_KEY=
# =============================================================================
# LOGGING CONFIGURATION
# =============================================================================
# Log level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
LOG_LEVEL=INFO
# Log file path (leave empty to disable file logging)
LOG_FILE=logs/llmguardian.log
# Maximum log file size in bytes (default: 10MB)
LOG_MAX_FILE_SIZE=10485760
# Number of backup log files to keep
LOG_BACKUP_COUNT=5
# Enable console logging
LOG_ENABLE_CONSOLE=true
# Enable file logging
LOG_ENABLE_FILE=true
# Log format
LOG_FORMAT="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
# =============================================================================
# MONITORING CONFIGURATION
# =============================================================================
# Enable metrics collection
MONITORING_ENABLE_METRICS=true
# Metrics collection interval in seconds
MONITORING_METRICS_INTERVAL=60
# Refresh rate for monitoring dashboard in seconds
MONITORING_REFRESH_RATE=60
# Alert threshold (0.0-1.0)
MONITORING_ALERT_THRESHOLD=0.8
# Number of alerts before triggering notification
MONITORING_ALERT_COUNT_THRESHOLD=5
# Enable alerting
MONITORING_ENABLE_ALERTING=true
# Alert channels (comma-separated: console,email,slack)
MONITORING_ALERT_CHANNELS=console
# Data retention period in days
MONITORING_RETENTION_PERIOD=7
# =============================================================================
# DASHBOARD CONFIGURATION
# =============================================================================
# Dashboard server port
DASHBOARD_PORT=8501
# Dashboard host (0.0.0.0 for all interfaces, 127.0.0.1 for local only)
DASHBOARD_HOST=0.0.0.0
# Dashboard theme (light or dark)
DASHBOARD_THEME=dark
# =============================================================================
# API SERVER CONFIGURATION
# =============================================================================
# API server host
API_SERVER_HOST=0.0.0.0
# API server port
API_SERVER_PORT=8000
# Enable API documentation
API_ENABLE_DOCS=true
# API documentation URL path
API_DOCS_URL=/docs
# Enable CORS (Cross-Origin Resource Sharing)
API_ENABLE_CORS=true
# Allowed CORS origins (comma-separated)
API_CORS_ORIGINS=*
# =============================================================================
# DATABASE CONFIGURATION (if applicable)
# =============================================================================
# Database URL (e.g., sqlite:///llmguardian.db or postgresql://user:pass@host/db)
DATABASE_URL=sqlite:///llmguardian.db
# Database connection pool size
DATABASE_POOL_SIZE=5
# Database connection timeout
DATABASE_TIMEOUT=30
# =============================================================================
# NOTIFICATION CONFIGURATION
# =============================================================================
# Email notification settings
EMAIL_SMTP_HOST=
EMAIL_SMTP_PORT=587
EMAIL_SMTP_USER=
EMAIL_SMTP_PASSWORD=
EMAIL_FROM_ADDRESS=
EMAIL_TO_ADDRESSES=
# Slack notification settings
SLACK_WEBHOOK_URL=
SLACK_CHANNEL=
# =============================================================================
# DEVELOPMENT CONFIGURATION
# =============================================================================
# Environment mode (development, staging, production)
ENVIRONMENT=development
# Enable debug mode
DEBUG=false
# Enable testing mode
TESTING=false
# =============================================================================
# ADVANCED CONFIGURATION
# =============================================================================
# Custom configuration file path
CONFIG_PATH=
# Enable experimental features
ENABLE_EXPERIMENTAL_FEATURES=false
# Custom banned patterns (pipe-separated regex patterns)
BANNED_PATTERNS=
# Cache directory
CACHE_DIR=.cache
# Temporary directory
TEMP_DIR=.tmp