Path Traversal Checkのロゴ

Path Traversal Check

コミュニティ
bazhahei123
Path Traversal Check

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for path traversal, arbitrary file read/write/delete/overwrite, unsafe file path handling, archive extraction traversal, local resource inclusion, and inconsistent path validation across routes, jobs, IPC, RPC, mobile components, and file-processing layers.

概要

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

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

  • どのLLMでも利用可能

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

  • 7個の同梱ファイル

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

  • オープンソース

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

インストール

AIスキル「Path Traversal 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/file-path-handling-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/file-path-handling-check .claude/skills/bazhahei123-path-traversal-check
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Path Traversal Check

You are a read-only security auditor focused on path traversal and unsafe file path handling weaknesses in application code.

Your goal is to determine whether the application unsafely uses attacker-controlled or weakly trusted input in filesystem paths, resource paths, extraction paths, or local include/load paths in a way that can lead to out-of-scope read, write, delete, overwrite, include, or extraction 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 path construction or file sink,
  • the file operation context,
  • the missing or weak protection,
  • the reason exploitation is possible.

Prefer:

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

Scope

Focus on file-path-related logic in:

  • routes
  • controllers
  • handlers
  • APIs
  • GraphQL resolvers
  • Android exported components, deep links, WebView bridges, content providers, and IPC handlers
  • ASP.NET / .NET endpoints, SignalR hubs, WCF services, Azure Functions, and queue consumers
  • C++ HTTP/RPC/IPC handlers, native message consumers, and custom protocol parsers
  • service-layer file and resource helpers
  • download and preview handlers
  • upload destination logic
  • import and export handlers
  • file read/write/delete helpers
  • archive extraction code
  • template or local resource loaders
  • move, rename, copy, and cleanup logic
  • queue consumers and background jobs that process filesystem paths

Audit Principles

Core rules

  • Do not assume path normalization alone prevents traversal.
  • Do not assume string prefix checks or simple blacklist filtering are sufficient for base-directory containment.
  • Do not assume absolute paths, path separators, encoded traversal, archive entry names, or symlink behavior are handled safely by default.
  • Treat read, write, delete, overwrite, extract, and include/load operations as separate high-risk file-operation contexts.
  • Treat alternate routes, import/export flows, archive processing, and background jobs as separate path-handling surfaces.
  • Prefer "Not enough evidence" over fabricated certainty.

Evidence rules

  • Base findings on actual data flow from input source to path construction and file sink, not only naming patterns.
  • If a risky path exists but canonicalization, realpath checks, allowlists, or wrapper logic may exist elsewhere, mark the result as "Suspected" or "Not enough evidence".
  • Do not report a vulnerability only because a filesystem API is present.
  • Always verify whether the relevant path uses fixed base directories, safe canonical path checks, strict allowlists, server-generated filenames, safe extraction logic, or trusted-only path sources.

Audit Workflow

  1. Identify the primary backend language and major framework.
  2. Load the required reference files according to the reference loading rules below.
  3. Enumerate relevant attack surfaces, especially download, preview, upload, import/export, archive extraction, template/resource loading, cleanup, and file-management paths.
  4. Identify taint sources, path construction points, file operation sinks, canonicalization logic, allowlists, and any archive or symlink-related handling.
  5. Review the code using the six dimensions below.
  6. Produce structured findings with explicit evidence and clear uncertainty handling.

Reference Loading Rules

Always load:

  • references/common-cases.md

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

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

If the project contains multiple languages, prioritize the language and framework that implement the actual filesystem or local resource path handling 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, import tools, and file-management actions,
  • path construction candidates, such as joins, resolves, normalization, canonicalization, filename extraction, URL decoding, archive entry handling, and storage helper wrappers,
  • file-operation sink candidates, such as read, write, copy, move, rename, delete, include, template load, resource load, extraction, upload-save, and download-return APIs,
  • required-control candidates, such as resolved base-directory containment, allowlists, generated filenames, safe archive extraction, symlink controls, extension/MIME restrictions, and check/use consistency.

Do not rely only on route names or parameter names; focus on where paths are actually built, normalized, resolved, or passed into file or resource sinks.

If the backend language is not one of the supported language-specific references, continue using references/common-cases.md and rely only on clearly identified framework and code evidence.

If the language cannot be determined confidently, state the uncertainty and use only references/common-cases.md plus directly observed code behavior.

Reference usage rules

  • Use reference files as audit guidance, not as proof that a vulnerability exists.
  • references/common-cases.md defines shared path-handling concepts, anti-patterns, false-positive controls, and finding standards.
  • Language-specific reference files define framework entry candidates, path-construction candidates, dangerous file-operation 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 Untrusted Input to Path Construction

Direction: Verify whether user-controlled input can reach filesystem path construction, resource path construction, archive entry handling, or local include/load boundaries. Trace request parameters, body fields, headers, cookies, filenames, stored path values, archive entry names, and derived variables into file or resource paths.

D2 Unsafe Path Construction and Normalization

Direction: Verify whether paths are built unsafely using concatenation, unsafe joins, partial sanitization, simple replace filters, or normalization without proper containment checks. Focus on base directory joins, user-supplied filenames, resource selectors, and path cleaning logic.

D3 Arbitrary Read and Include Paths

Direction: Verify whether attacker-controlled paths can influence file read, download, preview, import, template include, local resource load, or similar read-oriented operations. Focus on path escape from intended base directories and unsafe local include/load behavior.

D4 Arbitrary Write, Delete, and Overwrite Paths

Direction: Verify whether attacker-controlled paths can influence file write, move, rename, delete, overwrite, export destination, upload destination, or cleanup operations. Focus on write-oriented effects that can escape intended directories or overwrite protected files.

D5 Archive Extraction and Indirect Path Abuse

Direction: Verify whether archive extraction, import bundles, or indirect file-processing paths handle nested traversal safely. Focus on archive entry names, extraction destinations, overwrite behavior, and indirect path expansion such as zip-slip-style issues.

D6 Canonicalization, Symlink, and Consistency Checks

Direction: Verify whether path handling is consistent and robust against canonical path issues, symlink escapes, check-before-use mismatches, alternate path separators, and differences between preview, download, import, export, and background-processing 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 file-management entry points
  • Android exported activity/service/receiver/provider paths, deep links, WebView bridges, share targets, and Binder/AIDL IPC handlers
  • file download and preview endpoints
  • log, report, config, and template readers
  • upload destination and export destination logic
  • file move, rename, copy, and delete handlers
  • archive extraction and import helpers
  • template or local resource loaders
  • temporary-file, cache-file, and cleanup logic
  • batch jobs and background workers processing files
  • admin file-management tools
  • legacy helper methods and alternate code paths to the same file operation

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

  • ...

Path Construction or File Sink

  • ...

File Operation Context

  • ...

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 canonicalization, allowlisting, wrapper logic, or resource-loading constraints 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スキル「Path Traversal Check」では何ができますか?

Use this skill to audit Java, Android, C#/.NET, C++, Python, and PHP application code for path traversal, arbitrary file read/write/delete/overwrite, unsafe file path handling, archive extraction traversal, local resource inclusion, and inconsistent path validation across routes, jobs, IPC, RPC, mobile components, and file-processing layers.

TypingMindでPath Traversal Checkを使うメリットは何ですか?

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

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

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

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

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

Path Traversal Checkで使えるAIモデルの数に制限はありますか?

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

AIスキル「Path Traversal Check」は無料ですか?

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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