Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devel to main update for release #443

Merged
merged 41 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f117074
Specify missing state parameter for package
anzoman Sep 15, 2023
130e021
Correct with_items indentation for package
anzoman Sep 15, 2023
601ef18
Replace inline strings with module parameters
anzoman Sep 15, 2023
b53d7be
Merge pull request #437 from anzoman/steampunk-spotter-fixes
uk-bolly Sep 15, 2023
dfb9791
updated link
uk-bolly Sep 15, 2023
5108506
lint updates
uk-bolly Sep 15, 2023
223624e
removed old
uk-bolly Sep 15, 2023
20a720a
added new defined secrets file
uk-bolly Sep 15, 2023
5956a0f
added precommit
uk-bolly Sep 15, 2023
395956a
Merge pull request #438 from ansible-lockdown/discord_updates
uk-bolly Sep 15, 2023
aa000e8
lint updates
uk-bolly Oct 9, 2023
d14af2e
updated
uk-bolly Oct 9, 2023
1dc0f9b
added pragma allow list
uk-bolly Oct 9, 2023
6098b02
updated due to galaxy changes
uk-bolly Oct 9, 2023
197f961
moved file
uk-bolly Oct 9, 2023
d49469b
updated path
uk-bolly Oct 9, 2023
5aae574
removed quality badge since galaxy-ng
uk-bolly Oct 9, 2023
32fe8c1
Merge pull request #439 from ansible-lockdown/collections_lint
uk-bolly Oct 10, 2023
fb6f4fe
Adding additional condition for rhel7stig_grub2_user_cfg for task
layluke Oct 18, 2023
5e47e97
Merge pull request #441 from layluke/440-Grub_Handler_Fix
uk-bolly Oct 25, 2023
b3f3248
updated the workflow version and galaxy setup
uk-bolly Oct 31, 2023
d26e104
Merge pull request #442 from ansible-lockdown/workflow_galaxy
uk-bolly Nov 1, 2023
d687371
removed file
uk-bolly Nov 1, 2023
9dd216c
updated
uk-bolly Nov 1, 2023
388f850
updated
uk-bolly Nov 1, 2023
22f7dab
lint update
uk-bolly Nov 1, 2023
51b2df3
fix typo
uk-bolly Nov 1, 2023
9943f97
Merge pull request #444 from ansible-lockdown/tidyup
uk-bolly Nov 1, 2023
444074d
rhel7stig_boot_part variable now discovered
uk-bolly Nov 14, 2023
6276776
tidy up of rhel7stig_boot_part variable
uk-bolly Nov 14, 2023
ad3b174
changed logic on 20620
uk-bolly Nov 15, 2023
617e008
updated logic for uuid
uk-bolly Nov 20, 2023
6e7329b
removed extra line
uk-bolly Nov 21, 2023
212f524
Merge pull request #445 from ansible-lockdown/fix_021350
uk-bolly Nov 21, 2023
207be13
removed doc dir
uk-bolly Jan 11, 2024
4e0554f
Merge pull request #449 from ansible-lockdown/nodocs
uk-bolly Jan 11, 2024
3901021
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Jan 22, 2024
c294efb
Merge pull request #447 from ansible-lockdown/pre-commit-ci-update-co…
uk-bolly Jan 26, 2024
594ece9
Issue #446 tag update to always - thanks to @prestonSeaman2
uk-bolly Jan 26, 2024
e401d83
conditional updated 021000 & 021010 #448 thanks @erosen03
uk-bolly Jan 26, 2024
3ce0e42
Merge pull request #450 from ansible-lockdown/jan_24_updates
uk-bolly Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .config/.gitleaks-report.json

This file was deleted.

