helix.mcp: Skill for Claude Code

.copilot/skills/secure-xml-parsing/SKILL.md

secure-xml-parsing is a skill for Claude Code, Codex from lewing/helix.mcp. It costs 0 tokens per session (574 once invoked), scanned A, original, MIT.

A .NET and C# security pattern for parsing XML from untrusted or partly trusted sources, such as uploads, API responses, or downloaded files.

In plain words
What is it for?
Use it when loading untrusted XML with XDocument or XmlReader, with DTD processing disabled, external resolution blocked, and a document-size limit applied.
Why use it?
It helps prevent XML attacks that can read local files, contact internal services, or consume excessive memory through expanded entities.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is lewing/helix.mcp's own configuration. It tells Claude Code and Codex how to work on helix.mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything helix.mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to lewing/helix.mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.copilot/skills/secure-xml-parsing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/lewing/helix.mcp

Made for: Claude Code, Codex.

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 secure-xml-parsing

README.md
[![agentmods](https://agentmods.dev/badge/skills/lewing/helix.mcp/secure-xml-parsing/github.svg)](https://agentmods.dev/skills/lewing/helix.mcp/secure-xml-parsing)
Your own site
<a href="https://agentmods.dev/skills/lewing/helix.mcp/secure-xml-parsing"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/secure-xml-parsing/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 secure-xml-parsing

Your own site · 80×15
<a href="https://agentmods.dev/skills/lewing/helix.mcp/secure-xml-parsing"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/secure-xml-parsing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 574 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.00000 $0.00574
Opus 5 $0.00000 $0.00287
Sonnet 5 $0.00000 $0.00115
Haiku 4.5 $0.00000 $0.00057

Measured 9d ago against content hash a93c263b1dab, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

secure-xml-parsing 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 9d 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.

.copilot/skills/secure-xml-parsing/SKILL.md · 52 lines

How it starts

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

SKILL: Secure XML Parsing for Untrusted Content

Confidence: low Source: earned Domain: .NET / C# / Security

When to Apply

When parsing XML files whose content originates from untrusted or semi-trusted sources (user uploads, CI artifacts, API responses, file downloads from external systems).

The Pattern

var settings = new XmlReaderSettings
{
    DtdProcessing = DtdProcessing.Prohibit,
    XmlResolver = null,
    MaxCharactersInDocument = 50_000_000 // ~50MB character limit
};

using var reader = XmlReader.Create(stream, settings);
var doc = XDocument.Load(reader);

Why This Matters

  1. XXE (XML External Entity) attacks — Default XDocument.Load(stream) allows <!ENTITY> declarations that can read local files (file:///etc/passwd) or make HTTP requests to internal services (SSRF). DtdProcessing.Prohibit blocks all DTD processing.

  2. Billion Laughs (XML bomb) — Nested entity expansion can turn a 1KB XML file into gigabytes of memory consumption. DtdProcessing.Prohibit prevents this. MaxCharactersInDocument provides a secondary defense.

  3. External resolver SSRF — Even with DTDs disabled, XmlResolver could resolve external schema references. Setting it to null prevents all external resource resolution.

Checklist

  • DtdProcessing = DtdProcessing.Prohibit — always
  • XmlResolver = null — always
  • MaxCharactersInDocument set to a reasonable limit — for untrusted input
  • File size check BEFORE parsing (don't load a 500MB file into XDocument)
  • Content truncation on extracted text fields (error messages, descriptions) to prevent downstream resource exhaustion (e.g., LLM context window overflow)

Common Mistakes

  • Using XDocument.Load(path) or XDocument.Load(stream) directly — these use default settings which allow DTDs
  • Setting DtdProcessing = DtdProcessing.Ignore instead of ProhibitIgnore still processes some DTD constructs
  • Forgetting XmlResolver = null — DTD prohibition alone doesn't prevent all external resolution paths
  • Not checking file size before parsing — XDocument loads the entire DOM into memory

Read the full file on GitHub · 52 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. 9d ago First seen · 52 lines · 0 tokens per session scan A a93c263b1dab

Subscribe to this mod's changes

secure-xml-parsing is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 574 tokens. 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-31.

Related

Other skills, from other repositories

blazor

Use for Blazor Server development with Fluent UI Blazor, Razor components, layouts, pages, scoped UI services, culture switching, localization, forms, loading/empty/error states, and Studio-style dashboard workflows.

AterDev/Perigon.CLI · 45 tokens

cli

Use for .NET command-line tool development with Spectre.Console/Spectre.Console.Cli, Microsoft.Extensions.Hosting, dependency injection, localized help text, command settings, aliases, examples, terminal output, exit codes, and stdio-safe command paths.

AterDev/Perigon.CLI · 52 tokens

codegen

Use for .NET code generation work with Roslyn, Microsoft.OpenApi, Razor templates, DTO/manager/controller generation, REST API generation, C# HttpClient generation, Angular/Axios TypeScript request clients, generated formatting, and deterministic output.

AterDev/Perigon.CLI · 53 tokens

dotnet

Use for .NET application development involving services, managers, dependency injection, Microsoft.Extensions.Hosting, dependency direction, MiniDb persistence, DTOs, Mapster mapping, shared entities/helpers, MCP tools, module workflows, solution analysis, cancellation, logging, and logic shared by CLI and Blazor.

AterDev/Perigon.CLI · 61 tokens

generate-code-cs

Generate the code from typespec for C#. Parameter: C# SDK repository root location .

Azure/azure-sdk-for-net · 26 tokens

author-test

Generate a test given sample. Parameters: C# SDK repository root; Package name: one of Azure.AI.Projects, Azure.AI.Projects.Agents or Azure.AI.Extensions.OpenAI; the sample to use as a starting point for the test.

Azure/azure-sdk-for-net · 68 tokens