Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐾 QwenPaw Agentic Code Auditor

Python QwenPaw Ollama License Code Style

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.


🚀 Overview & QwenPaw Integration

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:3b and qwenpaw-flash local models via Ollama with reasoning disabled (think: False).
  • 📊 Visual Deliverables: Produces GitHub-ready output.md and a responsive dark-mode output.html dashboard.

⚙️ Tech Stack

  • 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

📁 Project Architecture

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

💻 Installation & Setup

1. Prerequisites

Ensure Python 3.11+ is installed on your system.

2. Install QwenPaw Main Tool

pip install qwenpaw

3. Install Project Dependencies

pip install -r requirements.txt

4. Setup Local LLM (Ollama)

Install and launch Ollama with the target model:

ollama run qwen2.5:3b

🎯 5 Core Use Cases

  1. 🔒 Pre-Commit Code Security Check: Intercept vulnerability patterns before code is committed or merged.
  2. 🏎️ Automated Pull Request Review: Generate instant visual code quality metrics and security flags for PR authors.
  3. 📜 Compliance & Audit Logging: Produce offline, timestamped Markdown reports for security verification.
  4. 🛠️ Refactoring Guidance: Identify high-cyclomatic complexity methods and suggest modular code breakdowns.
  5. 🌐 Interactive Dashboard Sharing: Provide developers with standalone HTML visual dashboards containing instant file exports.

🔮 5 Future Roadmap Features

  1. 🔄 Multi-Language AST Support: Expand parsing capabilities to TypeScript, Go, and Rust codebases.
  2. 🤖 QwenPaw Marketplace Plugin: Publish as an official QwenPaw Marketplace plugin for web console triggering.
  3. 📡 CI/CD GitHub Action: Automatic repository scanning on push with inline PR comments.
  4. 🧠 ReMe Long-Term Vector Memory: Store historical vulnerability signatures in QwenPaw ReMe memory to prevent regressions.
  5. 🛡️ Interactive Fix Application: Provide single-click automated patch generation directly inside the HTML UI.

⚡ Quick Start & Run Commands

Execute the audit workflow on the included sample script:

python main.py --target sample_code.py

To run with a custom model or custom output path:

python main.py --target sample_code.py --model qwen2.5:3b --output output.md

🧪 Testing & Verification

Run the verification test suite to validate AST parsing, QwenPaw engine rules, and report generation:

python main.py --test

📊 File Explanations

  • main.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.

🏷️ Keywords & SEO

QwenPaw, QwenPaw Local Setup, AgentOS, AgentScope, Local AI Agent, Tool Guard Security, Ollama Qwen2.5, Python AST Auditor, AI Code Security, Autonomous Coding Agent

About

QwenPaw: The AI Agent That Never Forgets (Setup Locally) - Autonomous AI code security and quality auditor powered by QwenPaw Agent OS

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages