-
Notifications
You must be signed in to change notification settings - Fork 75
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
2024 April Update: Section 1.2.x Logic, Section 19 HKU Improvement, Handler Fixes, Prelim Fixes #100
Merged
Merged
2024 April Update: Section 1.2.x Logic, Section 19 HKU Improvement, Handler Fixes, Prelim Fixes #100
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
70a222e
Update ChangeLog
frederickw082922 511718d
Realign CIS Controls in Section 2.3.1.x
frederickw082922 3cd47c9
Fix for win19cis_rule_18_9_32_6_3 in defaults/main
frederickw082922 a622483
Updates from @MrSteve81 #98
frederickw082922 6d196ad
Update in defaults/main win19cis_rule_18_9_7_2
frederickw082922 2aafe28
Fix for defaults/main win19cis_rule_18_9_32_6_2
frederickw082922 3325f74
Removed DoH Var from Defaults/Main 18.6.4.1
frederickw082922 1179f2d
Typo Fix in Prelim
frederickw082922 6b1cc17
Typo Fixes in Defaults/Main
frederickw082922 c05f30e
Order Fixes in Defaults/Main
frederickw082922 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
|
||
- name: reboot_windows | ||
ansible.windows.win_reboot: | ||
reboot_timeout: 3600 | ||
- name: change_requires_reboot | ||
ansible.builtin.set_fact: | ||
reboot_host: true | ||
tags: | ||
- always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
|
||
- name: "POST | Flush Handlers" | ||
ansible.builtin.meta: flush_handlers | ||
tags: | ||
- always | ||
|
||
- name: "POST | Reboot System Options" | ||
block: | ||
- name: "POST | Rebooting System................. Skip Reboot Has Been Set To: False" | ||
ansible.windows.win_reboot: | ||
reboot_timeout: 3600 | ||
when: | ||
- reboot_host | ||
- not skip_reboot | ||
|
||
- name: "POST | Warning A Reboot Is Required, Skip Reboot Has Been Set" | ||
ansible.builtin.debug: | ||
msg: | ||
- "Warning!! Changes Have Been Made That Require A Reboot To Be Implemented Manually." | ||
- "Skip Reboot Was Set To: True - This Can Affect Compliance Check Results." | ||
changed_when: true | ||
when: | ||
- reboot_host | ||
- skip_reboot | ||
|
||
- name: "POST | Warning A Reboot Is Required, Skip Reboot Has Been Set | Warning Count" | ||
ansible.builtin.import_tasks: | ||
file: warning_facts.yml | ||
when: | ||
- reboot_host | ||
- skip_reboot | ||
vars: | ||
warn_control_id: Reboot_Required | ||
tags: | ||
- always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||||
--- | ||||||||
|
||||||||
- name: Set System Facts Based On Gather Facts Module | ||||||||
- name: PRELIM | Set System Facts Based On Gather Facts Module | ||||||||
block: | ||||||||
- name: Set fact is system is standalone | ||||||||
ansible.builtin.set_fact: | ||||||||
|
@@ -26,7 +26,7 @@ | |||||||
# Current list is elastic and will be updated as we test more cloud based services. | ||||||||
# Current testing is working in Azure using Hyper-V. We are currently using this for reference: | ||||||||
# https://github.com/ansible/ansible/blob/905131fc76a07cf89dbc8d33e7a4910da3f10a16/lib/ansible/module_utils/facts/virtual/linux.py#L205 | ||||||||
- name: Set Fact If Cloud-Based System. | ||||||||
- name: PRELIM | Set Fact If Cloud-Based System. | ||||||||
ansible.builtin.set_fact: | ||||||||
win19cis_cloud_based_system: true | ||||||||
when: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
@@ -36,16 +36,52 @@ | |||||||
tags: | ||||||||
- always | ||||||||
|
||||||||
- name: Get Windows installation type | ||||||||
- name: PRELIM | Get Windows installation type | ||||||||
ansible.windows.win_reg_stat: | ||||||||
path: HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion | ||||||||
name: InstallationType | ||||||||
register: get_windows_installation_type | ||||||||
tags: | ||||||||
- always | ||||||||
|
||||||||
- name: Set Windows installation type | ||||||||
- name: PRELIM | Set Windows installation type | ||||||||
ansible.builtin.set_fact: | ||||||||
windows_installation_type: "{{ get_windows_installation_type.value | default('') }}" | ||||||||
tags: | ||||||||
- always | ||||||||
|
||||||||
- name: PRELIM | Obtain And Load Default Hive As Well As User Hives | ||||||||
block: | ||||||||
- name: PRELIM | Load Default User Hive (Account That All New Users Get Created From Profile) | ||||||||
ansible.windows.win_shell: REG LOAD HKU\DEFAULT C:\Users\Default\NTUSER.DAT | ||||||||
changed_when: false | ||||||||
failed_when: false | ||||||||
|
||||||||
- name: PRELIM | Pull All Username and SIDs | ||||||||
ansible.windows.win_shell: Get-CimInstance -Class Win32_UserAccount -Filter "SID LIKE 'S-1-5-%'" | ForEach-Object { $_.Name + " " + $_.SID } | ||||||||
changed_when: false | ||||||||
failed_when: false | ||||||||
register: all_users | ||||||||
|
||||||||
- name: PRELIM | Create Results List Fact For Username And SIDs | ||||||||
ansible.builtin.set_fact: | ||||||||
username_and_sid_results_list: "{{ all_users.stdout_lines | map('split', ' ') | list }}" | ||||||||
|
||||||||
- name: PRELIM | Load All User Hives From Username And SIDs List | ||||||||
ansible.windows.win_shell: REG LOAD HKU\{{ item.1 }} C:\Users\{{ item.0 }}\NTUSER.DAT | ||||||||
changed_when: false | ||||||||
failed_when: false | ||||||||
loop: "{{ username_and_sid_results_list }}" | ||||||||
|
||||||||
- name: PRELIM | Retrieve Current Users SIDs from HKEY_USERS | ||||||||
ansible.windows.win_shell: (Get-ChildItem "REGISTRY::HKEY_USERS").name | Where-Object {$_ -notlike "*_classes"} | ||||||||
changed_when: false | ||||||||
failed_when: false | ||||||||
register: current_users_loaded_hku | ||||||||
|
||||||||
- name: PRELIM | Create List Fact For Current Users SIDs from HKEY_USERS | ||||||||
ansible.builtin.set_fact: | ||||||||
hku_loaded_list: "{{ current_users_loaded_hku.stdout | regex_replace('HKEY_USERS\\\\','') | split }}" | ||||||||
when: win19cis_section19 | ||||||||
tags: | ||||||||
- always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't the Azure fix be here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oversight! Thank you @mfortin ! I see you put in your PR #99 ! Nice work!