Hummingbird remediations#14625
Open
jan-cerny wants to merge 12 commits intoComplianceAsCode:masterfrom
Open
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.
jan-cerny
commented
Apr 8, 2026
This fixes variable substitution code in Bash remediations.
0abe5b0 to
102504d
Compare
Member
matusmarhefka
left a comment
There was a problem hiding this comment.
Just some nitpicks, otherwise LGTM.
Collaborator
Author
|
I have risen an exception and shown a real list of languages |
matusmarhefka
approved these changes
Apr 8, 2026
|
@jan-cerny: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
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:
New remediation type
hummingbirdhas been added. The hummingbird remediations are bash scripts specifically designed to be run only during building container images in the Hummingbird project.An example remediation for rule
no_host_based_fileshas been added. This example demonstrates how the Humminbird should look like and shows how it differs from a generic Bash remediation.Also, unit tests for
generate_profile_remediations.pyhave been added to this PR.Rationale:
Even though the remediations are Bash code, it isn't preferred to use existing Bash remediations. The reasons are:
Review Hints: