Magebean CLI
Commands and options for running Magento security checks from the terminal.
Download the PHAR, make it executable, and scan a Magento root.
wget https://magebean.com/files/magebean.phar
chmod +x magebean.phar
./magebean.phar scan --path=/var/www/magento
When --path is omitted, Magebean attempts to detect Magento from the current directory.
| Command | Purpose |
|---|---|
| scan | Run the Magebean security audit against a Magento 2 project. |
| completion | Generate shell completion for Bash, Fish, or Zsh. |
| list | List all available commands. |
| help | Display help for a command. |
scan options--path=PATH--url=URL--standard=STANDARD--profile=PROFILE--controls=IDS--rules=IDS--exclude-rules=IDS--config=FILE./magebean.phar scan --path=/var/www/magento --url=https://store.example.com
./magebean.phar scan --path=. --profile=owasp
./magebean.phar scan --path=. --controls=MB-C01,MB-C05
./magebean.phar scan --path=. --exclude-rules=MB-R020,MB-R036
A profile defines a reusable scan scope. It selects the rules or controls relevant to a security standard, review type, client, or Magento environment.
| Profile | Aliases | Scope |
|---|---|---|
| OWASP Top 10 2025 | owasp, owasp-top-10 | Magento application security rules mapped to OWASP Top 10 categories. |
| PCI DSS v4.0.1 Readiness | pci, pci-dss, pci-dss-v4 | Technical readiness checks mapped to PCI DSS requirements. It does not certify compliance. |
./magebean.phar scan --path=. --profile=owasp
./magebean.phar scan --path=. --profile=pci
Pass a JSON file directly, or save a named profile at .magebean/profiles/<name>.json inside the current directory or Magento project root.
./magebean.phar scan --path=. --profile=profiles/agency-review.json
./magebean.phar scan --path=. --profile=agency-review
id is required. A profile can include specific rules, include whole controls, and exclude rules from the resulting scope.
{
"id": "agency-review",
"title": "Agency Security Review",
"report_template": "standard",
"include": {
"controls": ["MB-C01", "MB-C05"]
},
"exclude": {
"rules": ["MB-R020"]
}
}
For a tightly curated scope, replace include.controls with a top-level rules array:
{
"id": "checkout-review",
"title": "Checkout Security Review",
"rules": ["MB-R082", "MB-R083", "MB-R084", "MB-R086"]
}
rules are provided, Magebean selects those exact rule IDs.include.controls selects every rule belonging to those controls.exclude.rules is applied last to remove rules from the selected scope.Unknown rule IDs cause the profile to fail instead of silently running an incomplete scan.
-h, --help shows help, -V, --version prints the version, -q, --quiet shows errors only, and -v, -vv, or -vvv increases verbosity.
Generate completion for Bash, Fish, or Zsh and load it from your shell configuration.
./magebean.phar completion bash > completion.sh
source completion.sh