Spaces:
Sleeping
Sleeping
Download db/seed/code_fixing.example.json from Alpha-Team/CyberArena: direct link, hf CLI and curl.
- Browser
- Download file 1.03 kB
-
https://huggingface.co/spaces/Alpha-Team/CyberArena/resolve/main/db/seed/code_fixing.example.json
- Command line
-
hf download hf://spaces/Alpha-Team/CyberArena/db/seed/code_fixing.example.json
-
curl -L -o code_fixing.example.json https://huggingface.co/spaces/Alpha-Team/CyberArena/resolve/main/db/seed/code_fixing.example.json
1.03 kB
| { | |
| "team_role": "blue", | |
| "language": "PYTHON", | |
| "module": "code-fixing", | |
| "title": "إصلاح ثغرة SQL Injection في دالة login()", | |
| "story": "اكتشف فريق الأمن في CloudWave ثغرة SQL Injection في كود تسجيل الدخول. مهمتك إغلاقها.", | |
| "task_outline": "استبدل استعلام SQL المعرّض للخطر بـ parameterized query.", | |
| "vulnerable_code": "def login(username, password):\n query = f\"SELECT * FROM users WHERE name='{username}' AND pass='{password}'\"\n return db.execute(query)\n", | |
| "vulnerability_type": "sql-injection", | |
| "vulnerability_description": "استخدام f-string لبناء استعلام SQL مباشرة بدون أي تصفية.", | |
| "hints": [ | |
| "استخدم ? placeholders في sqlite3.", | |
| "الفرق بين execute(query) و execute(query, params).", | |
| "الحل الآمن: db.execute('SELECT * FROM users WHERE name=? AND pass=?', (username, password))" | |
| ], | |
| "difficulty": "متوسط", | |
| "xp_reward": 150 | |
| } | |