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

Revised ordering of excel/csv output columns to align with DISA provided SRGTemplate spreadsheet. #660

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

skykam87
Copy link

@skykam87 skykam87 commented Mar 3, 2025

DISA Excel Export column ordering is not consistent with the DISA provided STIGTemplate spreadsheet.

A review of the column ordering on several DISA provided STIGTemplate spreadsheets indicates a consistent column ordering as follows:

'IA Control', 'CCI', 'SRGID', 'STIGID', 'SRG Requirement', 'Requirement', 'SRG VulDiscussion', 'VulDiscussion', 'Status', 'SRG Check', 'Check', 'SRG Fix', 'Fix', 'Severity', 'Mitigation', 'Artifact Description', 'Status Justification'

Vulcan column ordering for DISA Excel Exports is:

'IA Control', 'CCI', 'SRGID', 'STIGID', 'Severity', 'SRG Requirement', 'Requirement', 'SRG VulDiscussion', 'VulDiscussion', 'Status', 'SRG Check', 'Check', 'SRG Fix', 'Fix', 'Status Justification', 'Mitigation', 'Artifact Description', 'Vendor Comments'

The 'Severity', 'Mitigations', 'Status Justification', and 'Artifact Description' columns are out of order.

To correct this:
Update the ordering for the headers configured under vulcan/app/constants/export_constants.rb DISA_EXPORT_HEADERS.
Update the ordering for the records under vulcan/app/models/rule.rb, def csv_attributes.

This change affects the column ordering for CSV, Excel and DISA Excel Exports, as all 3 export methods use the same base header and record definitions. If non-DISA Excel Exports are required to follow the current column ordering, additional work will be necessary to break out the header and record definitions into unique definitions for each export type.

@skykam87
Copy link
Author

skykam87 commented Mar 3, 2025

Resolves #659

@Amndeep7
Copy link
Contributor

Amndeep7 commented Mar 3, 2025

@skykam87 Thank you for your contribution. I have enabled workflows in this PR, and it seems one of them is failing. Can you please make sure that all workflows are passing?

@Amndeep7
Copy link
Contributor

Amndeep7 commented Mar 3, 2025

@rlakey Hi Ryan, can you please take a look at this PR and related issue (#659)? Aaron suggested that you'd have the best expertise to confirm the accuracy of this change. Codewise, things look fine by me though I'd appreciate @vanessuniq chiming in if possible.

@Amndeep7 Amndeep7 requested review from vanessuniq and rlakey March 3, 2025 18:46
@skykam87
Copy link
Author

skykam87 commented Mar 3, 2025

@skykam87 Thank you for your contribution. I have enabled workflows in this PR, and it seems one of them is failing. Can you please make sure that all workflows are passing?

@Amndeep7 Please rerun at your convenience. I adjusted my change to align to the 120 char max length per the projects coding standards.

vanessuniq
vanessuniq previously approved these changes Mar 4, 2025
@rlakey
Copy link
Collaborator

rlakey commented Mar 4, 2025

@rlakey Hi Ryan, can you please take a look at this PR and related issue (#659)? Aaron suggested that you'd have the best expertise to confirm the accuracy of this change. Codewise, things look fine by me though I'd appreciate @vanessuniq chiming in if possible.

The column ordering I have in my most recent spreadsheets from 11/24 is slightly different than what is being proposed here.

Mine are all...

'IA Control', 'CCI', 'SRGID', 'STIGID', 'SRG Requirement', 'Requirement', 'SRG VulDiscussion', 'VulDiscussion', 'Status', 'SRG Check', 'Check', 'SRG Fix', 'Fix', 'Severity', 'Mitigation', 'Artifact Description', 'Status Justification'

@skykam87
Copy link
Author

skykam87 commented Mar 4, 2025

@rlakey Hi Ryan, can you please take a look at this PR and related issue (#659)? Aaron suggested that you'd have the best expertise to confirm the accuracy of this change. Codewise, things look fine by me though I'd appreciate @vanessuniq chiming in if possible.

The column ordering I have in my most recent spreadsheets from 11/24 is slightly different than what is being proposed here.

Mine are all...

'IA Control', 'CCI', 'SRGID', 'STIGID', 'SRG Requirement', 'Requirement', 'SRG VulDiscussion', 'VulDiscussion', 'Status', 'SRG Check', 'Check', 'SRG Fix', 'Fix', 'Severity', 'Mitigation', 'Artifact Description', 'Status Justification'

Ryan - you are correct. I must have neglected to transpose Status Justification and Artifact Description fields that were flipped in the original Vulcan output when I was comparing the DISA spreadsheets. I pushed an updated commit to fix these. Thanks for catching this!

Copy link

sonarqubecloud bot commented Mar 4, 2025

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.

4 participants