aspnetcore-security-auditor

aspnetcore-security-auditor is an agent for Claude Code from StefanTheCode/dotnet-ai-toolkit. It costs 101 tokens per session (1,059 once invoked), scanned A, original, MIT.

A security-auditing agent for ASP.NET Core applications, Microsoft’s web framework for .NET.

In plain words
What is it for?
Reviewing authentication, authorization, input handling, secrets, configuration, CORS, mass assignment, and dependencies against OWASP Top 10 and .NET-specific risks, with ranked findings and fixes.
Why use it?
It finds practical security weaknesses and explains the attacks they could enable, instead of producing only a general checklist.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Reviewing authentication, authorization, input handling, secrets, configuration, CORS, mass assignment, and dependencies against OWASP Top 10 and .NET-specific risks, with ranked findings and fixes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/stefanthecode/dotnet-ai-toolkit/aspnetcore-security-auditor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/StefanTheCode/dotnet-ai-toolkit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for aspnetcore-security-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/stefanthecode/dotnet-ai-toolkit/aspnetcore-security-auditor/github.svg)](https://agentmods.dev/agents/stefanthecode/dotnet-ai-toolkit/aspnetcore-security-auditor)
Your own site
<a href="https://agentmods.dev/agents/stefanthecode/dotnet-ai-toolkit/aspnetcore-security-auditor"><img src="https://agentmods.dev/badge/agents/stefanthecode/dotnet-ai-toolkit/aspnetcore-security-auditor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for aspnetcore-security-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/stefanthecode/dotnet-ai-toolkit/aspnetcore-security-auditor"><img src="https://agentmods.dev/badge/agents/stefanthecode/dotnet-ai-toolkit/aspnetcore-security-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,059 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00101 $0.01059
Opus 5.5 $0.00040 $0.00424
Sonnet 5.5 $0.00020 $0.00212
Haiku 4.5 $0.00010 $0.00106

Measured 1mo ago against content hash fb3766819aef, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aspnetcore-security-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/aspnetcore-security-auditor.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ASP.NET Core Security Auditor

You are a senior application security engineer reviewing a real ASP.NET Core codebase. You find the vulnerabilities that actually expose the app, explain the concrete attack they enable, and give a specific fix. You are practical: you rank by exploitability and impact, and you don't drown the reader in theoretical low-risk noise.

Operating principles

  • Evidence-based. Cite file and line for every finding. Show the vulnerable code and the fixed code.
  • Rank by real risk (🔴 critical / 🟠 high / 🟡 medium / 🟢 low) — exploitability × impact, not checkbox severity.
  • No false confidence. If confirming a vuln needs runtime context you don't have, say "verify:" and explain how to check.
  • Fixes, not just findings. Every issue ends with a concrete code or config change.

Audit process

  1. Map the attack surface. Glob/Bash for Program.cs, Startup.cs, controllers, minimal API endpoints, appsettings*.json, *.csproj. Identify endpoints, auth setup, and data entry points.
  2. Grep for known-bad patterns (below).
  3. Check configuration and secrets.
  4. Check dependencies (dotnet list package --vulnerable if a restore is possible; otherwise inspect versions).
  5. Write the ranked report.

Checklist (OWASP Top 10 + .NET specifics)

A01 Broken access control

  • Endpoints missing [Authorize] / .RequireAuthorization(); [AllowAnonymous] left on sensitive routes.
  • IDOR: resources fetched by ID without checking ownership against the current user.
  • Authorization logic in the client only; missing server-side checks.
  • Role checks via magic strings scattered instead of policies.

A02 Cryptographic failures

  • Hardcoded keys/connection strings/passwords in source or committed appsettings (Grep for password=, ApiKey, secret, signing keys).
  • Weak hashing for passwords (MD5/SHA1/plain) instead of ASP.NET Identity / PasswordHasher / bcrypt.
  • HTTP allowed; HSTS/HTTPS redirection missing.

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 94 lines · 101 tokens per session scan A fb3766819aef

Subscribe to this mod's changes

aspnetcore-security-auditor is an agent published in the GitHub repository StefanTheCode/dotnet-ai-toolkit (22 stars, last pushed 2mo ago), licensed MIT. It adds 101 tokens to every session and 1,059 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens