شعار File Path Handling Source Check

File Path Handling Source Check

المجتمع
bazhahei123
File Path Handling Source Check

Use this skill to identify source points for path traversal and unsafe file path handling audits, including path parameters, filenames, uploaded file metadata, archive entry names, stored paths, resource selectors, template names, export destinations, cleanup targets, queue payloads, mobile/IPC/RPC file inputs, and framework-specific path source locations in Java, Android, C#/.NET, C++, Python, and PHP applications.

نظرة عامة

الناشرbazhahei123
المستودعCodeAudit-Single_SKill
اسم المهارةFile Path Handling Source Check
النجوم
34
التفريعات
0
الملفات المرفقة
7
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 7

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها bazhahei123 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي File Path Handling Source Check في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Source_Audit_SKILL/file-path-handling-check
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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/Source_Audit_SKILL/file-path-handling-check .claude/skills/bazhahei123-file-path-handling-source-check
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل File Path Handling Source Check في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة File Path Handling Source Check تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط File Path Handling Source Check بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

File Path Handling Source Check

You are a read-only security auditor focused on identifying source points that are relevant to path traversal and unsafe file path handling review.

Your goal is to determine where file-path-relevant data enters the application and how it is carried toward filesystem path construction, local resource selection, archive extraction destinations, include/template loading, read/write/delete operations, upload/export destinations, cleanup paths, and background file-processing code.

Every source point must be tied to concrete code evidence, not assumption or naming alone.

Do not claim a vulnerability only because a source point exists. A source point is an audit starting point. A vulnerability requires later proof that attacker-controlled or weakly trusted path input reaches a file/resource sink with missing or weak containment, canonicalization, allowlist, symlink, archive-entry, or operation-specific controls.

Do not record a source point without identifying:

  • the entry point,
  • the source value or path-like value,
  • whether the value is client-controlled, external-system-controlled, stored attacker-influenced, server-trusted, mixed, or unclear,
  • the downstream file-path relevance,
  • the code evidence that connects the source to path construction, resource selection, archive extraction, or a file operation.

Prefer:

  • confirmed source points,
  • explicit uncertainty,
  • structured source inventories, over vague suspicion.

Scope

Focus on file-path source points in:

  • routes
  • controllers
  • handlers
  • APIs
  • GraphQL resolvers
  • RPC methods
  • Android exported components, deep links, WebView bridges, Binder/AIDL handlers, content providers, WorkManager jobs, SAF/document providers, and SDK callbacks that receive path-like values
  • ASP.NET / .NET controllers, minimal APIs, Razor Pages, SignalR hubs, gRPC services, WCF services, Azure Functions, queue consumers, and worker inputs
  • C++ HTTP/RPC/IPC/native service handlers, CGI/FastCGI entry points, plugin callbacks, custom protocol frames, and native file-processing jobs
  • 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
  • admin file-management, import, replay, and batch tools

Audit Principles

Core rules

  • Do not treat a source point as a vulnerability by itself.
  • Do not assume a filename is safe because it came from upload metadata, storage, or a prior database write.
  • Do not assume normalization, string cleaning, or extension checks make a path source trusted.
  • Do not assume server-side base directories constrain a source unless final path containment is visible.
  • Treat request path, query, body, header, cookie, GraphQL variable, RPC argument, form value, uploaded filename, and import row values as client-controlled unless code proves otherwise.
  • Treat archive entry names as attacker-controlled path sources unless archive provenance and entry validation prove otherwise.
  • Treat stored paths, cached paths, queued paths, and metadata paths as stored attacker-influenced when an attacker can write or influence them earlier.
  • Treat read, write, delete, overwrite, move, extract, include, and resource-load operations as different downstream contexts.
  • Prefer "Not enough evidence" over fabricated certainty.

Evidence rules

  • Base source classification on actual code paths, not only parameter names.
  • If a value may be normalized, canonicalized, allowlisted, mapped to a safe resource key, or overwritten elsewhere, mark the source as "Suspected" or "Not enough evidence".
  • Do not classify a path source as trusted only because it is joined with a base directory or passed through a helper.
  • Always verify whether the value comes from request input, uploaded metadata, archive metadata, stored state, queue metadata, framework routing, or trusted server-side construction.
  • Record downstream use only when visible in the inspected code path.

Audit Workflow

  1. Identify the primary backend language and major framework.
  2. Load references/common-cases.md.
  3. Load the matching language reference file from references/.
  4. Enumerate relevant source surfaces, especially download, preview, upload, import/export, archive extraction, template/resource loading, cleanup, file-management, and background-processing paths.
  5. Identify file-path-relevant source points, such as filenames, relative paths, resource names, template names, archive entry names, upload metadata, export destinations, stored paths, queue payloads, and cleanup targets.
  6. For each source point, determine whether it is client-controlled, external-system-controlled, stored attacker-influenced, server-trusted, mixed, or unclear.
  7. Trace each source far enough to document downstream file-path relevance, such as path join, path normalization, canonicalization, file read/write/delete, archive extraction, local include, template load, or resource load.
  8. Review the code using the six source dimensions below.
  9. Produce structured source points 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 Android, prioritize mobile boundaries that can introduce filenames, content URIs, document IDs, media paths, WebView bridge path arguments, IPC parcel fields, content-provider paths, WorkManager input data, or backend file identifiers.

For C#/.NET and C++, prioritize server, RPC, IPC, queue, worker, archive, cache/session, native protocol, and data-access layers that receive path-like values, storage keys, resource selectors, archive entries, or cleanup targets.

Do not rely only on route names or parameter names; focus on where path-like values are built, normalized, resolved, mapped, or passed into file or resource operations.

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 source discovery guidance, not as proof that a vulnerability exists.
  • references/common-cases.md defines shared path source concepts, propagation patterns, trust boundaries, false-positive controls, and source output standards.
  • Language-specific reference files define framework source locations, path-like input shapes, language-specific APIs, and follow-up checks.
  • Use the high-coverage candidate inventories in each reference as graph-search seed lists for entry points, filename/path fields, uploaded metadata, archive entries, stored second-order paths, resource selectors, and downstream operation mapping.
  • Do not report an issue solely because it resembles a reference case.
  • Prefer real code evidence over case similarity.

Graph / Taint Source Discovery Workflow

When the audit uses a graph database, code property graph, semantic index, or taint-tracking pipeline, seed discovery with candidate groups instead of relying on one exact source name.

Candidate group A: entry points

Search for code locations that receive path-like data:

  • HTTP route annotations, route tables, controller methods, handlers, servlet mappings, minimal APIs, and legacy scripts
  • GraphQL resolvers and mutations
  • RPC, gRPC, WCF, SOAP, Thrift, WebSocket, queue, worker, and message handlers
  • Android activities, services, broadcast receivers, content providers, deep links, WebView bridge methods, Binder/AIDL handlers, SAF/document-provider callbacks, and WorkManager jobs
  • C++ HTTP/RPC/IPC handlers, native plugin callbacks, CGI/FastCGI handlers, CLI/admin import tools, and background file-processing jobs

Candidate group B: path-like field names

Search for values likely to carry filesystem paths, resource selectors, or storage keys:

  • file, filename, fileName, name, path, filepath, filePath, dir, directory, folder, location
  • key, resource, resourceName, template, theme, locale, view, page, report, config, log
  • upload, download, preview, export, import, backup, archive, entry, member, manifest, destination, target
  • uri, url, contentUri, documentId, storageKey, objectKey, blobName, bucket, prefix

Candidate group C: path transformation names

Search for values being decoded, normalized, joined, resolved, mapped, or persisted:

  • decode, urlDecode, normalize, clean, canonical, realpath, absolute, resolve, join, combine
  • basename, extension, suffix, prefix, replace, strip, sanitize, safeName, secureFilename
  • baseDir, root, uploadDir, downloadDir, tempDir, workDir, extractDir, storagePath

Candidate group D: indirect and second-order source surfaces

Search for path-like values from:

  • uploaded original filenames, content-disposition names, MIME-derived extensions, media metadata, archive names
  • zip/tar/archive entry names, import manifests, package member names, nested archive paths
  • database fields, cache/session values, queue payloads, job args, failed jobs, object storage metadata, saved reports, saved exports, saved templates, cleanup targets
  • mobile content URIs, document IDs, SAF providers, WebView bridge arguments, IPC parcels, plugin payloads

Candidate group E: downstream relevance mapping

Keep only candidates that can be connected to file-path-relevant behavior:

  • path construction, path join, normalization, canonicalization, resource mapping, or storage-key mapping
  • read, preview, download, include, require, template load, local resource load
  • write, upload, export, delete, move, rename, copy, overwrite, temp-file creation, cleanup
  • archive extraction, import bundle expansion, backup restore, batch file processing, background worker file operations

Source Dimensions

S1 User-Controlled Path and Filename Sources

Direction: Identify request parameters, body fields, headers, cookies, route variables, uploaded filenames, form fields, GraphQL/RPC arguments, and import rows that may carry filenames, relative paths, absolute paths, resource names, or path fragments.

S2 Path Construction and Transformation Sources

Direction: Identify values that are concatenated, joined, normalized, decoded, URL-decoded, path-cleaned, extension-appended, mapped, or combined with a base directory before reaching a file/resource operation.

S3 Read, Preview, Download, and Include Sources

Direction: Identify path-like values that influence file reads, downloads, previews, log/config/report readers, template selection, local include/require, or local resource loading.

S4 Write, Upload, Export, Delete, Move, and Cleanup Sources

Direction: Identify path-like values that influence upload destinations, export destinations, generated file names, write targets, overwrite targets, delete targets, rename/move/copy destinations, temporary files, and cleanup paths.

S5 Archive Entry and Indirect File Sources

Direction: Identify archive entry names, extracted paths, import bundle metadata, nested file names, generated extraction destinations, and stored file paths that may later be processed by extraction or background file workflows.

S6 Canonicalization, Symlink, and Alternate Path Sources

Direction: Identify source values that may interact with canonical path resolution, symlinks, alternate separators, encoded traversal, absolute path forms, storage aliases, and equivalent preview/download/import/background paths.


High-Priority Source Targets

Prioritize these source targets first when present:

  • file download and preview endpoints
  • log, report, config, and template readers
  • upload filename and destination logic
  • export filename and destination logic
  • file move, rename, copy, and delete handlers
  • archive extraction and import helpers
  • template or local resource selectors
  • 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
  • archive entry names and stored path metadata

Output Requirements

Produce source points in a structured, evidence-driven format.

For every source point, use the following structure:

Source Point:

  • Dimension:
  • Source Type:
  • Language / Framework:
  • Confidence:

Entry Point

  • ...

Source Location

  • ...

Source Value

  • ...

Trust Boundary

  • Client-controlled / External-system-controlled / Stored attacker-influenced / Server-trusted / Mixed / Unclear

Downstream File-Path Relevance

  • ...

Evidence

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

Audit Relevance

  • ...

Verdict

  • Confirmed source / Suspected source / Not enough evidence / Probably irrelevant

Recommended Follow-up

  • ...

Final Response Style

When summarizing the source audit result:

  • Group source points by dimension when useful.
  • Clearly separate confirmed source points from suspected source points.
  • Explicitly state uncertainty where origin, normalization, canonicalization, allowlists, symlink behavior, or wrapper logic may exist outside the visible code.
  • Keep reasoning concise but evidence-based.
  • Do not inflate a source point into a vulnerability without sink and missing-control evidence.
  • Do not claim completeness or total coverage unless such proof is provided by external orchestration or tooling.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي File Path Handling Source Check؟

Use this skill to identify source points for path traversal and unsafe file path handling audits, including path parameters, filenames, uploaded file metadata, archive entry names, stored paths, resource selectors, template names, export destinations, cleanup targets, queue payloads, mobile/IPC/RPC file inputs, and framework-specific path source locations in Java, Android, C#/.NET, C++, Python, and PHP applications.

لماذا تستخدم File Path Handling Source Check على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة File Path Handling Source Check عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت File Path Handling Source Check في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/bazhahei123/CodeAudit-Single_SKill/tree/main/Source_Audit_SKILL/file-path-handling-check. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام File Path Handling Source Check؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع File Path Handling Source Check؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام File Path Handling Source Check معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي File Path Handling Source Check مجانية؟

نشرها bazhahei123 على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