API Security Auditor Pro is a professional command-line tool designed to help developers and security engineers test the security of their APIs. It automatically detects common security vulnerabilities and misconfigurations.
- β Rate Limiting Detection - Test if your API can handle brute force attacks
- π Security Headers Check - Identify missing security headers
- π¨ Vulnerability Scanning - Detect common API vulnerabilities
- π Multiple Output Formats - JSON, HTML, CSV reports
- π³ Docker Support - Run anywhere without installation
- β‘ Fast & Lightweight - Minimal dependencies, maximum performance
- Installation
- Quick Start
- Commands Reference
- Examples
- Security Checks
- Docker Usage
- CI/CD Integration
- Output Formats
- FAQ
- Contributing
pip install api-security-auditor-progit clone https://github.com/miladrezanezhad/api-security-auditor-pro.git
cd api-security-auditor-pro
pip install -e .docker pull miladrezanezhad/api-security-auditor-pro
docker run miladrezanezhad/api-security-auditor-pro --helpapi-auditor scan https://jsonplaceholder.typicode.com/usersOutput:
π Starting security scan on: https://jsonplaceholder.typicode.com/users
Security Scan Results
βββββββββββββββββ³ββββββββββββββββ³βββββββββββ
β Check β Status β Severity β
β‘βββββββββββββββββββββββββββββββββββββββββββ©
β Rate Limiting β β οΈ VULNERABLE β MEDIUM β
βββββββββββββββββ΄ββββββββββββββββ΄βββββββββββ
β οΈ Found 1 vulnerabilities!
api-auditor test-rate-limit https://api.github.com/users/octocatOutput:
π¦ Testing rate limiting on: https://api.github.com/users/octocat
Rate Limiting Test Results
βββββββββββββββββββββββββ³βββββββββ
β Metric β Value β
β‘βββββββββββββββββββββββββββββββββ©
β Total Requests β 50 β
β Successful (200) β 0 β
β Rate Limited (429) β 50 β
β Errors β 0 β
β Rate Limiting Present β β
Yes β
βββββββββββββββββββββββββ΄βββββββββ
api-auditor scan https://api.example.com --output report.json --format json
api-auditor report report.json --output final_report.htmlScan a single API endpoint for vulnerabilities.
api-auditor scan URL [OPTIONS]Options:
| Option | Description | Default |
|---|---|---|
-v, --verbose |
Enable verbose output | False |
-o, --output |
Output file path | None |
-f, --format |
Output format (json/html) | json |
-t, --timeout |
Request timeout in seconds | 30 |
Examples:
# Basic scan
api-auditor scan https://api.example.com/users
# Scan with verbose output
api-auditor scan https://api.example.com/users --verbose
# Save to HTML report
api-auditor scan https://api.example.com/users --output report.html --format html
# Increase timeout for slow APIs
api-auditor scan https://slow-api.com --timeout 60Test if your API implements proper rate limiting.
api-auditor test-rate-limit URL [OPTIONS]Options:
| Option | Description | Default |
|---|---|---|
-r, --requests |
Number of requests to send | 50 |
-c, --concurrency |
Concurrent connections | 5 |
-d, --delay |
Delay between requests (seconds) | 0.05 |
Examples:
# Standard test
api-auditor test-rate-limit https://api.example.com/login
# Aggressive test (100 requests, 10 concurrent)
api-auditor test-rate-limit https://api.example.com/login --requests 100 --concurrency 10
# Slow test (to be polite)
api-auditor test-rate-limit https://api.example.com/login --delay 0.5Generate a formatted report from previous scan results.
api-auditor report INPUT_FILE [OPTIONS]Options:
| Option | Description | Default |
|---|---|---|
-o, --output |
Output file path | None |
Examples:
# Generate summary from JSON results
api-auditor report scan_result.json
# Save formatted report
api-auditor report scan_result.json --output formatted_report.json# Step 1: Test rate limiting on login endpoint
api-auditor test-rate-limit https://your-api.com/api/login --requests 100 --concurrency 20
# Step 2: Scan user endpoints
api-auditor scan https://your-api.com/api/users --output users_scan.json
# Step 3: Generate report
api-auditor report users_scan.json --output security_report.html# Development
api-auditor scan https://dev-api.example.com --output dev_report.json
# Staging
api-auditor scan https://staging-api.example.com --output staging_report.json
# Production
api-auditor scan https://api.example.com --output prod_report.jsonCreate a batch script scan_all.bat:
@echo off
echo Scanning API Endpoints...
api-auditor scan https://api1.example.com --output report1.json
api-auditor scan https://api2.example.com --output report2.json
api-auditor scan https://api3.example.com --output report3.json
echo All scans complete!# GitHub API (has rate limiting)
api-auditor test-rate-limit https://api.github.com/users
# JSONPlaceholder (no rate limiting)
api-auditor scan https://jsonplaceholder.typicode.com/posts
# Agify API (simple demo API)
api-auditor scan https://api.agify.io?name=michael
# Chuck Norris API
api-auditor test-rate-limit https://api.chucknorris.io/jokes/random| Check ID | Check Name | Severity | Description |
|---|---|---|---|
| RATE001 | Missing Rate Limiting | MEDIUM | API doesn't limit request rates, vulnerable to brute force |
| HEAD001 | Missing Security Headers | LOW | Missing HSTS, CSP, X-Frame-Options headers |
| DATA001 | Sensitive Data Exposure | HIGH | API returns sensitive information in responses |
| AUTH001 | Weak Authentication | HIGH | Weak JWT secrets or missing authentication |
# Pull the image
docker pull miladrezanezhad/api-security-auditor-pro:latest
# Run a scan
docker run miladrezanezhad/api-security-auditor-pro scan https://api.example.com
# Save output locally
docker run -v $(pwd)/output:/output miladrezanezhad/api-security-auditor-pro \
scan https://api.example.com --output /output/report.json# Clone repository
git clone https://github.com/miladrezanezhad/api-security-auditor-pro.git
cd api-security-auditor-pro
# Build image
docker build -t api-auditor:custom .
# Run
docker run api-auditor:custom scan https://api.example.comname: API Security Scan
on:
push:
branches: [main]
schedule:
- cron: '0 2 * * *' # Daily at 2 AM
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install API Auditor
run: pip install api-security-auditor-pro
- name: Run Security Scan
run: |
api-auditor scan https://api.example.com --output security-report.json
- name: Upload Results
uses: actions/upload-artifact@v3
with:
name: security-report
path: security-report.jsonsecurity-scan:
stage: test
script:
- pip install api-security-auditor-pro
- api-auditor scan https://api.example.com --output report.json
- api-auditor report report.json
artifacts:
paths:
- report.json
reports:
junit: report.xmlpipeline {
agent any
stages {
stage('API Security Scan') {
steps {
sh 'pip install api-security-auditor-pro'
sh 'api-auditor scan https://api.example.com --output security-report.json'
}
}
}
post {
always {
archiveArtifacts artifacts: 'security-report.json'
}
}
}{
"target": "https://api.example.com",
"timestamp": "2026-05-30T05:20:57.186710",
"vulnerabilities": [
{
"check": "Rate Limiting",
"severity": "MEDIUM",
"finding": "No rate limiting detected",
"remediation": "Implement rate limiting to prevent brute force attacks"
}
],
"scan_summary": {
"duration_seconds": 2.34,
"checks_performed": 1
}
} Security Scan Results
βββββββββββββββββ³ββββββββββββββββ³βββββββββββ
β Check β Status β Severity β
β‘βββββββββββββββββββββββββββββββββββββββββββ©
β Rate Limiting β β οΈ VULNERABLE β MEDIUM β
βββββββββββββββββ΄ββββββββββββββββ΄βββββββββββ
A: Any HTTP/HTTPS API - REST, GraphQL, SOAP. Public APIs, internal APIs, microservices.
A: No! It only sends safe test requests. It checks for configurations and behaviors without exploiting vulnerabilities.
A: Default is 30-50 requests per test. You can control this with --requests parameter.
A: Yes! Set environment variables:
set HTTP_PROXY=http://proxy.company.com:8080
set HTTPS_PROXY=https://proxy.company.com:8080A: Current version supports basic scanning. Future versions will add authentication support.
A: Very accurate for rate limiting detection. Other checks are being continuously improved.
Contributions are welcome! Here's how you can help:
- Report Bugs: Open an issue on GitHub
- Suggest Features: Tell us what you'd like to see
- Submit PRs: Fix bugs or add features
- Improve Docs: Help make documentation better
# Clone repository
git clone https://github.com/miladrezanezhad/api-security-auditor-pro.git
cd api-security-auditor-pro
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
black src tests
flake8 src testsMIT License - see LICENSE file for details.
- OWASP for API security guidelines
- The Python open-source community
- All contributors and users
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: miladvf2014@gmail.com
If you find this tool useful, please star it on GitHub!
https://github.com/miladrezanezhad/api-security-auditor-pro
Made with β€οΈ for API security
# Help
api-auditor --help
api-auditor scan --help
# Scan
api-auditor scan https://api.example.com
api-auditor scan https://api.example.com --verbose
api-auditor scan https://api.example.com --output report.json
# Rate Limit Test
api-auditor test-rate-limit https://api.example.com
api-auditor test-rate-limit https://api.example.com --requests 100 --concurrency 10
# Reports
api-auditor report scan_result.json
api-auditor report scan_result.json --output final.htmlStart securing your APIs today! π―
