Security Auditing Code Reviewのロゴ

Security Auditing Code Review

組織
wpultimatesecurity
security-auditing-code-review

既存のWordPressプラグインやテーマのセキュリティ監査やコードレビュー、脆弱性報告のトリアージ、引き継いだコードの強化に使用します。信頼境界を特定し、機密性の高いシンクを洗い出して、制御とデータフローを追跡したうえで、確認された問題をトリアージし、修正方法とともに報告する体系的な手法を提供します。リリース前やサードパーティのコードをレビューするときにあらかじめ適用してください。

Add to TypingMind

概要

公開者wpultimatesecurity
リポジトリWordPress-Security-Skills
スキル名security-auditing-code-review
スター
54
フォーク
3
同梱ファイル
8
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 8個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    wpultimatesecurityがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Security Auditing Code Review」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/wpultimatesecurity/WordPress-Security-Skills/tree/dev/skills/security-auditing-code-review
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wpultimatesecurity/WordPress-Security-Skills.git /tmp/WordPress-Security-Skills
mkdir -p .claude/skills
cp -r /tmp/WordPress-Security-Skills/skills/security-auditing-code-review .claude/skills/security-auditing-code-review
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSecurity Auditing Code Reviewを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSecurity Auditing Code Reviewを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Security Auditing Code Reviewは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Security auditing & code review

When to use this skill

Use this skill when the task is to evaluate code rather than write a feature:

  • Reviewing a PR/plugin/theme for security defects.
  • Auditing inherited or third-party code before deploying it.
  • Triaging a reported vulnerability or suspicious behavior.
  • Producing a security findings report with severities and fixes.

This skill is the audit counterpart to the secure-coding skills. When you find an issue, fix it using the relevant skill (nonces-csrf-protection, output-escaping, sql-injection-prevention, etc.).

Operating modes

  • Guidance mode — a focused question, one handler, a triage of a single report, or a methodology question. Answer inline with the relevant parts of this skill; do not produce the full report or claim coverage beyond what was examined.
  • Full review mode — an explicit audit, pre-release security review, third-party code assessment, or a requested findings report. Run every step below, follow the full audit workflow (coverage ledger, hunting, independent validation), and use the full report template.

In either mode, run code only on a disposable local WordPress with dummy users and secrets; never probe a live or client site. A fact that source and the local stack cannot settle becomes needs_validation.

If the request could mean either, ask one focused question before starting a full review.

Core principles (and why they matter)

  1. Follow the data, not the file order. Trace untrusted input from its entry point ($_GET/$_POST/$_FILES/REST) to where it is used (DB, output, filesystem). Bugs live on those paths.
  2. Map trust boundaries first. Enumerate AJAX actions, REST routes, forms, shortcodes, cron jobs, and CLI commands. Decide which need authentication, authorization, CSRF protection, validation, and output escaping for their context.
  3. Trace controls, not proximity. A nearby nonce, capability check, escaper, or prepare() call does not establish protection. Verify it governs the reachable operation; absence from the same line/file does not establish a vulnerability.
  4. Require a boundary and a result. A confirmed finding names the lower-trust principal (anonymous visitor, subscriber, contributor, author, editor, shop manager), the input or action it controls, the control that should stop it, the boundary crossed, the affected user or resource, and the concrete result. If any part is missing, it is not confirmed.
  5. Separate certainty from priority. Only confirmed findings receive severity, rated from demonstrated impact and reachability with the severity anchors. A blocked hypothesis is needs_validation, not a low-severity finding.
  6. Report with a concrete fix. Each finding = location, what's wrong, why it matters, and the corrected code. A finding without a fix is half-done.
  7. Don't trust comments or names. Verify what the code does, not what it claims.

Step-by-step implementation

  1. Record review context before inventory/scanning: target, immutable revision (commit/tag resolved to commit/checksum), reviewer, date, scope, exclusions, methods/tool versions, active-testing authorization, and limitations. Keep unavailable values explicitly Unknown; never infer them. Use the full report template throughout the review.

  2. Inventory entry points: grep for wp_ajax_, register_rest_route, admin_post_, add_shortcode, $_GET/$_POST/$_REQUEST/$_FILES, form handlers. In full review mode, record them as coverage units (entry point × boundary × attack class) so the report states what was covered, blocked, deferred, or out of scope.

  3. Check applicable controls on each path: transport-appropriate authentication and CSRF protection, resource-level authorization, shape/type validation, sanitization, output escaping, and safe query construction.

  4. Inventory sinks, including safely guarded ones: database calls, output, filesystem operations, uploads, code execution, deserialization, redirects, and outbound requests. Follow the input and controls before labeling any hit. Then hunt the classes a sink sweep misses: business logic, feature abuse, second-order paths, and the "obvious things" in attack classes.

  5. Classify before rating: give every candidate one verdict.

    • confirmed — complete reachable trace, boundary, and result; severity from the severity anchors.
    • needs_validation — a source-grounded hypothesis blocked by one exact missing fact (host/WAF config, a filter added elsewhere, a role customization). Record the blocker and a safe validation plan; assign no severity. Scanner hits and incomplete traces go here.
    • rejected — disproved by a control that governs the path; record the control so the candidate is not re-reported.

    Keep defense-in-depth advice under Hardening recommendations, outside all verdicts.

  6. Report: evidence/data flow, exploit prerequisites, impact, concrete remediation, verification, and references. Redact secrets/PII. Do not invent CVSS/CWE values, remediation hours, response promises, or an overall secure score.

  7. Re-verify fixes across in-scope paths; distinguish executed checks from proposed checks. Record residual limitations and refuse blanket release sign-off or security certification for incomplete scope.

After recording context, use the read-only sink inventory helper if Bash and ripgrep (rg) are available. From this skill directory:

bash
bash scripts/scan-security-sinks.sh /path/to/plugin-or-theme

This is a heuristic text search, not a security audit or vulnerability detector. It includes safe calls, comments, and strings; it does not prove missing controls. No hits is not proof of safety. It searches PHP/PHTML/INC files using ripgrep ignore rules, skipping hidden/binary files and symlinks. Dynamic/multiline calls and other file types require separate review. Source lines can contain secrets; keep the output local and redact before sharing. --help explains scope and exit codes (0: completed, with or without hits; 2: usage/search error).

See references/grep-patterns.md for additional searches and references/audit-checklist.md for the full review pass.

Supporting references

ReferenceLoad when
WordPress security audit checklistPerforming the full manual audit pass across entry points, controls, and sinks.
Audit grep patternsExpanding the entry-point and sink inventory with additional heuristic searches.
WordPress security review report templateRecording review context before inventory and reporting evidence, classification, verification, and limitations.
WordPress attack classesHunting access-control, business-logic, feature-abuse, second-order, wildcard, and obvious-exposure classes beyond the sink sweep.
Full audit workflowRunning full review mode: execution safety, coverage ledger, hunting waves, independent validation, profiles, budget, and re-audits.
Resource exhaustionReviewing public or low-role paths that do expensive work, store data, schedule jobs, or spend paid API quota.
Severity anchorsAssigning severity to a confirmed finding or checking that a rating matches demonstrated impact.

Common AI mistakes / anti-patterns

Mistake 1 — Reviewing for style, missing the security sink

php
// Reviewer comment: "rename $q to $query for clarity" ← misses the actual bug:
$rows = $wpdb->get_results( "SELECT * FROM t WHERE id = " . $_GET['id'] ); // SQL injection

Flag the injection first. Cosmetic notes never outrank a Critical finding.

Mistake 2 — Assuming a nonce implies authorization (or vice versa)

php
// A nonce check is present, so the reviewer marks it "secure" —
check_admin_referer( 'act' );
delete_user( absint( $_POST['id'] ) ); // ❌ still missing current_user_can()

Verify both controls independently on every state-changing path.

Mistake 3 — Trusting sanitize_* as if it were escaping (or the reverse)

php
// Input was sanitized on save, so output is assumed safe — but context differs:
echo '<a href="' . get_option( 'my_url' ) . '">'; // ❌ needs esc_url on output

Sanitize-on-input and escape-on-output are separate; check both ends.

Mistake 4 — Marking everything Critical (or burying real issues)

Inflated severity destroys signal. Rate by impact × reachability: an unauthenticated RCE is Critical; a self-XSS reachable only by an admin editing their own profile is Low/Info. Apply the severity anchors: overall severity never exceeds the demonstrated impact.

Mistake 5 — Reporting the problem without the fix

text
❌ "Line 42 is vulnerable to XSS."
✅ "Line 42: $name echoed unescaped into HTML (stored XSS, High).
    Fix: echo esc_html( $name );"

Mistake 6 — Reporting a principal's own authority as a vulnerability

php
// Reviewer: "Stored XSS — post content is saved without wp_kses_post()."
// But only users with unfiltered_html (administrators/editors on single site) reach it:
if ( current_user_can( 'unfiltered_html' ) ) {
	update_post_meta( $post_id, '_custom_html', wp_unslash( $_POST['custom_html'] ) );
}

Raw HTML from a principal WordPress already trusts with unfiltered_html crosses no boundary. Report it only if a lower-trust principal (a contributor, or a multisite site admin without unfiltered_html) can reach the same write, or if the result affects someone the writer could not already affect.

Mistake 7 — Guessing the deployment

text
❌ "Exploitable: the site has no WAF."   ❌ "Not exploitable: hosts block PHP in uploads."
✅ needs_validation — blocker: whether uploads/ executes .phtml on the target server.
   Validation plan: owner confirms the web-server handler for uploads/, or reproduce
   on a disposable local stack with the recorded server config.

Host rules, WAF/CDN behavior, wp-config.php constants such as DISALLOW_FILE_EDIT, and role customizations are real controls. If the decision depends on one that is not in the reviewed source, do not assume it present or absent; record needs_validation with the exact missing fact.

Mistake 8 — Checklist deviations presented as findings

text
❌ "[Medium] Plugin directory lacks index.php silence file."
❌ "[Low] needs_validation: possible SSRF if the host allows internal requests."
✅ Hardening: add index.php (no reachable disclosure demonstrated).
✅ needs_validation (no severity): an editor-set webhook URL reaches wp_remote_get();
   blocker: whether internal hosts are reachable from the target server.

A missing best practice with no affected principal or resource is a hardening note, not a finding. A needs_validation item never carries severity.

Correct code examples

Use the full report template for the review. Keep this compact skeleton for each confirmed finding:

text
[SEVERITY] Category — title
Location: Exact file:line at the reviewed revision.
Evidence/data flow: Reachable source, governing controls, and sensitive sink.
Exploit prerequisites: Required identity, nonce access, object restrictions, configuration.
Impact: Demonstrated consequences and evidence-based severity rationale.
Remediation: Concrete corrected code/configuration with fail-closed controls.
Verification: Executed checks and results; proposed checks explicitly unexecuted.
References: Relevant official API/security sources.

Checklist

  • Review context records scope, immutable revision, reviewer/date, methods/versions, testing authorization, exclusions, and limitations; unavailable values remain Unknown.
  • All in-scope entry points inventoried; no claim extends beyond reviewed paths.
  • Full reviews report coverage (covered, blocked, deferred, out of scope); partial or quick runs say so.
  • Runtime checks ran only on a disposable local WordPress with dummy data.
  • State-changing paths checked independently for applicable CSRF and authorization controls.
  • Each output checked for context-correct escaping.
  • Each custom query checked for $wpdb->prepare().
  • File/path operations checked for allowlisting and traversal.
  • Dangerous sink hits traced before classifying them as vulnerabilities.
  • Each confirmed finding names the lower-trust principal, input, bypassed control, crossed boundary, affected resource, and concrete result.
  • Every candidate has one verdict: confirmed, needs_validation (exact blocker and validation plan), or rejected (the governing control recorded).
  • Only confirmed findings carry severity, rated with the severity anchors and never above demonstrated impact; needs_validation items and hardening stay outside totals.
  • Each finding records location, evidence/data flow, exploit prerequisites, impact, concrete remediation, verification, and references.
  • Executed checks and results distinguished from proposed checks and unverified fixes.
  • Secrets/PII redacted; residual scope limitations explicit; no blanket sign-off or certification.

Official references

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Security Auditing Code Review」では何ができますか?

既存のWordPressプラグインやテーマのセキュリティ監査やコードレビュー、脆弱性報告のトリアージ、引き継いだコードの強化に使用します。信頼境界を特定し、機密性の高いシンクを洗い出して、制御とデータフローを追跡したうえで、確認された問題をトリアージし、修正方法とともに報告する体系的な手法を提供します。リリース前やサードパーティのコードをレビューするときにあらかじめ適用してください。

TypingMindでSecurity Auditing Code Reviewを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Security Auditing Code Reviewはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSecurity Auditing Code Reviewをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/wpultimatesecurity/WordPress-Security-Skills/tree/dev/skills/security-auditing-code-reviewを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Security Auditing Code Reviewを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Security Auditing Code Reviewで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSecurity Auditing Code Reviewを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Security Auditing Code Review」は無料ですか?

はい。wpultimatesecurityがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る
affaan-mのロゴ

Agent Architecture Audit

affaan-m
コミュニティ人気

エージェントやLLMアプリケーション向けのフルスタック診断です。12層のエージェントスタックを対象に、ラッパーのリグレッション、メモリ汚染、ツール利用規律の欠如、隠れた修復ループ、レンダリングの破損を監査します。重要度順の問題点と、コードを中心とした修正案を提示します。エージェントアプリケーション、自律ループ、LLMを活用した機能を開発する方に必須です。

39.1K
261.1K
指示
表示
NousResearchのロゴ

Antigravity Cli

NousResearch
組織人気

Antigravity CLI(agy)のプラグイン、認証、サンドボックスを操作します。

53.5K
250.4K
1ファイル
表示
langgeniusのロゴ

Backend Code Review

langgenius
組織人気

ユーザーが`api/`配下のバックエンドコードのレビューまたは監査を明示的に依頼した場合にのみ使用します。保留中の変更、特定ファイル、貼り付けられた差分のレビューに対応します。実装のみの依頼には使用しないでください。…

24.9K
157.6K
4ファイル
表示
langgeniusのロゴ

Frontend Code Review

langgenius
組織人気

ユーザーが`web/`または`packages/dify-ui/`配下のフロントエンドコードのレビューまたは監査を明示的に依頼した場合にのみ使用します。保留中の変更、特定ファイル、貼り付けられた差分のレビューに対応します。実装のみの依頼には使用しないでください。…

24.9K
157.6K
8ファイル
表示

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