Sample overlay for the baseline InSpec profile at https://github.com/mitre/oracle-mysql-ee-5.7-cis-baseline with modifications based Our Project's different policy compliance requirements.
The original baseline InSpec profile is used validate the secure configuration of Oracle MySQL EE 5.7 exactly against the requirements in CIS Oracle MySQL EE 5.7 Benchmark 1.0.0.
This Overlay profile clearly distinguishes and measures to OUR policy requirements without modification to the baseline profile or misrepresentation that we are exactly compliant with the original Benchmark. This overlay allows us to show compliance with our own vetted requirements.
It is intended and recommended that InSpec and this profile overlay be run from a "runner" host (such as a DevOps orchestration server, an administrative management system, or a developer's workstation/laptop) against the target remotely over ssh.
For the best security of the runner, always install on the runner the latest version of InSpec and supporting Ruby language components.
Latest versions and installation options are available at the InSpec site.
The following inputs may be configured in an inputs ".yml" file for the profile to run correctly for your specific environment. More information about InSpec inputs can be found in the InSpec Profile Documentation.
# Username MySQL DB Server (e.g., 'root')
user: ''
# Password MySQL DB Server (e.g., 'P@ssw0rd1')
password: ''
# Hostname MySQL DB Server (e.g., 'localhost')
host: ''
# Port MySQL DB Server
port: 3306
# List of MySQL database users (e.g., ['root'])
mysql_users: []
# Set to true if the MySQL server has a slave configured
is_mysql_server_slave_configured: false
# List of MySQL administrative users (e.g., ['root'])
mysql_administrative_users: []
# List of MySQL users allows to modify or create data structures (e.g., ['root'])
mysql_users_allowed_modify_or_create: []
# Full path to MySQL configuration file (e.g. 'C:\Users\vagrant\MySQL\my.ini')
mysql_config_file: ''
Against a remote target using ssh with escalated privileges (i.e., InSpec installed on a separate runner host)
# How to run
inspec exec https://github.com/mitre/sample-mysql-overlay/archive/main.tar.gz -t ssh://TARGET_USERNAME:TARGET_PASSWORD@TARGET_IP:TARGET_PORT --sudo --sudo-password=<SUDO_PASSWORD_IF_REQUIRED> --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter=cli json:<path_to_your_output_file/name_of_your_output_file.json>
Against a remote target using a pem key with escalated privileges (i.e., InSpec installed on a separate runner host)
# How to run
inspec exec https://github.com/mitre/sample-mysql-overlay/archive/main.tar.gz -t ssh://TARGET_USERNAME@TARGET_IP:TARGET_PORT --sudo -i <your_PEM_KEY> --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter=cli json:<path_to_your_output_file/name_of_your_output_file.json>
Against a local Red Hat host with escalated privileges (i.e., InSpec installed on the target)
# How to run
sudo inspec exec https://github.com/mitre/sample-mysql-overlay/archive/main.tar.gz --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter=cli json:<path_to_your_output_file/name_of_your_output_file.json>
If your runner is not always expected to have direct access to GitHub, use the following steps to create an archive bundle of this overlay and all of its dependent tests:
(Git is required to clone the InSpec profile using the instructions below. Git can be downloaded from the Git site.)
mkdir profiles
cd profiles
git clone https://github.com/mitre/sample-mysql-overlay.git
inspec archive sample-mysql-overlay
sudo inspec exec <name of generated archive> --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter=cli json:<path_to_your_output_file/name_of_your_output_file.json>
For every successive run, follow these steps to always have the latest version of this overlay and dependent profiles:
cd sample-mysql-overlay
git pull
cd ..
inspec archive sample-mysql-overlay --overwrite
sudo inspec exec <name of generated archive> --input-file <path_to_your_input_file/name_of_your_input_file.yml> --reporter=cli json:<path_to_your_output_file/name_of_your_output_file.json>
The JSON results output file can be loaded into heimdall-lite for a user-interactive, graphical view of the InSpec results.
The JSON InSpec results file may also be loaded into a full heimdall server, allowing for additional functionality such as to store and compare multiple profile runs.
To report a bug or feature request, please open an issue.
This is licensed under the Apache 2.0 license.