AI Code Quality Scanner — catches what copilots miss.
Project description
airev
Catch code that looks valid, but is actually wrong.
Fast semantic code quality scanner for AI-written and human-written code. airev does not use generative AI to scan code — it is a deterministic static analysis tool.
Demo
File │ Line │ Rule │ Severity │ Message
──────────┼──────┼──────────────────┼──────────┼─────────────────────────────────────────
app.py │ 3 │ phantom-import │ error │ Module 'analytics.client' not found
app.py │ 6 │ hallucinated-api │ error │ 'Client.send_event_batch' does not exist
config.js│ 7 │ hardcoded-secret │ warning │ Possible API key in string literal
What it catches
| Rule | Description |
|---|---|
phantom-import |
Imports of packages or modules that don't exist in the project |
hallucinated-api |
Calls to methods/functions that don't exist on real packages |
deprecated-api |
Usage of deprecated APIs from Python stdlib, NumPy, Node.js |
hardcoded-secrets |
API keys, tokens, passwords left in source code |
reinvented-internal |
AI-duplicated utility functions that already exist in the project |
Languages: Python, JavaScript, TypeScript
Install
pip (recommended)
pip install airev-scanner
Docker
docker pull ghcr.io/airev-tools/airev:latest
docker run --rm -v "$(pwd):/repo" ghcr.io/airev-tools/airev /repo
Native binary (Linux, macOS)
curl -fsSL https://raw.githubusercontent.com/airev-tools/airev/main/build/install.sh | bash
Binaries are available for Linux x86_64, macOS x86_64, and macOS ARM64. If your platform is unsupported, use pip install airev-scanner.
Usage
# Scan the current directory
airev scan .
# Scan only Python files
airev scan . --lang python
# Output as JSON
airev scan . --format json
# Output as SARIF (for GitHub Code Scanning)
airev scan . --format sarif
# Run a single rule
airev scan . --rule phantom-import
# Check version
airev --version
Zero-config by default: auto-detects languages, scans all supported files.
GitHub Action
name: airev
on:
pull_request:
jobs:
airev:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- name: Run airev
id: airev
uses: airev-tools/airev@v0.2.0
with:
format: sarif
- name: Upload SARIF
if: always() && steps.airev.outputs.sarif-file != ''
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.airev.outputs.sarif-file }}
See Action documentation for all inputs and outputs.
Configuration
.airev.toml
exclude = ["vendor/**", "*.generated.py"]
[rules]
phantom-import = "off"
hardcoded-secrets = "warning"
[rules.deprecated-api]
enabled = true
severity = "error"
Also supports [tool.airev] in pyproject.toml. If both exist, .airev.toml takes precedence.
.airevignore
Gitignore-style file exclusion:
*.generated.py
vendor/**
!vendor/internal.py
Inline suppression
import foo # airev: ignore[phantom-import]
How it works
- Read source files (with safety checks: binary/size/symlink filtering)
- Parse with Tree-sitter (error-tolerant, multi-language)
- Lower into a unified AST stored in numpy arrays (Structure of Arrays)
- Build semantic context (imports, symbols, workspace facts)
- Evaluate pure-function rules via dictionary jump-table dispatch
- Emit findings as terminal output, JSON, or SARIF
All analysis is read-only. Rules are pure functions with no side effects. No code is ever executed or imported from the scanned repository.
Safety
- No code execution — never imports, evaluates, or runs repository code
- No repo mutation — never writes, moves, or deletes project files
- No network access — fully offline, no telemetry
- Binary/oversized/minified files — automatically skipped before parsing
- Symlinks outside project — rejected to prevent path traversal
- Missing dependencies — reported as degraded confidence, not silently dropped
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airev_scanner-0.2.0.tar.gz.
File metadata
- Download URL: airev_scanner-0.2.0.tar.gz
- Upload date:
- Size: 100.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29fdb4f2554aba4b973f259b6b25146d0aee2c34cf1e386249e24c85a6dc4751
|
|
| MD5 |
c0edb7be238746c7902e803350ac4b1b
|
|
| BLAKE2b-256 |
f51f15ec03a92a25efb4bce65bf2681e27d0164cdc12c80812752a0b5bc25299
|
File details
Details for the file airev_scanner-0.2.0-py3-none-any.whl.
File metadata
- Download URL: airev_scanner-0.2.0-py3-none-any.whl
- Upload date:
- Size: 62.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ebd93b59253abfea176f32a12f0bbe7ba1823c55fddee71b97146a64f66c6c
|
|
| MD5 |
262b20deb01c36c7cd95096d132b31b7
|
|
| BLAKE2b-256 |
ae0ed6535567e59f9c7fcab2d8b14b35f3ad75f6c15ddf208b00a2b0bd6e75ca
|