prevent-sql-injection
Pass
Audited by Gen Agent Trust Hub on Nov 18, 2026
Risk Level: SAFE
Full Analysis
- [Secure Coding Practices]: The skill provides detailed guidance on preventing SQL injection through proper parameterization using
sp_executesqland avoiding unsafe string concatenation. - [Identifier Validation]: It highlights a specific security consideration regarding the
QUOTENAMEfunction in T-SQL, which returnsNULLfor inputs exceeding 128 characters, potentially causing dynamic SQL batches to fail silently if not properly checked. - [Privilege Management]: The documentation explains the impact of dynamic SQL on the ownership chain and provides guidance on the appropriate use of the
EXECUTE ASclause for privilege escalation in a controlled manner. - [Safe Instructional Content]: Vulnerable code examples are explicitly labeled with warnings to prevent developers from copying insecure patterns, ensuring the material is used for educational purposes only.
Audit Metadata