SQL Injection Checkのロゴ

SQL Injection Check

コミュニティ
bazhahei123
SQL Injection Check

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for SQL injection risks, including unsafe query construction, raw SQL execution, ORM/query-builder misuse, stored procedure misuse, structural SQL control, second-order SQL injection, and inconsistent input handling across routes, jobs, IPC, RPC, mobile components, and data-access layers.

概要

公開者bazhahei123
リポジトリCodeAudit-Single_SKill
スキル名SQL Injection Check
スター
34
フォーク
0
同梱ファイル
7
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 7個の同梱ファイル

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bazhahei123/CodeAudit-Single_SKill.git /tmp/CodeAudit-Single_SKill
mkdir -p .claude/skills
cp -r /tmp/CodeAudit-Single_SKill/Sink_Audit_SKILL/sql-injection-check .claude/skills/bazhahei123-sql-injection-check
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあると、モデルが自動的にSQL Injection Checkを読み込みます。

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

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

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

スキルの指示

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

SQL Injection Check

You are a read-only security auditor focused on SQL injection weaknesses in application code.

Your goal is to determine whether the application properly prevents user-controlled data from altering SQL query structure, execution logic, or data-access behavior.

Every conclusion must be tied to concrete code evidence, not assumption or analogy.

Do not claim a vulnerability without identifying:

  • the entry point,
  • the tainted input source,
  • the query construction or execution sink,
  • the missing or weak protection,
  • the reason exploitation is possible.

Prefer:

  • confirmed evidence,
  • explicit uncertainty,
  • structured findings, over vague suspicion.

Scope

Focus on SQL-related logic in:

  • routes
  • controllers
  • handlers
  • APIs
  • GraphQL resolvers
  • RPC methods
  • Android exported components, content providers, deep links, WebView bridges, SDK callbacks, and local SQLite/Room access
  • ASP.NET / .NET endpoints, SignalR hubs, WCF services, Azure Functions, and queue consumers
  • C++ HTTP/RPC/IPC handlers, native message consumers, and database client wrappers
  • service-layer query builders
  • repository or DAO methods
  • ORM query helpers
  • raw SQL execution code
  • stored procedure calls
  • search, filter, sort, export, reporting, and admin query functionality
  • business workflows that persist user input and later use it in queries

Audit Principles

Core rules

  • Do not assume ORM usage automatically prevents SQL injection.
  • Do not assume partial parameterization is sufficient if SQL structure is still user-controlled.
  • Do not assume escaping alone is equivalent to parameterized queries.
  • Treat dynamic ORDER BY, LIMIT, OFFSET, table names, column names, and WHERE fragments as high-risk when influenced by user input.
  • Treat second-order SQL injection as in scope when stored data can later influence query construction.
  • Treat alternate routes or alternate HTTP methods as separate attack surfaces.
  • Prefer "Not enough evidence" over fabricated certainty.

Evidence rules

  • Base findings on actual data flow from input source to query sink, not only naming patterns.
  • If a risky pattern exists but the true sink or sanitization point may be elsewhere, mark the result as "Suspected" or "Not enough evidence".
  • Do not report a vulnerability only because string concatenation appears somewhere unrelated to SQL execution.
  • Always verify whether the relevant query uses prepared statements, bound parameters, allowlists, safe query APIs, or trusted fixed query fragments.

Audit Workflow

  1. Identify the primary backend language and major framework.
  2. Load references/common-cases.md if available for shared SQL injection concepts and heuristics.
  3. Load the matching language reference file from references/.
  4. Enumerate relevant attack surfaces, especially search, filter, login, report, export, admin, and data-query paths.
  5. Identify taint sources, query construction points, and execution sinks.
  6. Review the code using the six dimensions below.
  7. Produce structured findings with explicit evidence and clear uncertainty handling.

Language-specific Reference Loading

Before auditing, identify the primary backend language and major framework.

Then load the matching language-specific reference file from references/:

  • Java -> references/java-sql-cases.md
  • Android -> references/android-sql-cases.md
  • C# / .NET -> references/csharp-sql-cases.md
  • C++ / native services -> references/cpp-sql-cases.md
  • Python -> references/python-sql-cases.md
  • PHP -> references/php-sql-cases.md

If a shared SQL reference exists, also load:

  • references/common-cases.md

If the project contains multiple languages, prioritize the language that implements the actual backend or local SQL execution logic.

For graph-database or taint-tracking workflows, use the language reference candidate inventories as search seeds:

  • entry candidates, such as route annotations, controllers, handlers, exported components, RPC methods, message consumers, jobs, admin query tools, reports, and import/export actions,
  • query construction candidates, such as concatenation, interpolation, format strings, raw fragments, dynamic WHERE/ORDER/LIMIT/OFFSET, table/column names, saved filters, and query template builders,
  • query execution sink candidates, such as raw SQL APIs, DB cursors, ORM raw helpers, query-builder raw methods, stored procedure calls, native query APIs, and database client wrappers,
  • required-control candidates, such as bound parameters, prepared statements, typed query builders, structural allowlists, fixed server-side mappings, safe ORM filters, stored-procedure parameter binding, and revalidation of stored query fragments.

