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

Benchmark v2.0.0 #255

Open
wants to merge 135 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
7ff3857
initial v2.0 update
uk-bolly Jun 27, 2024
d8f3311
updated 5.4.3.2 variables
uk-bolly Jul 1, 2024
ed5b7cc
fix confditionals if skipped
uk-bolly Jul 1, 2024
72a47e7
updated conditionals
uk-bolly Jul 1, 2024
d39d92e
updated ID references
uk-bolly Jul 1, 2024
58a76a1
fix typo
uk-bolly Jul 1, 2024
4061505
updated
uk-bolly Jul 1, 2024
f7fd57d
adjusted rule ids
uk-bolly Jul 1, 2024
327ba53
1.1.1.6 updated conditionals
uk-bolly Jul 2, 2024
e4db7a6
fixed typo
uk-bolly Jul 2, 2024
83123bf
updated var naming
uk-bolly Jul 2, 2024
c887a75
fix layout
uk-bolly Jul 2, 2024
f302e52
reomved comments
uk-bolly Jul 2, 2024
e1d43b6
5.3.3.4.4 fixed path
uk-bolly Jul 2, 2024
48df824
moved directory creation to prelim
uk-bolly Jul 2, 2024
0b123a4
removed path as not valid for OS
uk-bolly Jul 2, 2024
1604af6
fix layout and conditionals
uk-bolly Jul 2, 2024
dcf74dc
layout and naming updates
uk-bolly Jul 2, 2024
d3caf0f
tidy up and remove uneccessary items
uk-bolly Jul 2, 2024
ee4cec7
handler naming correction
uk-bolly Jul 2, 2024
e89587f
updated handler naming
uk-bolly Jul 2, 2024
9b62df3
renamed files
uk-bolly Jul 2, 2024
78d17cc
fix tasks
uk-bolly Jul 2, 2024
c4dbd7c
fix typo
uk-bolly Jul 2, 2024
8a03ed8
rename handler
uk-bolly Jul 2, 2024
cddb639
rename var
uk-bolly Jul 2, 2024
0d0e2d0
moved tasks and updated
uk-bolly Jul 2, 2024
c0e6da2
update var
uk-bolly Jul 2, 2024
fe594fd
aligned variables
uk-bolly Jul 2, 2024
a56603f
tidy up 6.4.3.1-4
uk-bolly Jul 2, 2024
8bf0743
6.3.2.3 updated
uk-bolly Jul 2, 2024
9653e6b
fix 6.2.1.2.3
uk-bolly Jul 2, 2024
c35ff9d
tidy up
uk-bolly Jul 2, 2024
d967816
fix mode in quotes
uk-bolly Jul 2, 2024
f710cc2
remove empty line
uk-bolly Jul 2, 2024
eeb9c03
lint updates
uk-bolly Jul 2, 2024
65e10cc
fix typo
uk-bolly Jul 2, 2024
bd31db5
update comments
uk-bolly Jul 2, 2024
ea9fec3
lint
uk-bolly Jul 2, 2024
477c6d0
add pragma
uk-bolly Jul 2, 2024
d60280b
fix directory layout
uk-bolly Jul 2, 2024
6b5e1c7
typo resolved
uk-bolly Jul 2, 2024
a69e163
moved conditional to tag
uk-bolly Jul 2, 2024
0d95f24
improved mail 2.1.21
uk-bolly Jul 2, 2024
ac85608
improved tasks
uk-bolly Jul 3, 2024
533681a
fix tasks
uk-bolly Jul 3, 2024
20d3934
update defaults
uk-bolly Jul 3, 2024
500af8a
improve controls
uk-bolly Jul 5, 2024
e135d75
fix typo
uk-bolly Jul 5, 2024
cdf51db
improved tests
uk-bolly Jul 5, 2024
f7c090f
removed dupes
uk-bolly Jul 5, 2024
86ce8ed
updated value to be correct
uk-bolly Jul 8, 2024
92a0d48
updated to add flush handlers
uk-bolly Jul 8, 2024
5ad2554
fix tags
uk-bolly Jul 8, 2024
16c969c
updated test
uk-bolly Jul 8, 2024
2906e2f
fixed 6.3.3.5
uk-bolly Jul 8, 2024
4fd48c9
initial_v2
uk-bolly Jul 8, 2024
254eca5
add variable
uk-bolly Jul 8, 2024
d7ff345
tidy up space
uk-bolly Jul 8, 2024
f89c43e
improve 6.1.2
uk-bolly Jul 8, 2024
066cfc2
6.1.2 additions
uk-bolly Jul 8, 2024
d268d74
fixed logic
uk-bolly Jul 8, 2024
4c3e008
fixed handler
uk-bolly Jul 8, 2024
567385c
Tidy up vars
uk-bolly Jul 8, 2024
46cc906
updated precommit
uk-bolly Jul 8, 2024
c8c4878
updated to new workflow
uk-bolly Jul 8, 2024
10578a0
lint work
uk-bolly Jul 8, 2024
e549b14
Merge pull request #1 from ansible-lockdown/v2_beta
uk-bolly Jul 8, 2024
cdb62ff
updated changelog
uk-bolly Jul 8, 2024
c1f742c
removed file not needed
uk-bolly Jul 23, 2024
cabbe89
updated to enable AMR audit to take place
uk-bolly Aug 13, 2024
8bba2bb
typos and updates
uk-bolly Sep 2, 2024
a150588
typos and improvements
uk-bolly Sep 2, 2024
4ed7fab
improved variable import
uk-bolly Sep 2, 2024
36818a0
fixed bad handler
uk-bolly Sep 2, 2024
04c62a0
applied fixes
uk-bolly Sep 4, 2024
814599e
remove jmespath_requirement
uk-bolly Oct 22, 2024
5a9785f
updated root password check
uk-bolly Oct 22, 2024
4a4812c
Updated audit
uk-bolly Oct 22, 2024
5fd4dc6
fixed conditionals and requirements
uk-bolly Oct 22, 2024
62e6228
updated precommit
uk-bolly Oct 22, 2024
9b5c0ea
Merge pull request #7 from ansible-lockdown/updated_oct_24
uk-bolly Oct 25, 2024
7bd332e
updated 7.1 passwd- thanks to @dlesaffrew
uk-bolly Nov 4, 2024
1bbf6ee
issue #247 addressed thanks to @angaaruriakhil
uk-bolly Nov 4, 2024
29660b0
updated pre-commit
uk-bolly Nov 12, 2024
14621eb
updated 1st to ubuntu
uk-bolly Nov 12, 2024
b7c950a
Merge branch 'devel' into v2.0.0_cis
uk-bolly Nov 19, 2024
68968ca
removed legacy data
uk-bolly Nov 19, 2024
685f4a0
Lint on file
uk-bolly Nov 19, 2024
c2b422b
Improvements to 6.1.1 logic
uk-bolly Nov 19, 2024
f4f6a2f
lint and layout update
uk-bolly Nov 22, 2024
6faa6e7
lint and layut updates
uk-bolly Nov 22, 2024
6d534c7
updated lint and update
uk-bolly Nov 26, 2024
2c5c7a0
variable naming and lint updates
uk-bolly Nov 26, 2024
e5441bd
merged
uk-bolly Nov 26, 2024
cdf22f9
Merge branch 'v2.0.0_cis' into benchmark_v2.0.0
uk-bolly Nov 26, 2024
fa6ebe4
updated desktop logic
uk-bolly Nov 26, 2024
2eb64a4
updated vars
uk-bolly Nov 26, 2024
78e400d
updated autofs logic
uk-bolly Nov 26, 2024
63b7658
added ec2 to autofs
uk-bolly Nov 26, 2024
0556056
fixed 5.4.1.6 var
uk-bolly Nov 26, 2024
342b90a
fixed 5.4.1.6 var
uk-bolly Nov 26, 2024
5d171cd
fixed 5.4.1.6 var
uk-bolly Nov 26, 2024
e760890
updated async and poll variable naming
uk-bolly Nov 26, 2024
9e1f883
Updated with extra information on some controls
uk-bolly Nov 26, 2024
ace514b
fix typo in item.item
uk-bolly Nov 26, 2024
1f20d47
fixed fregex for python versioning
uk-bolly Nov 26, 2024
c4143f1
updated to loop 7.1.11 -13
uk-bolly Nov 26, 2024
4796248
Add NIST IDs
uk-bolly Nov 26, 2024
ec278e4
Added Nist Values
uk-bolly Nov 27, 2024
813df11
Updated titles #256 thanks to @bgro
uk-bolly Nov 28, 2024
7f724f6
tag and title fixes #258 thanks to @bgro
uk-bolly Nov 29, 2024
c8dd951
updated var naming 5.1.4 thanks to @bgro #257
uk-bolly Nov 29, 2024
2a71aac
Latest lint configs
uk-bolly Dec 3, 2024
e4fa52c
Updated to latest lint layout config
uk-bolly Dec 3, 2024
8d52dde
updated for time_sync
uk-bolly Dec 3, 2024
3b12acc
updated dev_shm vars and handler
uk-bolly Dec 3, 2024
588d602
updated details
uk-bolly Dec 3, 2024
fee3c71
updated
uk-bolly Dec 4, 2024
e5ef95d
updated company name reference
uk-bolly Dec 4, 2024
9a98d60
addressed #259 thanks to @kbknapp
uk-bolly Dec 4, 2024
34dd800
addressed #260 thanks to @kbknapp
uk-bolly Dec 4, 2024
57ca826
addressed #261 thanks to kbknapp
uk-bolly Dec 4, 2024
d28adb5
fix typo in variable
uk-bolly Dec 9, 2024
6632b77
Addressed #262 mount refactor thanks to @bgro
uk-bolly Dec 9, 2024
b1068de
Updated tmpfs options in conditional
uk-bolly Dec 9, 2024
f712114
Updated with name titles
uk-bolly Dec 9, 2024
180d19a
Enable debug options for mounts
uk-bolly Dec 9, 2024
db17068
expanded mountpoint explaination
uk-bolly Dec 9, 2024
6e6161c
layout update for pipeline
uk-bolly Dec 10, 2024
7056dd0
convert file characterset
uk-bolly Dec 10, 2024
a9cb027
removed locale
uk-bolly Dec 10, 2024
0666e00
Align mountpoint variable naming
uk-bolly Dec 11, 2024
7f93438
change case in title
uk-bolly Dec 11, 2024
31844a6
Merge pull request #263 from ansible-lockdown/mounts
uk-bolly Dec 12, 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
18 changes: 2 additions & 16 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,7 @@
parseable: true
quiet: true
skip_list:
- 'schema'
- 'no-changed-when'
- 'var-spacing'
- 'experimental'
- 'name[play]'
- 'name[casing]'
- 'name[template]'
- 'key-order[task]'
- 'yaml[line-length]'
- '204'
- '305'
- '303'
- '403'
- '306'
- '602'
- '208'
- 'package-latest'
- 'risky-shell-pipe'
use_default_rules: true
verbosity: 0
119 changes: 0 additions & 119 deletions .config/.secrets.baseline

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/devel_pipeline_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
jobs:
# This will create messages for first time contributers and direct them to the Discord server
welcome:
runs-on: self-hosted
runs-on: ubuntu-latest

