Code Quality Analyser is an AI-powered tool designed to analyze you code quality. It can annalyse codefiles in your codebases and automatically generate comprehensive documentation for your projects, including security design, threat modeling, attack surface analysis, and more. The tool can be run locally using Docker or directly via Streamlit.
- AI-powered analysis that supports multi llm and works with OpenAI, OpenRouter, Anthropic, and Google models
- Docker-based execution for consistency and containerisation
- Streamlit UI for an interactive experience
- Generates security reports in Markdown format for better readeability.
git clone https://github.com/YOUR-USERNAME/YOUR-REPO.git
cd YOUR-REPOBefore running the tool, set up the required API keys: note that you can change this command based on the API key you are using
export GOOGLE_API_KEY=your-google-api-key
export GEMINI_API_KEY=your-gemini-api-key(For Windows PowerShell)
$env:GOOGLE_API_KEY="your-google-api-key"
$env:GEMINI_API_KEY="your-gemini-api-key"docker build -t code quality checker .docker run -v $(pwd):/target \
-e GOOGLE_API_KEY=${GOOGLE_API_KEY} \
-e GEMINI_API_KEY=${GEMINI_API_KEY} \
ai-security-analyzer \
dir -v -t /target/uploads -o /target/security_design.md \
--agent-provider google --agent-model gemini-2.0-flash-thinking-expThis will generate security_design.md containing the security analysis.
build your docker imagepip install streamlit
streamlit run app.pyOnce started, open the displayed local URL (e.g., http://localhost:8501) to interact with the security analyzer via the UI.
📦 AI-Security-Analyzer
├── 📂 ai_code_quality # Core analyzer logic
├── 📂 data # Example reports and datasets
├── 📂 scripts # Helper scripts
├── 📂 uploads # Uploaded files for analysis
├── Dockerfile # Docker setup
├── app.py # Streamlit UI
├── requirements.txt # Python dependencies
├── security_design.md # Generated security report
└── README.md # Project documentation
If you’d like to contribute:
- Fork the repo
- Create a feature branch (
git checkout -b feature-name) - Commit changes (
git commit -m 'Added feature') - Push (
git push origin feature-name) - Create a Pull Request
This project is licensed under the MIT License.
For questions or issues, feel free to reach out via GitHub Issues or email at [email protected], [email protected].