Files
git.stella-ops.org/offline/rules/secrets/sources/database-connection-string.json
StellaOps Bot 3098e84de4 save progress
2026-01-04 14:54:52 +02:00

17 lines
756 B
JSON

{
"id": "stellaops.secrets.database-connection-string",
"version": "1.0.0",
"name": "Database Connection String with Credentials",
"description": "Detects database connection strings containing embedded credentials",
"type": "regex",
"pattern": "(?i)(?:postgres|mysql|mongodb|sqlserver|mssql)://[^:]+:[^@]+@[^/]+",
"severity": "critical",
"confidence": "high",
"keywords": ["postgres://", "mysql://", "mongodb://", "sqlserver://", "connection"],
"filePatterns": ["*.yml", "*.yaml", "*.json", "*.env", "*.properties", "*.config", "appsettings.json", "*.xml"],
"enabled": true,
"allowlistPatterns": ["localhost", "127\\.0\\.0\\.1", "\\$\\{", "\\{\\{"],
"tags": ["database", "credentials", "connection-string"],
"references": []
}