steps:
- uses: actions/first-interaction@main
Expand Down
17 changes: 11 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@
##### CI for use by github no need for action to be added
##### Inherited
ci:
autofix_prs: false
skip: [detect-aws-credentials, ansible-lint ]
autofix_prs: false
skip: [detect-aws-credentials, ansible-lint ]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Safety
- id: detect-aws-credentials
name: Detect AWS Credentials
- id: detect-private-key
name: Detect Private Keys

# git checks
- id: check-merge-conflict
name: Check for merge conflicts
- id: check-added-large-files
name: Check for Large files
- id: check-case-conflict
name: Check case conflict

# General checks
- id: trailing-whitespace
Expand All @@ -27,19 +32,18 @@ repos:
types: [text]
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
name: Ensure line at end of file

# Scan for passwords
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: [ '--baseline', '.config/.secrets.baseline' ]

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

- repo: https://github.com/ansible-community/ansible-lint
rev: v24.10.0
Expand All @@ -53,14 +57,15 @@ repos:
# https://github.com/ansible/ansible-lint/issues/611
pass_filenames: false
always_run: true
additional_dependencies:
# additional_dependencies:
# https://github.com/pre-commit/pre-commit/issues/1526
# If you want to use specific version of ansible-core or ansible, feel
# free to override `additional_dependencies` in your own hook config
# file.
- ansible-core>=2.10.1
# - ansible-core>=2.10.1

- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1 # or higher tag
hooks:
- id: yamllint
name: Check YAML Lint
54 changes: 29 additions & 25 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
---

extends: default

ignore: |
tests/
molecule/
.github/
.gitlab-ci.yml
*molecule.yml

rules:
indentation:
# Requiring 4 space indentation
spaces: 4
# Requiring consistent indentation within a file, either indented or not
indent-sequences: consistent
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
empty-lines:
max: 1
line-length: disable
key-duplicates: enable
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: enable
truthy:
allowed-values: ['true', 'false']
check-keys: true
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
comments:
ignore-shebangs: true
min-spaces-from-content: 1 # prettier compatibility
comments-indentation: enable
empty-lines:
max: 1
indentation:
# Requiring 2 space indentation
spaces: 2
# Requiring consistent indentation within a file, either indented or not
indent-sequences: consistent
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: enable
new-lines:
type: unix
octal-values:
forbid-implicit-octal: true # yamllint defaults to false
forbid-explicit-octal: true
trailing-spaces: enable
truthy:
allowed-values: ['true', 'false']
check-keys: true
16 changes: 16 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Ubuntu22CIS

## Based on CIS v2.0.0

### Do not migrate

CIS have rewritten with a full release including but not limited to

- reordering
- new sections and controls in differing sections

