Skip to content

Commit 7233396

Browse files
committed
feat: add patching
1 parent 1d6e63d commit 7233396

File tree

4 files changed

+505
-1138
lines changed

4 files changed

+505
-1138
lines changed

src/assets/YAML/default/BuildAndDeployment/PatchManagement.yaml

+18-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Build and Deployment:
44
Patch Management:
55
A patch policy is defined:
66
uuid: 99415139-6b50-441b-89e1-0aa59accd43d
7-
risk: Vulnerabilities in running containers stay for long and might get exploited.
7+
risk: Vulnerabilities in running artifacts stay for long and might get exploited.
88
measure:
99
A patch policy for all artifacts (e.g. in images) is defined. How often
1010
is an image rebuilt?
@@ -29,6 +29,8 @@ Build and Deployment:
2929
isImplemented: false
3030
evidence: ""
3131
comments: ""
32+
tags:
33+
- patching
3234
Automated PRs for patches:
3335
uuid: 8ae0b92c-10e0-4602-ba22-7524d6aed488
3436
risk:
@@ -52,6 +54,7 @@ Build and Deployment:
5254
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/jenkins
5355
# - $ref: src/assets/YAML/default/implementations.yaml#/implementations/argocd TODO
5456
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/terraform
57+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/renovate
5558
references:
5659
samm2:
5760
- O-EM-1-B
@@ -61,9 +64,9 @@ Build and Deployment:
6164
iso27001-2022:
6265
- 8.8
6366
- 8.27
64-
isImplemented: false
65-
evidence: ""
6667
comments: ""
68+
tags:
69+
- patching
6770
Nightly build of images (base images):
6871
uuid: 34869eaf-f2e1-4926-b0bd-28c43402f057
6972
description: |-
@@ -97,6 +100,8 @@ Build and Deployment:
97100
isImplemented: false
98101
evidence: ""
99102
comments: ""
103+
tags:
104+
- patching
100105
Reduction of the attack surface:
101106
uuid: 16e39c8f-5336-4001-88ed-a552d2447531
102107
description: |-
@@ -129,9 +134,10 @@ Build and Deployment:
129134
- 14.2.1
130135
iso27001-2022:
131136
- 8.25
132-
isImplemented: false
133137
evidence: ""
134138
comments: ""
139+
tags:
140+
- patching
135141
Usage of a maximum lifetime for images:
136142
uuid: 485a3383-7f2e-4dba-bb84-479377070904
137143
description: |-
@@ -167,9 +173,10 @@ Build and Deployment:
167173
- 12.6.1
168174
iso27001-2022:
169175
- 8.8
170-
isImplemented: false
171176
evidence: ""
172177
comments: ""
178+
tags:
179+
- patching
173180
Usage of a short maximum lifetime for images:
174181
uuid: 6b96e5a0-ce34-4ea4-a88f-469d3b84546e
175182
description: |-
@@ -204,17 +211,18 @@ Build and Deployment:
204211
isImplemented: false
205212
evidence: ""
206213
comments: ""
214+
tags:
215+
- patching
207216
Automated merge of automated PRs:
208217
uuid: f2594f8f-1cd6-45f9-af29-eaf3315698eb
209218
description: |-
210219
Automated merges of automated created PRs for outdated dependencies.
211220
risk:
212-
Vulnerabilities in running containers stay for too long and might get
213-
exploited.
221+
Vulnerabilities in running artifacts stay for too long and might get exploited.
214222
measure: |
215223
A good practice is to merge trusted dependencies (e.g. spring boot) after a grace period like one week.
216224
Often, patches, fixes and minor updates are automatically merged. Be aware that automated merging requires a high
217-
automated test coverage.
225+
automated test coverage. Enforcement of merging of pull requests after a grace period.
218226
difficultyOfImplementation:
219227
knowledge: 2
220228
time: 1
@@ -232,3 +240,5 @@ Build and Deployment:
232240
iso27001-2022:
233241
- 8.8
234242
comments: ""
243+
tags:
244+
- patching

