SentinelAI.NET is open-source runtime security for .NET. Its API firewall inspects requests and uploads for code-execution and data-access payloads before your endpoints or workers touch them. Its AI layer guards prompts, tool calls and model output.
Attacks like the Hugging Face dataset-config exploit don’t look like attacks. A config arrives through a normal upload API with a template expression where a number belongs, and a background worker later evaluates it. SentinelAI.ApiFirewall inspects every request and upload before anything processes it.
name: imdb-reviews data_files: - path: "reference://" # loader follows attacker refs offset: "{{ 7 * 7 }}" # a template where a number belongs
// the worker never sees the upload
schema_violation data_files[0].offset: expected integer
template_injection data_files[0].offset
dangerous_url data_files[0].path: reference:// URLEvery request crosses four surfaces. Each is scanned, decided and recorded. Select a stage.
Four packages, one policy file. Select a card for the contract and a sample.
A preview of the demo scenarios. The real thing runs in your browser: no install, no sign-up.
Turn on the firewall, add one step to your chat client, then let security teams own the YAML. Tools not listed in the policy are blocked.
dotnet add package SentinelAI.ApiFirewall --prereleasedotnet add package SentinelAI.Extensions.AI --prereleaseAll packages on NuGet ↗// loads sentinel.yaml builder.Services.AddSentinelAI() .AddHttpContextCaller(); // who is calling // API firewall: every request and upload app.UseSentinelFirewall(); // AI apps: the chat client and its tools builder.Services.AddChatClient(innerClient) .UseSentinel() // before function invocation .UseFunctionInvocation();
api_firewall: endpoints: - path: /datasets/*/config uploads: { schema_file: config.schema.json } secrets: { action: redact } tools: IssueRefund: ownership_arg: customerId amount_arg: amount approval_above: 150 max_amount: 500 DeleteAccount: action: require_approval
Strong tools already exist for detection, testing and observability. None put endpoint-aware request inspection and an AI tool firewall inside your own .NET app.
| Tool | Strength | What Sentinel adds |
|---|---|---|
| Edge WAFs · OWASP CRS | Generic HTTP attack signatures | Knows your endpoint schemas, uploads and archives; runs in-app |
| Promptfoo | Red teaming and CI testing | Production runtime enforcement |
| LlamaFirewall | Runtime scanners | Runs as a pluggable scanner behind policy |
| NeMo Guardrails | Input, output and tool rails | .NET-native, no Python service to run |
| Langfuse · OpenLLMetry | LLM observability | Security decisions on the same traces |
| Microsoft.Extensions.AI | AI abstractions for .NET | Plugs in as one pipeline step |
Policy, scanners, tool firewall and approvals for IChatClient apps.
Schemas, injection, SSRF, traversal and upload inspection for any ASP.NET Core API.
AI crawler and agent controls, rate and anomaly limits; scanner adapters for ML detectors.
YARP gateway for apps you can’t modify, Semantic Kernel filters, dashboards.