This is a rewrite off approx 75% of controls

- New variables
- improved audit related checks
- greater options on some controls
- linting improvements and updated to latest

## Based on CIS V1.0.0

### 1.1.1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 MindPoint Group / Lockdown Enterprise / Lockdown Enterprise Releases
Copyright (c) 2025 Mindpoint Group - A Tyto Athene Company / Ansible Lockdown

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Configure a Ubuntu 22 machine to be [CIS](https://www.cisecurity.org/cis-benchmarks/) compliant

### Based on CIS Ubuntu Linux 22.04 LTS Benchmark v1.0.0 [Release](https://learn.cisecurity.org/l/799323/2022-09-15/3l9d2k)
### Based on CIS Ubuntu Linux 22.04 LTS Benchmark v2.0.0 [Release](https://downloads.cisecurity.org/#/)

![Org Stars](https://img.shields.io/github/stars/ansible-lockdown?label=Org%20Stars&style=social)
![Stars](https://img.shields.io/github/stars/ansible-lockdown/ubuntu22-cis?label=Repo%20Stars&style=social)
Expand Down
18 changes: 9 additions & 9 deletions collections/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---

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

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

- name: ansible.posix
source: https://github.com/ansible-collections/ansible.posix
type: git
- name: ansible.posix
source: https://github.com/ansible-collections/ansible.posix
type: git
Loading