SQL Server
Detects SQL Server patterns. This pattern is based on a Microsoft Purview built-in sensitive information type. Users already running Purview may prefer to enable the built-in SIT directly, or use this version as a starting point for customisation.
- Type
- regex
- Engine
- universal
- Confidence
- high
- Confidence justification
- High confidence: structurally constrained pattern with corroborative keyword support reduces false positive rates significantly. Added context gating and exclusion rules improve precision and reduce incidental matches.
- Detection quality
- Topic partial
- Jurisdictions
- global
- Regulations
- Criminal Code Act 1995 (Cth)
- Frameworks
- CIS Controls, ISO 27001, NIST CSF, PCI-DSS, SOC 2
- Data categories
- credentials, security
- Scope
- specific
- Risk rating
- 8
- Platform compatibility
- Purview: Compatible, GCP DLP: Compatible, Macie: Compatible, Zscaler: Compatible, Palo Alto: Compatible, Netskope: Unsupported
Pattern
Server=[^;]+;Database=[^;]+;(?:User\s+Id|Uid)=[^;]+;(?:Password|Pwd)=[^;]+
Corroborative evidence keywords
api key, api_key, apikey, access key, secret key, private key, auth token, authorization, access token, bearer, conn str, connection string, connectionstring, cookie, credential, database, host, [object Object], oauth, passphrase (+33 more)
Proximity: 300 characters
Should match
Server=myserver;Database=mydb;User Id=admin;Password=pass123— SQL Server connection stringServer=localhost;Database=test;Uid=sa;Pwd=secret— SQL Server with short field namesServer=db.example.com;Database=prod;User Id=app;Password=s3cure!— Production SQL Server stringData Source=sql01;Initial Catalog=app;User Id=sa;Password=S3cr3t!;— ADO.NET Data Source form with password — any-order (Snaffler KeepCSharpDbConnStringsRed)Password=MyP@ss;Initial Catalog=hr;Data Source=db02.corp.local;— ADO.NET Password-first any-order formData Source=sql01.corp.internal\SQLEXPRESS;Initial Catalog=HumanResources;Integrated Security=False;MultipleActiveResultSets=True;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Password=MyLongS3cretPwd!;— Long ADO.NET string with many intermediate parameters between Data Source and Password (Snaffler parity — gap >200 chars)
Should not match
host=myserver;dbname=mydb;user=admin— PostgreSQL-style connection string — no Server= or Password= keywords; no regex matchServer=myserver;Database=mydb;User Id=admin— Missing Password/Pwd parameterServer=myserver;User Id=admin;Password=pass123— Missing Database parameterData Source=sql01;Integrated Security=SSPI;— ADO.NET Data Source without a Password= field — Windows Integrated Security onlyjdbc:sqlserver://myserver;databaseName=mydb;integratedSecurity=true— JDBC URL form — no Password= key presenttemplate example placeholder record identifier— Template/sample context should be excluded even when anchor words are present
Known false positives
- Authentication-related terminology in software documentation, security training materials, or system architecture descriptions without actual credentials. Mitigation: Require proximity to credential-specific patterns (API keys, connection strings, tokens) rather than general security terminology.
- Code snippets and configuration examples containing credential-related keywords or placeholder values in developer documentation. Mitigation: Check for common placeholder patterns (example.com, localhost, 0000) and documentation file types to reduce false positives from technical writing.