| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python2 |
||
| 2 | |||
| 3 | from __future__ import print_function |
||
| 4 | |||
| 5 | import argparse |
||
| 6 | import ssg.build_stig |
||
| 7 | |||
| 8 | |||
| 9 | def parse_args(): |
||
| 10 | parser = argparse.ArgumentParser(description='Add STIG references to XCCDF files.') |
||
| 11 | parser.add_argument("--disa-stig", help="DISA STIG Reference XCCDF file", |
||
| 12 | dest="reference") |
||
| 13 | parser.add_argument("--unlinked-xccdf", help="unlinked SSG XCCDF file", |
||
| 14 | dest="destination") |
||
| 15 | return parser.parse_args() |
||
| 16 | |||
| 17 | |||
| 18 | def main(): |
||
| 19 | args = parse_args() |
||
| 20 | |||
| 21 | target_root = ssg.build_stig.add_references(args.reference, args.destination) |
||
| 22 | target_root.write(args.destination) |
||
| 23 | |||
| 24 | |||
| 25 | if __name__ == "__main__": |
||
| 26 | main() |
||
| 27 |