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

Handle Eval-STIG style XCCDF #28

Merged
merged 9 commits into from
Nov 12, 2024
Merged

Handle Eval-STIG style XCCDF #28

merged 9 commits into from
Nov 12, 2024

Conversation

cd-rite
Copy link
Contributor

@cd-rite cd-rite commented Oct 29, 2024

Uses XCCDF ruleResult <message> text, if present, to populate "review.detail" for all XCCDF (SCC tool now puts notes in this block as well).
Eval STIG concatenates detail (eval-stig default result) and comment (answer file result if present) into message. for STIG Viewer compatibility.
Eval STIG generates <sm:resultEngine> block with STIGMan-style XCCDF output, but if answer file adjusted answer, populates <override><remark> with the standard "comment" as well.
This lets us populate review.comment if applicable and strip out the duplicated comment text from the detail text.

Also adjusts cpe regex to handle both cpe expression styles- Resolves: #27

cd-rite and others added 7 commits September 17, 2024 18:12
…rsion; trigger resultEngine processing in non-scap mode for either evaluate-stig or stig-manager products
…turn accommodating STIG Viewer's expected format which only expects one <message> block. <message> will have the separate detail and comment fields concatenated together if answer file was used. The content of what would have been a separate comment field is included in the sm:overrides.remark element, so it is removed from the tail end of detail if present.
ReviewParser.js Outdated Show resolved Hide resolved
ReviewParser.js Outdated Show resolved Hide resolved
@cd-rite cd-rite marked this pull request as ready for review November 12, 2024 18:20
@cd-rite cd-rite merged commit 7151aeb into main Nov 12, 2024
1 check passed
@cd-rite cd-rite changed the title Handle Eval-STIG style XCCDF imports Handle Eval-STIG style XCCDF parsing Nov 12, 2024
@cd-rite cd-rite changed the title Handle Eval-STIG style XCCDF parsing Handle Eval-STIG style XCCDF Nov 12, 2024
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

Successfully merging this pull request may close these issues.

cpe regex in ReviewParser.js fails to capture product,version for alternate cpe forms
2 participants