מיון תלויות פגיעות עם AI בלי לכפות עדכון גורף
לקרוא 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.המטרה
AI מסייע לארגן דוח, אך קובץ הנעילה והודעת הספק העדכנית קובעים אילו תלויות מושפעות. הקיט משתמש בחבילה בדיונית ובכתובת example.invalid; אין כאן טענה לפגיעות אמיתית.
1. הגדרת גבולות הבדיקה
חלצו לתיקייה חדשה והשתמשו ב-Node.js 22 ומעלה. אין צורך ב-npm install לתרגיל. הקורא תומך במבנה מפושט של דוח npm בגרסה 2 ודוחה מבנים לא מוכרים או שגיאת שרת חבילות.
2. הפעלת התרגיל המקומי
הריצו את חמש הבדיקות וקראו את הסיכום. החשיפה בזמן ריצה נשארת לא מאומתת, ומעבר גרסה ראשית דורש בדיקה. הסרת בדיקת השגיאה צריכה להכשיל את בדיקת שרת החבילות: סריקה שנכשלה אינה סריקה נקייה.
node --test lab.test.mjs
node lab.mjs audit.synthetic.json3. לבקש ראיות מה-AI
הפרומפט הראשון מבדיל תלות ישירה, שרשרת עקיפה וחשיפה בזמן ריצה. תלות פיתוח יכולה להשפיע בבנייה או ב-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 אמיתי הפקודה פונה לשרת החבילות המוגדר וכותבת דוח בלי לתקן חבילות. קוד יציאה לא אפס יכול לציין ממצאים; יש להבדיל משגיאת רשת או מבנה. בדקו שמות חבילות פרטיים לפני שיתוף, ואז imports, בדיקות, בנייה וגרסאות בפריסה לאחר עדכון מוסכם.
npm audit --json > audit.jsonמקורות רשמיים
מכאן לפרויקט שלכם
הורידו את הקבצים, שמרו את המדריך או תנו לעוזר הפיתוח תיאור משימה מוכן.
מכינים את הפרויקט עם AI
העתיקו את הפרומפט באנגלית לעוזר הפיתוח. הוא כולל את המאמר, הקבצים הזמינים ושלבי ההכנה.
הצגת פרומפט ההכנה
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.

