Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

to_xccdf: Enable STIGViewer support for automatic CCI descriptions. - #222

Merged
Bialogs merged 4 commits into
mitre:masterfrom
janeuner:jn-ident-system-stigviewer
Apr 16, 2021
Merged

Bialogs merged 4 commits into
mitre:masterfrom
janeuner:jn-ident-system-stigviewer

Conversation

@janeuner

@janeuner janeuner commented Apr 9, 2021

Copy link
Copy Markdown
Contributor

XCCDF ident elements with CCI values should use a cyber.mil/cci system attribute to display correctly in STIG Viewer.

Before:
20210409_rule_with_public_cci

After:
20210409_rule_with_mil_cci

…m attribute to display correctly in STIG Viewer.

Signed-off-by: Jarod Neuner <[email protected]>
@janeuner
janeuner force-pushed the jn-ident-system-stigviewer branch from 10dae7a to eb466e7 Compare April 9, 2021 23:11
@janeuner

janeuner commented Apr 12, 2021 •

Copy link
Copy Markdown
Contributor Author

I was also able to figure out the Legacy IDs field. Adding to the PR since they are closely related in the data schema.

20210412_rule_with_legacy_ids

@Bialogs Bialogs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of making the rule_idents method aware of the type of system being created, move back the logic to the initializer for the Ident itself. This way the logic for determine legacy or CCI can be reused if we need to include this information on other output formats.

Not sure what you would have to parse within the control['cci'] or control['legacy'] to make that determination.

Essentially what would be acceptable is

# to_xxdf.rb#build_rule_idents
# ...
idents.map { Ident.new(identifier) }

# HappyMapperTools::Benchmark::Ident
class Ident
  def initialize(ident_string)
    # Some parsing to determine CCI or Legacy
   @system = system
    @ident = ident
  end
end

@Bialogs

Bialogs commented Apr 15, 2021

Copy link
Copy Markdown
Contributor

Thanks for the changes. Makes sense since these legacy IDs are now being parsed from the XCCDF content. Please take a look at my review.

@Bialogs
Bialogs merged commit d4ee848 into mitre:master Apr 16, 2021
@janeuner janeuner mentioned this pull request Apr 16, 2021
Bialogs pushed a commit that referenced this pull request Apr 23, 2021
- added fallback logic for unrecognized idents, using legacy behaviors
- added unit testing for the new Ident constructor
* Cleanup Ident test to use hash instead of array

Signed-off-by: Jarod Neuner <[email protected]>
Signed-off-by: Robert Clark <[email protected]>
Co-authored-by: Robert Clark <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants