You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2023-04-21-mrac.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ author: Matěj Týč
6
6
author_url: https://github.com/matejak
7
7
---
8
8
9
-
Systems that our contents aims to harden are very often large collections of separate components whose life cycle is independent from the life cycle of the product that ships them.
9
+
Systems that our content aims to harden are very often large collections of separate components whose life cycle is independent from the life cycle of the product that ships them.
10
10
For example, the Red Hat Enterprise Linux consists of more than six thousand of such distinct components, although only a fraction of them s.a. OpenSSH, Grub2 and so on is supported by the ComplianceAsCode project.
11
11
12
12
Our Red Hat group is contemplating the idea of making the content project better equipped to handle changes in component behavior better.
13
13
As the project is open-source and has a community, we would like to get it involved from the very start.
14
14
The purpose of this post is twofold:
15
15
16
-
- To serve as a resoure of brainstorming and of forming ideas for improvements, and
17
-
- to put incoming improvements implementations into the appropriate context.
16
+
- To serve as a resource of brainstorming and of forming ideas for improvements, and
17
+
- to put incoming implementation of improvements into the appropriate context.
18
18
19
19
20
20
## Introduction
@@ -30,18 +30,18 @@ Here are some examples:
30
30
31
31
- Configuration preference changes - instead of putting everything into one file, prefer distributing the configuration into a directory, for example prefer `sshd_config.d` directory over the `sshd_config` file.
32
32
- A configuration option is renamed, e.g. from a `whitelist` to `allowlist`.
33
-
- A feature disappears, and alternative approach is needed - consider the case of OpenSSH losing capabilities of the `SetIdleTimeout 0` option to drop inactive sessions.
33
+
- A feature disappears, and an alternative approach is needed - consider the case of OpenSSH losing capabilities of the `SetIdleTimeout 0` option to drop inactive sessions.
34
34
35
35
36
36
## New Approach Needed
37
37
38
-
If we think in a very simple way, we clearly need to design smart procedures or workflows that recact to changes, so no major brain power is needed to make the right decisions.
38
+
If we think in a very simple way, we clearly need to design smart procedures or workflows that react to changes, so no major brain power is needed to make the right decisions.
39
39
However, in order to be able to come with workflows that introduce an added value, the project needs to gain some extra capabilities.
40
40
41
41
Our team has come up with these ideas so far:
42
42
43
-
- Lower the pressue on rules - enable coverage of a security requirement by more than one rule.
44
-
- Be able to split a rule into such set of rules easily.
43
+
- Lower the pressure on rules - enable coverage of a security requirement by more than one rule.
44
+
- Be able to split a rule into such a set of rules easily.
45
45
- Enhance the declarative aspect of the project.
46
46
- Introduce a component-centric view to the project.
47
47
- Facilitate extension of a rule's scope.
@@ -56,8 +56,8 @@ Let's take a look how those ideas could align to the subject of component change
56
56
In practice, we may not know at build-time what exact version of a component will be scanned, and we may address this uncertainty by having multiple rules prepared to handle this uncertainty.
57
57
When it comes to the actual scanning, this collection of rules has to make sure that the evaluation will be carried out correctly, regardless of what component version is present on the system.
58
58
59
-
This could be achieved by set of rules with disjoint applicability, so at the end, at most one rule is active.
60
-
In this context, the recently-introduced CPE Applicability Language functionality can be helpful, as it enables content authors to specify that the rule is applicable only when certain conditions s.a. package version are met.
59
+
This could be achieved by a set of rules with disjoint applicability, so at the end, at most one rule is active.
60
+
In this context, the recently-introduced CPE Applicability Language functionality can be helpful, as it enables content authors to specify that the rule is applicable only when certain conditions s.a. packages versions are met.
61
61
62
62
63
63
### Support of rule splitting
@@ -81,7 +81,7 @@ Macros can also help to reduce copy-pasting, but let's face it - the manual work
81
81
### Go Declarative
82
82
83
83
Some areas of the project are already declarative, but to have more is better.
84
-
Declarative way of doing things allows for introduction of more levels of abstraction, and when something changes, it is much more likely that a change will stay contained in one of such abstraction levels.
84
+
Declarative way of doing things allows for the introduction of more levels of abstraction, and when something changes, it is much more likely that a change will stay contained in one of such abstraction levels.
85
85
86
86
For example, we already have an enhanced declarative part in the form of [control files](https://github.com/ComplianceAsCode/content/tree/master/controls).
87
87
Thanks to that, we don't have to specify relations of rules to the profile directly, but we can focus on a much easier to grasp relation of a rule to a security control.
@@ -91,15 +91,15 @@ As an additional benefit, the assignment of rules to security controls can be re
91
91
However, this declarative concept can be extended beyond profile compositions.
92
92
We often use constructs s.a. `{{% if product in ("rhel8", "rhel9") %}}` instead of a more generic and understandable `{{% if product.prefers_single_file_sshd_configuration %}}` or something analogous.
93
93
94
-
In other words, we shouldn't miss an opportunity to declare that certain product has a particular property, and every other part of the content should refer to those properties rather than to product names.
94
+
In other words, we shouldn't miss an opportunity to declare that a certain product has a particular property, and every other part of the content should refer to those properties rather than to product names.
95
95
Designing such product properties in a way that is smart, doesn't get in the way and that can be reused in prose, checks and remediations is not trivial.
96
96
97
-
Can you thing of other ways of bringing declarative principles to the project?
97
+
Can you think of other ways of bringing declarative principles to the project?
98
98
99
99
100
100
### Be able to track component changes and our reactions to them.
101
101
102
-
Imagine that a component changes behavior, and you dispatch pull requests that react to that change, and they get merged successfuly.
102
+
Imagine that a component changes behavior, and you dispatch pull requests that react to that change, and they get merged successfully.
103
103
However, later you discover that something is still not right, and you need to check out the reaction to that change.
104
104
What do you do?
105
105
@@ -108,7 +108,7 @@ However, this information needs to be manually recovered from other changes to t
108
108
That's doable, but it is, to some degree, a detective work.
109
109
110
110
Wouldn't it be nice to have a capability that would allow us to query a component, and we would get change information from the project using some automation?
111
-
This can be very difficult to achieve exhaustively, but partial and good enough solution may not be so difficult.
111
+
This can be very difficult to achieve exhaustively, but a partial and good enough solution may not be so difficult.
112
112
113
113
114
114
### Polymorphic rules
@@ -131,5 +131,5 @@ Do you have answers, or even more questions?
131
131
Or do you have worries or objections?
132
132
In any case, reach out to us on [Gitter](https://app.gitter.im/#/room/#Compliance-As-Code-The_content:gitter.im)!
133
133
134
-
Attempts to implements some improvements outlined here will probably start coming up in some form in course of 2023.
134
+
Attempts to implement some improvements outlined here will probably start coming up in some form in the course of 2023.
135
135
We are early on the cycle, and we are collecting and processing feedback, so our intentions can change is definitely our aim.
0 commit comments