Skip to content

Commit

Permalink
Generate results and reports from the remediation in post phase
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-cerny committed Jul 22, 2024
1 parent f7d0e4a commit 96abfeb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/XCCDF_POLICY/xccdf_policy_remediate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,10 +1508,11 @@ static int _generate_kickstart_post(struct kickstart_commands *cmds, const char
char *basename = oscap_basename(dup);
free(dup);
char *oscap_command = oscap_sprintf(
"oscap xccdf eval --remediate --profile '%s' /usr/share/xml/scap/ssg/content/%s\n",
"oscap xccdf eval --remediate --results-arf /root/openscap_data/arf.xml --report /root/openscap_data/report.html --profile '%s' /usr/share/xml/scap/ssg/content/%s\n",
profile_id, basename);
free(basename);
_write_text_to_fd(output_fd, "# Perform OpenSCAP hardening (required for security compliance)\n");
_write_text_to_fd(output_fd, "mkdir -p /root/openscap_data\n");
_write_text_to_fd_and_free(output_fd, oscap_command);
struct oscap_iterator *post_it = oscap_iterator_new(cmds->post);
while (oscap_iterator_has_more(post_it)) {
Expand Down

0 comments on commit 96abfeb

Please sign in to comment.