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

Added --control-id flag - #229

Merged
rbclark merged 7 commits into
masterfrom
xccdf2inspec_add_control_id_flag
May 27, 2021
Merged

rbclark merged 7 commits into
masterfrom
xccdf2inspec_add_control_id_flag

Conversation

@wdower

@wdower wdower commented May 6, 2021

Copy link
Copy Markdown
Contributor

Added --control-id flag to xccdf2inspec to allow user to specify if they want the created profile to use legacy vuln IDs (ex. 'V-XXXXX') or rule IDs as the control IDs for the generated profile

resolves #218

Signed-off-by: Will Dower [email protected]

@wdower
wdower requested review from Bialogs and rbclark May 6, 2021 18:54
@aaronlippold

Copy link
Copy Markdown
Member

I'd use a v3 RedHat xccdf

@wdower

wdower commented May 6, 2021

Copy link
Copy Markdown
Contributor Author

Updated the RHEL7 V1R4 example profile to V3R3

@Bialogs Bialogs self-assigned this May 7, 2021
@rbclark
rbclark removed their request for review May 7, 2021 15:19
Comment thread lib/inspec_tools/plugin_cli.rb Resolved
Comment thread test/unit/inspec_tools/xccdf_test.rb Resolved
Comment thread .rubocop.yml Resolved
@Bialogs
Bialogs force-pushed the xccdf2inspec_add_control_id_flag branch from 5191e74 to f87e4bf Compare May 13, 2021 17:15

@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.

Why is the option a string instead of boolean?

wdower added 5 commits May 13, 2021 10:19
…hey want the created profile to use legacy vuln IDs (ex. 'V-XXXXX') or rule IDs as the control IDs for the generated profile

Signed-off-by: Will Dower <[email protected]>
Signed-off-by: Will Dower <[email protected]>
@Bialogs
Bialogs force-pushed the xccdf2inspec_add_control_id_flag branch from f87e4bf to e87e92e Compare May 13, 2021 17:20
@wdower

wdower commented May 13, 2021

Copy link
Copy Markdown
Contributor Author

I think we left it a string so that we could eventually use any tag for the control_id as opposed to just a flag for using the legacy vulnID (which for now would need to default to true anyway). But the logic using the variable does expect it to be either ruleID or vulnID.

@aaronlippold aaronlippold linked an issue May 22, 2021 that may be closed by this pull request
@aaronlippold

Copy link
Copy Markdown
Member

note that there seem to be at least two ids hat are considered 'legecy' so it looks like it need to be an array

@rbclark
rbclark force-pushed the xccdf2inspec_add_control_id_flag branch 3 times, most recently from 94fece0 to fa7c87a Compare May 27, 2021 14:08
@rbclark

rbclark commented May 27, 2021

Copy link
Copy Markdown
Contributor

note that there seem to be at least two ids hat are considered 'legecy' so it looks like it need to be an array

We are already mapping over the legacy array so this shouldn't be an issue.

@rbclark
rbclark force-pushed the xccdf2inspec_add_control_id_flag branch from fa7c87a to 8f849eb Compare May 27, 2021 14:20
@rbclark
rbclark self-requested a review May 27, 2021 14:40
@rbclark
rbclark merged commit 4b7d799 into master May 27, 2021
@rbclark
rbclark deleted the xccdf2inspec_add_control_id_flag branch May 27, 2021 14:40
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.

Discuss the use of STIG field Rule ID as InSpec Control id Support for new group and rule ids

4 participants