Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 6fb826f

Browse files
authored
Minor changes to the adr_0001.adoc
1 parent 1abb135 commit 6fb826f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/adr/adr_0001.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
=== Status Quo
2525

26-
One major challange implementing the _secureCodeBox_ is to provide an flexible and modular architecture which enables the open source community to easily understand the concepts and especially to extend the _secureCodeBox_ with individual features. Therefore we decided to seperate the process stages of an single security scan (instance of scanType CRD) in 3 major phases:
26+
One major challenge implementing the _secureCodeBox_ is to provide a flexible and modular architecture, which enables the open source community to easily understand the concepts and especially to extend the _secureCodeBox_ with individual features. Therefore we decided to seperate the process stages of a single security scan (instance of scanType CRD) in 3 major phases:
2727
```
2828
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
2929
│ Scanning ├─────────▶│ Parsing ├─────────▶│ Persisting │
@@ -34,18 +34,18 @@ By now the "Persisting Phase 3" was implemented by so called _persistenceProvide
3434

3535
=== Problem and Question
3636

37-
We identified different additional UseCases with a are more _data proccessing oriented_ pattern than the implemented _persisting phase3_ indicates. For example we implemented a so called "MetaDataProvider" feature which is responsible for enhancing each security finding with additional metadata. But the MetaDataProvider must be executed after the _parsing phase 2_ and before the _persisting phase 3_ because it depends on the parsed finding results (which will be enhanced) and the update findings should be persisted also.
37+
We identified different additional UseCases with a more _data proccessing oriented_ pattern than the implemented _persisting phase3_ indicates. For example, we implemented a so called "MetaDataProvider" feature, which is responsible for enhancing each security finding with additional metadata. But the MetaDataProvider must be executed after the _parsing phase 2_ and before the _persisting phase 3_ because it depends on the parsed finding results (which will be enhanced) and the update findings should be also persisted.
3838

3939

40-
To find a proper solution we splitted the topic into the follwong two questions:
40+
To find a proper solution, we splitted the topic into the follwong two questions:
4141

4242
* Question 1: Should we unify the concepts MetaDataProvider and PersistenceProvider?
43-
* Question 2: How should the execution model look like for each?
43+
* Question 2: How should the execution model look like for each concept?
4444

4545
==== Question 1: Should we unify the concepts MetaDataProvider and PersistenceProvider?
4646
==== Solution approach 1: Unify
4747

48-
Both "modules" are "processing" the security findings which are generated in the parsing phase.
48+
Both "modules" are "processing" the security findings, which are generated in the parsing phase.
4949
But there is one larger difference between them:
5050

5151
* `PersistenceProvider` is proccesing the findings with a *ReadOnly* pattern
@@ -58,13 +58,13 @@ The are two variants:
5858
* `ValidatingWebhookConfiguration` (ReadOnly) *Executed Last*
5959
* `MutatingWebhookConfiguration` (ReadAndWrite) *Executed First*
6060

61-
We could do a similar thing and introduce CRD which allows to execute "custom code" (generally speaking, depends on the second question) after a scan has completed (meaning scan and parser phase are done). Some name ideas:
61+
We could do a similar thing and introduce CRD which allows to execute "custom code" (generally speaking, depends on the second question) after a scan has completed (meaning both scan and parser phases are done). Some name ideas:
6262

6363
- `ScanHooks`
6464
- `ScanCompletionHooks`
6565
- `FindingProcessors`
6666

67-
These could than have a `type` attribute which declares if they are `ReadOnly` or `ReadAndWrite`.
67+
These could be implemented with a `type` attribute, which declares if they are `ReadOnly` or `ReadAndWrite`.
6868

6969
The operator would process all these resources in the namespace and execute the `ReadAndWrite` ones first (in serial: one at a time to avoid write conflicts) and then the `ReadOnly` ones (in parallel).
7070

@@ -99,9 +99,9 @@ The Execution Flow would then look something like this:
9999

100100
**Cons:**
101101

102-
- Possible "over abstraction"?
102+
- Possible "over-abstraction"?
103103
- Need to refactor the ElasticSearch PersistenceProvider
104-
- The "General Implementation" will be harder than the individual ones -
104+
- The "General Implementation" will be harder than the individual ones
105105

106106
==== Solution approach 1: Keep Split between Persistence Provider and MetaData Provider
107107

@@ -187,7 +187,7 @@ Regarding the Question 1 it seems that both solution approaches are resulting in
187187
└──────────────────┘ └──────────────────┘ └──────────────────┘
188188
```
189189

190-
Regarding the question 2 we descided to implement the solution approach 1 with a job based approach (no active service componend needed).
190+
Regarding the Question 2 we decided to implement the solution approach 1 with a job-based approach (no active service componend needed).
191191
The Phase 3 `DataProcessing` will be therefore splitt into to seperate phases named `ReadAndWriteHooks (3.1)` and `ReadOnlyHooks (3.2)`
192192

193193
```
@@ -203,11 +203,11 @@ The Phase 3 `DataProcessing` will be therefore splitt into to seperate phases na
203203

204204
== Consequences
205205

206-
With the new `Hook Concept` we open the `DataProcessing` Phase 3 to a more intuitive and flexible architecture. It is easier to understand because _WebHooks_ are already a well known concept. It is possible to keep the existing implementation of the `persistenceProviders` and to integrate them with a lot of other possible data processing components in a more general fashion. In the end this step will result in a lot of additional feature possibilities which go fare beyond the existing ones. Therefore we only need to implement this concept once in the secureCodeBox Operator and new ideas for extending the DataProcessing will not enforce conceptual or architectural changes.
206+
With the new `Hook Concept` we open the `DataProcessing` Phase 3 to a more intuitive and flexible architecture. It is easier to understand because _WebHooks_ are already a well known concept. It is possible to keep the existing implementation of the `persistenceProviders` and to integrate them with a lot of other possible data processing components in a more general fashion. In the end, this step will result in a lot of additional feature possibilities, which go fare beyond the existing ones. Therefore we only need to implement this concept once in the secureCodeBox Operator and new ideas for extending the DataProcessing will not enforce conceptual or architectural changes.
207207

208208
Ideas for additional data processing hooks:
209209
* Notifier-Hooks (ReadOnlyHook) e.g. for chat systems (slack, teams...) or metric / alerting systems
210210
* MetaData Enrichment Hooks (ReadAndWriteHook)
211211
* FilterData Hooks (e.g. false/positive Handling) (ReadAndWriteHook)
212212
* SystemIntegration Hooks (ReadOnlyHook) e.g. for ticketing systems like JIRA
213-
* CascadingScans Hooks (ReadOnlyHook) e.g. for starting new security scans based on findings
213+
* CascadingScans Hooks (ReadOnlyHook) e.g. for starting new security scans based on findings

0 commit comments

Comments
 (0)