Skip to content

Commit

Permalink
Allow oscap-bootc to download remote resources
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Sturla <[email protected]>
  • Loading branch information
p5 committed Dec 11, 2024
1 parent b8d36be commit 62f0b80
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions utils/oscap-bootc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def parse_args():
"data_stream", metavar="DATA_STREAM",
help="Path to a SCAP source data stream, eg. "
"/usr/share/xml/scap/ssg/content/ssg-rhel10-ds.xml")
parser.add_argument(
"--fetch-remote-resources", action="store_true",
help="Fetch remote resources referenced in the XCCDF content")
# Unfortunately, we can't add "--rule", "--skip-rule", or "--reference"
# because the "oscap xccdf generate fix" submodule doesn't support these
# options.
Expand Down Expand Up @@ -81,13 +84,19 @@ def add_args(option_args_list, cmd):
cmd.append(a)


def add_flags(flag, cmd):
cmd.append(flag)


def add_common_args(args, cmd):
oal = [
option_args_list = [
("--profile", args.profile),
("--tailoring-file", args.tailoring_file),
("--tailoring-id", args.tailoring_id)
("--tailoring-id", args.tailoring_id),
]
add_args(oal, cmd)
add_args(option_args_list, cmd)
if args.fetch_remote_resources:
add_flags("--fetch-remote-resources", cmd)


def add_eval_args(args, cmd):
Expand Down

0 comments on commit 62f0b80

Please sign in to comment.