api-spectral

Lint OpenAPI/AsyncAPI definitions with Spectral to enforce security and governance rules.

183|35|Updated Nov 19, 2025
One-click install
npx skills add https://github.com/AgentSecOps/SecOpsAgentKit --skill api-spectral
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-spectral
Source: https://github.com/AgentSecOps/SecOpsAgentKit/tree/main/skills/appsec/api-spectral
Command: npx skills add https://github.com/AgentSecOps/SecOpsAgentKit --skill api-spectral

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

API security and design governance for API specs: enforcement of security best practices, OWASP Top 10, and organizational standards across OpenAPI/AsyncAPI portfolios.

Core Features & Use Cases

  • Lint OpenAPI/AsyncAPI specs to identify security and governance issues
  • Enforce organization-wide rules by supporting custom Spectral rulesets
  • Generate reports and integrate into CI/CD pipelines for portfolio governance

Quick Start

Run spectral lint on your API specs in CI to enforce security rules.

Frequently Asked Questions about api-spectral

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I lint OpenAPI specs to enforce API security standards?

You can lint OpenAPI specs to enforce API security by running Spectral validation with built-in OWASP-aligned rules. This identifies governance issues in your API definitions and produces CI-friendly reports for consistent security validation.

Can I use custom rulesets to enforce organization-wide API governance?

Yes, you can use custom Spectral rulesets to enforce organization-wide API governance. This allows you to define specific security and design standards, apply them across OpenAPI and AsyncAPI portfolios, and validate specs in CI pipelines.

What is the best way to validate AsyncAPI definitions for security issues?

The best way to validate AsyncAPI definitions for security issues is using Spectral linting. It applies OWASP-aligned rules to detect vulnerabilities, supports custom organization standards, and generates reports suitable for CI/CD integration.

Does Spectral work with CI/CD pipelines for automated API governance?

Spectral works with CI/CD pipelines for automated API governance by producing CI-friendly reports. You can integrate linting directly into your pipeline to continuously validate OpenAPI and AsyncAPI specs against security rules across your portfolio.

How do I check my API specs for OWASP Top 10 vulnerabilities?

To check API specs for OWASP Top 10 vulnerabilities, run Spectral linting with its built-in OWASP-aligned rules. This scans OpenAPI and AsyncAPI definitions, identifies security issues, and outputs governance reports for remediation.

Why should I lint API definitions instead of just testing endpoints?

Linting API definitions catches security and governance issues early by validating OpenAPI and AsyncAPI specs against standards before deployment. This shift-left approach enforces consistent rules across your portfolio and prevents vulnerabilities from reaching production endpoints.