Logo di Path Traversal Check

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.

Panoramica

Pubblicato dabazhahei123
RepositoryCodeAudit-Single_SKill
Nome della skillPath Traversal Check
Stelle
34
Fork
0
File inclusi
7
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 7

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da bazhahei123 su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Path Traversal Check in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/file-path-handling-check
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Path Traversal Check in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Path Traversal Check non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Path Traversal Check non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Path Traversal Check su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Path Traversal Check è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Path Traversal Check in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Sink_Audit_SKILL/file-path-handling-check. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Path Traversal Check?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Path Traversal Check?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Path Traversal Check: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Path Traversal Check è gratuita?

È pubblicata su GitHub da bazhahei123. Consulta il repository per i termini di licenza. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