An autonomous AI-powered code security and quality auditor built directly on the QwenPaw Agent OS framework. It leverages QwenPaw kernel-level Tool Guard security policies, scroll context memory, AST structural analysis, and local Ollama model execution to deliver interactive Markdown reports and visual HTML dashboards.
QwenPaw Agentic Code Auditor makes QwenPaw the core hero of automated code inspection. Designed for lightweight, high-performance static analysis, it integrates:
- 🛡️ QwenPaw Tool Guard Policies: Scans code AST for dangerous function calls (
os.system,subprocess(shell=True),eval/exec, hardcoded credentials). - 🧠 QwenPaw Scroll Memory: Maintains working context history across multi-pass file audits.
- ⚡ Local LLM Engine: Native support for
qwen2.5:3bandqwenpaw-flashlocal models via Ollama with reasoning disabled (think: False). - 📊 Visual Deliverables: Produces GitHub-ready
output.mdand a responsive dark-modeoutput.htmldashboard.
- Core Framework: QwenPaw Agent OS Architecture (
qwenpaw) - Language: Python 3.11+ (Streamlined single-driver script
main.py) - Local AI Engine: Ollama (
qwen2.5:3b/qwenpaw-flash) - Templating Engine: Jinja2 (
templates/report_template.html) - Static Analysis: Native Python AST module & regex security heuristics
QwenPaw/
├── README.md # Project documentation & GitHub guide
├── requirements.txt # Minimal Python dependencies
├── main.py # Consolidated QwenPaw Agent OS driver & self-tests
├── sample_code.py # Sample target Python script for auditing
└── templates/
└── report_template.html # Responsive HTML visual dashboard template
Ensure Python 3.11+ is installed on your system.
pip install qwenpawpip install -r requirements.txtInstall and launch Ollama with the target model:
ollama run qwen2.5:3b- 🔒 Pre-Commit Code Security Check: Intercept vulnerability patterns before code is committed or merged.
- 🏎️ Automated Pull Request Review: Generate instant visual code quality metrics and security flags for PR authors.
- 📜 Compliance & Audit Logging: Produce offline, timestamped Markdown reports for security verification.
- 🛠️ Refactoring Guidance: Identify high-cyclomatic complexity methods and suggest modular code breakdowns.
- 🌐 Interactive Dashboard Sharing: Provide developers with standalone HTML visual dashboards containing instant file exports.
- 🔄 Multi-Language AST Support: Expand parsing capabilities to TypeScript, Go, and Rust codebases.
- 🤖 QwenPaw Marketplace Plugin: Publish as an official QwenPaw Marketplace plugin for web console triggering.
- 📡 CI/CD GitHub Action: Automatic repository scanning on push with inline PR comments.
- 🧠 ReMe Long-Term Vector Memory: Store historical vulnerability signatures in QwenPaw ReMe memory to prevent regressions.
- 🛡️ Interactive Fix Application: Provide single-click automated patch generation directly inside the HTML UI.
Execute the audit workflow on the included sample script:
python main.py --target sample_code.pyTo run with a custom model or custom output path:
python main.py --target sample_code.py --model qwen2.5:3b --output output.mdRun the verification test suite to validate AST parsing, QwenPaw engine rules, and report generation:
python main.py --testmain.py: Consolidated driver script combining QwenPaw Tool Guard policies, AST parsing, LLM synthesis, and report rendering.sample_code.py: Target script with intentional security vulnerabilities for audit demonstration.templates/report_template.html: Modern dark-mode UI dashboard with visual metric cards and Markdown export.
QwenPaw, QwenPaw Local Setup, AgentOS, AgentScope, Local AI Agent, Tool Guard Security, Ollama Qwen2.5, Python AST Auditor, AI Code Security, Autonomous Coding Agent