Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code is Broken with oscap-podman generated xccdf #30

Open
jasonbrianhall opened this issue Jan 28, 2022 · 1 comment
Open

Code is Broken with oscap-podman generated xccdf #30

jasonbrianhall opened this issue Jan 28, 2022 · 1 comment

Comments

@jasonbrianhall
Copy link

$ cat stig.py
import stig_parser

LOAD XML FILE (OPTIONAL)

import os

with open("xccdf.xml", "r") as fh:
raw_file = fh.read()

PARSE XCCDF(XML) to JSON

json_results = stig_parser.convert_xccdf(raw_file)

$ python stig.py
Traceback (most recent call last):
File "/home/jbhall/software_build/xccdf/stig.py", line 10, in
json_results = stig_parser.convert_xccdf(raw_file)
File "/home/jbhall/aws3/lib/python3.9/site-packages/stig_parser/stig_parser.py", line 76, in convert_xccdf
if isinstance(CONTENT_DICT['Benchmark']['plain-text'], list):
KeyError: 'plain-text'

@RyanMillerC
Copy link

RyanMillerC commented Jan 10, 2024

I'm also experiencing this with an XCCDF XML file created from oscap (no podman). The XML file I have is in XCCDF version 1.2 format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants