MSSQL Credentials
ID |
mssql_assignment |
Severity |
high |
Vendor |
Microsoft |
Family |
Data Storage Secret |
Description
Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network.
Security
Any hardcoded SQL Server Connection String or Credential is a potential secret reported by this detector.
Accidentally checking-in the key to source control repositories could compromise your SQL Server resource.
Examples
version: "3.9" services: web: build: . ports: - "80:80" environment: - MSSQL_USER=sa - MSSQL_PASSWORD=p@ass
Mitigation / Fix
-
Remove the password from the source code or committed configuration file.
-
Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s).
-
If under a git repository, you may remove unwanted files from the repository history using tools like
git filter-repo
orBFG Repo-Cleaner
. You may follow the procedure listed here for GitHub.
You should consider any sensitive data in commits with secrets as compromised. Remember that secrets may be removed from history in your projects, but not in other users' cloned or forked repositories. |