src/assets/YAML/default/TestAndVerification/StaticDepthForApplications.yaml

+58-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,65 @@ Test and Verification:
2727
- Not explicitly covered by ISO 27001 - too specific
2828
- 8.25
2929
- 8.27
30-
isImplemented: false
31-
evidence: ""
3230
comments: ""
31+
Test libyear:
32+
<<: *Exclusion-of-source-code-duplicates
33+
risk: Vulnerabilities in running artifacts stay for long and might get exploited.
34+
measure: |-
35+
Test `libyear`, which provides a good insight how good patch management is.
36+
usefulness: 3
37+
level: 2
38+
difficultyOfImplementation:
39+
knowledge: 1
40+
time: 1
41+
resources: 1
42+
implementation:
43+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/libyear
44+
meta:
45+
implementationGuide: |
46+
`libyear` can be integrated into the build process and flag or even better break the build in case the defined threshold (e.g. 30 years) is reached.
47+
An alternative approach is to determine `libyear` based on deployed artifacts (which requires more effort in implementation).
48+
tags:
49+
- patching
50+
Test for Time to Patch:
51+
<<: *Exclusion-of-source-code-duplicates
52+
risk: Automatic PRs for dependencies are overlooked resulting in known vulnerabilities in production artifacts.
53+
measure: |-
54+
Test of the Time to Patch (e.g. based on Mean Time to Close automatic PRs)
55+
This activity is not repeated in the Sub-Dimension "Static depth for infrastructure", but it applies to infrastructure as well.
56+
usefulness: 3
57+
level: 2
58+
difficultyOfImplementation:
59+
knowledge: 1
60+
time: 1
61+
resources: 1
62+
implementation:
63+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/dependabot
64+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/renovate
65+
meta:
66+
implementationGuide:
67+
Usage of a version control platform API (e.g. github API) can be used to fetch the information.
68+
Consider that `Measure libyears` might be an alternative to this activity.
69+
tags:
70+
- patching
71+
Test for Patch Deployment Time:
72+
<<: *Exclusion-of-source-code-duplicates
73+
risk: Automatic PRs for dependencies are overlooked resulting in known vulnerabilities in production artifacts.
74+
measure: |
75+
Test of the Patch Deployment Time.
76+
This activity is not repeated in the Sub-Dimension "Static depth for infrastructure", but it applies to infrastructure as well.
77+
usefulness: 3
78+
difficultyOfImplementation:
79+
knowledge: 2
80+
time: 2
81+
resources: 1
82+
level: 3
83+
meta:
84+
implementationGuide:
85+
Self implementation.
86+
This activity is not repeated in the Sub-Dimension "Static depth for infrastructure", but it applies to infrastructure as well.
87+
tags:
88+
- patching
3389
Dead code elimination:
3490
<<: *Exclusion-of-source-code-duplicates
3591
uuid: d17dbff0-1f10-492a-b4c7-17bb59a0a711

src/assets/YAML/default/implementations.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ implementations:
164164
description:
165165
"[Do not Forget EVIL User Stories](https://www.owasp.org/index.php/Agile_Software_Development:_Don%27t_Forget_EVIL_User_Stories)\
166166
\ and [Practical Security Stories and Security Tasks for Agile Development Environments](http://safecode.org/publication/SAFECode_Agile_Dev_Security0712.pdf)"
167+
libyear:
168+
uuid: 2fff917f-205e-4eab-2e0e-1fab8c04bf33
169+
name: libyear
170+
tags: [patching, build]
171+
url: https://libyear.com/
172+
description: |-
173+
A simple measure of software dependency freshness. It is a single number telling you how up-to-date your dependencies are.
167174
owasp-juice-shop:
168175
uuid: 1fff917f-205e-4eab-ae0e-1fab8c04bf3a
169176
name: OWASP Juice Shop

0 commit comments

Comments
 (0)