Skip to content

Add rule accounts_umask_etc_bashrc to Hummingbird#14630

Draft
jan-cerny wants to merge 13 commits intoComplianceAsCode:masterfrom
jan-cerny:hummingbird_umask
Draft

Add rule accounts_umask_etc_bashrc to Hummingbird#14630
jan-cerny wants to merge 13 commits intoComplianceAsCode:masterfrom
jan-cerny:hummingbird_umask

Conversation

@jan-cerny
Copy link
Copy Markdown
Collaborator

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_bashrc evaluates 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:

jan-cerny added 13 commits April 8, 2026 08:56
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.
@jan-cerny jan-cerny added the Hummingbird Hummingbird project or container images related label Apr 8, 2026
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Used by openshift-ci bot. label Apr 8, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 8, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Used by openshift-ci bot. Hummingbird Hummingbird project or container images related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant