ai_audit
No security coverage
AI Audit provides a one-click technical audit of any Drupal site. Enter a URL,
and the module crawls the page, detects Drupal fingerprints, runs 18+
automated rules across Security, Performance, SEO, and Accessibility — then
enriches every issue with AI-generated explanations and ready-to-use code fixes.
Features
- One-click audit from a simple URL input form at
/ai-audit - Drupal detection engine with 12 signals and confidence scoring (DEFINITE / PROBABLE / UNLIKELY)
- 18 automated rules across 5 categories: Security, Performance, Drupal-specific, SEO, Accessibility
- AI-powered explanations via Claude API — each issue gets a technical explanation, ready-to-use code fix, and documentation links
- Severity levels: High / Medium / Low with sort order
- Estimation engine: total fix time in hours + rough cost estimate in USD
- Graceful fallback — module works without API key, showing rule-based issues only
- Expandable rule set — add new rules in 6 lines of PHP, no class registration needed
- Print-friendly report (PDF via browser print)
- Contact form integration — generates a pre-filled message summarizing all issues
Post-Installation
- Enable the module:
drush en ai_audit -y && drush cr - Go to /admin/config/ai-audit and enter your Claude API key (get one at console.anthropic.com)
- Optionally set the key in
settings.phpto keep it out of the database:
$config['ai_audit.settings']['claude_api_key'] = 'sk-ant-...'; - Visit /ai-audit, enter any URL, and click Run audit
- Review the structured report with issues, code fixes, and time estimates
Additional Requirements
- Drupal 10.x or 11.x
- PHP 8.1+
- Claude API key from console.anthropic.com (optional — module works without it, AI enrichment disabled)
- Outbound HTTPS access to
api.anthropic.comfrom your server
Recommended modules/libraries
- Security Kit (seckit) — complements AI Audit's CSP recommendations with actual header enforcement
- Metatag — fixes several SEO issues detected by this module
- Purge + Varnish Purger — implements the reverse proxy recommendations
Similar projects
- Site Audit — Drush-based audit tool, CLI only, no AI explanations, no external URL auditing
- Checklist API — manual checklist approach, not automated
AI Audit differs by combining automated rule detection with AI-generated,
code-level fix instructions — targeting both developers and agency clients
who need actionable output, not just a list of warnings.
Supporting this Module
Drupal expertise and consulting:
drupal.com.ua/contact
Community Documentation
- Full source code and setup guide: see the module's
README.md