# dotnet-security-owasp

dotnet-security-owasp flags OWASP Top 10 vulnerabilities in .NET solutions and guides safe coding. Useful for reviewing ASP.NET Core endpoints and data queries.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 175 installs · ★ 92 repo stars
- Author: wshaddix
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/wshaddix/dotnet-skills/tree/HEAD/skills/dotnet-security-owasp/SKILL.md
- Updated: 2026-02-27
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/dotnet-security-owasp

## What it does

This skill guides coding assistants through OWASP Top 10 (2021) risks specific to .NET. It spots string concatenation in SQL queries via `FromSqlRaw`, raw process execution, and missing endpoint authorization handlers. It also flags deprecated runtime mechanisms like `BinaryFormatter`, `DCOM`, `APTCA`, and .NET Remoting.

Mitigation recipes rely on modern framework tools. The skill prompts you to apply fallback authorization policies, use `FromSqlInterpolated` for parameter safety, and encrypt application payload via Data Protection API.

Token-level OAuth implementation and cloud stores like AWS Secrets Manager are intentionally out of scope. Silently bypassing CORS rules with `SetIsOriginAllowed` poses a direct security trap in ASP.NET Core, and this skill catches that bug before production.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-security-owasp -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/dotnet-security-owasp/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/dotnet-security-owasp/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-security-owasp -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/dotnet-security-owasp/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-security-owasp -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/dotnet-security-owasp/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install wshaddix/dotnet-skills skills/dotnet-security-owasp
```

2. **Manually: put the files in place**
- File: `.github/skills/dotnet-security-owasp/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-security-owasp -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/wshaddix/dotnet-skills --path skills/dotnet-security-owasp
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/dotnet-security-owasp/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add wshaddix/dotnet-skills --skill dotnet-security-owasp -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/wshaddix/dotnet-skills/tree/HEAD/skills/dotnet-security-owasp/SKILL.md

## When to use it
- review ASP.NET Core controllers for missing authorization attributes and IDOR
- replace risky SQL string concatenation with parameterized LINQ or interpolation
- audit codebase for deprecated APIs such as BinaryFormatter and DCOM
- prevent cross-site scripting by properly encoding Minimal API responses

## Example prompts
- Review DocumentEndpoints.cs for IDOR flaws and broken access control
- Audit my EF Core queries for potential SQL injection vulnerabilities
- Show how to configure ASP.NET Core built-in rate limiting safely

## Similar
- [dotnet-patterns](https://affpapa.org/en/nevibecode/skills/dotnet-patterns.md) — skill · 6300 installs
- [dotnet-security](https://affpapa.org/en/nevibecode/skills/dotnet-security.md) — skill · 358 installs
- [azure-security-keyvault-keys-dotnet](https://affpapa.org/en/nevibecode/skills/azure-security-keyvault-keys-dotnet.md) — skill · 1 install
- [owasp-security](https://affpapa.org/en/nevibecode/skills/owasp-security.md) — skill · 3100 installs
- [owasp-security-check](https://affpapa.org/en/nevibecode/skills/owasp-security-check.md) — skill · 1800 installs
- [laravel-owasp-security](https://affpapa.org/en/nevibecode/skills/laravel-owasp-security.md) — skill · 1100 installs

From the same set: [wshaddix/dotnet-skills](https://affpapa.org/en/nevibecode/by/wshaddix/dotnet-skills.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
