Skip to content

Commit 599b6a0

Browse files
uk-bollyanzomanpre-commit-ci[bot]
authored
Final v3.0.0 release to main (#334)
* Replace service with systemd module Signed-off-by: Anže Luzar <[email protected]> * Use FQCNs in tasks/section_5/cis_5.5.x.yml Signed-off-by: Anže Luzar <[email protected]> * Use FQCN for user module Signed-off-by: Anže Luzar <[email protected]> * Use FQCN for debug module Signed-off-by: Anže Luzar <[email protected]> * Use name instead of list in package Signed-off-by: Anže Luzar <[email protected]> * Add that parameter and remove when for the assert module Signed-off-by: Anže Luzar <[email protected]> * updated discord link Signed-off-by: Mark Bolwell <[email protected]> * updated required pkgs Signed-off-by: Mark Bolwell <[email protected]> * updated lint files Signed-off-by: Mark Bolwell <[email protected]> * discord update Signed-off-by: Mark Bolwell <[email protected]> * lint updates Signed-off-by: Mark Bolwell <[email protected]> * Aligned and updated Signed-off-by: Mark Bolwell <[email protected]> * removed quality badge since galaxy-ng Signed-off-by: Mark Bolwell <[email protected]> * updated since galaxy changes Signed-off-by: Mark Bolwell <[email protected]> * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v3.2.0 → v4.5.0](pre-commit/pre-commit-hooks@v3.2.0...v4.5.0) - [github.com/gitleaks/gitleaks: v8.17.0 → v8.18.1](gitleaks/gitleaks@v8.17.0...v8.18.1) - [github.com/ansible-community/ansible-lint: v6.17.2 → v6.22.1](ansible/ansible-lint@v6.17.2...v6.22.1) - [github.com/adrienverge/yamllint.git: v1.32.0 → v1.33.0](https://github.com/adrienverge/yamllint.git/compare/v1.32.0...v1.33.0) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/ansible-community/ansible-lint: v6.22.1 → v6.22.2](ansible/ansible-lint@v6.22.1...v6.22.2) * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/gitleaks/gitleaks: v8.18.1 → v8.18.2](gitleaks/gitleaks@v8.18.1...v8.18.2) - [github.com/ansible-community/ansible-lint: v6.22.2 → v24.2.0](ansible/ansible-lint@v6.22.2...v24.2.0) - [github.com/adrienverge/yamllint.git: v1.33.0 → v1.35.1](https://github.com/adrienverge/yamllint.git/compare/v1.33.0...v1.35.1) * updated for galaxy_ng Signed-off-by: Mark Bolwell <[email protected]> * Add audit_only and tidy up Signed-off-by: Mark Bolwell <[email protected]> * Lint updates Signed-off-by: Mark Bolwell <[email protected]> --------- Signed-off-by: Anže Luzar <[email protected]> Signed-off-by: Mark Bolwell <[email protected]> Co-authored-by: Anže Luzar <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ebcb285 commit 599b6a0

37 files changed

+358
-301
lines changed

.ansible-lint

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ skip_list:
66
- 'schema'
77
- 'no-changed-when'
88
- 'var-spacing'
9-
- 'fqcn-builtins'
109
- 'experimental'
1110
- 'name[play]'
1211
- 'name[casing]'
1312
- 'name[template]'
14-
- 'fqcn[action]'
1513
- 'key-order[task]'
1614
- '204'
1715
- '305'

.config/.secrets.baseline

Lines changed: 4 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@
7575
{
7676
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
7777
},
78-
{
79-
"path": "detect_secrets.filters.common.is_baseline_file",
80-
"filename": ".config/.secrets.baseline"
81-
},
8278
{
8379
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
8480
"min_level": 2
@@ -113,70 +109,11 @@
113109
{
114110
"path": "detect_secrets.filters.regex.should_exclude_file",
115111
"pattern": [
116-
".config/.gitleaks-report.json"
112+
".config/.gitleaks-report.json",
113+
"tasks/parse_etc_password.yml"
117114
]
118115
}
119116
],
120-
"results": {
121-
"defaults/main.yml": [
122-
{
123-
"type": "Secret Keyword",
124-
"filename": "defaults/main.yml",
125-
"hashed_secret": "b92ce9d4aeed417acfd85f0f9bc7cdb5e6d05c5d",
126-
"is_verified": false,
127-
"line_number": 382,
128-
"is_secret": false
129-
}
130-
],
131-
"tasks/main.yml": [
132-
{
133-
"type": "Secret Keyword",
134-
"filename": "tasks/main.yml",
135-
"hashed_secret": "b92ce9d4aeed417acfd85f0f9bc7cdb5e6d05c5d",
136-
"is_verified": false,
137-
"line_number": 22,
138-
"is_secret": false
139-
}
140-
],
141-
"tasks/parse_etc_password.yml": [
142-
{
143-
"type": "Secret Keyword",
144-
"filename": "tasks/parse_etc_password.yml",
145-
"hashed_secret": "2aaf9f2a51d8fe89e48cb9cc7d04a991ceb7f360",
146-
"is_verified": false,
147-
"line_number": 18
148-
}
149-
],
150-
"vars/CentOS.yml": [
151-
{
152-
"type": "Hex High Entropy String",
153-
"filename": "vars/CentOS.yml",
154-
"hashed_secret": "2baa4bd2c505f21a0e48d6c17a174a0c8b6f3c3b",
155-
"is_verified": false,
156-
"line_number": 6,
157-
"is_secret": false
158-
}
159-
],
160-
"vars/OracleLinux.yml": [
161-
{
162-
"type": "Hex High Entropy String",
163-
"filename": "vars/OracleLinux.yml",
164-
"hashed_secret": "260c8f0806148cd568435cd3d7647f43150efdbb",
165-
"is_verified": false,
166-
"line_number": 9,
167-
"is_secret": false
168-
}
169-
],
170-
"vars/is_container.yml": [
171-
{
172-
"type": "Secret Keyword",
173-
"filename": "vars/is_container.yml",
174-
"hashed_secret": "b92ce9d4aeed417acfd85f0f9bc7cdb5e6d05c5d",
175-
"is_verified": false,
176-
"line_number": 377,
177-
"is_secret": false
178-
}
179-
]
180-
},
181-
"generated_at": "2023-09-13T08:05:26Z"
117+
"results": {},
118+
"generated_at": "2023-10-09T15:14:50Z"
182119
}

