Add rule accounts_umask_etc_bashrc to Hummingbird#14630
Draft
jan-cerny wants to merge 13 commits intoComplianceAsCode:masterfrom
Draft
Add rule accounts_umask_etc_bashrc to Hummingbird#14630jan-cerny wants to merge 13 commits intoComplianceAsCode:masterfrom
jan-cerny wants to merge 13 commits intoComplianceAsCode:masterfrom
Conversation
This new remediation type will be used to generate scripts that will perform hardening during the build of Project Hummingbird container images. The `hummingbird` type remediation scripts will be Bash scripts specifically written for the container image build environment. They won't be used in other situations. They will work with the `$NEWROOT` environment variable defined in the `Containerfile`.
Generate remediation scripts for all profiles in the `hummingbird` product and store them in the `/build/hummingbird_scripts` directory. These scripts will be integrated to the build process of container images in Project Hummingbird.
Improve format of the generated hummingbird remediation script. The main improvement is that it won't print an error message if the rule doesn't have any remediation, because in hummingbird remediation it's expected that most rules don't have any remediation, for example all package rules.
Add the NEWROOT variable as an argument fo the generated remediation script. The script is expected to be used in Containerfile and should modify the filesystem specified by the NEWROOT variable, typically `/new-root-fs`.
A Humminbird remediation for rule `no_host_based_files` has been added. This demonstrates how the Humminbird should look like and shows how it differs from a generic Bash remediation.
This fixes variable substitution code in Bash remediations.
The rule accounts_umask_etc_bashrc becomes applicable on containers. To do that, we will remove the system_with_kernel platform from the group.yml and we move the platform to the individual rules.
|
Skipping CI for Draft Pull Request. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description:
This PR is blocked by #14625 and will be rebased on the top of master branch after #14625 will be merged.
Add rule accounts_umask_etc_bashrc to Hummingbird to STIG and CIS profiles. Add a special remediation for hummingbird for this rule.
Rationale:
The rule
accounts_umask_etc_bashrcevaluates as FAIL by default on most hummingbird images. Having this rule with a remediation in the content will allow us to demonstrate and test how the remediation will work during the container image build time.Review Hints: