Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/XCCDF_POLICY/xccdf_policy_remediate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@
return buffer;
}

static int _write_script_header_to_fd(struct xccdf_policy *policy, struct xccdf_result *result, const char *sys, int output_fd)

Check warning on line 1015 in src/XCCDF_POLICY/xccdf_policy_remediate.c

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "result" is "struct xccdf_result *".

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ_sS9Iyfpbeqx5_TkFC&open=AZ_sS9Iyfpbeqx5_TkFC&pullRequest=2399

Check warning on line 1015 in src/XCCDF_POLICY/xccdf_policy_remediate.c

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Make the type of this parameter a pointer-to-const. The current type of "policy" is "struct xccdf_policy *".

See more on https://sonarcloud.io/project/issues?id=OpenSCAP_openscap&issues=AZ_sS9Iyfpbeqx5_TkFB&open=AZ_sS9Iyfpbeqx5_TkFB&pullRequest=2399
{
if (!(oscap_streq(sys, "") || oscap_streq(sys, "urn:xccdf:fix:script:sh") || oscap_streq(sys, "urn:xccdf:fix:commands") ||
oscap_streq(sys, "urn:xccdf:fix:script:ansible") || oscap_streq(sys, "urn:redhat:osbuild:blueprint")))
Expand Down Expand Up @@ -1156,6 +1156,8 @@
"name = \"hardened_%s\"\n"
"description = \"%s\"\n"
"version = \"%s\"\n\n"
"[customizations]\n"
"partitioning_mode = \"raw\"\n\n"
"[customizations.openscap]\n"
"profile_id = \"%s\"\n"
"# If your hardening data stream is not part of the 'scap-security-guide' package\n"
Expand Down
3 changes: 3 additions & 0 deletions tests/API/XCCDF/unittests/test_remediation_blueprint.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ name = "hardened_xccdf_moc.elpmaxe.www_profile_common"
description = "Profile title on one line"
version = "1.0"

[customizations]
partitioning_mode = "raw"

[customizations.openscap]
profile_id = "xccdf_moc.elpmaxe.www_profile_common"
# If your hardening data stream is not part of the 'scap-security-guide' package
Expand Down
Loading