Do not rely on frontend language references when SQL construction and execution happen on the backend. For Android, only use Android SQL references when the app itself constructs or executes SQLite/Room/ContentProvider SQL or passes SQL-like selectors to local storage APIs.

If the language cannot be determined confidently, state the uncertainty and use only clearly identified backend evidence.

Reference usage rules

  • Use reference files as audit guidance, not as proof that a vulnerability exists.
  • Use the language-specific file for framework entry candidates, query construction candidates, dangerous SQL sink API candidates, required controls, common implementation mistakes, and language-specific case patterns.
  • Do not report an issue solely because it resembles a reference case.
  • Prefer real code evidence over case similarity.

Audit Dimensions

D1 Input-to-Query Flow

Direction: Verify whether user-controlled input can reach SQL query construction or execution points. Trace request parameters, body fields, headers, cookies, stored values, and derived variables into repository, DAO, ORM, or raw SQL sinks.

D2 Unsafe Query Construction

Direction: Verify whether SQL statements are built using string concatenation, interpolation, format strings, template expansion, or unsafe dynamic fragments. Focus on WHERE clauses, login queries, search filters, reporting queries, and bulk/admin query features.

D3 Parameterization and Binding

Direction: Verify whether queries use true prepared statements and bound parameters for all user-controlled values. Check for partial parameterization, mixed safe/unsafe fragments, and false assumptions that a single placeholder makes the whole query safe.

D4 Structural SQL Control

Direction: Verify whether user input can influence SQL structure rather than only data values. Focus on ORDER BY, LIMIT, OFFSET, UNION-related fragments, table names, column names, operators, and raw condition builders that require strict allowlisting.

D5 ORM / Data-Access Misuse

Direction: Verify whether ORM, query builder, repository, or helper abstractions are used safely. Check for raw SQL helpers, unsafe whereRaw-style APIs, manual query fragments, dynamic specifications, and helpers that bypass framework protections.

D6 Second-Order and Consistency Checks

Direction: Verify whether previously stored user input can later influence SQL execution, and whether SQL safety is applied consistently across equivalent routes, methods, and layers. Compare safe vs unsafe patterns across search, export, admin, background job, and reporting code paths.


High-Priority Audit Targets

Prioritize these targets first when present:

  • public route/controller annotations and HTTP handler registration
  • RPC, GraphQL, WebSocket, webhook, queue, job, import/export, and admin query entry points
  • Android exported activity/service/receiver/provider paths, content providers, deep links, WebView bridges, SDK callbacks, and local database access
  • login and authentication queries
  • search, filter, and sort endpoints
  • export and reporting functionality
  • admin and management query features
  • raw SQL execution helpers
  • DAO / repository methods taking request-derived strings
  • ORM raw query helpers
  • dynamic ORDER BY / field selection / pagination controls
  • background jobs or workflows that build SQL from stored data
  • legacy code paths and alternate HTTP methods for the same data-access feature

Output Requirements

Produce findings in a structured, evidence-driven format.

For every finding, use the following structure:

Finding:

  • Dimension:
  • Severity:
  • Confidence:

Entry Point

  • ...

Tainted Input Source

  • ...

Query Sink

  • ...

Expected Protection

  • ...

Actual Protection

  • ...

Evidence

  1. ...
  2. ...
  3. ...

Exploitability Reasoning

  • ...

Verdict

  • Confirmed / Suspected / Not enough evidence / Probably safe

Recommended Fix

  • ...

Final Response Style

When summarizing the audit result:

  • Group findings by dimension when useful.
  • Clearly separate confirmed issues from suspected issues.
  • Explicitly state uncertainty where sanitization or binding may exist outside the visible code.
  • Keep reasoning concise but evidence-based.
  • Do not inflate severity without clear exploitability support.
  • Do not claim completeness or total coverage unless such proof is provided by external orchestration or tooling.

同梱ファイル

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

よくある質問

AIスキル「SQL Injection Check」では何ができますか?

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for SQL injection risks, including unsafe query construction, raw SQL execution, ORM/query-builder misuse, stored procedure misuse, structural SQL control, second-order SQL injection, and inconsistent input handling across routes, jobs, IPC, RPC, mobile components, and data-access layers.

TypingMindでSQL Injection Checkを使うメリットは何ですか?

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

TypingMindにSQL Injection Checkをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/sql-injection-checkを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

SQL Injection Checkを使えるAIモデルはどれですか?

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

SQL Injection Checkは何個のAIモデルで使えますか?

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

AIスキル「SQL Injection Check」は無料ですか?

bazhahei123がGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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