.github/workflows/devel_pipeline_validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
repo-token: ${{ secrets.GITHUB_TOKEN }}
2828
pr-message: |-
2929
Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
30-
Please join in the conversation happening on the [Discord Server](https://discord.io/ansible-lockdown) as well.
30+
Please join in the conversation happening on the [Discord Server](https://www.lockdownenterprise.com/discord) as well.
3131
3232
# This workflow contains a single job which tests the playbook
3333
playbook-test:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ci:
77

88
repos:
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v3.2.0
10+
rev: v4.5.0
1111
hooks:
1212
# Safety
1313
- id: detect-aws-credentials
@@ -37,13 +37,13 @@ repos:
3737
exclude: .config/.gitleaks-report.json
3838

3939
- repo: https://github.com/gitleaks/gitleaks
40-
rev: v8.17.0
40+
rev: v8.18.2
4141
hooks:
4242
- id: gitleaks
4343
args: ['--baseline-path', '.config/.gitleaks-report.json']
4444

4545
- repo: https://github.com/ansible-community/ansible-lint
46-
rev: v6.17.2
46+
rev: v24.2.0
4747
hooks:
4848
- id: ansible-lint
4949
name: Ansible-lint
@@ -62,6 +62,6 @@ repos:
6262
- ansible-core>=2.10.1
6363

6464
- repo: https://github.com/adrienverge/yamllint.git
65-
rev: v1.32.0 # or higher tag
65+
rev: v1.35.1 # or higher tag
6666
hooks:
6767
- id: yamllint

.yamllint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ rules:
3030
trailing-spaces: enable
3131
truthy:
3232
allowed-values: ['true', 'false']
33-
check-keys: false
33+
check-keys: true

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
![followers](https://img.shields.io/github/followers/ansible-lockdown?style=social)
1212
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/AnsibleLockdown.svg?style=social&label=Follow%20%40AnsibleLockdown)](https://twitter.com/AnsibleLockdown)
1313

14-
![Ansible Galaxy Quality](https://img.shields.io/ansible/quality/56324?label=Quality&&logo=ansible)
1514
![Discord Badge](https://img.shields.io/discord/925818806838919229?logo=discord)
1615

1716
![Release Branch](https://img.shields.io/badge/Release%20Branch-Main-brightgreen)
@@ -39,7 +38,7 @@
3938

4039
### Community
4140

42-
On our [Discord Server](https://discord.io/ansible-lockdown) to ask questions, discuss features, or just chat with other Ansible-Lockdown users
41+
On our [Discord Server](https://www.lockdownenterprise.com/discord) to ask questions, discuss features, or just chat with other Ansible-Lockdown users
4342

4443
---
4544

@@ -169,6 +168,10 @@ uses:
169168
pre-commit run
170169
```
171170

172-
## Credits
171+
## Credits and Thanks
173172

174-
This repo originated from work done by [Sam Doran](https://github.com/samdoran/ansible-role-stig)
173+
Massive thanks to the fantastic community and all its members.
174+
175+
This includes a huge thanks and credit to the original authors and maintainers.
176+
177+
Josh Springer, Daniel Shepherd, Bas Meijeri, James Cassell, Mike Renfro, DFed, George Nalen, Mark Bolwell

ansible.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ transfer_method=scp
2222

2323
[colors]
2424

25-
[diff]
25+
[diff]

collections/requirements.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
collections:
44
- name: community.general
5+
source: https://github.com/ansible-collections/community.general
6+
type: git
57

68
- name: community.crypto
9+
source: https://github.com/ansible-collections/community.crypto
10+
type: git
711

812
- name: ansible.posix
13+
source: https://github.com/ansible-collections/ansible.posix
14+
type: git

defaults/main.yml

Lines changed: 32 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,46 @@ python2_bin: /bin/python2.7
2626
benchmark: RHEL7-CIS
2727
benchmark_version: v3.1.1
2828

29-
#### Basic external goss audit enablement settings ####
30-
#### Precise details - per setting can be found at the bottom of this file ####
29+
##########################################
30+
### Goss is required on the remote host ###
31+
## Refer to vars/auditd.yml for any other settings ##
3132

32-
### Goss is required on the remote host
33+
# Allow audit to setup the requirements including installing git (if option chosen and downloading and adding goss binary to system)
3334
setup_audit: false
34-
# How to retrive goss
35+
36+
# enable audits to run - this runs the audit and get the latest content
37+
run_audit: false
38+
39+
# Only run Audit do not remediate
40+
audit_only: false
41+
# As part of audit_only
42+
# This will enable files to be copied back to control node
43+
fetch_audit_files: false
44+
# Path to copy the files to will create dir structure
45+
audit_capture_files_dir: /some/location to copy to on control node
46+
47+
# How to retrieve audit binary
3548
# Options are copy or download - detailed settings at the bottom of this file
3649
# you will need to access to either github or the file already dowmloaded
37-
get_goss_file: download
50+
get_audit_binary_method: download
51+
52+
## if get_audit_binary_method - copy the following needs to be updated for your environment
53+
## it is expected that it will be copied from somewhere accessible to the control node
54+
## e.g copy from ansible control node to remote host
55+
audit_bin_copy_location: /some/accessible/path
3856

3957
# how to get audit files onto host options
40-
# options are git/copy/get_url
58+
# options are git/copy/get_url other e.g. if you wish to run from already downloaded conf
4159
audit_content: git
4260

43-
# Timeout for those cmds that take longer to run where timeout set
44-
audit_cmd_timeout: 30000
61+
# archive or copy:
62+
audit_conf_copy: "some path to copy from"
4563

46-
# enable audits to run - this runs the audit and get the latest content
47-
run_audit: false
64+
# get_url:
65+
audit_files_url: "some url maybe s3?"
66+
67+
# Run heavy tests - some tests can have more impact on a system enabling these can have greater impact on a system
68+
audit_run_heavy_tests: true
4869

4970
### End Goss enablements ####
5071
#### Detailed settings found at the end of this document ####
@@ -379,7 +400,7 @@ rhel7cis_rhnsd_required: false
379400

380401
# 1.4.2 Bootloader password
381402
rhel7cis_set_boot_pass: false
382-
rhel7cis_bootloader_password_hash: 'grub.pbkdf2.sha512.changethispart'
403+
rhel7cis_bootloader_password_hash: 'grub.pbkdf2.sha512.changethispart' # pragma: allowlist secret
383404

384405
# System network parameters (host only OR host and router)
385406
rhel7cis_is_router: false
@@ -565,55 +586,3 @@ rhel7cis_dotperm_ansiblemanaged: true
565586

566587
# RHEL-07-6.2.18 Clear users from shadow group
567588
rhel7cis_remove_shadow_grp_usrs: true
568-
569-
#### Goss Configuration Settings ####
570-
audit_run_script_environment:
571-
AUDIT_BIN: "{{ audit_bin }}"
572-
AUDIT_FILE: 'goss.yml'
573-
AUDIT_CONTENT_LOCATION: "{{ audit_out_dir }}"
574-
575-
### Goss binary settings ###
576-
goss_version:
577-
release: v0.3.23
578-
checksum: 'sha256:9e9f24e25f86d6adf2e669a9ffbe8c3d7b9b439f5f877500dea02ba837e10e4d'
579-
audit_bin_path: /usr/local/bin/
580-
audit_bin: "{{ audit_bin_path }}goss"
581-
audit_format: json
582-
583-
# if get_goss_file == download change accordingly
584-
goss_url: "https://github.com/goss-org/goss/releases/download/{{ goss_version.release }}/goss-linux-amd64"
585-
586-
## if get_goss_file - copy the following needs to be updated for your environment
587-
## it is expected that it will be copied from somewhere accessible to the control node
588-
## e.g copy from ansible control node to remote host
589-
copy_goss_from_path: /some/accessible/path
590-
591-
### Goss Audit Benchmark file ###
592-
## managed by the control audit_content
593-
# git
594-
audit_file_git: "https://github.com/ansible-lockdown/{{ benchmark }}-Audit.git"
595-
audit_git_version: "benchmark_{{ benchmark_version }}"
596-
597-
# copy:
598-
audit_local_copy: "some path to copy from"
599-
600-
# get_url:
601-
audit_files_url: "some url maybe s3?"
602-
603-
# Where the goss audit configuration will be stored
604-
audit_files: "/opt/{{ benchmark }}-Audit/"
605-
606-
## Goss configuration information
607-
# Where the goss configs and outputs are stored
608-
audit_out_dir: '/opt'
609-
audit_conf_dir: "{{ audit_out_dir }}/{{ benchmark }}-Audit/"
610-
pre_audit_outfile: "{{ audit_out_dir }}/{{ ansible_hostname }}-{{ benchmark }}_pre_scan_{{ ansible_date_time.epoch }}.{{ audit_format }}"
611-
post_audit_outfile: "{{ audit_out_dir }}/{{ ansible_hostname }}-{{ benchmark }}_post_scan_{{ ansible_date_time.epoch }}.{{ audit_format }}"
612-
613-
## The following should not need changing
614-
goss_file: "{{ audit_conf_dir }}goss.yml"
615-
audit_vars_path: "{{ audit_conf_dir }}/vars/{{ ansible_hostname }}.yml"
616-
audit_results: |
617-
The pre remediation results are: {{ pre_audit_summary }}.
618-
The post remediation results are: {{ post_audit_summary }}.
619-
Full breakdown can be found in {{ audit_out_dir }}

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
galaxy_info:
4-
author: "Sam Doran, Josh Springer, Daniel Shepherd, Bas Meijeri, James Cassell, Mike Renfro, DFed, Mark Bolwell, George Nalen"
4+
author: "MindPoint group"
55
description: "Apply the CIS RHEL7 role"
66
company: "MindPoint Group"
77
license: MIT

0 commit comments

Comments
 (0)