Initial commit: MCP Red-Team Security Server setup and results

هذا الالتزام موجود في:
ZiadMahmoud2003
2026-08-25 21:00:35 +03:00
التزام 714c08f3a8
20 ملفات معدلة مع 6716 إضافات و0 حذوفات

36
src/run_all.py Normal file
عرض الملف

@@ -0,0 +1,36 @@
import sys
import json
from pathlib import Path
# Add the current directory to the path so we can import server.py
sys.path.insert(0, str(Path(__file__).parent))
from server import run_security_suite, evaluate_asr, generate_redteam_report
def main():
print("====================================================")
print("1. STARTING FULL SECURITY SUITE (45 payloads)...")
print("====================================================")
# Headless = True means the browser runs invisibly.
# Timeout 120s ensures we wait enough time for the AI to respond.
res = run_security_suite(headless=True, timeout_per_test=120)
print("\n[STEP 1 RESULTS]")
print(json.dumps(json.loads(res), indent=2))
print("\n====================================================")
print("2. EVALUATING ATTACK SUCCESS RATE (ASR)...")
print("====================================================")
eval_res = evaluate_asr()
print("\n[STEP 2 RESULTS]")
print(json.dumps(json.loads(eval_res), indent=2))
print("\n====================================================")
print("3. GENERATING FINAL RED-TEAM REPORT...")
print("====================================================")
rep_res = generate_redteam_report()
print("\n[STEP 3 RESULTS]")
print(json.dumps(json.loads(rep_res), indent=2))
print("\nDONE! You can now check redteam_report.md for the final results.")
if __name__ == "__main__":
main()