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.
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.copilot/skills/secure-xml-parsing/SKILL.mdgit clone --depth 1 https://github.com/lewing/helix.mcpWrote 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.
[](https://agentmods.dev/skills/lewing/helix.mcp/secure-xml-parsing)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
-
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.Prohibitblocks all DTD processing. -
Billion Laughs (XML bomb) — Nested entity expansion can turn a 1KB XML file into gigabytes of memory consumption.
DtdProcessing.Prohibitprevents this.MaxCharactersInDocumentprovides a secondary defense. -
External resolver SSRF — Even with DTDs disabled,
XmlResolvercould resolve external schema references. Setting it tonullprevents all external resource resolution.
Checklist
-
DtdProcessing = DtdProcessing.Prohibit— always -
XmlResolver = null— always -
MaxCharactersInDocumentset 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)orXDocument.Load(stream)directly — these use default settings which allow DTDs - Setting
DtdProcessing = DtdProcessing.Ignoreinstead ofProhibit—Ignorestill processes some DTD constructs - Forgetting
XmlResolver = null— DTD prohibition alone doesn't prevent all external resolution paths - Not checking file size before parsing —
XDocumentloads the entire DOM into memory
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.
- 9d ago First seen · 52 lines · 0 tokens per session scan A a93c263b1dab
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.
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.
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.
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.
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.
generate-code-cs
Generate the code from typespec for C#. Parameter: C# SDK repository root location .
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.