- Add .gitignore to prevent secret leakage - Implement YOLO guard with double-confirmation flow * Environment variable gate (YOLO_MODE=1) * Typed confirmation phrase + one-time code * Time-limited approval tokens (5 min TTL) * Single-use tokens with audit logging - Add rate limiting (10/min, 100/hour, 500/day) * Token bucket implementation * Per-session tracking * Automatic bucket reset - Integrate safeguards into existing code * Rate limiter in SecureBridge.send_message() * YOLO guard in YOLOMode.execute_command() * Dry-run mode by default - Add security test suite * .gitignore validation * YOLO guard functional tests * Rate limiter verification * Integration checks All security measures tested and verified. No secrets found in git history.
84 lines
750 B
Text
84 lines
750 B
Text
# Secrets and tokens
|
|
*.key
|
|
*.pem
|
|
*.token
|
|
*.crt
|
|
tokens.json
|
|
.env
|
|
.env.local
|
|
.env.*.local
|
|
|
|
# Database files
|
|
*.db
|
|
*.db-shm
|
|
*.db-wal
|
|
*.sqlite
|
|
*.sqlite3
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*$py.class
|
|
*.so
|
|
.Python
|
|
build/
|
|
develop-eggs/
|
|
dist/
|
|
downloads/
|
|
eggs/
|
|
.eggs/
|
|
lib/
|
|
lib64/
|
|
parts/
|
|
sdist/
|
|
var/
|
|
wheels/
|
|
pip-wheel-metadata/
|
|
share/python-wheels/
|
|
*.egg-info/
|
|
.installed.cfg
|
|
*.egg
|
|
MANIFEST
|
|
|
|
# PyInstaller
|
|
*.manifest
|
|
*.spec
|
|
|
|
# Testing
|
|
.pytest_cache/
|
|
.coverage
|
|
.coverage.*
|
|
htmlcov/
|
|
.tox/
|
|
.nox/
|
|
.hypothesis/
|
|
|
|
# Logs
|
|
*.log
|
|
audit_*.json
|
|
yolo_audit.log
|
|
bridge_audit.log
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# YOLO mode tokens
|
|
.yolo_tokens.json
|
|
|
|
# Virtual environments
|
|
venv/
|
|
env/
|
|
ENV/
|
|
env.bak/
|
|
venv.bak/
|
|
|
|
# Local development
|
|
/tmp/
|
|
/temp/
|
|
scratch/
|