Search by

crealoz / easyaudit-cli

ChristopheCrealoz

Standalone static analysis tool for Magento 2 codebases

Package info

github.com/crealoz/easyaudit-cli

pkg:composer/crealoz/easyaudit-cli

Fund package maintenance!

crealoz

Statistics

Installs: 102

Dependents: 0

Suggesters: 0

Stars: 15

Open Issues: 2

v2.0.0 2026-11-26 18:46 UTC

README

Latest Release License: MIT PHP Version Tests codecov

Static analysis tool for Magento 2 codebases. Detects anti-patterns, security risks, and architectural issues.

Features

  • 21 processors detecting 40 anti-patterns across DI, code quality, templates, performance, and architecture
  • Zero dependencies - standalone PHAR (~455KB)
  • CI/CD ready - SARIF output for GitHub Code Scanning
  • Docker image available
  • Privacy first - No data sent to external servers (security details)

workflow-schema.png

Quick Start

Using PHAR

# Download latest PHAR
curl -LO https://github.com/crealoz/easyaudit-cli/releases/latest/download/easyaudit.phar
chmod +x easyaudit.phar

# Run
php easyaudit.phar scan /path/to/magento --format=sarif

Using Composer

composer require --dev crealoz/easyaudit-cli
vendor/bin/easyaudit scan /path/to/magento --format=sarif

Using Docker

docker run --rm --user "$(id -u):$(id -g)" -v $PWD:/workspace ghcr.io/crealoz/easyaudit:latest scan /workspace

From Source

git clone git@github.com:crealoz/easyaudit-cli.git
php bin/easyaudit scan /path/to/magento

Output Formats

Format Use Case
sarif GitHub Code Scanning, tooling (default)

Console output is always displayed during scan.

Automatic fixing (fix-apply) and the HTML, Markdown and JSON reports are part of the sponsors edition.

GitHub Actions

Scan & upload to Code Scanning

name: EasyAudit Scan

on: [push, pull_request]

permissions:
  contents: read
  security-events: write

jobs:
  scan:
    runs-on: ubuntu-latest
    container:
      image: ghcr.io/crealoz/easyaudit:latest
    steps:
      - uses: actions/checkout@v6
      - run: |
          mkdir -p report
          easyaudit scan --format=sarif --output=report/easyaudit.sarif "$GITHUB_WORKSPACE"
      - uses: github/codeql-action/upload-sarif@v4
        with:
          sarif_file: report/easyaudit.sarif

Private repos: SARIF upload requires GitHub Advanced Security, which is a paid feature for private repositories. Upload the SARIF file with upload-artifact instead. See GitHub Actions docs for alternative workflows.

GitHub Code Scanning

Documentation

Requirements

  • PHP 8.1+
  • Docker (optional)

License

MIT