yaml_tools.oscal¶
The main init, run, and self-test functions for oscal extract.
Functions¶
|
Append/update column data using ID sets and write a new csv file using |
|
Extracted ctl munging from |
|
Find and gather the inputs, ie, content file(s) and user control IDs, |
|
Munge a CSV file by appending columns. |
|
Process inputs, print some output. |
|
Create a new control in SSG format using the given ID. Give it some |
|
Quick set match analysis of ID sets. |
|
Basic sanity check using |
|
Collect and process command options/arguments and then process data. |
Module Contents¶
- 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.- Parameters:
in_ids (List)
prog_opts (Dict)
uargs (munch.Munch)
- Return type:
None
- yaml_tools.oscal.csv_row_match(in_ids, ctl)[source]¶
Extracted ctl munging from
csv_append_id_data
loop for testing.- Parameters:
in_ids (List)
ctl (List)
- Return type:
List
- 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
.- Parameters:
filepath (pathlib.Path)
prog_opts (Dict)
use_ssg (bool)
debug (bool)
- Return type:
Tuple[List, Deque, Deque]
- yaml_tools.oscal.munge_file(filepath, prog_opts, uargs)[source]¶
Munge a CSV file by appending columns.
- Parameters:
filepath (pathlib.Path)
prog_opts (Dict)
uargs (munch.Munch)
- yaml_tools.oscal.process_data(filepath, prog_opts, uargs)[source]¶
Process inputs, print some output.
- Parameters:
filepath (pathlib.Path)
prog_opts (Dict)
uargs (munch.Munch)
- 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.
- Parameters:
in_id (str)
prog_opts (Dict)
uargs (munch.Munch)
- yaml_tools.oscal.id_set_match(in_ids, id_q, uargs)[source]¶
Quick set match analysis of ID sets.
- Parameters:
in_ids (List)
id_q (Deque)
uargs (munch.Munch)
- Return type:
Tuple[List, List]