HefestoAI Auditor:本地静态代码分析 - Openclaw Skills

作者:互联网

2026-03-26

AI教程

什么是 HefestoAI Auditor?

HefestoAI Auditor 是一款以隐私为核心的静态代码分析工具,旨在保护您的代码库而不向外部服务传输任何数据。作为 Openclaw Skills 生态系统的强大补充,它提供对 17 种语言的安全漏洞、语义偏差和技术债的深度检查。对于使用 AI 辅助编程的开发者来说,它特别有效,因为它有助于识别标准语法检查器可能遗漏的架构退化和逻辑变更。

通过完全在您的本地机器上运行,此技能可确保您的专有代码、机密信息和配置保持私密。它是现代 DevOps 流水线中必不可少的防御层,提供从 SQL 注入风险到循环复杂度的详细洞察,同时保持 Openclaw Skills 预期的卓越性能标准。

下载入口:https://github.com/openclaw/skills/tree/main/skills/artvepa80/hefestoai-auditor

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install hefestoai-auditor

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 hefestoai-auditor。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Install

HefestoAI Auditor 应用场景

  • 在硬编码的机密、API 密钥和令牌进入版本控制之前识别它们。
  • 审计 AI 生成的代码,检查大型单体仓库中的语义偏差和隐藏的不一致性。
  • 扫描包括 Dockerfile 和 Terraform 脚本在内的 DevOps 配置,查找安全误配置。
  • 监控循环复杂度和深度嵌套等代码质量指标,防止技术债。
HefestoAI Auditor 工作原理
  1. 通过 CLI 触发审计员扫描特定的项目目录。
  2. 对源文件执行仅限本地的扫描,无需网络访问或外部 API 调用。
  3. 引擎根据安全模式库和质量启发式算法分析代码。
  4. 问题会根据严重程度等级(关键、高、中、低)进行标记和分类。
  5. 生成文本、JSON 或 HTML 格式的详细报告,以便立即修复或进行自动化处理。

HefestoAI Auditor 配置指南

要将此工具集成到您的 Openclaw Skills 工作流中,请使用 pip 安装该包:

pip install hefesto-ai

然后您可以验证安装并检查状态:

hefesto status
hefesto --version

HefestoAI Auditor 数据架构与分类体系

HefestoAI Auditor 为每次扫描生成结构化数据。使用 JSON 输出格式时,该工具根据以下分类整理结果:

属性 描述
文件路径 检测到问题的具体文件和行号。
问题类型 发现结果的类别(例如:HARDCODED_SECRET、SQL_INJECTION_RISK)。
严重程度 用于确定修复优先级的等级(CRITICAL、HIGH、MEDIUM、LOW)。
函数 包含问题的特定代码块或函数名。
建议 关于如何重构或保护代码的可操作建议。
name: hefestoai-auditor
version: "2.2.0"
description: "Static code analysis tool. Detects security vulnerabilities, code smells, and complexity issues across 17 languages. All analysis runs locally — no code leaves your machine."
metadata:
  {
    "openclaw":
      {
        "emoji": "??",
        "requires": { "bins": ["hefesto"] },
        "install":
          [
            {
              "id": "pip",
              "kind": "pip",
              "package": "hefesto-ai",
              "bins": ["hefesto"],
              "label": "Install HefestoAI (pip)"
            }
          ]
      }
  }

HefestoAI Auditor

Static code analysis for security, quality, and complexity. Supports 17 languages.

Privacy: All analysis runs locally. No code is transmitted to external services. No network calls are made during analysis.

Permissions: This tool reads source files in the specified directory (read-only). It does not modify your code.


Install

pip install hefesto-ai

Quick Start

hefesto analyze /path/to/project --severity HIGH

Severity Levels

hefesto analyze /path/to/project --severity CRITICAL   # Critical only
hefesto analyze /path/to/project --severity HIGH        # High + Critical
hefesto analyze /path/to/project --severity MEDIUM      # Medium + High + Critical
hefesto analyze /path/to/project --severity LOW         # Everything

Output Formats

hefesto analyze /path/to/project --output text                          # Terminal (default)
hefesto analyze /path/to/project --output json                          # Structured JSON
hefesto analyze /path/to/project --output html --save-html report.html  # HTML report
hefesto analyze /path/to/project --quiet                                # Summary only

Status and Version

hefesto status
hefesto --version

What It Detects

Security Vulnerabilities

  • SQL injection and command injection
  • Hardcoded secrets (API keys, passwords, tokens)
  • Insecure configurations (Dockerfiles, Terraform, YAML)
  • Path traversal and XSS risks

Semantic Drift (AI Code Integrity)

  • Logic alterations that preserve syntax but change intent
  • Architectural degradation from AI-generated code
  • Hidden duplicates and inconsistencies in monorepos

Code Quality

  • Cyclomatic complexity >10 (HIGH) or >20 (CRITICAL)
  • Deep nesting (>4 levels)
  • Long functions (>50 lines)
  • Code smells and anti-patterns

DevOps Issues

  • Dockerfile: missing USER, no HEALTHCHECK, running as root
  • Shell: missing set -euo pipefail, unquoted variables
  • Terraform: missing tags, hardcoded values

What It Does NOT Detect

  • Runtime network attacks (DDoS, port scanning)
  • Active intrusions (rootkits, privilege escalation)
  • Network traffic monitoring
  • For these, use SIEM/IDS/IPS or GCP Security Command Center

Supported Languages (17)

Code: Python, TypeScript, JavaScript, Java, Go, Rust, C#

DevOps/Config: Dockerfile, Jenkins/Groovy, JSON, Makefile, PowerShell, Shell, SQL, Terraform, TOML, YAML


Interpreting Results

file.py:42:10
  Issue: Hardcoded database password detected
  Function: connect_db
  Type: HARDCODED_SECRET
  Severity: CRITICAL
  Suggestion: Move credentials to environment variables or a secrets manager

Issue Types

Type Severity Action
VERY_HIGH_COMPLEXITY CRITICAL Fix immediately
HIGH_COMPLEXITY HIGH Fix in current sprint
DEEP_NESTING HIGH Refactor nesting levels
SQL_INJECTION_RISK HIGH Parameterize queries
HARDCODED_SECRET CRITICAL Remove and rotate
LONG_FUNCTION MEDIUM Split function

CI/CD Integration

# Fail build on HIGH or CRITICAL issues
hefesto analyze /path/to/project --fail-on HIGH

# Pre-push git hook
hefesto install-hook

# Limit output
hefesto analyze /path/to/project --max-issues 10

# Exclude specific issue types
hefesto analyze /path/to/project --exclude-types VERY_HIGH_COMPLEXITY,LONG_FUNCTION

Licensing

Tier Price Key Features
FREE $0/mo Static analysis, 17 languages, pre-push hooks
PRO $8/mo ML semantic analysis, REST API, BigQuery integration, custom rules
OMEGA $19/mo IRIS monitoring, auto-correlation, real-time alerts, team dashboard

All paid tiers include a 14-day free trial.

See pricing and subscribe at hefestoai.narapallc.com.

To activate a license, see the setup guide at hefestoai.narapallc.com/setup.


About

Created by Narapa LLC (Miami, FL) — Arturo Velasquez (@artvepa)

  • GitHub: github.com/artvepa80/Agents-Hefesto
  • Support: support@narapallc.com