Repository navigation
Ensure that there is only one customizations in blueprint remedations - #2444
Merged
jan-cerny merged 1 commit intoOct 9, 2026
Merged
Conversation
Also ensure that `[customizations]` is before any sub sections as to better follow the TOML spec. Before this commit if rule added a `[customizations]` section there would be two `[customizations]` section thus causing an error. An example of such a rule is enabling fips. Assisted by: OpenCode using OpenAI models and Claude Code
|
jan-cerny
approved these changes
Oct 9, 2026
jan-cerny
left a comment
Member
There was a problem hiding this comment.
Using the XCCDF file tests/API/XCCDF/unittests/test_remediation_blueprint.xccdf.xml from this PR I have verified:
- that the OpenSCAP from the current main branch generates an invalid TOML which has 2
[customizations]sections - that with this PR it's fixed so that OpenSCAP generates a TOML file containing only 1
[customizations]that contains both the staticpartitioning_mode = "raw"and content remediationfips=1.
###############################################################################
#
# Blueprint for No profile (default benchmark)
#
# Profile Description:
# Not available
#
# Benchmark ID: xccdf_moc.elpmaxe.www_benchmark_test
# Benchmark Version: 1.0
# XCCDF Version: 1.2
#
# This file was generated by OpenSCAP 1.4.5 using:
# $ oscap xccdf generate fix --fix-type blueprint blueprint.xccdf.xml
#
# This Blueprint is generated from an OpenSCAP profile without preliminary evaluation.
# It attempts to fix every selected rule, even if the system is already compliant.
#
# How to apply this Blueprint:
# composer-cli blueprints push blueprint.toml
#
###############################################################################
name = "hardened_(null)"
description = "No profile (default benchmark)"
version = "1.0"
[customizations]
partitioning_mode = "raw"
fips=1
[customizations.openscap]
profile_id = ""
# If your hardening data stream is not part of the 'scap-security-guide' package
# provide the absolute path to it (from the root of the image filesystem).
# datastream = "/usr/share/xml/scap/ssg/content/ssg-xxxxx-ds.xml"
distro = rhel-80
[[packages]]
name = "aide"
version = "*"
[[customizations.filesystem]]
mountpoint = "/home"
size = 1
[[customizations.filesystem]]
mountpoint = "/tmp"
size = 2
[customizations.kernel]
append = "foo=bar audit=1"
[customizations.services]
enabled = ["sshd","usbguard"]
disabled = ["kdump"]
masked = ["evil"]
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.



Also ensure that
[customizations]is before any sub sections as to better follow the TOML spec.Before this commit if rule added a
[customizations]section there would be two[customizations]section thus causing an error. An example of such a rule is enabling fips.Assisted by: OpenCode using OpenAI models and Claude Code