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()