Step-by-step, no marketing. Including what it cannot do.
The whole module is four files. Nothing hidden, nothing compiled:
auditor.php — the page: sidebar, 3-step wizard (depth → target → run), results strip, report modal shell.assets/js/modules/auditor.js — the AuditorPlatform class: folder browser, run loop, progress log, modal, export.api/auditor.php — API entry: session + rate limit + CSRF gate, then dispatches target_info, run_layer, run, layers, modes.api/modules/auditor.php — the engine (~2,500 lines): file enumeration, pattern scanner, taint tracker, secret detector, all 13 layer functions, scoring.target_info first, then run_layer&layer=N for each layer). The progress bar advances only when a real layer result arrives, and each completed layer is logged with its score, file count and milliseconds.target_info resolves your folder with the same traversal-proof resolver as the main scanner (SourceIndexer::resolveBaseDir + resolveUrlPath — anything outside the root is refused with a 400), then returns a recursive file census: PHP/JS/CSS/HTML/config counts, capped at 5,000 files.run_layer sets the audit root to your folder, starts a 100-second budget, enumerates that layer's file types (one tree walk per layer, shared across its checks), and runs its patterns.files_scanned, scan_ms, truncated, files_sample).| Layer | Method (honest one-liner) |
|---|---|
| L01 Frontend | Scans all JS for dynamic imports, error handlers, old jQuery; all markup for missing alt, inline handlers; finds build configs and .htaccess caching directives anywhere in the tree. |
| L02 Backend | Scans all PHP for prepared statements vs interpolated SQL, raw superglobal reads vs validation calls, strict_types, idempotency wording; intra-file taint tracking from $_GET/$_POST to SQL sinks. |
| L03 Database | PDO options, transactions, relation definitions across PHP; N+1 heuristic (query positioned after a loop keyword, per file); every .sql file checked for non-idempotent DDL. |
| L04 Auth | Token/JWT usage + expiry/rotation signals, bcrypt vs md5-of-password, cookie flags, session-fixation defence, guard-function vocabulary, lockout mechanics — all per file. |
| L05 Hosting | Finds Dockerfiles/compose files anywhere; reads their contents for minimal base, multi-stage, non-root USER, HEALTHCHECK, env isolation, resource limits. |
| L06 Cloud | Finds Terraform/K8s/serverless manifests anywhere; reads contents for autoscaling, VPC/subnet, security-group signals. |
| L07 CI/CD | Globs .github/workflows/* directly (dot-dirs are skipped by the walker); reads contents for lint/test/SAST/dependency/secret-scan stages; detects test suites and signed-commit config. |
| L08 Security | Unencoded output, code execution (excluding ->exec() DB calls), unserialize-on-request-data, dynamic includes, password-context weak hashes, DOM sinks in JS, CORS wildcard verified against real header() calls, entropy-based secret detection (values masked), taint flows to output/include/exec. RLS only demanded with tenancy signals. |
| L09 Rate limiting | Limiter vocabulary, algorithm words, per-endpoint buckets, body-size caps, lockout/backoff — per file. |
| L10 Caching | OPcache in Dockerfiles, caching headers in any .htaccess, Redis/Memcached clients, TTL and invalidation vocabulary across code. |
| L11 Scaling | Compose/K8s/nginx contents for replicas, health probes, ingress, zero-downtime update config. |
| L12 Logging | Logging calls, JSON formatting, correlation IDs, redaction mechanics, APM keywords, alerting words; flags log-calls adjacent to credential keywords and display_errors left on. |
| L13 Backups | Finds *backup*/*snapshot* scripts anywhere; reads contents for dumps, binlog/PITR, schedules, offsite copies, DR drills; resilience words across PHP. |
/VeloXscan, then audit a different project — scores and gaps change because different code is read.test_vulnerable.php in this repo is an intentional fixture (eval($_GET…), include($_GET…)). Audit its folder and confirm L08 names those exact lines.innerHTML sink whose content is properly escaped is still flagged “verify”) and false negatives (cleverly obfuscated flaws sail through).$_GET → $var → sink within one file. Cross-file and cross-function flows are invisible to it, and it can't tell whether you sanitized between the two cited lines — that's why every flow shows both lines for you to judge.name = "long random value" patterns via entropy. Split, concatenated, encrypted-at-rest-until-runtime, or oddly-named secrets will be missed. Values are masked in output — full secrets never enter reports or logs.truncated flag. A “clean” layer on a capped scan means “clean within what was read”.auditor.php, auditor.js) so its detection patterns and sample snippets can't match themselves.D:\Website-system\php\logs\php_error_log — the real cause is logged there with context. The error panel's Retry Audit re-runs.