-
Notifications
You must be signed in to change notification settings - Fork 696
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
Allow multiple control files to add the same reference type #12165
Allow multiple control files to add the same reference type #12165
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: |
115f3fc
to
4246142
Compare
The build system is currently limited to a single ref type per control file. Two cotnrol files cannot add the same reference type. With this commit, the references added by the control file are tracked separately from the references loaded from the rule.yml. This allows us to differentiate references coming from the rule, and references coming from the control file.
4246142
to
927aeaf
Compare
Code Climate has analyzed commit 927aeaf and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 93.3% (50% is the threshold). This pull request will bring the total coverage in the repository to 59.4% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks.
Waving the Automatus tests for this PR as they are not applicable for this change. |
Description:
Rule.control_references
Rule.control_references
is merged intoRule.references
.This still allows us to ensure that references are not cross added from rules and control files.
To test this add, for example,
bsi: APP.4.4.A9
to any OCP rule.Rationale:
Review Hints:
gh co 12161
git cherry-pick 927aeafe9f6f129c993191ecf140c88d5b0b0796
./build_product -d ocp4
general_namespace_separation
has two BSI references: