yaml_tools.oscal module

The main init, run, and self-test functions for oscal extract.

yaml_tools.oscal.csv_append_id_data(in_ids, prog_opts, uargs)[source]

Append/update column data using ID sets and write a new csv file using the given filename with .modified appended to the filename stem.

yaml_tools.oscal.csv_row_match(in_ids, ctl)[source]

Extracted ctl munging from csv_append_id_data loop for testing.

Param:

ctl

Return ctl:

munged ctl

yaml_tools.oscal.id_set_match(in_ids, id_q, uargs)[source]

Quick set match analysis of ID sets.

yaml_tools.oscal.load_input_data(filepath, prog_opts, use_ssg=False, debug=False)[source]

Find and gather the inputs, ie, content file(s) and user control IDs, into a tuple of lists (id_list, file_tuple_list). Load up the queues and return a tuple of both queues and the list of normalized user IDs from filepath.

yaml_tools.oscal.main(argv=None)[source]

Collect and process command options/arguments and then process data.

yaml_tools.oscal.munge_file(filepath, prog_opts, uargs)[source]

Munge a CSV file by appending columns.

yaml_tools.oscal.process_data(filepath, prog_opts, uargs)[source]

Process inputs, print some output.

yaml_tools.oscal.self_test(ucfg)[source]

Basic sanity check using import_module.

yaml_tools.oscal.ssg_ctrl_from_nist(in_id, prog_opts, uargs)[source]

Create a new control in SSG format using the given ID. Give it some levels if it exists in the relevant NIST profiles.