turbot/alicloud_compliance

GitHub

Alibaba Cloud Compliance Mod

Run individual configuration, compliance and security controls or full compliance benchmarks for CIS and across all your Alibaba Cloud accounts.

References

Alibaba Cloud provides on-demand cloud computing platforms and APIs to authenticated customers on a metered pay-as-you-go basis.

CIS Alibaba Cloud Benchmarks provide a predefined set of compliance and security best-practice checks for Alibaba Cloud accounts.

Steampipe is an open source CLI to instantly query cloud APIs using SQL.

Steampipe Mods are collections of named queries, and codified controls that can be used to test current configuration of your cloud resources against a desired configuration.

Documentation

Getting started

Installation

Download and install Steampipe (https://steampipe.io/downloads). Or use Brew:

brew tap turbot/tap
brew install steampipe

Install the Alibaba Cloud plugin with Steampipe:

steampipe plugin install alicloud

Clone:

git clone https://github.com/turbot/steampipe-mod-alicloud-compliance.git
cd steampipe-mod-alicloud-compliance

Usage

Before running any benchmarks, it's recommended to generate your AliCloud credential report:

aliyun ims GenerateCredentialReport --endpoint ims.aliyuncs.com

Start your dashboard server to get started:

steampipe dashboard

By default, the dashboard interface will then be launched in a new browser window at https://localhost:9194. From here, you can run benchmarks by selecting one or searching for a specific one.

Instead of running benchmarks in a dashboard, you can also run them within your terminal with the steampipe check command:

Run all benchmarks:

steampipe check all

Run a single benchmark:

steampipe check benchmark.cis_v100

Run a specific control:

steampipe check control.cis_v100_2_1

Different output formats are also available, for more information please see Output Formats.

Credentials

This mod uses the credentials configured in the Steampipe AliCloud plugin.

Configuration

No extra configuration is required.

Common and Tag Dimensions

The benchmark queries use common properties (like account_id, connection_name and region) and tags that are defined in the form of a default list of strings in the mod.sp file. These properties can be overwritten in several ways:

  • Copy and rename the steampipe.spvars.example file to steampipe.spvars, and then modify the variable values inside that file

  • Pass in a value on the command line:

    steampipe check benchmark.cis_v100 --var 'common_dimensions=["account_id", "connection_name", "region"]'
    steampipe check benchmark.cis_v100 --var 'tag_dimensions=["Environment", "Owner"]'
  • Set an environment variable:

    SP_VAR_common_dimensions='["account_id", "connection_name", "region"]' steampipe check control.cis_v100_4_3
    SP_VAR_tag_dimensions='["Environment", "Owner"]' steampipe check control.cis_v100_4_3

Contributing

If you have an idea for additional compliance controls, or just want to help maintain and extend this mod (or others) we would love you to join the community and start contributing.

Please see the contribution guidelines and our code of conduct. All contributions are subject to the Apache 2.0 open source license.

Want to help but not sure where to start? Pick up one of the help wanted issues: