More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    C# Code Safety Check

    1

    WHERE Email = '{email}'") or one new BinaryFormatter().Deserialize(Request.Body) is enough to lose your data or your server.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    C# Code Safety Check

    C# Code Safety Check

    Example session with this skill installed

    Check this project with csharp-code-safety-check.

    • Read your context and instructions
    • Compiled the c code safety

    $ python3 scripts/check_csharp.py examples/risky
    BLOCK Shop.Api/Controllers/OrdersController.cs:25 C01 SQL_INJECTION
    .FromSqlRaw($"SELECT * FROM Orders WHERE Status = '{status}' ORDER BY {sort}")
    Why: SQL text is built with +, $"...{value}", string.Format, string.Concat or a StringBuilder and run with ADO.NET (new SqlCommand, NpgsqlCommand, MySqlCommand, SqliteCommand, CommandText), Dapper (Query, QueryAsync, Execute...), EF Core FromSqlRaw, ExecuteSqlRaw or SqlQueryRaw, EF Core 2 FromSql with a string, EF6 SqlQuery or ExecuteSqlCommand, or NHibernate CreateSQLQuery. Anyone who controls the value can change the query.
    Safer: Pass values as parameters: @Name placeholders with Dapper (conn.Query<User>("... WHERE Email = @Email", new { Email = email })) or SqlCommand.Parameters, FromSql($"... {value}") or FromSqlInterpolated or FromSqlRaw("... {0}", value) in EF Core, or plain LINQ. Check table and column names against a fixed list (a switch or a HashSet) before you put them in the text.

    BLOCK Shop.Api/Controllers/ReportsController.cs:16 C02 COMMAND_FROM_INPUT
    BLOCK Shop.Api/Controllers/ReportsController.cs:23 C03 UNSAFE_DESERIALIZATION
    BLOCK Shop.Api/Data/OrderRepository.cs:10 C04 HARDCODED_SECRET
    BLOCK Shop.Api/Data/OrderRepository.cs:16 C01 SQL_INJECTION
    BLOCK Shop.Api/Program.cs:10 C04 HARDCODED_SECRET
    BLOCK Shop.Api/Services/InvoiceImporter.cs:11 C03 UNSAFE_DESERIALIZATION
    BLOCK Shop.Api/Services/TokenService.cs:9 C04 HARDCODED_SECRET
    REVIEW Shop.Api/Controllers/OrdersController.cs:33 C17 FILE_PATH_FROM_REQUEST
    REVIEW Shop.Api/Controllers/OrdersController.cs:34 C17 FILE_PATH_FROM_REQUEST
    REVIEW Shop.Api/Controllers/OrdersController.cs:40 C19 SECRET_IN_LOG
    REVIEW Shop.Api/Controllers/OrdersController.cs:41 C18 OPEN_REDIRECT
    REVIEW Shop.Api/Program.cs:31 C11 TLS_VALIDATION_OFF
    REVIEW Shop.Api/Program.cs:40 C17 FILE_PATH_FROM_REQUEST
    REVIEW Shop.Api/Services/InvoiceImporter.cs:20 C16 XML_EXTERNAL_ENTITIES
    REVIEW Shop.Api/Services/InvoiceImporter.cs:21 C16 XML_EXTERNAL_ENTITIES
    REVIEW Shop.Api/Services/TokenService.cs:13 C14 WEAK_RANDOM_TOKEN
    REVIEW Shop.Api/Services/TokenService.cs:18 C13 FAST_PASSWORD_HASH
    REVIEW Shop.Api/Services/TokenService.cs:24 C12 WEAK_CIPHER
    REVIEW Shop.Api/Services/TokenService.cs:25 C12 WEAK_CIPHER
    REVIEW Shop.Web/Views/Products/Details.cshtml:6 C15 RAW_HTML_OUTPUT
    REVIEW Shop.Web/Views/Products/Details.cshtml:10 C15 RAW_HTML_OUTPUT

    (Each finding also has Why and Safer lines, as in the first one.)
    Verdict: BLOCK. Checked 7 files, 7 with C# content.
    This is a static check of file text. NOT FLAGGED is not a guarantee.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    One conn.Query<User>($"... WHERE Email = '{email}'") or one new BinaryFormatter().Deserialize(Request.Body) is enough to lose your data or your server. This skill finds those and eleven other C# security mistakes before you deploy, and tells you how to fix each one.

    Your agent runs a scanner on your .cs files and your .cshtml and .razor views. It skips comments, tests, generated code and the bin and obj folders, understands verbatim, interpolated and raw strings including the values inside {...}, follows SQL built in a variable or a StringBuilder to the call that runs it, and knows which values come from the request (controller, Razor Pages and minimal API parameters, [FromQuery], [BindProperty], Request.Query, IFormFile.FileName). It knows the safe patterns, so ordinary EF Core and Dapper code stays quiet: FromSql and FromSqlInterpolated, ExecuteSqlInterpolated, FromSqlRaw with {0} placeholders, @Name parameters, LINQ, constants and int values, sort columns picked by a switch or checked against a list, Path.GetFileName, Url.IsLocalUrl and RandomNumberGenerator. It never compiles or runs C#. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.

    What it checks

    BLOCK

    • C01: SQL built with +, $"...{value}", string.Format or StringBuilder and run with SqlCommand, CommandText, Dapper, EF Core FromSqlRaw, ExecuteSqlRaw or SqlQueryRaw, EF6 SqlQuery or NHibernate
    • C02: Process.Start or ProcessStartInfo running cmd, powershell or bash with a changing command, or a program or Arguments string from the request
    • C03: BinaryFormatter, SoapFormatter, NetDataContractSerializer, LosFormatter, Json.NET TypeNameHandling without a binder, Type.GetType with a type name from the request
    • C04: hard-coded passwords, API keys, JWT signing keys, client secrets, credentials, literal passwords in Identity seed code (UserManager.CreateAsync) and Password= or AccountKey= in connection strings

    REVIEW

    • C11: certificate validation callbacks that always return true and DangerousAcceptAnyServerCertificateValidator
    • C12: DES, TripleDES, RC2, ECB mode and fixed IVs
    • C13: MD5 or SHA on passwords, Rfc2898DeriveBytes or PBKDF2 under 100,000 iterations, Identity V2 hashes
    • C14: System.Random for tokens, OTPs, salts and reset codes
    • C15: Html.Raw, HtmlString and MarkupString with values that are not fixed text (XSS)
    • C16: XmlUrlResolver, DtdProcessing.Parse and trusted XSLT (XXE)
    • C17: file paths from the request in Path.Combine, File.*, FileStream or PhysicalFile
    • C18: Redirect(returnUrl) without Url.IsLocalUrl (open redirect)
    • C19: passwords, tokens, connection strings and the Authorization header written to logs

    What's included

    • The scanner (Python 3.9+, standard library only)
    • A rules guide with the reason and safer approach for each rule
    • A risky and a safe example ASP.NET Core shop API with a Razor view, and the real report the scanner produces on the risky one

    Limits It reads code as text, not with the C# compiler: types are not known and values are followed within one file. appsettings.json, web.config, .csproj files, NuGet packages and known CVEs are not checked, and Razor views are checked only for raw HTML output. NOT FLAGGED is not a guarantee.

    Static check of C# and Razor text. Values are followed within one file only; configuration files, packages and data flow across classes are not checked. NOT FLAGGED is not a guarantee.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 5 days ago

    Permissions

    Terminal / Shell
    Read Files

    Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example project includes clearly fake, inert secrets (not-a-real-..., NOTREAL-...) for the scanner to find. It is never compiled or run.

    Listed5 days ago

    What's inside

    Frequently Asked Questions

    No. The script reads local files only and makes no network calls.

    No. It only reports. Your agent changes files only if you ask it to.

    Any agent that supports SKILL.md skills and can run a terminal command, such as Claude Code. It needs Python 3.9 or newer and nothing else.

    No. It reads .cs and .cshtml files as text. It never runs dotnet, MSBuild or your application.

    BLOCK: fix it before you ship. REVIEW: check it before release. NOT FLAGGED: no rule matched. It is a static check, so NOT FLAGGED is not a guarantee.

    New in Security