Path Traversal Check logo

Path Traversal Check

Community
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.

Overview

Publisherbazhahei123
RepositoryCodeAudit-Single_SKill
Skill namePath Traversal Check
Stars
34
Forks
0
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by bazhahei123 on GitHub. Read the source before you install it.

Installation

Install the Path Traversal Check AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/file-path-handling-check
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Path Traversal Check in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Path Traversal Check on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Path Traversal Check is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Path Traversal Check AI skill do?

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.

Why use Path Traversal Check on TypingMind?

Because you install it once and use it with any model. Path Traversal Check is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Path Traversal Check in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/file-path-handling-check. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Path Traversal Check?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Path Traversal Check?

As many as you like. As long as a model supports skills, you can use Path Traversal Check with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Path Traversal Check AI skill free?

It is published on GitHub by bazhahei123. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