Skip to content

Commit fde00d2

Browse files
authored
feat: add security chapter (#7359)
1 parent 55c9e29 commit fde00d2

File tree

2 files changed

+155
-28
lines changed

2 files changed

+155
-28
lines changed

handbook/issues.md

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ The *QA team member*.
200200
The *Packager* coordinates the *Developer* and *QA member* work.
201201
After the *QA member* has completed the testing phase:
202202
* Takes an issue with label **verified**
203-
* Commits a *release tag* (see [version numbering rules](../version_numbering)).
204-
* Pushes the *release tag* and commits to GitHub
203+
* Follow the specific steps for releasing depending on the process:
204+
- [NethServer release process](https://dev.nethsecurity.org/development_process/#release-process), it also applies to NethVoice
205+
- [NethSecurity release process](https://dev.nethsecurity.org/development_process/#release-process)
205206
* Merges the documentation changes in the documentation repo. Also
206207
publishes the documentation by pushing the `latest` branch, if needed.
207208
Documentation repositories:
@@ -216,29 +217,3 @@ When the package is CLOSED, all related documentation must be in place.
216217
At any time of the issue life-cycle they ensure that there are no release
217218
conflict with other issues.
218219

219-
## Security: report vulnerabilities
220-
221-
If you find a security vulnerability, please report it to the security team by writing an email to [email protected]
222-
or by using GitHub dedicated security report tools:
223-
224-
- [NethServer and Nethvoice](https://github.com/NethServer/dev/security/advisories/new)
225-
- [NethSecurity](https://github.com/NethServer/nethsecurity/security/advisories/new)
226-
227-
Please, **do not report security vulnerabilities as GitHub issues**.
228-
229-
### Handling security vulnerabilities
230-
231-
The security team will evaluate the report and will contact the reporter to discuss the issue.
232-
If the issue is confirmed, the security team will work with the development team to fix the issue.
233-
The security team will evaluate the severity of the issue and will decide if the issue should be kept private until a fix is available.
234-
235-
This is the process:
236-
1. open a draft security advisory on GitHub
237-
2. assign the issue to the development team
238-
3. the development team will work on the fix
239-
4. the security team will review the fix
240-
5. the fix will be released as soon as possible and announced to the users using community channels; the fix usually includes new packages along with a new image
241-
6. depending on the severity of the issue, the development team will decide how long to wait before a full disclosure, usually between 15 and 30 days, to give
242-
users time to update their systems.
243-
244-
The disclosure will be be done by publishing the security advisory on GitHub and eventually by updating the community channels

handbook/security.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
---
2+
layout: default
3+
title: Security (CRA, NIS2, SBOM)
4+
nav_order: 6
5+
---
6+
7+
# Security
8+
9+
The [Cyber Resilience Act (CRA)](https://eur-lex.europa.eu/eli/reg/2024/2847/oj) is a regulatory framework established by the European Union to enhance the cybersecurity of digital products and services.
10+
It aims to ensure that manufacturers, developers, and distributors of digital products adhere to stringent security requirements throughout the product lifecycle.
11+
The CRA mandates the implementation of robust security measures, regular updates, and transparent reporting of vulnerabilities to protect consumers and businesses from cyber threats.
12+
CRA is built on existing regulations, such as the General Data Protection Regulation (GDPR), and complements other cybersecurity initiatives, such as the [NIS2 Directive](https://eur-lex.europa.eu/eli/dir/2022/2555).
13+
14+
## Essentials cybersecurity requirements
15+
16+
Essential cybersecurity requirements are a set of security measures that must be implemented by manufacturers, developers, and distributors of digital
17+
products and services to comply with the Cyber Resilience Act. They are defined inside Annex 1, around page 68 of the CRA document:
18+
19+
- [CRA, English version](https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=OJ:L_202402847)
20+
- [CRA, Italian version](https://eur-lex.europa.eu/legal-content/IT/TXT/PDF/?uri=OJ:L_202402847)
21+
22+
## SBOM (Software Bill of Materials)
23+
24+
A SBOM (Software Bill of Materials) is a comprehensive inventory of all software components, libraries, and modules used in a project. It is essential for ensuring transparency, security, and compliance in software development. As part of the Cyber Resilience Act, maintaining an SBOM is crucial for identifying and mitigating vulnerabilities.
25+
26+
This inventory provides a detailed list of all dependencies, including version numbers, licenses, and known vulnerabilities. By generating an SBOM, developers can track and manage dependencies more effectively, reducing the risk of security breaches and ensuring compliance with licensing requirements.
27+
28+
SBOM helps to comply with the CRA requirements, such as the one defined in Annex 1:
29+
Part 1:
30+
31+
> (a) be made available on the market without known exploitable vulnerabilities;
32+
33+
Part 2:
34+
35+
> (1) identify and document vulnerabilities and components contained in products with digital elements, including by
36+
drawing up a software bill of materials in a commonly used and machine-readable format covering at the very least the
37+
top-level dependencies of the products;
38+
39+
> (4) once a security update has been made available, share and publicly disclose information about fixed vulnerabilities,
40+
including a description of the vulnerabilities, information allowing users to identify the product with digital elements
41+
affected, the impacts of the vulnerabilities, their severity and clear and accessible information helping users to remediate
42+
the vulnerabilities; in duly justified cases, where manufacturers consider the security risks of publication to outweigh
43+
the security benefits, they may delay making public information regarding a fixed vulnerability until after users have
44+
been given the possibility to apply the relevant patch;
45+
46+
We have chosen [Trivy](https://trivy.dev/latest/) as our tool for generating SBOMs. Trivy supports three output formats:
47+
48+
- **SARIF standard CVE**: This format is integrated into GitHub's code scanning feature, allowing for continuous vulnerability monitoring.
49+
- **GitHub Dependency Graph format**: This format provides a snapshot of the current dependencies under the Insights tab but does not maintain a historical record.
50+
- **CycloneDX**: This format should be included in the release with a filename ending in `.cdx.json`, providing a detailed and standardized SBOM.
51+
It also creates a historical record of dependencies.
52+
When generating a SBOM of package, make sure to target all the software parts:
53+
54+
- the user interface (UI)
55+
- the software itself that can be written in any language
56+
- if the software is containerized, the container image including Linux distribution and software dependencies
57+
58+
See details on SBOM generation:
59+
60+
- [NethServer](https://nethserver.github.io/ns8-core/)
61+
- [NethSecurity](https://dev.nethsecurity.org/) developer manual
62+
63+
## Updates
64+
65+
The priority is to release software without known exploitable vulnerabilities.
66+
67+
A known vulnerability does not necessarily mean it is exploitable.
68+
When a CVE is reported on a released software, it should be analyzed and its impact evaluated.
69+
Many known vulnerabilities often affect the build system or development dependencies, not the final product and can't be exploited.
70+
There are also known vulnerabilities that are part of the Linux distribution where the software is running, but they are not exploitable in the context of the product.
71+
72+
### NethServer 8
73+
74+
NethServer 8 is a container-based solution. Each application is composed of one or more image containers.
75+
So an application can be considered a package and can be easily updated by the user or automatically by the system.
76+
This approach should ensure compliance with the Cyber Resilience Act, Annex 1 Part 2:
77+
78+
> c) ensure that vulnerabilities can be addressed through security updates, including, where applicable, through
79+
automatic security updates that are installed within an appropriate timeframe enabled as a default setting, with
80+
a clear and easy-to-use opt-out mechanism, through the notification of available updates to users, and the option to
81+
temporarily postpone them;
82+
83+
The same apply to NethVoice which is an application of NethServer.
84+
85+
### NethSecurity
86+
87+
NethSecurity is based on Linux distribution OpenWrt which supports updates based on packages and also images.
88+
89+
Security policies and EOL of each release is documented inside [Security](https://openwrt.org/docs/guide-developer/security) page on the official Wiki.
90+
91+
NethSecurity follows the EOL policy of OpenWrt.
92+
93+
Gestione delle segnalazioni CVE:
94+
Se un CVE viene segnalato su un software rilasciato, deve essere analizzato e il suo impatto valutato.
95+
96+
## Vulnerability management
97+
98+
Vulnerability management is a critical aspect of maintaining the security and integrity of digital products and services.
99+
From CRA, Annex 1, Part 1:
100+
101+
> c) ensure that vulnerabilities can be addressed through security updates, including, where applicable, through
102+
automatic security updates that are installed within an appropriate timeframe enabled as a default setting, with
103+
a clear and easy-to-use opt-out mechanism, through the notification of available updates to users, and the option to
104+
temporarily postpone them;
105+
106+
And Annex 1, Part 2:
107+
108+
> (5) put in place and enforce a policy on coordinated vulnerability disclosure;
109+
110+
The following guidelines are recommended for managing vulnerabilities on all products.
111+
112+
### Report vulnerabilities
113+
114+
If you find a security vulnerability, please report it to the security team by writing an email to ``[email protected]``
115+
or by using GitHub dedicated security report tools:
116+
117+
- [NethServer and Nethvoice](https://github.com/NethServer/dev/security/advisories/new)
118+
- [NethSecurity](https://github.com/NethServer/nethsecurity/security/advisories/new)
119+
120+
Please, **do not report security vulnerabilities as GitHub issues**.
121+
122+
### Handling security vulnerabilities
123+
124+
The security team will evaluate the report and will contact the reporter to discuss the issue.
125+
If the issue is confirmed, the handling process depends on the type of software:
126+
127+
- software produced and maintained by Nethesis
128+
- software not produced by Nethesis (upstream projects)
129+
130+
#### Case 1: Software produced and maintained by Nethesis
131+
132+
For software developed and maintained by Nethesis, the following process applies:
133+
134+
1. Open a draft security advisory on GitHub
135+
2. Assign the issue to the development team
136+
3. The development team will work on the fix
137+
4. The security team will review the fix
138+
5. The fix will be released as soon as possible and announced to the users using community channels. The fix usually includes new packages along with a new image
139+
6. Depending on the severity of the issue, the development team will decide how long to wait before a full disclosure, usually between 15 and 30 days, to give users time to update their systems
140+
141+
The disclosure will be done by publishing the security advisory on GitHub and, if necessary, updating the community channels.
142+
143+
#### Case 2: Software not produced by Nethesis (upstream projects)
144+
145+
For software that is not developed by Nethesis but is part of an upstream project:
146+
147+
1. The security team will analyze the reported issue and verify if it is exploitable in the context of Nethesis products
148+
2. If the issue is exploitable, the team will attempt to provide a temporary mitigation to protect users
149+
3. The team will report the issue to the upstream project and collaborate with their developers to find a solution
150+
4. Once a fix is available from the upstream project, the team will integrate it into the affected products and release an update
151+
152+
In both cases, the priority is to address vulnerabilities promptly and ensure the security of users.

0 commit comments

Comments
 (0)