スキル api-spectral
📦

api-spectral

v0.1.0 中リスク ⚙️ 外部コマンド🌐 ネットワークアクセス📁 ファイルシステムへのアクセス🔑 環境変数⚡ スクリプトを含む

Spectral で API 仕様を検証

API 仕様では、実装開始前にセキュリティ要件が見落とされることがあります。このスキルは、Claude、Codex、Claude Code に対して、Spectral リンティング、OWASP API チェック、ガバナンスワークフローを案内します。

対応: Claude Codex Code(CC)
🥉 79 ブロンズ
1

スキルの ZIP をダウンロード

2

Claudeでアップロード

設定 → 機能 → スキル → スキルをアップロード に移動

3

オンにして使い始める

エージェントが読めるリソース

AI エージェント、クローラー、スクリプトがページ全体ではなく整理されたコンテキストを必要とする場合は、これらのリンクを使ってください。

テストする

「api-spectral」を使用しています。 OpenAPI ファイルに、保護されていない書き込み操作と HTTP サーバー URL があります。

期待される結果:

  • 認証、トランスポートセキュリティ、OWASP API カテゴリ別にグループ化された優先順位付きの検出結果リスト。
  • セキュリティ要件を追加し、HTTP サーバーを HTTPS URL に置き換える修正ガイダンス。
  • 検証用に提案される Spectral コマンドと重大度しきい値。

「api-spectral」を使用しています。 チームがプルリクエストで API ルールを使いたいと考えています。

期待される結果:

  • Spectral をインストールし、選択したルールセットを実行し、レポートを保存し、プルリクエストにコメントする CI ワークフローの概要。
  • ダウンロードした依存関係を固定し、リモートシェルインストーラーを避けるよう促す警告。
  • エラーとして適用する前に警告から開始するロールアウト計画。

「api-spectral」を使用しています。 セキュリティチームが、機密性の高いクエリパラメータ用のカスタムルールを必要としています。

期待される結果:

  • シークレットまたは個人データに関連するクエリパラメータ名を対象とするルール設計。
  • 重大度の推奨事項と OWASP API マッピング。
  • 有効および無効な API 仕様例を使ったテストガイダンス。

セキュリティ監査

中リスク
v6 • 6/28/2026

Static analysis reported many command, network, filesystem, environment, script, and weak-crypto patterns. Manual review found these are mostly documentation examples, Spectral rules, and CI templates for security scanning, not hidden runtime behavior. One CI template includes a remote script piped to bash, so publication is acceptable only with a clear warning.

9
スキャンされたファイル
3,739
解析済み行数
9
Review items
0
False positives ignored
Capability review items (4)

These are real local capabilities that may be expected for this skill, so they require review but are not counted as confirmed malicious behavior.

Remote Installer Piped to Shell in CI Template
The CI template installs tfsec by piping a remote GitHub script directly to bash. This is not executed by the skill itself, but users who copy the template could run unpinned remote code in CI.
The line directly uses curl with a pipe to bash, which is a recognized supply-chain risk. Confidence is high for the pattern, but impact is reduced because it is an optional template rather than automatic skill execution.
Static Findings Are Mostly Security Examples
Many flagged commands, weak cryptography terms, XSS sinks, secret names, and reconnaissance words appear in examples that teach users how to detect insecure API patterns.
The surrounding text labels the snippets as vulnerable examples or rule mappings. This strongly supports a false-positive interpretation for most pattern matches.
Documented Shell Commands for Spectral Workflows
The numerous shell-command detections are command snippets for installing Spectral, linting API specifications, and wiring CI checks. They do not show covert command execution by the skill.
The locations are fenced examples and workflow documentation. No evidence found that the skill silently runs these commands outside user-directed workflows.
Prompt Injection Search Found No Evidence
A targeted review for override language, fake system instructions, pre-approval claims, and requests to skip analysis found no evidence in the reviewed files.
The search covered the skill files for the injection phrases specified by the audit task. Confidence is not perfect because semantic variants may exist, but no evidence was found.

リスク要因

⚙️ 外部コマンド (224)
assets/ci-config-template.yml:298 assets/ci-config-template.yml:301 assets/ci-config-template.yml:304 assets/ci-config-template.yml:307 assets/ci-config-template.yml:310 assets/ci-config-template.yml:134 assets/ci-config-template.yml:250 assets/ci-config-template.yml:291 assets/github-actions-template.yml:116-129 assets/github-actions-template.yml:87 references/custom_rules_guide.md:18-29 references/custom_rules_guide.md:29-42 references/custom_rules_guide.md:42-57 references/custom_rules_guide.md:57-61 references/custom_rules_guide.md:61-76 references/custom_rules_guide.md:76-84 references/custom_rules_guide.md:84-94 references/custom_rules_guide.md:94-100 references/custom_rules_guide.md:100-112 references/custom_rules_guide.md:112-118 references/custom_rules_guide.md:118-125 references/custom_rules_guide.md:125-131 references/custom_rules_guide.md:131-139 references/custom_rules_guide.md:139-145 references/custom_rules_guide.md:145-158 references/custom_rules_guide.md:158-164 references/custom_rules_guide.md:164-169 references/custom_rules_guide.md:169-175 references/custom_rules_guide.md:175-185 references/custom_rules_guide.md:185-189 references/custom_rules_guide.md:189-213 references/custom_rules_guide.md:213-217 references/custom_rules_guide.md:217-231 references/custom_rules_guide.md:231-235 references/custom_rules_guide.md:235-244 references/custom_rules_guide.md:244-248 references/custom_rules_guide.md:248-265 references/custom_rules_guide.md:265-269 references/custom_rules_guide.md:269-286 references/custom_rules_guide.md:286-290 references/custom_rules_guide.md:290-303 references/custom_rules_guide.md:303-307 references/custom_rules_guide.md:307-318 references/custom_rules_guide.md:318-322 references/custom_rules_guide.md:322-342 references/custom_rules_guide.md:342-346 references/custom_rules_guide.md:346-356 references/custom_rules_guide.md:356-362 references/custom_rules_guide.md:362-376 references/custom_rules_guide.md:376-378 references/custom_rules_guide.md:378-391 references/custom_rules_guide.md:391-395 references/custom_rules_guide.md:395-404 references/custom_rules_guide.md:404-408 references/custom_rules_guide.md:408-441 references/custom_rules_guide.md:441-449 references/custom_rules_guide.md:449-456 references/custom_rules_guide.md:456-462 references/custom_rules_guide.md:462-472 references/custom_rules_guide.md:472-476 references/custom_rules_guide.md:476-482 references/custom_rules_guide.md:482-486 references/custom_rules_guide.md:486-498 references/custom_rules_guide.md:498-502 references/custom_rules_guide.md:502-511 references/custom_rules_guide.md:511-515 references/custom_rules_guide.md:515-525 references/custom_rules_guide.md:525-529 references/custom_rules_guide.md:529-536 references/custom_rules_guide.md:536-540 references/custom_rules_guide.md:540-546 references/custom_rules_guide.md:409 references/EXAMPLE.md:54-74 references/EXAMPLE.md:74-95 references/EXAMPLE.md:95-108 references/EXAMPLE.md:108-111 references/EXAMPLE.md:111-118 references/EXAMPLE.md:118-122 references/EXAMPLE.md:122-129 references/EXAMPLE.md:129-135 references/EXAMPLE.md:135-151 references/EXAMPLE.md:151-154 references/EXAMPLE.md:154-162 references/EXAMPLE.md:162-296 references/EXAMPLE.md:296-306 references/EXAMPLE.md:306-309 references/EXAMPLE.md:309-318 references/EXAMPLE.md:318-333 references/EXAMPLE.md:333-342 references/EXAMPLE.md:342-346 references/EXAMPLE.md:346-354 references/EXAMPLE.md:354-358 references/EXAMPLE.md:358-361 references/EXAMPLE.md:361-371 references/EXAMPLE.md:371-404 references/EXAMPLE.md:404-414 references/EXAMPLE.md:414-447 references/EXAMPLE.md:447-451 references/EXAMPLE.md:451-472 references/EXAMPLE.md:472-476 references/EXAMPLE.md:476-537 references/owasp_api_mappings.md:26-60 references/owasp_api_mappings.md:60-77 references/owasp_api_mappings.md:77-123 references/owasp_api_mappings.md:123-140 references/owasp_api_mappings.md:140-182 references/owasp_api_mappings.md:182-186 references/owasp_api_mappings.md:186-187 references/owasp_api_mappings.md:187-188 references/owasp_api_mappings.md:188-199 references/owasp_api_mappings.md:199-250 references/owasp_api_mappings.md:250-267 references/owasp_api_mappings.md:267-317 references/owasp_api_mappings.md:317-335 references/owasp_api_mappings.md:335-390 references/owasp_api_mappings.md:390-405 references/owasp_api_mappings.md:405-466 references/WORKFLOW_CHECKLIST.md:74 SKILL.md:41-53 SKILL.md:53-57 SKILL.md:57-66 SKILL.md:66-70 SKILL.md:70-76 SKILL.md:76-98 SKILL.md:98-100 SKILL.md:100-115 SKILL.md:115-118 SKILL.md:118-119 SKILL.md:119-120 SKILL.md:120-124 SKILL.md:124-125 SKILL.md:125-126 SKILL.md:126-128 SKILL.md:128-134 SKILL.md:134-154 SKILL.md:154-157 SKILL.md:157-158 SKILL.md:158-159 SKILL.md:159-160 SKILL.md:160-161 SKILL.md:161-167 SKILL.md:167-216 SKILL.md:216-219 SKILL.md:219-221 SKILL.md:221-223 SKILL.md:223-229 SKILL.md:229-289 SKILL.md:289-292 SKILL.md:292-293 SKILL.md:293-294 SKILL.md:294-301 SKILL.md:301-342 SKILL.md:342-345 SKILL.md:345-357 SKILL.md:357-360 SKILL.md:360-374 SKILL.md:374-376 SKILL.md:376-382 SKILL.md:382-394 SKILL.md:394-406 SKILL.md:406-417 SKILL.md:417-425 SKILL.md:425-439 SKILL.md:439-445 SKILL.md:445-457 SKILL.md:457-459 SKILL.md:459-465 SKILL.md:465-471 SKILL.md:471-488 SKILL.md:488-494 SKILL.md:494-506 SKILL.md:506-512 SKILL.md:512-525 SKILL.md:525-527 SKILL.md:527-540 SKILL.md:540-542 SKILL.md:542-548 SKILL.md:548-557 SKILL.md:557-561 SKILL.md:561-568 SKILL.md:568-585 SKILL.md:585-587 SKILL.md:587-588 SKILL.md:588-589 SKILL.md:589-590 SKILL.md:590-591 SKILL.md:591-592 SKILL.md:592-593 SKILL.md:593-594 SKILL.md:594-596 SKILL.md:596-598 SKILL.md:598-599 SKILL.md:599-600 SKILL.md:600-601 SKILL.md:601-602 SKILL.md:602-604 SKILL.md:604-606 SKILL.md:606-607 SKILL.md:607-608 SKILL.md:608-609 SKILL.md:609-610 SKILL.md:610-618 SKILL.md:618-624 SKILL.md:624-630 SKILL.md:630-639 SKILL.md:639-645 SKILL.md:645-656 SKILL.md:656-673 SKILL.md:673 SKILL.md:673-675 SKILL.md:675-676 SKILL.md:676-682 SKILL.md:682-683 SKILL.md:683-689 SKILL.md:689-690 SKILL.md:690-699 SKILL.md:699-700 SKILL.md:363 SKILL.md:432 SKILL.md:476 SKILL.md:360-374 SKILL.md:425-439 SKILL.md:471-488 SKILL.md:473
🌐 ネットワークアクセス (30)
📁 ファイルシステムへのアクセス (9)
🔑 環境変数 (27)
⚡ スクリプトを含む (2)

検出されたパターン

Pipe to Shell Pattern
監査者: codex 監査履歴を表示 →

品質スコア

59
アーキテクチャ
100
保守性
87
コンテンツ
74
コミュニティ
76
セキュリティ
91
仕様準拠

作成できるもの

構築前に API 設計をレビュー

OpenAPI または AsyncAPI ファイルについて、認証の欠落、安全でないサーバー、機密性の高いクエリパラメータ、OWASP API のギャップをチェックします。

API ガバナンスを標準化

多数の API リポジトリ全体で組織標準を適用する共有 Spectral ルールセットを作成します。

CI に API チェックを追加

ワークフローテンプレートを使用して、プルリクエストやリリースパイプライン中に Spectral の検出結果を報告します。

これらのプロンプトを試す

1 つの API 仕様をリンティング
api-spectral スキルを使用して、Spectral で私の OpenAPI ファイルをリンティングするのを手伝ってください。セットアップ、コマンド、検出結果の読み方を説明してください。
検出結果を OWASP API にマッピング
api-spectral スキルを使用して、これらの Spectral 検出結果を OWASP API Security Top 10 のカテゴリにマッピングし、実践的な修正手順を提案してください。
カスタムルールセットを作成
api-spectral スキルを使用して、当社の API 標準向けの Spectral ルールセットを作成してください。認証、HTTPS、ページネーション、機密データチェックを含めてください。
CI 適用計画を設計
api-spectral スキルを使用して、多数のリポジトリ全体で API 仕様リンティングを段階的に CI 展開する計画を設計してください。しきい値、例外、レポート、開発者フィードバックを含めてください。

ベストプラクティス

  • まず組み込みの Spectral ルールから始め、その後カスタムセキュリティルールを段階的に追加します。
  • 検出結果を確認済みの脆弱性として扱う前に、手動でレビューします。
  • CI 依存関係を固定し、ダウンロードしたツールを実行する前に検証します。

回避

  • リモートダウンロードをレビューせずに CI テンプレートを本番環境へコピーしないでください。
  • API 例に実際のシークレット、トークン、プライベート URL を含めないでください。
  • チームが想定される誤検知をレビューする前に、新しいルールでビルドを失敗させないでください。

よくある質問

このスキルは Spectral を自動的に実行しますか?
いいえ。AI アシスタントが Spectral の使用を案内するのに役立つガイダンス、ルールセット、テンプレートを提供します。
どの API フォーマットが対象ですか?
このスキルでは OpenAPI、AsyncAPI、Arazzo を扱い、ほとんどの例は OpenAPI と Spectral に焦点を当てています。
API が安全であることを証明できますか?
いいえ。Spectral は仕様をチェックします。ランタイム認可、実装、ビジネスロジックには、別途レビューが必要です。
なぜ監査で多くのリスクのあるパターンが見つかったのですか?
ほとんどのパターンは、セキュリティ教育と検出に使用される、意図的に脆弱な例、ルール名、または CI スニペットです。
主なセキュリティ上の注意点は何ですか?
ある CI テンプレートでは、リモートインストーラースクリプトを bash にパイプしています。固定され検証済みのインストール方法に置き換えてください。
Claude Code または Codex と一緒に使用できますか?
はい。レポートには Claude、Codex、Claude Code ワークフローのサポートが記載されています。