Skip to content

AXM Logo

axm-audit

Code auditing and quality rules for Python projects.

CI axm-audit axm-init Coverage PyPI Python 3.12+


What it does

axm-audit is a Python library and CLI that audits project quality across 10 scored categories, producing a composite 0โ€“100 score:

Category Tool Weight
Linting Ruff 20%
Type Safety mypy 15%
Complexity radon 15%
Security Bandit 10%
Dependencies pip-audit + deptry 10%
Testing pytest-cov 15%
Architecture AST analysis 10%
Practices AST analysis 5%

Quick Example

# CLI
axm-audit audit .

# Or via the unified AXM CLI
axm audit .
# Python API
from pathlib import Path
from axm_audit import audit_project

result = audit_project(Path("."))
print(f"Grade: {result.grade} โ€” {result.quality_score:.1f}/100")
# Grade: A โ€” 95.0/100

Features

  • ๐Ÿ” Linting โ€” Ruff analysis (800+ rules)
  • ๐Ÿ”’ Type Safety โ€” Strict mypy (per-project pyproject.toml config)
  • ๐Ÿ“Š Complexity โ€” Cyclomatic complexity via radon (Python API with subprocess fallback)
  • ๐Ÿ›ก๏ธ Security โ€” Bandit integration + hardcoded secrets detection
  • ๐Ÿ“ฆ Dependencies โ€” Vulnerability scanning (pip-audit) + hygiene (deptry)
  • ๐Ÿงช Testing โ€” Coverage enforcement via pytest-cov
  • ๐Ÿ—๏ธ Architecture โ€” Circular imports, god classes, coupling metrics, duplication detection
  • ๐Ÿ“ Practices โ€” Docstring coverage, bare except detection, blocking I/O, logging presence, test mirroring
  • ๐Ÿ”ง Tooling โ€” CLI tool availability checks
  • โšก Fast & Typed โ€” Direct Python APIs, strict mypy, 429 tests, 93% coverage

Learn More