Ops And Release
AIWAF-PHP Operations
Source and package versions
One AIWAF repository.
Python: py/aiwaf/ · Node.js: js/ · Rust/WASM: rust/ · Java: java/.
Source and canonical README.
Versions shown describe the source checkout; package releases are independent.
Current Python/Node source targets are aiwaf 1.1.8 (Python) and
aiwaf 1.1.5 (npm), with Rust/Python 0.2.7 and
WASM 0.2.5 and Java 1.3.5. Sandbox guides retain their separately pinned builds.
How AIWAF works: system architecture
10. Operational Command Surface
php setup.php
php cli/detect_and_train.php
composer test
composer run cover-everything
composer run test-adapters-matrix
composer run validate-all
AIWAF-PHP operations are script-based (PHP/Composer), not a Node-style monolithic CLI.
11. Configuration Model
Layering
- Defaults in
Core\RuntimeConfig - Optional JSON file via
RuntimeConfig::loadFromFile - Environment mapping via
RuntimeConfig::loadFromEnvironment - Runtime overrides via
RuntimeConfig::update
Static Config Highlights (Config)
Config::$exemptPaths,Config::$knownPathsConfig::$rateLimitPerMinuteConfig::$keywordDetectionThresholdConfig::$uuidTamperThresholdConfig::$aiAnomalyThresholdConfig::HEADER_MIN_SCORE,Config::REQUIRED_HEADERS
Env Mapping Highlights
- Storage, header validation, rate limiting, detection toggles, geo policies, blocklist/logging controls.
12. Request Lifecycle (Simplified)
- Request enters front controller/bootstrap.
AIWAF::protect()evaluates exemptions and enabled controls.- Failing controls block with
403/429and may persist IP consequences. - Passing requests continue to app routing.
- Training loop independently updates model and keywords from historical logs.
13. Testing And Local Development
- PHP
>=7.4, Composer, optional Docker for adapter/sandbox matrix workflows.
composer install
php setup.php
composer test
php cli/detect_and_train.php
composer run cover-everything
composer run test-adapters-matrix
composer run validate-all
14. Packaging And Release Surface
- Composer name:
aayushgauba/aiwaf - PSR-4 namespace:
AIWAF\\->src/ - Dev namespace:
AIWAF\\Tests\\->tests/ - Archive excludes include
/examplesand/tools
15. Operational Notes
- Run
AIWAF::protect()early, before side effects/output. - Keep exemptions explicit for health checks and trusted callbacks.
- Treat anomaly blocking as data-dependent and retrain with representative logs.
- Select adapter/driver backend according to deployment topology and durability needs.
- Validate thresholds/settings with staged traffic before tightening.
Suggested Onboarding Order
README.mddocs/php/setup(Setup Guide)src/AIWAF.phpsrc/Core/RuntimeConfig.phpsrc/Core/Training.phpandsrc/Core/TrainingLogic.phpsrc/Adapters/*andsrc/RateLimit/*cli/detect_and_train.phptests/