79 changes: 4 additions & 75 deletions .config/.secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": ".config/.secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
Expand Down Expand Up @@ -113,78 +109,11 @@
{
"path": "detect_secrets.filters.regex.should_exclude_file",
"pattern": [
".config/.gitleaks-report.json"
".config/.gitleaks-report.json",
"tasks/parse_etc_passwd.yml"
]
}
],
"results": {
"defaults/main.yml": [
{
"type": "Secret Keyword",
"filename": "defaults/main.yml",
"hashed_secret": "64411efd0f0561fe4852c6e414071345c9c6432a",
"is_verified": false,
"line_number": 467,
"is_secret": false
}
],
"tasks/fix-cat2.yml": [
{
"type": "Secret Keyword",
"filename": "tasks/fix-cat2.yml",
"hashed_secret": "673504d3db128a01a93d32de2b104a05dc2e6859",
"is_verified": false,
"line_number": 1449,
"is_secret": false
}
],
"tasks/main.yml": [
{
"type": "Secret Keyword",
"filename": "tasks/main.yml",
"hashed_secret": "2784977b09b611a32db88f631d88a5806605967e",
"is_verified": false,
"line_number": 39,
"is_secret": false
},
{
"type": "Secret Keyword",
"filename": "tasks/main.yml",
"hashed_secret": "64411efd0f0561fe4852c6e414071345c9c6432a",
"is_verified": false,
"line_number": 56,
"is_secret": false
}
],
"tasks/parse_etc_passwd.yml": [
{
"type": "Secret Keyword",
"filename": "tasks/parse_etc_passwd.yml",
"hashed_secret": "2aaf9f2a51d8fe89e48cb9cc7d04a991ceb7f360",
"is_verified": false,
"line_number": 18
}
],
"tasks/prelim.yml": [
{
"type": "Secret Keyword",
"filename": "tasks/prelim.yml",
"hashed_secret": "fd917ab33fb6bd01e799f4b72da0586589cd909a",
"is_verified": false,
"line_number": 228,
"is_secret": false
}
],
"templates/pam_pkcs11.conf.j2": [
{
"type": "Secret Keyword",
"filename": "templates/pam_pkcs11.conf.j2",
"hashed_secret": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
"is_verified": false,
"line_number": 173,
"is_secret": false
}
]
},
"generated_at": "2023-09-14T14:19:49Z"
"results": {},
"generated_at": "2023-10-09T14:42:52Z"
}
20 changes: 10 additions & 10 deletions .github/workflows/devel_pipeline_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: |-
Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
Please join in the conversation happening on the [Discord Server](https://discord.io/ansible-lockdown) as well.
Please join in the conversation happening on the [Discord Server](https://www.lockdownenterprise.com/discord) as well.

# This workflow contains a single job which tests the playbook
# This workflow contains a single job that tests the playbook
playbook-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
Expand All @@ -44,13 +44,13 @@

steps:
- name: Clone ${{ github.event.repository.name }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

# Pull in terraform code for linux servers
- name: Clone github IaC plan
uses: actions/checkout@v3
- name: Clone GitHub IaC plan
uses: actions/checkout@v4
with:
repository: ansible-lockdown/github_linux_IaC
path: .github/workflows/github_linux_IaC
Expand All @@ -74,23 +74,23 @@
pwd
ls
env:
# Imported from github variables this is used to load the relvent OS.tfvars file
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Terraform_Init
id: init
run: terraform init
env:
# Imported from github variables this is used to load the relvent OS.tfvars file
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Terraform_Validate
id: validate
run: terraform validate
env:
# Imported from github variables this is used to load the relvent OS.tfvars file
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

Expand All @@ -111,9 +111,9 @@
# Aws deployments taking a while to come up insert sleep or playbook fails

- name: Sleep for 60 seconds
run: sleep 60s
run: sleep ${{ vars.BUILD_SLEEPTIME }}

# Run the ansible playbook
# Run the Ansible playbook
- name: Run_Ansible_Playbook
uses: arillso/action.playbook@master
with:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/main_pipeline_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# that can run sequentially or in parallel
jobs:

# This workflow contains a single job which tests the playbook
# This workflow contains a single job that tests the playbook
playbook-test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
Expand All @@ -33,13 +33,13 @@

steps:
- name: Clone ${{ github.event.repository.name }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

# Pull in terraform code for linux servers
- name: Clone github IaC plan
uses: actions/checkout@v3
- name: Clone GitHub IaC plan
uses: actions/checkout@v4
with:
repository: ansible-lockdown/github_linux_IaC
path: .github/workflows/github_linux_IaC
Expand All @@ -63,23 +63,23 @@
pwd
ls
env:
# Imported from github variables this is used to load the relvent OS.tfvars file
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Terraform_Init
id: init
run: terraform init
env:
# Imported from github variables this is used to load the relvent OS.tfvars file
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

- name: Terraform_Validate
id: validate
run: terraform validate
env:
# Imported from github variables this is used to load the relvent OS.tfvars file
# Imported from GitHub variables this is used to load the relevant OS.tfvars file
OSVAR: ${{ vars.OSVAR }}
TF_VAR_benchmark_type: ${{ vars.BENCHMARK_TYPE }}

Expand All @@ -100,9 +100,9 @@
# Aws deployments taking a while to come up insert sleep or playbook fails

- name: Sleep for 60 seconds
run: sleep 60s
run: sleep ${{ vars.BUILD_SLEEPTIME }}

# Run the ansible playbook
# Run the Ansible playbook
- name: Run_Ansible_Playbook
uses: arillso/action.playbook@master
with:
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/update_galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---

# This is a basic workflow to help you get started with Actions

name: update galaxy

# Controls when the action will run.
# Triggers the workflow on merge request events to the main branch
on:
push:
branches:
Expand All @@ -14,8 +10,10 @@ jobs:
update_role:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: robertdebock/galaxy-action@master
- name: Checkout repo
uses: actions/checkout@v4

- name: Action Ansible Galaxy Release ${{ github.ref_name }}
uses: ansible-actions/ansible-galaxy-action@main
with:
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
git_branch: main
galaxy_api_key: ${{ secrets.GALAXY_API_KEY }}
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.5.0
hooks:
# Safety
- id: detect-aws-credentials
Expand All @@ -34,16 +34,15 @@ repos:
hooks:
- id: detect-secrets
args: [ '--baseline', '.config/.secrets.baseline' ]
exclude: .config/.gitleaks-report.json

- repo: https://github.com/gitleaks/gitleaks
rev: v8.17.0
rev: v8.18.0
hooks:
- id: gitleaks
args: ['--baseline-path', '.config/.gitleaks-report.json']

- repo: https://github.com/ansible-community/ansible-lint
rev: v6.17.2
rev: v6.21.1
hooks:
- id: ansible-lint
name: Ansible-lint
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,3 @@ following text in your contribution commit message:
This message can be entered manually, or if you have configured git
with the correct `user.name` and `user.email`, you can use the `-s`
option to `git commit` to automatically include the signoff message.

4 changes: 2 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ README

## Release 1.9.0

- RHEL-07-010271 - New Control Added
- RHEL-07-010271 - New Control Added
- Update to STIG V3R9 Oct 27th 2022 - Changes Listed Below
- RHEL-07-010342, RHEL-07-010343, RHEL- 07-020023, RHEL-07-030201 - Updated fix text.
- RHEL-07-021040, RHEL-07-021700 - Updated check text command to eliminate false positives.
- RHEL-07-030840 - Updated check and fix text.
- RHEL-07-040160 - Updated check text.
- RHEL-07-040310 - Corrected typo in the Vulnerability Discussion.
- RHEL-07-040360, RHEL-07-040530 - Updated CCI.
- RHEL-07-040360, RHEL-07-040530 - Updated CCI.
- Update to README and requirements
- RHEL-07-010010, RHEL-07-010020, RHEL-07-010291, RHEL-07-021030,RHEL-07-021040 - Updated Tag Information

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ This role is based on RHEL 7 DISA STIG: [ Version 3, Rel 11 released on July 23
![followers](https://img.shields.io/github/followers/ansible-lockdown?style=social)
[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/AnsibleLockdown.svg?style=social&label=Follow%20%40AnsibleLockdown)](https://twitter.com/AnsibleLockdown)

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

![Release Branch](https://img.shields.io/badge/Release%20Branch-Main-brightgreen)
Expand Down
1 change: 0 additions & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ transfer_method=scp
[colors]

[diff]

12 changes: 9 additions & 3 deletions collections/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
---

collections:
- name: community.general
- name: community.general
source: https://github.com/ansible-collections/community.general
type: git

- name: community.crypto
- name: community.crypto
source: https://github.com/ansible-collections/community.crypto
type: git

- name: ansible.posix
- name: ansible.posix
source: https://github.com/ansible-collections/ansible.posix
type: git
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ rhel7stig_force_exact_packages: "{{ rhel7stig_disruption_high }}"
# RHEL-07-010480 and RHEL-07-010490
# Password protect the boot loader

rhel7stig_bootloader_password_hash: 'grub.pbkdf2.sha512.changethispassword'
rhel7stig_bootloader_password_hash: 'grub.pbkdf2.sha512.changethispassword' # pragma: allowlist secret
rhel7stig_boot_superuser: root

# RHEL-07-021700 set the value for correctly configured grub bootloader sequence
Expand Down Expand Up @@ -693,7 +693,7 @@ rhel7stig_auditd_failure_flag: "{{ rhel7stig_availability_override | ternary(1,

rhel7stig_audit_part: "{{ rhel_07_audit_part.stdout }}"

rhel7stig_boot_part: "{{ rhel_07_boot_part.stdout }}"
rhel7stig_boot_part: /boot

rhel7stig_legacy_boot_path: '/boot/grub2/'
rhel7stig_efi_boot_path: '/boot/efi/EFI/'
Expand Down
1 change: 0 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ To generate the documentation on a RHEL/CentOS 7 system, take the following step
* `sudo pip3 install -r requirements.txt`
3. Generate the documentation:
* `make singlehtml`

4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
- name: make grub2 config
ansible.builtin.shell: /usr/sbin/grub2-mkconfig --output={{ rhel7stig_bootloader_path }}grub.cfg
when:
- rhel7stig_grub2_user_cfg.stat.exists
- (rhel7stig_grub2_user_cfg is defined) and (rhel7stig_grub2_user_cfg.stat.exists)
- not rhel7stig_skip_for_travis
- not rhel7stig_system_is_container

Expand All @@ -42,7 +42,7 @@
- grub.cfg
- user.cfg
when:
- rhel7stig_grub2_user_cfg.stat.exists
- (rhel7stig_grub2_user_cfg is defined) and (rhel7stig_grub2_user_cfg.stat.exists)
- rhel7stig_workaround_for_disa_benchmark
- not rhel7stig_skip_for_travis
- not rhel7stig_system_is_container
Expand Down
7 changes: 4 additions & 3 deletions tasks/fix-cat1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@
insert: true
when:
- rhel7stig_boot_part not in ['/', '']
- item.uuid is defined
- not ansible_check_mode or
rhel7_stig_grub_template is not changed
notify: confirm grub2 user cfg
Expand All @@ -474,9 +475,9 @@
- ansible_check_mode
- rhel_07_021350_audit is failed
failed_when:
- rhel_07_021350_audit is failed
- not ansible_check_mode or
rhel_07_021350_audit.rc > 1
- rhel_07_021350_audit.rc not in [ 0, 1 ]
- not ansible_check_mode

when:
- not ansible_check_mode or
rhel7_stig_grub_template is not changed
Expand Down
Loading