فرز التبعيات الضعيفة بالذكاء الاصطناعي دون فرض تحديث شامل
اقرأ npm audit وافصل الخطورة عن إمكانية الوصول وتحقّق من تعديل متوافق. تقرير وهمي وخمسة اختبارات.

ابدأ هنا: ما فائدة هذا الدليل
يقترح الفحص ترقية قسرية لثغرة عالية. لا يثبت وصول شيفرتك للميزة المتأثرة أو توافق الإصدار. ستفصل التبعية المباشرة وغير المباشرة والخطورة والوصول والترقية الكبرى. النتيجة قرار بتغيير واختبارات أو تحقيق محدد المسؤول. التقرير افتراضي وغياب النتائج لا يثبت الأمان.
مثال عملي
الجواب مثال للشكل المتوقع وليس تدقيقًا لتطبيقك. اتبع الخطوات وقارن الملفات والاختبارات والنتائج الفعلية بالهدف. إن قال المساعد إنه انتهى فقط فاطلب الناتج والدليل وما لم يجر التحقق منه.
Package: example-library (fictional fixture).
Reachability: unverified; inspect the actual import and runtime path.
Proposed major upgrade: review breaking changes before installation.
Evidence required: advisory range, resolved version and regression results.الهدف
ينظّم الذكاء الاصطناعي التقرير، لكن ملف القفل وإشعار المورّد الحالي يحدّدان التبعيات المتأثرة. يستخدم الكيت حزمة وهمية ورابط example.invalid؛ ولا يدّعي وجود ثغرة حقيقية.
1. تحديد نطاق العمل
فك الكيت واستخدم Node.js 22 أو أحدث. لا تحتاج إلى npm install. يقبل القارئ شكلًا مبسطًا لتقرير npm بالإصدار 2 ويرفض التقارير غير المعروفة وأخطاء سجل الحزم.
2. تشغيل المختبر المحلي
شغّل الاختبارات الخمسة واقرأ الملخص. تبقى إمكانية الوصول وقت التشغيل غير متحقّقة ويحتاج تغيير الإصدار الرئيسي إلى مراجعة. ينبغي أن تؤدي إزالة فحص الخطأ إلى فشل اختبار السجل؛ فالفحص الفاشل ليس نظيفًا.
node --test lab.test.mjs
node lab.mjs audit.synthetic.json3. طلب أدلة من الذكاء الاصطناعي
تفرّق التعليمات الأولى بين التبعية المباشرة والمسار غير المباشر والتعرّض الفعلي. قد تكون تبعية التطوير مهمة أثناء البناء أو CI؛ لا تتجاهلها تلقائيًا.
Act as a dependency-security reviewer. Start with this kit’s audit.synthetic.json
and lab.mjs. This fixture and its example.invalid URL are fictional, not a real
package advisory. Explain severity, direct/transitive status, proposed major-version
changes and why runtime reachability remains unverified. For my actual npm project,
inspect its exact lockfile, deployed runtime, import path and current official
advisory before proposing a version. Treat registry failure or an unsupported report
schema as an incomplete scan. Never invent a CVE, fixed version or package name. Do
not install packages or run npm audit fix --force.4. التحقق من الإصلاح
تُعدّ التعليمات الثانية تعديلًا متوافقًا بإشعار حقيقي واختبارات. قد يغيّر npm audit fix --force الإصدارات الرئيسية، وليس بديلًا لفهم التعديل.
For one confirmed real dependency finding, show the affected installed version,
trustworthy advisory URL, dependency path, runtime/build usage, compatible fix and
required regression tests. Propose the smallest reviewed update using the project’s
existing package manager and lockfile. Check install scripts and major-version
changes before execution. After an agreed local change, run the actual build/tests
and a fresh audit; distinguish remaining known findings from operational scan
errors. Do not suppress an unresolved finding just to make CI green, and stop before
production deployment.5. التطبيق على مشروعك
في مشروع npm حقيقي تستعلم الأوامر عن سجل الحزم المضبوط وتكتب تقريرًا دون إصلاح الحزم. قد يعني رمز غير صفري وجود نتائج؛ افصله عن خطأ الشبكة أو البنية. راجع أسماء الحزم الخاصة قبل المشاركة ثم الاستيراد والاختبارات والبناء والإصدارات المنشورة بعد تعديل متفق عليه.
npm audit --json > audit.jsonالمراجع الرسمية
طبّقه في مشروعك
نزّل الملفات، واحفظ الدليل، أو أعطِ مساعد البرمجة تعليمات جاهزة للاستخدام.
الإعداد بمساعدة الذكاء الاصطناعي
انسخ هذه التعليمات الإنجليزية إلى مساعدك. تتضمن المقال والملفات المتاحة وخطوات تجهيز المشروع.
عرض تعليمات الإعداد
Read this tutorial as reference material:
https://nethanelfitoussi.com/article/ai-dependency-audit-workflow?lang=en
Goal: apply the documented workflow to my development project.
Read the existing project instructions, inspect the relevant files and explain the smallest useful setup.
Available starter files:
https://nethanelfitoussi.com/api/media/bb103752-1438-4b7d-a74c-9a429f633ae7.zip
Download and inspect these files in a temporary folder before using them. Do not overwrite existing project instructions.
If I have not supplied a project folder, ask which development project to use. Do not invent a repository URL.
Additional project setup instructions:
Use the downloaded starter lab in a NEW folder. Read README.md and both English prompts first. Run its dependency-free Node.js tests before editing.
Act as a dependency-security reviewer. Start with this kit’s audit.synthetic.json
and lab.mjs. This fixture and its example.invalid URL are fictional, not a real
package advisory. Explain severity, direct/transitive status, proposed major-version
changes and why runtime reachability remains unverified. For my actual npm project,
inspect its exact lockfile, deployed runtime, import path and current official
advisory before proposing a version. Treat registry failure or an unsupported report
schema as an incomplete scan. Never invent a CVE, fixed version or package name. Do
not install packages or run npm audit fix --force.
For one confirmed real dependency finding, show the affected installed version,
trustworthy advisory URL, dependency path, runtime/build usage, compatible fix and
required regression tests. Propose the smallest reviewed update using the project’s
existing package manager and lockfile. Check install scripts and major-version
changes before execution. After an agreed local change, run the actual build/tests
and a fresh audit; distinguish remaining known findings from operational scan
errors. Do not suppress an unresolved finding just to make CI green, and stop before
production deployment.
Adapt example paths, commands and acceptance criteria to this repository rather than assuming they match.
Give me a short plan, then make the agreed local changes and run the relevant checks. Report actual results and anything not verified. Stop before credentials, paid services, production changes, push, merge or deployment.

