Compare commits

...

7 Commits

Author SHA1 Message Date
rronneburger f945ccfb42
Merge fe8c656c3c into 85acc99536 2025-04-04 08:23:10 +02:00
uk-bolly 85acc99536
Merge pull request #30 from ansible-lockdown/updates_march25
Updates march25
2025-03-31 13:45:47 +01:00
Mark Bolwell c1684508f6
updated
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
2025-03-31 09:07:09 +01:00
Mark Bolwell 62c67740e4
typo fixes
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
2025-03-31 08:41:38 +01:00
Mark Bolwell 2611117b33
Updated
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
2025-03-31 08:40:25 +01:00
Mark Bolwell ecfee57c60
updated workflow files
Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
2025-03-31 08:38:59 +01:00
Ralf Ronneburger fe8c656c3c make sure audit_log_dir exists, make sure shell_session_file does not contain readonly twice (leading to error messages upon login) 2025-02-28 18:09:13 +01:00
6 changed files with 27 additions and 16 deletions

View File

@ -7,6 +7,7 @@
types: [opened, reopened, synchronize]
branches:
- devel
- benchmark*
paths:
- '**.yml'
- '**.sh'
@ -70,7 +71,6 @@
echo IAC_BRANCH=main >> $GITHUB_ENV
fi
# Pull in terraform code for linux servers
- name: Clone GitHub IaC plan
uses: actions/checkout@v4

View File

@ -7,6 +7,7 @@
types: [opened, reopened, synchronize]
branches:
- main
- latest
paths:
- '**.yml'
- '**.sh'
@ -23,17 +24,6 @@
# A workflow run is made up of one or more jobs
# that can run sequentially or in parallel
jobs:
# This will create messages for first time contributers and direct them to the Discord server
welcome:
runs-on: self-hosted
steps:
- uses: actions/first-interaction@main
with:
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://www.lockdownenterprise.com/discord) as well.
# This workflow contains a single job that tests the playbook
playbook-test:

2
.gitignore vendored
View File

@ -44,5 +44,5 @@ benchparse/
# GitHub Action/Workflow files
.github/
# Precommit
# ansible-lint cache
.ansible/

View File

@ -12,6 +12,12 @@
mode: 'go-w'
state: directory
- name: Pre Audit Setup | Ensure existence of {{ audit_log_dir }}
ansible.builtin.file:
path: "{{ audit_log_dir }}"
mode: 'go-w'
state: directory
- name: Pre Audit Setup | If using git for content set up
when: audit_content == 'git'
block:

View File

@ -19,6 +19,21 @@
regexp: nologin
replace: ""
- name: "5.4.3.2 | PATCH | Remove old content from {{ ubtu24cis_shell_session_file }} before adding new lines"
when:
- ubtu24cis_rule_5_4_3_2
tags:
- level1-server
- level1-workstation
- patch
- shell
- rule_5.4.3.2
- NIST800-53R5_NA
ansible.builtin.replace:
path: "{{ ubtu24cis_shell_session_file }}"
regexp: '# Logout Timeout\nexport TMOUT=0\nreadonly TMOUT\n'
replace: '# Logout Timeout\n'
- name: "5.4.3.2 | PATCH | Ensure default user shell timeout is configured"
when:
- ubtu24cis_rule_5_4_3_2

View File

@ -43,8 +43,8 @@
{{ arch_syscalls.append( syscall) }}
{% endif %}
{% endfor %}
-a always,exit -F arch=b64 -S {{ arch_syscalls|join(',') }} -k system-locale
-a always,exit -F arch=b32 -S {{ arch_syscalls|join(',') }} -k system-locale
-a always,exit -F arch=b64 -S {{ arch_syscalls|join(',') }} -k system-locale
-a always,exit -F arch=b32 -S {{ arch_syscalls|join(',') }} -k system-locale
-w /etc/issue -p wa -k system-locale
-w /etc/issue.net -p wa -k system-locale
-w /etc/hosts -p wa -k system-locale
@ -99,7 +99,7 @@
{% endif %}
{% endfor %}
-a always,exit -F arch=b64 -S {{ arch_syscalls|join(',') }} -F auid>=1000 -F auid!=unset -k perm_mod
{% set syscalls = ["etxattr","lsetxattr","fsetxattr","removexattr","lremovexattr","fremovexattr"] %}
{% set syscalls = ["setxattr","lsetxattr","fsetxattr","removexattr","lremovexattr","fremovexattr"] %}
{% set arch_syscalls = [] %}
{% for syscall in syscalls %}
{% if syscall in supported_syscalls %}