implementing-api-schema-validation-security

implementing-api-schema-validation-security is a skill for Claude Code, Codex from xalgorix/xalgorix. It costs 35 tokens per session (3,284 once invoked), scanned A, original, Apache-2.0.

Guidance for validating API requests and responses against OpenAPI or JSON Schema documents. These schemas describe the allowed fields, types, and structure of data exchanged by an API.

In plain words
What is it for?
Adding gateway and development-time validation, securing object schemas, checking responses, and reviewing common validation gaps.
Why use it?
It helps reject malformed or unexpected data, reducing risks such as injection, accidental data exposure, and unwanted field updates.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/schema_security_check.py openapi.yaml.

Good fit Adding gateway and development-time validation, securing object schemas, checking responses, and reviewing common validation gaps.

Compare 6 skills from other repositories ↓
About the project

xalgorix/xalgorix is a self-hosted AI penetration-testing tool in which an LLM agent performs reconnaissance, looks for vulnerabilities, and coordinates exploitation, while a separate verifier re-tests findings before reporting them. It is for security teams, ethical hackers, and bug bounty work using a private, bring-your-own-LLM setup. The catalogue skills extend the agent's pentesting workflow.

xalgorix/xalgorix · 1,213 stars · on GitHub · xalgorix.com

Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/xalgorix/xalgorix
agentmods
npx agentmods add skills/xalgorix/xalgorix/implementing-api-schema-validation-security

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 implementing-api-schema-validation-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/xalgorix/xalgorix/implementing-api-schema-validation-security/github.svg)](https://agentmods.dev/skills/xalgorix/xalgorix/implementing-api-schema-validation-security)
Your own site
<a href="https://agentmods.dev/skills/xalgorix/xalgorix/implementing-api-schema-validation-security"><img src="https://agentmods.dev/badge/skills/xalgorix/xalgorix/implementing-api-schema-validation-security/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 implementing-api-schema-validation-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/xalgorix/xalgorix/implementing-api-schema-validation-security"><img src="https://agentmods.dev/badge/skills/xalgorix/xalgorix/implementing-api-schema-validation-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,284 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 69
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 376
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 376
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • medium Data Exfiltration · line 383
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.00035 $0.03284
Opus 5.5 $0.00014 $0.01314
Sonnet 5.5 $0.00007 $0.00657
Haiku 4.5 $0.00003 $0.00328

Measured 1mo ago against content hash 600ffe30ca28, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

implementing-api-schema-validation-security scanned grade A 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST "https://api.cloudflare.com/client/v4/zones/{zone_id}/api_gateway/user_schemas" \
internal/tools/skills/data/api-security/implementing-api-schema-validation-security/SKILL.md · 441 lines

How it starts

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

Implementing API Schema Validation Security

Overview

API schema validation enforces that all data exchanged through APIs conforms to a predefined structure defined in OpenAPI Specification (OAS) or JSON Schema documents. This prevents injection attacks (SQLi, XSS, XXE), blocks mass assignment by rejecting unknown properties, prevents data leakage by validating response schemas, and ensures type safety across all API interactions. Schema validation operates at both the API gateway level (runtime enforcement) and during development (shift-left security).

When to Use

  • When deploying or configuring implementing api schema validation security capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Common Misconfigurations & Verification

  • additionalProperties missing or true: the single most common gap - without additionalProperties: false, mass-assignment fields pass validation; set it on every object schema.
  • Request-only validation: validating input but not responses lets excessive-data-exposure through; validate/serialize responses with explicit DTOs.
  • Loose constraints: strings without maxLength/pattern and fields without enum permit injection and DoS payloads.
  • readOnly not enforced server-side: clients can still write readOnly fields if the server only documents them rather than rejecting them.
  • Permissive/verbose errors: leaking schema detail in 400 responses aids attackers.
  • Spec drift: the deployed schema lagging the live API leaves new endpoints unvalidated.

How to verify it works: send a request with an extra/unknown field and confirm 400 (not silent acceptance); submit over-long and pattern-violating values and confirm rejection; attempt to set a readOnly field and confirm it is ignored; force a sensitive field into a response and confirm response validation strips it or fails safely; diff the enforced spec against the live route list.

Read the full file on GitHub · 441 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. 1mo ago First seen · 441 lines · 35 tokens per session scan A 600ffe30ca28

Subscribe to this mod's changes

implementing-api-schema-validation-security is a skill published in the GitHub repository xalgorix/xalgorix (1,213 stars, last pushed 7d ago), licensed Apache-2.0. It adds 35 tokens to every session and 3,284 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

implementing-api-schema-validation-security

Implement API schema validation using OpenAPI specifications and JSON Schema to enforce input/output contracts and prevent injection, data exposure, and mass assignment attacks.

Njones17/AI-agent-master-cyber-skills-list · 35 tokens

API Contract Validator

Validate API responses against OpenAPI/Swagger specifications, JSON Schema definitions, and consumer-driven contracts to prevent breaking changes.

PramodDutta/qaskills · 26 tokens

conducting-api-security-testing

Conducts security testing of REST, GraphQL, and gRPC APIs to identify vulnerabilities in authentication, authorization, rate limiting, input validation, and business logic. The tester uses the OWASP API Security Top 10 as the testing framework, combining Burp Suite interception with Postman collections and custom…

26zl/cybersec-toolkit · 99 tokens

bounty-api

Use when bug-bountying an API target — REST, GraphQL, gRPC, WebSocket. Covers OWASP API Top 10 (BOLA, BFLA, mass assignment, rate limiting bypass, JWT issues, GraphQL abuse). Triggers on "bounty api", "graphql security", "rest api testing", "api top 10".

26zl/cybersec-toolkit · 77 tokens

configuring-hsm-for-key-storage

Hardware Security Modules (HSMs) are tamper-resistant physical devices that safeguard cryptographic keys and perform cryptographic operations in a hardened environment. Keys stored in an HSM never lea.

26zl/cybersec-toolkit · 45 tokens

configuring-ldap-security-hardening

Harden LDAP directory services against common attacks including credential harvesting, LDAP injection, anonymous binding, and channel binding bypass. Covers LDAPS enforcement, channel binding, LDAP si.

26zl/cybersec-toolkit · 41 tokens