← 返回
未分类 Key 中文

Autonomous Code Review

Automatically review code to detect critical bugs, security flaws, performance issues, and style violations as a first-pass code auditor.
自动审查代码,检测关键缺陷、安全漏洞、性能问题和风格违规,作为初步代码审计。
1477009639zw-blip
未分类 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 489
下载
💾 2
安装
1
版本
#latest

概述

Autonomous Code Review

Category: Development

Author: Beta

Version: 1.0.0

Runtime: OpenClaw + Claude/GPT

What It Does

Automatically review code for bugs, security issues, performance problems, and style violations. Acts as a tireless first-pass reviewer on any codebase.

When to Use

  • After any significant code change
  • Before merging pull requests
  • During code review requests
  • To catch issues before human reviewers

Review Checklist

🔴 Critical (Block Merge)

  • [ ] Security vulnerabilities (SQL injection, XSS, auth bypass)
  • [ ] Data corruption risks (race conditions, deadlocks)
  • [ ] Authentication/authorization bypasses
  • [ ] Secrets hardcoded in source

🟡 Important (Should Fix)

  • [ ] Performance issues (N+1 queries, inefficient loops)
  • [ ] Error handling missing or insufficient
  • [ ] Missing input validation
  • [ ] Resource leaks (unclosed connections, files)

🟢建议 (Nice to Fix)

  • [ ] Code style violations
  • [ ] Missing documentation
  • [ ] Hardcoded values that should be config
  • [ ] Overly complex logic

Usage

# Review a file
openclaw code review --file src/auth.py

# Review a diff
openclaw code review --diff "main..feature-branch"

# Full repository audit
openclaw code review --repo ./ --exclude "node_modules,dist"

Integration

GitHub Actions

- name: Code Review
  uses: openclaw/code-review-action@v1
  with:
    api-key: ${{ secrets.OPENCLAW_API_KEY }}

Pre-commit Hook

openclaw code review --staged --fail-on critical

Output Format

{
  "file": "src/auth.py",
  "issues": [
    {
      "severity": "critical",
      "line": 42,
      "rule": "sql-injection",
      "message": "User input directly interpolated into SQL query",
      "fix": "Use parameterized queries instead"
    }
  ],
  "score": 72,
  "summary": "1 critical, 2 important, 3 suggestions"
}

Best Practices

  • Run on every commit, not just before merges
  • Combine with human review for critical paths
  • Track review history to catch recurring issues
  • Customize rules per project type

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-03 07:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Beta Trading Analysis

1477009639zw-blip
交易分析与教育。技术分析、图表形态、风险管理、以及股票、外汇和加密货币的头寸规模。
★ 0 📥 941

Beta TA Signal Engine

1477009639zw-blip
使用 SMA/EMA/RSI/MACD/ATR 从 OHLCV CSV 生成技术分析交易设置,包括明确入场、止损、目标和仓位大小。
★ 0 📥 476

Backtester

1477009639zw-blip
专业的交易策略回测框架。在历史数据上测试简单移动平均线交叉、RSI、MACD、布林带以及自定义策略。生成...
★ 0 📥 488