شعار Python Packaging Git Audit

Python Packaging Git Audit

مؤسسة
opendatahub-io
python-packaging-git-audit

Inspect recent git history of a Python package repository for suspicious commits touching supply-chain-sensitive files, then triage findings with AI reasoning to produce a structured risk report section.

نظرة عامة

الناشرopendatahub-io
المستودعai-helpers
اسم المهارةpython-packaging-git-audit
النجوم
39
التفريعات
76
الملفات المرفقة
تعليمات فقط
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

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

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

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

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

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

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

التثبيت

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

1

التثبيت في TypingMind

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

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-python-packaging/skills/python-packaging-git-audit
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/opendatahub-io/ai-helpers.git /tmp/ai-helpers
mkdir -p .claude/skills
cp -r /tmp/ai-helpers/plugins/odh-python-packaging/skills/python-packaging-git-audit .claude/skills/python-packaging-git-audit
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

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

يُحمّل النموذج Python Packaging Git Audit تلقائيًا بمجرد ورود طلب ذي صلة بها.

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

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

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

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

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

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

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

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

Python Packaging Git Audit

Inspects the recent git history of a Python package repository for commits that modify supply-chain-sensitive files (setup.py, CI configs, .pth files, etc.) and contain suspicious patterns. Produces a self-contained "Git History Analysis" report section with triaged findings and a risk assessment.

Inputs

  • repo_path (required): Local filesystem path to a git repository
  • output_file (optional): Write the report section to this file path instead of returning it inline. The first line of the file must be RISK_RATING:<value> so the orchestrator can parse it without reading the full report.

Step 1: Enumerate Commits

Determine the number of commits available and scan up to the last 50:

bash
git -C <repo-path> log -50 --format='%H'

Step 2: Filter Sensitive Files

From those commits, identify ones that modify supply-chain-sensitive files:

  • setup.py, setup.cfg, pyproject.toml, MANIFEST.in
  • .github/workflows/*.yml, .gitlab-ci.yml
  • Any .pth files
  • __init__.py files at package root
bash
git -C <repo-path> log -50 --diff-filter=ACMR --name-only --format='COMMIT:%H|%aI|%ae' -- \
  setup.py setup.cfg pyproject.toml MANIFEST.in \
  '.github/workflows/*.yml' .gitlab-ci.yml \
  '*.pth' '*/__init__.py'

Step 3: Search for Suspicious Patterns

For each flagged commit, extract the diff and search for suspicious patterns:

  • Code execution: eval(, exec(, compile(
  • Process spawning: subprocess, os.system, os.popen
  • Encoding/serialization: base64, marshal, pickle
  • Network access: socket, urllib, requests.get, httpx
  • Native code: ctypes, cffi
  • Embedded URLs: http://, https://
bash
git -C "<repo-path>" show --format= -m --first-parent "<commit>" -- "<file>" | \
  grep -nE 'eval\(|exec\(|compile\(|subprocess|os\.system|os\.popen|base64|marshal|pickle|socket|urllib|requests\.get|httpx|ctypes|cffi|https?://'

Collect per finding: commit hash, author, date, file modified, and matching patterns.

Step 4: Triage

Review git history findings with AI reasoning. There are no deterministic rules for this phase — each finding requires contextual judgment.

For each flagged commit, consider:

  • Is this a normal dependency version bump or configuration change?
  • Does the pattern match the package's stated purpose?
  • Is the author a known maintainer with a history of contributions?
  • Does the change introduce new capabilities that seem out of scope?

Flag commits that introduced suspicious patterns into sensitive files. Assign a verdict to each:

  • Likely legitimate — change is a normal maintenance or dependency update
  • Suspicious — change introduces unexpected capabilities or patterns
  • Critical — change strongly indicates malicious intent (e.g., encoded payload in install hook)

Output Format

Produce the following markdown section:

markdown
## Git History Analysis (Last 50 Commits)

**Commits touching sensitive files:** {N}

| Commit | Date | Author | File | Patterns Found |
|--------|------|--------|------|----------------|
| abc1234 | 2026-03-15 | user@example.com | setup.py | subprocess, os.system |

**AI Assessment:** {Brief narrative on whether the git history changes look normal or concerning, with reasoning}

The risk_rating for this phase is one of:

  • no_issues — No sensitive files modified in recent history
  • low_risk — All findings classified as "likely legitimate"
  • needs_review — One or more findings classified as "suspicious"
  • critical — One or more findings classified as "critical"

If output_file is provided, write the file with the first line as RISK_RATING:<value> followed by a blank line and then the markdown section above. If output_file is not provided, return the report section inline.

Error Handling

ScenarioBehavior
Path is not a git repositoryReport "not a git repository", risk_rating = needs_review
Fewer than 50 commits availableScan all available commits, note count in report
No sensitive files modified in historyReport "no sensitive files found", risk_rating = no_issues

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

ماذا تفعل مهارة الذكاء الاصطناعي Python Packaging Git Audit؟

Inspect recent git history of a Python package repository for suspicious commits touching supply-chain-sensitive files, then triage findings with AI reasoning to produce a structured risk report section.

لماذا تستخدم Python Packaging Git Audit على TypingMind؟

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

كيف أثبّت Python Packaging Git Audit في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/opendatahub-io/ai-helpers/tree/main/plugins/odh-python-packaging/skills/python-packaging-git-audit. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Python Packaging Git Audit؟

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

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Python Packaging Git Audit؟

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

هل مهارة الذكاء الاصطناعي Python Packaging Git Audit مجانية؟

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

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

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

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

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

عرض الكل

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

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