Building in the open

Stop the request before it runs code.

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.

.NET nativeOne policy fileSelf-hostedOpenTelemetry
CHECKPOINT / 01● ENFORCING
Your .NET app SENTINEL.UseSentinel() LLM / Agent Scanners (BYO) OpenTelemetry → SIEM promptallowscoreevents
One policyEvery hop inspected
● Allow● Redact● Block● Require approval● Trace everything
API firewall · new in 0.2

The attack hides in the data.

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.

Uploaded config.yaml
name: imdb-reviews
data_files:
  - path: "reference://"      # loader follows attacker refs
    offset: "{{ 7 * 7 }}"     # a template where a number belongs
SentinelAI says · 400, held for review
// 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:// URL
Shape

Schemas per endpoint

  • Wrong types and unknown fields
  • Sizes, lengths, patterns
  • Uploads, by file type
Code execution

Injection detectors

  • Template expressions
  • YAML tags, type hints, serialized objects
  • Shell syntax (recorded)
Reach

URLs and paths

  • file://, reference://, gopher://…
  • Internal and cloud-metadata hosts (SSRF)
  • ../ traversal and zip slip
Hiding places

Everywhere, decoded

  • Query, JSON, YAML, forms, files
  • Files inside zip archives
  • URL-encoded, base64, JSON-in-strings
Abuse

Limits

  • Zip and YAML alias bombs
  • Depth, size, value count
  • Duplicate JSON keys
Evidence

Decide and record

  • Block, quarantine or audit
  • No details leaked to callers
  • OpenTelemetry events
dotnet add package SentinelAI.ApiFirewall --prereleaseView on NuGet ↗Run the demo ↗
AI apps · the enforcement loop

One loop, five stages.

Every request crosses four surfaces. Each is scanned, decided and recorded. Select a stage.

Architecture

The full capability map.

Four packages, one policy file. Select a card for the contract and a sample.

CurrentPlannedContext
AI demo preview

Four attacks. Four outcomes.

A preview of the demo scenarios. The real thing runs in your browser: no install, no sign-up.

Quick start

A few lines. Policy in config.

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 ↗
Program.cs
// 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();
sentinel.yaml
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
Why Sentinel

Not another scanner. The missing layer.

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.

ToolStrengthWhat Sentinel adds
Edge WAFs · OWASP CRSGeneric HTTP attack signaturesKnows your endpoint schemas, uploads and archives; runs in-app
PromptfooRed teaming and CI testingProduction runtime enforcement
LlamaFirewallRuntime scannersRuns as a pluggable scanner behind policy
NeMo GuardrailsInput, output and tool rails.NET-native, no Python service to run
Langfuse · OpenLLMetryLLM observabilitySecurity decisions on the same traces
Microsoft.Extensions.AIAI abstractions for .NETPlugs in as one pipeline step
Roadmap

Narrow first, then wider.

v0.1 · released

AI app protection

Policy, scanners, tool firewall and approvals for IChatClient apps.

v0.2 · now

API firewall

Schemas, injection, SSRF, traversal and upload inspection for any ASP.NET Core API.

v0.3

Agent traffic

AI crawler and agent controls, rate and anomaly limits; scanner adapters for ML detectors.

Later

Wider reach

YARP gateway for apps you can’t modify, Semantic Kernel filters, dashboards.

Put a checkpoint in front of your APIs and agents.

dotnet add package SentinelAI.ApiFirewall --prereleaseAPI firewall →AI demoNuGet ↗Star on GitHub ↗