Skip to content

feat: add /learn security — post-deploy live security scanner#9

Merged
8GSean merged 1 commit into
masterfrom
raz/Security
Jun 15, 2026
Merged

feat: add /learn security — post-deploy live security scanner#9
8GSean merged 1 commit into
masterfrom
raz/Security

Conversation

@RazHadas

Copy link
Copy Markdown
Contributor

מה זה

מודול חדש /learn security שסורק אפליקציה חיה לאחר פריסה ומלמד את הלומד על כל פרצה שנמצאת.

הקשר

תלמיד בנה אפליקציית מעקב מצב רוח ופרסם אותה. סקירת אבטחה שנעשתה אחרי הפריסה מצאה 8 פרצות — כולל endpoint ללא אימות שאיפשר לכל אחד לשכתב את היומן, וחשיפת קוד המקור דרך express.static(__dirname). מודול זה מוסיף בדיקה שיטתית לתוך פלוא הלמידה.

שינויים

.claude/commands/learn/security.md (חדש)

סקירת אבטחה ב-5 שלבים:

  • Phase A — סריקת HTTP על ה-URL החי: קבצים חשופים, security headers, auth endpoints, /config leakage
  • Phase B — 2 שאלות ממוקדות על endpoints וקלט משתמש
  • Phase C — checklist לפי ממצאים בלבד (לא כל הרשימה תמיד): חשיפת קבצים, auth, confused deputy, HTML injection, headers, rate limiting, error leakage, ניהול סודות — כל אחד עם הסבר למה זה מסוכן + קוד תיקון
  • Phase D — דוח 🔴/🟠/🟡/✅
  • Phase E — שמירת ממצאים ל-~/skill-tutor-tutorials/progress/security-[project].md

.claude/commands/learn/deploy.md

נוסף Step 7 בסוף — אחרי שיש URL חי, הלומד מוזמן להריץ /learn security [URL]. הסיבה לסוף (ולא אמצע): רוב הבדיקות דורשות אפליקציה שרצה.

.claude/commands/learn.md

נוסף routing לפקודות security ו-security https://....

למה post-deploy ולא pre-deploy

בדיקות קוד בלבד מפספסות:

  • איזה קבצים בפועל נגישים (לא מה שצריך להיות)
  • response headers שהשרת שולח
  • האם auth endpoint באמת מחזיר 401 — או 200
  • מה /config חושף בפועל

כל הפרצות שנמצאו בתלמיד נגלו דרך URL חי, לא קריאת קוד.

Test plan

  • /learn security https://mood-tracker-gkzt.onrender.com — מריץ curl checks ומציג ממצאים
  • /learn security ללא URL — מבקש URL לפני שממשיך
  • /learn deploy — Step 7 מופיע בסוף עם הצעה להריץ security
  • /learn security https://valid-url מוצא קבצים חשופים אם יש

🤖 Generated with Claude Code

New module (.claude/commands/learn/security.md) that scans a live URL
for real vulnerabilities — file exposure, auth gaps, missing headers,
HTML injection, rate limiting, and secret leakage.

Key design decisions:
- Accepts a URL argument (/learn security https://...) so checks run
  against the running app, not just source code — same approach that
  caught real issues in a student's mood-tracker deployment
- Phase A runs curl-based HTTP checks (files served, headers, auth
  endpoints, /config leakage) before asking the learner anything
- Phase B asks only 2 targeted questions based on live findings
- Added as Step 7 in deploy.md (after the live URL exists, not before)
- Routing added to learn.md for /learn security [url]

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@8GSean 8GSean merged commit a91b45a into master Jun 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants