Skip to content

Repository files navigation

🛡️ StyleShield AI

AI-Powered Programmer Identity Verification Using Coding Fingerprints

StyleShield AI is an AI-powered system designed to verify whether a new code submission is consistent with a programmer's established coding behavior.

Instead of relying only on code similarity, StyleShield analyzes multiple programming patterns such as variable naming, indentation, function structure, complexity, loops, comments, and other structural characteristics to create a unique Coding Fingerprint and Coding DNA.


🚀 Why StyleShield?

Traditional plagiarism detection mainly focuses on whether two programs look similar.

StyleShield focuses on a different question:

"Does this code behave like the code normally written by this programmer?"

Every programmer develops certain coding habits and patterns. These patterns can provide useful supporting evidence for programmer identity verification.


✨ Key Features

  • 🔍 Coding Fingerprint Extraction
  • 🧬 Coding DNA Generation
  • 📊 Programming Style Analysis
  • 🤖 Machine Learning Prediction
  • 🔄 Similarity Analysis
  • 🧠 Programming Personality Insights
  • 📈 Visual Analysis
  • 📄 Verification Reports
  • 🗃️ Analysis History
  • 🌐 WebMCP Integration
  • 🤝 Human + AI-Agent Collaboration

🧠 How It Works

Previous Code Samples ↓ Coding Fingerprint Creation ↓ New Code Submission ↓ Feature Extraction ↓ Similarity Analysis ↓ Machine Learning Prediction ↓ Coding DNA + Style Analysis ↓ Verification Result ↑ WebMCP ↓ AI-Agent Assistance

🔬 Coding Fingerprint

StyleShield extracts multiple characteristics from source code, including:

Variable naming patterns Indentation behavior Function structure Function length Code complexity Loops Conditional statements Comments Blank lines Classes Imports List comprehensions AST-based structural features

These characteristics are combined to create a programmer-specific coding profile.

🧬 Coding DNA

StyleShield generates a compact Coding DNA identifier representing the extracted programming characteristics.

Example:

SS-C2B399A99434

The Coding DNA works as a compact representation of the programmer's coding style, while the detailed Coding Fingerprint provides the underlying characteristics.

🌐 WebMCP Integration

For the WebMCP Challenge, StyleShield AI was extended with WebMCP so that AI agents can directly access the application's analysis capabilities through structured tools.

Available WebMCP Tools analyze_code

Analyzes source code and returns structured StyleShield analysis including:

Coding Fingerprint Coding DNA Personality information Verification-related information get_coding_fingerprint

Extracts structural and behavioral coding characteristics from source code.

explain_verification

Provides a human-readable explanation of a verification result using the available analysis evidence.

🤝 Human + AI-Agent Workflow

WebMCP allows StyleShield to move beyond a traditional webpage-based interaction.

A human can provide a programmer's code while an AI agent can use StyleShield's WebMCP tools to:

Analyze the submitted code Retrieve coding characteristics Examine verification evidence Explain the result

The AI agent assists with investigation and interpretation while the human remains responsible for the final verification decision.

🛠️ Technology Stack Technology-Purpose Python-Core application and analysis Flask-Web application and REST API JavaScript-Frontend and WebMCP integration HTML/CSS-User interface SQLite-Data storage Machine Learning-Programming-style prediction AST Analysis-Source-code structure analysis Jinja2,HTML-templating ReportLab-Verification report generation Cloudflare-Tunnel Public development/demo access WebMCP-AI-agent tool integration

📁 Project Structure StyleShield-AI/ │ ├── app.py ├── database.py ├── feature_extractor.py ├── similarity.py ├── coding_dna.py ├── ml_model.py ├── personality.py ├── chart_generator.py ├── pdf_generator.py ├── requirements.txt │ ├── templates/ │ ├── index.html │ └── result.html │ ├── static/ │ ├── style.css │ └── charts/ │ └── README.md ⚙️ Installation

  1. Clone the Repository git clone https://github.com/Sharvani-07/StyleShield-AI.git cd StyleShield-AI

  2. Create a Virtual Environment python -m venv venv Windows venv\Scripts\activate

  3. Install Dependencies pip install -r requirements.txt

  4. Run the Application python app.py

The application will be available at:

http://127.0.0.1:5000 🧪 Example

Example source code:

a = 10 b = 20 c = a + b print(c)

StyleShield analyzes the submitted code and generates structured information such as:

Status: Success Coding DNA: SS-C2B399A99434 Coding Fingerprint: Generated Personality Analysis: Generated

The actual result depends on the code being analyzed and the established programmer profile.

📊 Verification Process

StyleShield combines multiple signals rather than depending on a single feature.

The analysis includes:

Source Code ↓ Feature Extraction ↓ Coding Fingerprint ↓ Similarity Analysis ↓ Machine Learning Analysis ↓ Coding DNA ↓ Personality Analysis ↓ Verification Evidence

This multi-feature approach helps provide a broader view of programming behavior.

🎯 Applications

StyleShield AI can assist with:

🎓 Coding assessments 🏫 Academic programming evaluation 💼 Technical hiring 👨‍💻 Programmer identity verification 🔐 Secure coding environments 🔎 Code authorship investigation 🤖 AI-assisted verification 📝 Online programming platforms 🌟 What Makes StyleShield Different?

Traditional code comparison can identify similarities between programs.

StyleShield focuses on the programmer's coding behavior.

Instead of asking only:

"Are these two programs similar?"

StyleShield asks:

"Is this code consistent with the programmer's established coding style?"

The system combines:

Structural code features Programming habits Similarity analysis Machine learning Coding Fingerprint Coding DNA Explainable analysis WebMCP-based AI-agent interaction

This creates a more comprehensive approach to programmer identity verification.

🌐 WebMCP Architecture Human User │ ↓ StyleShield UI │ ↓ Flask Backend │ ┌───────────┴───────────┐ ↓ ↓ Code Analysis WebMCP Tools │ │ ↓ ┌────────┼────────┐ Feature Extraction ↓ ↓ ↓ │ analyze fingerprint explain ↓ code code verification Coding Fingerprint │ ↓ Similarity + ML │ ↓ Coding DNA │ ↓ Verification Result ↑ │ AI Agent 🔐 Responsible AI Approach

StyleShield AI is designed as an AI-assisted verification system, not an automatic authority.

The system provides supporting evidence based on coding behavior.

The final decision should involve appropriate human review, especially in high-impact situations such as academic evaluation or employment.

🔮 Future Scope

Future improvements include:

🌐 Cross-language programmer fingerprinting 🧠 Advanced semantic code analysis 📚 Larger machine-learning datasets 🔄 Continuous fingerprint learning 🔍 Stronger explainability 🤖 Additional WebMCP tools 🎓 Coding-assessment platform integration 📝 Advanced verification history 🔐 Detailed audit trails 🧬 Improved Coding DNA representation 🎭 Detection of deliberate coding-style imitation ☁️ Scalable cloud deployment 🔗 Integration with developer platforms 📈 Future WebMCP Capabilities

Additional WebMCP tools could allow AI agents to:

Compare multiple submissions Retrieve historical verification results Generate verification reports Analyze coding evolution over time Identify unusual changes in coding behavior Provide detailed explanations of verification evidence Assist instructors or reviewers during coding assessments 🏆 Project Goal

The goal of StyleShield AI is to provide a new layer of evidence for programmer identity verification by combining AI, machine learning, source-code analysis, coding fingerprints, and WebMCP.

Rather than replacing human judgment, StyleShield aims to help humans make better-informed verification decisions.

⚠️ Disclaimer

StyleShield AI is an AI-assisted verification system and does not provide absolute proof of code authorship.

Coding fingerprints and machine-learning predictions should be treated as supporting evidence.

Final verification decisions should involve appropriate human review.

👥 Project StyleShield AI

AI-Powered Programmer Identity Verification Using Coding Fingerprints and WebMCP

Built with:

Python • Flask • JavaScript • Machine Learning • AST Analysis • SQLite • WebMCP

📜 License

This project is developed as a prototype for demonstrating AI-powered programmer identity verification and WebMCP-based human-agent interaction.

About

AI-powered programmer identity verification using coding fingerprints and WebMCP.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages