MAGDOX Code Security documentation

CLI reference

Every magdox command, global flags and exit codes.

Status: Preview

Commands follow magdox <command> [subcommand] [flags]. Output is human-readable by default and stable JSON with --format json. Behaviour is identical on Windows, macOS and Linux.

Global flags

Global flags
FlagPurpose
--org <slug>Act within a specific organisation.
--format text|jsonOutput format.
--yesSkip interactive confirmations.
--offlineUse only cached rules and data; never contact MAGDOX.
--config <path>Use a specific project configuration file.
--quiet / --verboseReduce or increase logging.

Commands

Commands
CommandPurpose
magdox login | logout | whoamiDevice sign-in, end the session, show identity, organisation and role.
magdox initCreate .magdox.yml and register the project.
magdox scanScan locally and upload findings. Flags: --include, --exclude, --only, --baseline, --show-payload, --local-only, --fail-on.
magdox rules status | pull | import <file>Show cached rule version, refresh, or import an offline bundle.
magdox runs list | show | open | fetchList runs, show one, open it in the dashboard, download report and exports together.
magdox report <run> --format pdf|html|mdDownload the report for a run.
magdox export <run> --format sarif|cyclonedx|spdx|cbomDownload a machine-readable export.
magdox findings list | show <id>Read findings from the terminal.
magdox projects list | show | archiveManage projects.
magdox tokens list | create | revokeManage CI tokens (admin).
magdox config get | set | validateInspect and validate configuration.
magdox upgrade | verify-install | versionMaintain the CLI.

Exit codes

Exit codes
CodeMeaning
0Scan completed; no --fail-on threshold exceeded.
1Usage or configuration error.
2Authentication or authorisation failure.
3Scan failed locally.
4Scan completed but a --fail-on threshold was exceeded.
5Could not reach MAGDOX (upload or rules). Local report is still written.