-
Notifications
You must be signed in to change notification settings - Fork 706
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
Automated Reference Assignment: Allow Skippping of Controls #11630
Automated Reference Assignment: Allow Skippping of Controls #11630
Conversation
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
@Mab879 @jan-cerny If the |
Add a new key to tag controls that should not be added as a reference during build.
These rules are not directly tied to a STIG ID. Plus, the string 'needed_rules' was being added as a STIG reference.
16f6944
to
99eb3fc
Compare
We will need to figure out what we want to do about the missing refs test. Do want to somehow add a exclude list? |
I don't have a strong opinion. I can imagine the situation in which the reference to a dummy control would be useful. Remember that the users don't have access to the control files, they only use the data stream. If they review the profile eg. in HTML guide they will see that all rules have a reference to the STIG policy except this one so they might wonder if the rule is there by mistake. So in that case a reference to the dummy control could be a helpful information. If you decide to remove it please add a whitelist as Matthew suggested. |
/hold for test |
Still, as you mentioned, the user doesn't have access to the control file, only the data stream. So listing a dummy control in the rule can be confusing too. |
@jan-cerny By the way, these "needed rules" could also be directly selected in content/products/ocp4/profiles/high-rev-4.profile Lines 50 to 52 in cb599e6
This approach will still trigger "missing references" failures though. |
I think adding there the exception list would be great.
So for some profile we expect this and we had the test for years. This expectation is easy and consistent. |
@jan-cerny We have moved the rules that don't support a STIG ID out of the control file into the profile file. If you are not interested in this feature we can close the PR.
I gave it some thought and am curious how you would implement this.
|
It would have to be a hardcoded list of tuples (rule, product, profile). I assume that these rules are an exception and not something that should be there on a large scale. |
@jan-cerny I'm sorry but I won't have the time to pursue this. I'm closing the PR, feel free to reuse the commit. |
Description:
Controls
to be skipped from automated "referencing" during build.Rationale:
<xccdf-1.2:reference href="https://public.cyber.mil/stigs/downloads/?_dl_facet_stigs=operating-systems%2Cunix-linux">needed_rules</xccdf-1.2:reference>
This will also be useful for OCP4 STIG control file from Add OCP4 STIG control file and auto-add references #11593Review Hints:
needed_rules
references are gone.