Magebean CLI 0.1.0
Audit Magento 2 production readiness using 12 controls and 101 security rules.
Download the PHAR and run the default Basic scan from a Magento project.
wget https://magebean.com/files/magebean.phar
cd /var/www/magento
php /path/to/magebean.phar
When neither --path nor --url is supplied, Magebean searches for a Magento root from the current directory.
php bin/magebean <command> [options]
php magebean.phar <command> [options]
php magebean.phar --version
php magebean.phar list
| Command | Purpose |
|---|---|
| scan | Audit a Magento installation or storefront. |
| completion | Generate Bash, Fish, or Zsh completion. |
| help | Display help for a command. |
| list | List available commands. |
The scan command supports local filesystems, remote storefronts, or both sources of evidence.
| Mode | Options | Coverage |
|---|---|---|
| Local | --path=PATH, or omit both targets | Reads the Magento filesystem and local configuration. |
| Remote | --url=URL | Runs externally observable checks after confirming the target is Magento. |
| Hybrid | --path=PATH --url=URL | Combines local and HTTP evidence. |
A detected local Magento root must contain composer.json, bin/magento, and either app/etc/config.php or app/etc/env.php.
Profiles define reusable scan scopes. Magebean uses basic when --profile is omitted.
| Profile | Rules | Purpose |
|---|---|---|
basic | 21 | Default fast, low-noise production security and operations check. |
owasp | 77 | Application-security checks mapped to OWASP Top 10 2025. |
pci | 69 | PCI DSS v4.0.1 payment-readiness checks; not a certification. |
hardening | 89 | Deep production, code, dependency, integration, and operations checks. |
baseline | 101 | Full local catalog. Aliases: all, magebean. |
FILE | Custom | JSON profile path or a profile in .magebean/profiles. |
standard profile name is no longer supported. Use --profile=basic. The separate --standard option remains only as a legacy report selector.scan optionsphp magebean.phar [--path=PATH] [--url=URL] [options]
--path=PATH--url=URL--profile=PROFILE|FILE--controls=MB-Cxx,...--rules=MB-Rxxx,...--exclude-rules=MB-Rxxx,...--config=FILE--standard=NAMEAn explicit --profile takes precedence over the legacy --standard selector.
Magebean applies policy, profile, and command-line filters in this order:
Target rule pack
→ project policy
→ profile
→ --rules
→ --exclude-rules
Filters only reduce the selected profile. A rule outside basic is not added by --rules; select baseline first:
php magebean.phar \
--path=/var/www/magento \
--profile=baseline \
--rules=MB-R020
php magebean.phar --path=/var/www/magento
php magebean.phar --url=https://store.example.com
php magebean.phar \
--path=/var/www/magento \
--url=https://store.example.com
php magebean.phar --path=/var/www/magento --profile=basic
php magebean.phar --path=/var/www/magento --profile=owasp
php magebean.phar --path=/var/www/magento --profile=pci
php magebean.phar --path=/var/www/magento --profile=hardening
php magebean.phar --path=/var/www/magento --profile=baseline
php magebean.phar --path=/var/www/magento \
--profile=hardening --controls=MB-C01,MB-C05
php magebean.phar --path=/var/www/magento \
--profile=baseline --rules=MB-R049,MB-R050
php magebean.phar --path=/var/www/magento \
--exclude-rules=MB-R032
php magebean.phar \
--path=/var/www/magento \
--config=.magebean.yml
Exit 0UNKNOWN results are reported as inconclusive.Exit 1-h, --help-V, --version-q, --quiet--silent--ansi, --no-ansi-n, --no-interaction-v, -vv, -vvvA custom profile is a JSON file with an ID and a list of rule IDs. Unknown rule IDs fail validation.
{
"id": "acme",
"title": "ACME Magento Policy",
"description": "Rules required by ACME production policy.",
"rules": [
"MB-R001",
"MB-R031",
"MB-R049",
"MB-R050"
]
}
php magebean.phar \
--path=/var/www/magento \
--profile=.magebean/profiles/acme.json
Generate completion for Bash, Fish, or Zsh.
php magebean.phar completion bash
php magebean.phar completion fish
php magebean.phar completion zsh
php magebean.phar completion bash > completion.sh
source completion.sh
Show detailed scan help, disable colors for CI, or increase diagnostic output:
php magebean.phar --help
php magebean.phar \
--path=/var/www/magento \
--no-ansi \
--no-interaction
php magebean.phar --path=/var/www/magento -vvv
If Magento root detection fails, pass the installation root explicitly with --path=/var/www/magento.