Using the CLI
Query protection statistics, asset distribution, and risk alerts in the terminal with Alibaba Cloud Bailian CLI.
Alibaba Cloud Bailian CLI packages security protection queries into commands for use in the terminal or by Agents. Complete installation and authentication first, see Installation and Authentication.
Prerequisites
- Install the CLI and configure an API key using Installation and Authentication.
- Obtain the actual workspace ID and select the target through
BAILIAN_WORKSPACE_IDor CLI workspace configuration. Confirm that the API key, workspace, and current endpoint refer to the same target; see Security command reference.
Commands
Inspect statistics and asset distribution for the last 24 hours.
Filter existing alerts by high risk.
| Capability | Command | Description |
|---|---|---|
| Protection Overview | bl agents security overview | Query protection statistics and asset distribution |
| Alert List | bl agents security alerts | Query risk and log details of all Agents under the account |
Examples
Query the overview
bl agents security overview
Query high-risk alerts
bl agents security alerts --risk-level high
NoteThe overview queries protection statistics and asset distribution for the fixed last-24-hour window. The alerts command lists existing risk and log details filtered by high. These queries do not activate or configure protection or start a new code scan. An empty result does not certify safety; consider the statistics scope and alert logs.
Append --help to any command for full parameter descriptions. See Security command reference for more.