Borrowing it
Nothing to install: this file belongs to Sanoy24/safe-fetch-mcp-server. 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/Sanoy24/safe-fetch-mcp-server/main/.claude/skills/testing-and-validation/SKILL.mdgit clone --depth 1 https://github.com/Sanoy24/safe-fetch-mcp-serverWrote 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/sanoy24/safe-fetch-mcp-server/testing-and-validation)<a href="https://agentmods.dev/skills/sanoy24/safe-fetch-mcp-server/testing-and-validation"><img src="https://agentmods.dev/badge/skills/sanoy24/safe-fetch-mcp-server/testing-and-validation/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/sanoy24/safe-fetch-mcp-server/testing-and-validation"><img src="https://agentmods.dev/badge/skills/sanoy24/safe-fetch-mcp-server/testing-and-validation.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.00044 | $0.01016 |
| Opus 5.5 | $0.00018 | $0.00406 |
| Sonnet 5.5 | $0.00009 | $0.00203 |
| Haiku 4.5 | $0.00004 | $0.00102 |
Grade B, and why
testing-and-validation scanned grade B with 1 finding 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 6d 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.
Cloud metadata endpointmediumServer-side request forgery
One request to 169.254.169.254 can return temporary IAM credentials.
- Refuse `http://169.254.169.254/latest/meta-data/` (cloud metadata). Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 95 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing & Validation
Testing here is security testing. A fetch server that "works" is not enough — it must provably refuse the dangerous cases. Ordinary AI-generated tests only assert that valid URLs succeed; they never assert that internal targets are refused. Those refusals are the whole point.
1. Test-first, one test per threat
Write the failing test before the guard exists, then implement until green. There must be a test for every row of the threat matrix in the security skill. Minimum set:
- Refuse
http://169.254.169.254/latest/meta-data/(cloud metadata). - Refuse loopback
http://127.0.0.1,http://127.1. - Refuse private ranges
http://10.0.0.5,http://192.168.1.1. - Refuse IPv4-mapped IPv6 loopback
http://[::ffff:127.0.0.1]. - Refuse IPv6 loopback/ULA
http://[::1]. - Refuse encoded IPs (octal/hex/decimal/dotless variants).
- Refuse a redirect whose next hop is internal (302 →
http://127.0.0.1). - Refuse non-http(s) schemes (
file:,gopher:,ftp:). - Refuse URLs with userinfo (
http://user:pass@host). - Enforce max-bytes truncation and timeouts.
- Regression: a re-fetch / poller path also goes through the guard (the 2026 bypass).
- Allow a normal public URL and return clean markdown.
Example (Vitest)
import { describe, it, expect } from "vitest";
import { assertSafeUrl } from "../src/security/index.js";
describe("SSRF guard", () => {
it("refuses the cloud metadata endpoint", async () => {
await expect(
assertSafeUrl("http://169.254.169.254/latest/meta-data/")
).rejects.toThrow();
});
it("refuses IPv4-mapped IPv6 loopback", async () => {
await expect(assertSafeUrl("http://[::ffff:127.0.0.1]/")).rejects.toThrow();
});
it("re-validates each redirect hop", async () => {
// Spin up a local server that 302s to http://127.0.0.1 and assert the fetch is refused.
});
it("allows a normal public URL", async () => {
await expect(assertSafeUrl("https://example.com")).resolves.toBeTruthy();
});
});
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.
- 6d ago Changed · -4 lines 375e9afd05f9
- 1mo ago First seen · 99 lines · 44 tokens per session scan B 72ae3ac43d27
testing-and-validation is a skill published in the GitHub repository Sanoy24/safe-fetch-mcp-server (1 stars, last pushed 5d ago), licensed MIT. It adds 44 tokens to every session and 1,016 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (cloud metadata endpoint). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
testing
Comprehensive software testing skill covering unit tests, integration tests, TDD/BDD, mocking strategies, and test automation across multiple languages. Use this skill when writing test cases, designing test strategies, implementing test automation, or need guidance on testing frameworks and best practices. Ideal for…
api-testing
Testing patterns for MCP tool/resource handlers using createMockContext and Vitest. Covers mock context options, handler testing, McpError assertions, format testing, Vitest config setup, and test isolation conventions.
add-test
Scaffold a test file for an existing tool, resource, or service. Use when the user asks to add tests, improve coverage, or when a definition exists without a matching test file.
api-testing
Testing patterns for MCP tool/resource handlers using createMockContext and Vitest. Covers mock context options, handler testing, McpError assertions, format testing, Vitest config setup, and test isolation conventions.
add-test
Scaffold a test file for an existing tool, resource, or service. Use when the user asks to add tests, improve coverage, or when a definition exists without a matching test file.
add-test
Scaffold a test file for an existing tool, resource, or service. Use when the user asks to add tests, improve coverage, or when a definition exists without a matching test file.