Skip to content

Commit e3a5e72

Browse files
committed
fix: add secure headers and Containers are running as non-root
1 parent 8bca87c commit e3a5e72

File tree

5 files changed

+115
-61
lines changed

5 files changed

+115
-61
lines changed

src/assets/YAML/default/Implementation/ApplicationHardening.yaml

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,110 @@ Implementation:
222222
iso27001-2022:
223223
- Hardening is not explicitly covered by ISO 27001 - too specific
224224
- 8.22
225-
isImplemented: false
226-
evidence: ""
227-
comments: ""
228225
dependsOn:
229226
- App. Hardening Level 2
227+
Secure headers:
228+
uuid: 29318d60-18ce-4526-80ea-f5928e49f639
229+
risk: |
230+
Missing or misconfigured security headers can lead to various security vulnerabilities, e.g.:
231+
- Cross-Site Scripting (XSS) due to missing Content Security Policy
232+
- Clickjacking attacks due to missing X-Frame-Options
233+
- Information disclosure through Server header exposure
234+
- SSL/TLS downgrade attacks due to missing HSTS
235+
- Cross-site scripting and injection due to missing security headers
236+
measure: |
237+
Implement and enforce security headers across all applications and services
238+
239+
Implementation Methods:
240+
1. Reverse Proxy/Load Balancer: Configure at nginx/Apache level
241+
2. Web Application: Implement in the application middleware
242+
3. Service Mesh: Configure at the ingress controller level
243+
4. Standard Docker Image: Use secure base images with preset headers
244+
245+
Remove or Secure:
246+
- Server header: Hide server version information
247+
- X-Powered-By: Remove technology stack information
248+
difficultyOfImplementation:
249+
knowledge: 2
250+
time: 1
251+
resources: 2
252+
usefulness: 4
253+
level: 3
254+
implementation:
255+
- $ref: src/assets/YAML/default/implementations.yaml#/implementations/owasp-secure-headers
256+
meta:
257+
implementationGuide: |
258+
Essential headers:
259+
- Content-Security-Policy: Define trusted sources for content
260+
- Strict-Transport-Security: Enforce HTTPS connections
261+
- X-Frame-Options: Prevent clickjacking attacks
262+
- X-Content-Type-Options: Prevent MIME-type sniffing
263+
- X-XSS-Protection: Enable browser's XSS filtering
264+
- Referrer-Policy: Control information in the Referrer header
265+
references:
266+
samm2:
267+
- D-SR-3-A
268+
iso27001-2017:
269+
- Hardening is not explicitly covered by ISO 27001 - too specific
270+
- 13.1.3
271+
iso27001-2022:
272+
- Hardening is not explicitly covered by ISO 27001 - too specific
273+
- 8.22
274+
openCRE:
275+
- https://www.opencre.org/cre/620-421
276+
Containers are running as non-root:
277+
uuid: a86c1fbc-28fd-4610-89a3-a7f73acfe45f
278+
risk: |-
279+
There are various reasons to run a container as non-root. Samples are listed:
280+
## Container Escape Vectors
281+
282+
- Root privileges significantly increase the chance of breaking container isolation
283+
- Root access can be leveraged to exploit kernel vulnerabilities
284+
- Compromised root containers provide attackers with maximum privileges inside the container
285+
- Greater potential for escaping container boundaries to the host system
286+
287+
## Host System Vulnerabilities
288+
289+
Root containers can potentially:
290+
291+
- Mount sensitive host filesystems
292+
- Access critical device files
293+
- Modify host network settings
294+
- Interact with host system processes
295+
- Override security controls
296+
297+
## Resource Management Issues
298+
299+
Root privileges may allow containers to:
300+
301+
- Bypass resource quotas and limits
302+
- Modify control group (cgroup) settings
303+
- Interfere with other containers' resources
304+
- Circumvent memory and CPU restrictions
305+
306+
Security Boundary Weakening
307+
308+
- Violates the principle of least privilege
309+
- Provides unnecessary elevated permissions
310+
- Expands the potential attack surface
311+
- Increases the impact of a successful compromise
312+
313+
measure: |-
314+
Containers are running as non-root. This can be enforced in the image itself or during runtime parameters
315+
(e.g. `podman run --user [...]`).
316+
difficultyOfImplementation:
317+
knowledge: 2
318+
time: 2
319+
resources: 1
320+
usefulness: 3
321+
level: 2
322+
implementation: []
323+
references:
324+
samm2:
325+
- O-EM-1-A
326+
iso27001-2017:
327+
- Virtual environments are not explicitly covered by ISO 27001 - too specific
328+
- 13.1.3
329+
iso27001-2022:
330+
- Virtual environments are not explicitly covered by ISO 27001 - too specific
331+
- 8.22

src/assets/YAML/default/Implementation/InfrastructureHardening.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ Implementation:
9696
iso27001-2022:
9797
- Virtual environments are not explicitly covered by ISO 27001 - too specific
9898
- 8.22
99-
isImplemented: false
100-
evidence: ""
10199
comments: ""
102100
Backup:
103101
uuid: 5c61fd6b-8106-4c68-ac28-a8a42f1c67dc

src/assets/YAML/default/implementations.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,3 +975,13 @@ implementations:
975975
url: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
976976
description: |-
977977
A catalog of vulnerabilities that have been exploited.
978+
owasp-secure-headers:
979+
uuid: 370b7f35-4da7-4833-89d6-7266b82ea07e
980+
name: OWASP Secure Headers Project
981+
tags: [header, documentation]
982+
url: https://owasp.org/www-project-secure-headers/
983+
description: |-
984+
The OWASP Secure Headers Project (also called OSHP) describes HTTP response headers that your application can use
985+
to increase the security of your application. Once set, these HTTP response headers can restrict modern browsers
986+
from running into easily preventable vulnerabilities. The OWASP Secure Headers Project intends to raise awareness
987+
and use of these headers.

src/assets/YAML/meta.yaml

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/assets/YAML/teams.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)