{"id":14984453,"url":"https://github.com/ansible-lockdown/rhel8-stig","last_synced_at":"2025-04-04T19:14:07.914Z","repository":{"id":39993544,"uuid":"286508171","full_name":"ansible-lockdown/RHEL8-STIG","owner":"ansible-lockdown","description":"Ansible role for Red Hat 8 STIG Baseline","archived":false,"fork":false,"pushed_at":"2024-10-29T12:10:15.000Z","size":1587,"stargazers_count":96,"open_issues_count":13,"forks_count":58,"subscribers_count":16,"default_branch":"devel","last_synced_at":"2024-10-29T14:38:47.717Z","etag":null,"topics":["ansible","ansible-role","ansible-roles","benchmark","benchmark-framework","compliance-as-code","compliance-automation","disa-stig","redhat8","remediation","rhel","rhel8","security","security-hardening","stig","stig-compliant"],"latest_commit_sha":null,"homepage":"https://ansible-lockdown.readthedocs.io","language":"YAML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansible-lockdown.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-10T15:12:29.000Z","updated_at":"2024-10-29T12:10:16.000Z","dependencies_parsed_at":"2023-09-26T16:44:22.340Z","dependency_job_id":"43b35f8b-d6ef-4fd8-90c2-a3b92055baa5","html_url":"https://github.com/ansible-lockdown/RHEL8-STIG","commit_stats":{"total_commits":828,"total_committers":24,"mean_commits":34.5,"dds":"0.30434782608695654","last_synced_commit":"94ad7e9326fd88e60c2790d2b49a8e114f41c2d8"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-lockdown%2FRHEL8-STIG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-lockdown%2FRHEL8-STIG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-lockdown%2FRHEL8-STIG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-lockdown%2FRHEL8-STIG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansible-lockdown","download_url":"https://codeload.github.com/ansible-lockdown/RHEL8-STIG/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234923,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","ansible-roles","benchmark","benchmark-framework","compliance-as-code","compliance-automation","disa-stig","redhat8","remediation","rhel","rhel8","security","security-hardening","stig","stig-compliant"],"created_at":"2024-09-24T14:09:05.311Z","updated_at":"2025-04-04T19:14:07.892Z","avatar_url":"https://github.com/ansible-lockdown.png","language":"YAML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RHEL 8 DISA STIG\n\n## Configure a RHEL8 based system to be complaint with Disa STIG\n\nThis role is based on RHEL 8 DISA STIG: [Version 1, Rel 14 released on  24, April 2024](https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_RHEL_8_V1R14_STIG.zip).\n\n---\n\n![Org Stars](https://img.shields.io/github/stars/ansible-lockdown?label=Org%20Stars\u0026style=social)\n![Stars](https://img.shields.io/github/stars/ansible-lockdown/rhel8-stig?label=Repo%20Stars\u0026style=social)\n![Forks](https://img.shields.io/github/forks/ansible-lockdown/rhel8-stig?style=social)\n![followers](https://img.shields.io/github/followers/ansible-lockdown?style=social)\n[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/AnsibleLockdown.svg?style=social\u0026label=Follow%20%40AnsibleLockdown)](https://twitter.com/AnsibleLockdown)\n\n![Discord Badge](https://img.shields.io/discord/925818806838919229?logo=discord)\n\n![Release Branch](https://img.shields.io/badge/Release%20Branch-Main-brightgreen)\n![Release Tag](https://img.shields.io/github/v/release/ansible-lockdown/RHEL8-STIG)\n![Release Date](https://img.shields.io/github/release-date/ansible-lockdown/RHEL8-STIG)\n\n[![Main Pipeline Status](https://github.com/ansible-lockdown/RHEL8-STIG/actions/workflows/main_pipeline_validation.yml/badge.svg?)](https://github.com/ansible-lockdown/RHEL8-STIG/actions/workflows/main_pipeline_validation.yml)\n\n[![Devel Pipeline Status](https://github.com/ansible-lockdown/RHEL8-STIG/actions/workflows/devel_pipeline_validation.yml/badge.svg?)](https://github.com/ansible-lockdown/RHEL8-STIG/actions/workflows/devel_pipeline_validation.yml)\n![Devel Commits](https://img.shields.io/github/commit-activity/m/ansible-lockdown/RHEL8-STIG/devel?color=dark%20green\u0026label=Devel%20Branch%20Commits)\n\n![Issues Open](https://img.shields.io/github/issues-raw/ansible-lockdown/RHEL8-STIG?label=Open%20Issues)\n![Issues Closed](https://img.shields.io/github/issues-closed-raw/ansible-lockdown/RHEL8-STIG?label=Closed%20Issues\u0026\u0026color=success)\n![Pull Requests](https://img.shields.io/github/issues-pr/ansible-lockdown/RHEL8-STIG?label=Pull%20Requests)\n\n![License](https://img.shields.io/github/license/ansible-lockdown/RHEL8-STIG?label=License)\n\n---\n\n## Looking for support?\n\n[Lockdown Enterprise](https://www.lockdownenterprise.com#GH_AL_RH8_stig)\n\n[Ansible support](https://www.mindpointgroup.com/cybersecurity-products/ansible-counselor#GH_AL_RH8_stig)\n\n### Community\n\nOn our [Discord Server](https://www.lockdownenterprise.com/discord) to ask questions, discuss features, or just chat with other Ansible-Lockdown users\n\n---\n\nConfigure a RHEL/Rocky 8 system to be DISA STIG compliant.\nNon-disruptive CAT I, CAT II, and CAT III findings will be corrected by default.\nDisruptive finding remediation can be enabled by setting `rhel8stig_disruption_high` to `true`.\n\n## Updating\n\nComing from a previous release.\n\nAs with all releases and updates, It is suggested to test and align controls.\nThis contains rewrites and ID reference changes as per STIG documentation.\n\n## Auditing\n\nThis can be turned on or off within the defaults/main.yml file with the variable rhel7cis_run_audit. The value is false by default, please refer to the wiki for more details. The defaults file also populates the goss checks to check only the controls that have been enabled in the ansible role.\n\nThis is a quick, very lightweight, check (where possible) of config compliance and live/running settings.\n\nA form of auditing has been developed, by using a small (12MB) go binary called [goss](https://github.com/goss-org/goss) along with the relevant configurations to check. Without the need for infrastructure or other tooling.\nThis audit will not only check the config has the correct setting but aims to capture if it is running with that configuration also trying to remove [false positives](https://www.mindpointgroup.com/blog/is-compliance-scanning-still-relevant/) in the process.\n\n## Documentation\n\n- [Read The Docs](https://ansible-lockdown.readthedocs.io/en/latest/)\n- [Getting Started](https://www.lockdownenterprise.com/docs/getting-started-with-lockdown#GH_AL_RH8_stig)\n- [Customizing Roles](https://www.lockdownenterprise.com/docs/customizing-lockdown-enterprise#GH_AL_RH8_stig)\n- [Per-Host Configuration](https://www.lockdownenterprise.com/docs/per-host-lockdown-enterprise-configuration#GH_AL_RH8_stig)\n- [Getting the Most Out of the Role](https://www.lockdownenterprise.com/docs/get-the-most-out-of-lockdown-enterprise#GH_AL_RH8_stig)\n\n## Requirements\n\n- RHEL/Rocky/AlmaLinux/OL 8 - Other versions are not supported.\n- Other OSs can be checked by changing the skip_os_check to true for testing purposes.\n- Access to download or add the goss binary and content to the system if using auditing. options are available on how to get the content to the system.\n\n## Dependencies\n\nThe following packages must be installed on the controlling host/host where ansible is executed:\n\n- python2-passlib (or just passlib, if using python3)\n- python-lxml\n\nPackages python(2)-passlib are required for tasks with custom filters or modules. These are all required on the controller host that executes Ansible.\n\n## Role Variables\n\nThis role is designed that the end user should not have to edit the tasks themselves. All customizing should be done via the defaults/main.yml file or with extra vars within the project, job, workflow, etc.\n\n### Tags\n\nThere are many tags available for added control precision. Each control has it's own set of tags noting the control number as well as what parts of the system that control addresses.\n\nBelow is an example of the tag section from a control within this role. Using this example if you set your run to skip all controls with the tag ssh, this task will be skipped. The\nopposite can also happen where you run only controls tagged with ssh.\n\n```sh\ntags:\n    - RHEL-08-010050\n    - ssh\n    - dod_logon_banner\n```\n\n### Example Audit Summary\n\nThis is based on a vagrant image with selections enabled. e.g. No Gui or firewall.\nNote: More tests are run during audit as we check config and running state.\n\n```sh\nok: [rocky8_efi] =\u003e\n  msg:\n  - 'The pre remediation results are: Count: 804, Failed: 416, Duration: 6.488s.'\n  - 'The post remediation results are: Count: 804, Failed: 28, Duration: 68.687s.'\n  - Full breakdown can be found in /opt\n\nPLAY RECAP ****************************************************************************************************************\nrocky8_efi                 : ok=482  changed=269  unreachable=0    failed=0    skipped=207  rescued=0    ignored=0\n```\n\n## Branches\n\n- **devel** - This is the default branch and the working development branch. Community pull requests will pull into this branch\n- **main** - This is the release branch\n- **reports** - This is a protected branch for our scoring reports, no code should ever go here\n- **gh_pages** - github pages\n- **all other branches** - Individual community member branches\n\n## Containers - testing\n\n- system_is_container\n\nThis is set to false by defaults/main.yml\nIf discovered it is a container type or ansible_connection == docker it will convert to run to with with true.\nSome controls will skip is this is true as they are not applicable at all. Others runs a subset of controls found in vars/is_container.yml based on a vendor supplied un altered image.\n\n**NON altered vendor image.**\n\n- container_vars_file: is_container.yml\n\nThis vars file runs controls are grouped into tags so if the container does later have ssh it could be re-enabled by loading an alternative vars file.\n\n## Community Contribution\n\nWe encourage you (the community) to contribute to this role. Please read the rules below.\n\n- Your work is done in your own individual branch. Make sure to Signed-off and GPG sign all commits you intend to merge.\n- All community Pull Requests are pulled into the devel branch\n- Pull Requests into devel will confirm your commits have a GPG signature, Signed-off, and a functional test before being approved\n- Once your changes are merged and a more detailed review is complete, an authorized member will merge your changes into the main branch for a new release.\n\n## Pipeline Testing\n\nuses:\n\n- ansible-core 2.12\n- ansible collections - pulls in the latest version based on requirements file\n- runs the audit using the devel branch\n- This is an automated test that occurs on pull requests into devel\n\n## Known Issues\n\nIf adopting stig rule RHEL-08-040134\n\nThis will affect cloud init as per [bug 1839899](https://bugs.launchpad.net/cloud-init/+bug/1839899)\n\n## Support\n\nThis is a community project at its core and will be managed as such.\n\nIf you would are interested in dedicated support to assist or provide bespoke setups\n\n- [Ansible Counselor](https://www.mindpointgroup.com/products/ansible-counselor-on-demand-ansible-services-and-consulting/)\n- [Try us out](https://engage.mindpointgroup.com/try-ansible-counselor)\n\n## Credits\n\nThis repo originated from work done by [Sam Doran](https://github.com/samdoran/ansible-role-stig)\n\n## Added Extras\n\n- makefile - this is there purely for testing and initial setup purposes.\n- [pre-commit](https://pre-commit.com) can be tested and can be run from within the directory\n\n```sh\npre-commit run\n```\n\n## Credits and Thanks\n\nMassive thanks to the fantastic community and all its members.\nThis includes a huge thanks and credit to the original authors and maintainers.\n\nJosh Springer, Daniel Shepherd, Bas Meijeri, James Cassell, Mike Renfro, DFed, George Nalen, Mark Bolwell\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-lockdown%2Frhel8-stig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansible-lockdown%2Frhel8-stig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-lockdown%2Frhel8-stig/lists"}