SqlInjectionGuardToolKit 1.0.4
dotnet add package SqlInjectionGuardToolKit --version 1.0.4
NuGet\Install-Package SqlInjectionGuardToolKit -Version 1.0.4
<PackageReference Include="SqlInjectionGuardToolKit" Version="1.0.4" />
<PackageVersion Include="SqlInjectionGuardToolKit" Version="1.0.4" />
<PackageReference Include="SqlInjectionGuardToolKit" />
paket add SqlInjectionGuardToolKit --version 1.0.4
#r "nuget: SqlInjectionGuardToolKit, 1.0.4"
#:package SqlInjectionGuardToolKit@1.0.4
#addin nuget:?package=SqlInjectionGuardToolKit&version=1.0.4
#tool nuget:?package=SqlInjectionGuardToolKit&version=1.0.4
🚀 SqlInjectionGuardToolKit
SqlInjectionGuardToolKit is a lightweight, enterprise-grade SQL Injection detection and sanitization library for .NET.
It helps developers automatically validate and sanitize potentially dangerous SQL patterns in user input with minimal configuration.
🎯 Why This Library Matters ⭐⭐⭐⭐⭐
SQL Injection is one of the most critical security vulnerabilities.
Without protection:
❌ Database compromise
❌ Data leakage
❌ Unauthorized data manipulation
❌ Full system takeover
This toolkit provides:
✅ Automatic validation
✅ Safe input handling
✅ Attribute-driven protection
✅ Type-safe string design
✅ DTO sanitization
✅ MVC Filter / Middleware integration
✅ Key Features ⭐⭐⭐⭐⭐🔥
✔ SQL Injection Pattern Detection
✔ Automatic Sanitization
✔ Attribute-Based Validation
✔ SafeSqlString Type
✔ MVC Filter Integration
✔ Middleware Support
✔ Console Validation Support
✔ CLI Tool Support
✔ Minimal Performance Overhead
📦 Installation
✅ NuGet Package Manager
✅ 1️⃣ Enable SQL Injection Guard (Web API)
Register services:
builder.Services.AddControllers();
builder.Services.AddSqlInjectionGuard();
or
app.UseSqlInjectionGuard();
#✅ 2️⃣ DTO Validation (Attribute Mode)
Global Validation (Validate ALL string properties)
[SafeClassString]
public class CreateUserRequest
{
public string Name { get; set; }
public string Email { get; set; }
}
Selective Validation (Validate specific properties)
public class SearchRequest
{
[SafeString]
public string Keyword { get; set; }
public string SortOrder { get; set; }
}
✅ 3️⃣ Type-Safe Protection (Recommended ⭐⭐⭐⭐⭐🔥)
public class TestModel
{
public SafeSqlProps Name { get; set; }
public string? Username { get; set; }
}
✅ 3️⃣ Type-Safe Protection Individual String Check (Recommended ⭐⭐⭐⭐⭐🔥)
public class TestModel
{
public SafeSqlProps Name { get; set; }
public string? Username { get; set; }
}
model.Username.VerifySQlString();
#🧠 How It Works
✅ Validation Flow
User Input
↓
SqlInjectionValidator
↓
Pattern Detection Engine
↓
Sanitization Logic
↓
Safe Output
✅ Web API Protection Flow
HTTP Request
↓
Middleware (Optional)
↓
MVC Filter
↓
DTO Validation
📜 License
MIT License
⭐ Final Thought ⭐⭐⭐⭐⭐🔥
Security should be:
✔ Automatic ✔ Predictable ✔ Hard to misuse
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.AspNetCore.Mvc.Core (>= 2.3.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
# 🚀 Release Notes – SqlInjectionGuardToolKit
---
# ✅ Version 1.0.1 – Initial Stable Release 🎉🔥
📅 Release Date: 2026
---
## 🎯 Overview
This is the first stable release of **SqlInjectionGuardToolKit**, a lightweight SQL Injection detection and sanitization library for .NET.
The toolkit is designed to provide automatic validation and safe input handling with minimal developer effort.
---
## ✅ ✨ Key Features
✔ SQL Injection Pattern Detection Engine
✔ Automatic String Sanitization
✔ Attribute-Based Validation
✔ SafeSqlString Type
✔ DTO-Level Protection
✔ MVC Filter Integration
✔ Middleware Support
✔ Console Validation Support
✔ CLI Tooling Support
---
## ✅ 🛡 Security Capabilities
✔ Detection of common SQL keywords
✔ Logical operator pattern detection
✔ Inline comment injection detection
✔ Batch separator detection
✔ Stored procedure abuse indicators
Example detected patterns: