T09 · Insecure Skill Coding Practices
- Location
query.py:4- Finding
Hard-Coded SQL Server Credentials in Source Code
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This SQL reporting skill has a coherent business purpose, but it exposes database credentials and can return broad internal delivery data on unsupported commands.
Only install this for an authorized internal environment after rotating the exposed database password, moving credentials to a secure secret source, limiting the database account to read-only least privilege, replacing generic triggers with specific ones, and changing unknown commands to fail closed instead of exporting detailed records.
query.py:4Hard-Coded SQL Server Credentials in Source Code
query.py:99Unknown Commands Trigger an Unrestricted Delivery Data Export
SKILL.md:19Unpinned Third-Party Dependency Installation
The skill documentation describes connectivity to an internal SQL Server and access to business delivery data, but it does not prominently warn users that using the skill will reach into an internal network resource and query potentially sensitive operational data. This can lead to uninformed use, accidental data exposure, or execution in environments where internal resource access should be explicitly disclosed and approved.
The code hardcodes a full SQL Server connection string including username and password directly in the source. Embedded credentials are dangerous because they can be recovered from source control, logs, backups, or redistributed skill packages, enabling unauthorized database access and lateral movement if the account is reused or overprivileged.
The trigger phrase "do report" is overly generic and can easily match ordinary user language unrelated to this SQL reporting skill. That increases the chance of accidental invocation, which is risky here because the skill executes a Python script that likely queries a SQL Server backend and may expose internal business data or perform unintended operations.
The functions connect to SQL Server and fetch delivery data, then print or return the results, but the file provides no user-facing notice, confirmation, or explanatory comment about this network/database access. For a code file, external data access that may transmit user or system data should include some form of visible disclosure unless clearly documented elsewhere, which is not present here.
No suspicious patterns detected.