Skip to content

Commit 03a2bab

Browse files
authored
Merge pull request #5 from stacklok/dussab-patch-1
Create SECURITY.md with security policy details
2 parents 3b9fd91 + 2588e40 commit 03a2bab

1 file changed

Lines changed: 156 additions & 0 deletions

File tree

SECURITY.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Security Policy
2+
3+
The ToolHive community take security seriously! We appreciate your efforts to
4+
disclose your findings responsibly and will make every effort to acknowledge
5+
your contributions.
6+
7+
## Reporting a vulnerability
8+
9+
To report a security issue, please use the GitHub Security Advisory
10+
["Report a Vulnerability"](https://github.com/stacklok/toolhive-core/security/advisories/new)
11+
tab.
12+
13+
If you are unable to access GitHub you can also email us at
14+
[security@stacklok.com](mailto:security@stacklok.com).
15+
16+
Include steps to reproduce the vulnerability, the vulnerable versions, and any
17+
additional files to reproduce the vulnerability.
18+
19+
If you are only comfortable sharing under GPG, please start by sending an email
20+
requesting a public PGP key to use for encryption.
21+
22+
### Contacting the ToolHive security team
23+
24+
Contact the team by sending email to
25+
[security@stacklok.com](mailto:security@stacklok.com).
26+
27+
## Disclosures
28+
29+
### Private disclosure processes
30+
31+
The ToolHive community asks that all suspected vulnerabilities be handled in
32+
accordance with
33+
[Responsible Disclosure model](https://en.wikipedia.org/wiki/Responsible_disclosure).
34+
35+
### Public disclosure processes
36+
37+
If anyone knows of a publicly disclosed security vulnerability please
38+
IMMEDIATELY email [security@stacklok.com](mailto:security@stacklok.com) to
39+
inform us about the vulnerability so that we may start the patch, release, and
40+
communication process.
41+
42+
If a reporter contacts the us to express intent to make an issue public before a
43+
fix is available, we will request if the issue can be handled via a private
44+
disclosure process. If the reporter denies the request, we will move swiftly
45+
with the fix and release process.
46+
47+
## Patch, release, and public communication
48+
49+
For each vulnerability, the ToolHive security team will coordinate to create the
50+
fix and release, and notify the rest of the community.
51+
52+
All of the timelines below are suggestions and assume a Private Disclosure.
53+
54+
- The security team drives the schedule using their best judgment based on
55+
severity, development time, and release work.
56+
- If the security team is dealing with a Public Disclosure all timelines become
57+
ASAP.
58+
- If the fix relies on another upstream project's disclosure timeline, that will
59+
adjust the process as well.
60+
- We will work with the upstream project to fit their timeline and best protect
61+
ToolHive users.
62+
- The Security team will give advance notice to the Private Distributors list
63+
before the fix is released.
64+
65+
### Fix team organization
66+
67+
These steps should be completed within the first 24 hours of Disclosure.
68+
69+
- The security team will work quickly to identify relevant engineers from the
70+
affected projects and packages and being those engineers into the
71+
[security advisory](https://docs.github.com/en/code-security/security-advisories/)
72+
thread.
73+
- These selected developers become the "Fix Team" (the fix team is often drawn
74+
from the projects MAINTAINERS)
75+
76+
### Fix development process
77+
78+
These steps should be completed within the 1-7 days of Disclosure.
79+
80+
- Create a new
81+
[security advisory](https://docs.github.com/en/code-security/security-advisories/)
82+
in affected repository by visiting
83+
`https://github.com/stacklok/toolhive-core/security/advisories/new`
84+
- As many details as possible should be entered such as versions affected, CVE
85+
(if available yet). As more information is discovered, edit and update the
86+
advisory accordingly.
87+
- Use the CVSS calculator to score a severity level.
88+
![CVSS Calculator](/images/calc.png)
89+
- Add collaborators from codeowners team only (outside members can only be added
90+
after approval from the security team)
91+
- The reporter may be added to the issue to assist with review, but **only
92+
reporters who have contacted the security team using a private channel**.
93+
- Select 'Request CVE' ![Request CVE](/docs/static/img/cve.png)
94+
- The security team / Fix Team create a private temporary fork
95+
![Security Fork](/docs/static/img/fork.png)
96+
- The Fix team performs all work in a 'security advisory' within its temporary
97+
fork
98+
- CI can be checked locally using the [act](https://github.com/nektos/act)
99+
project
100+
- All communication happens within the security advisory, it is _not_ discussed
101+
in slack channels or non private issues.
102+
- The Fix Team will notify the security team that work on the fix branch is
103+
completed, this can be done by tagging names in the advisory
104+
- The Fix team and the security team will agree on fix release day
105+
- The recommended release time is 4pm UTC on a non-Friday weekday. This means
106+
the announcement will be seen morning Pacific, early evening Europe, and late
107+
evening Asia.
108+
109+
If the CVSS score is under ~4.0
110+
([a low severity score](https://www.first.org/cvss/specification-document#i5))
111+
or the assessed risk is low the Fix Team can decide to slow the release process
112+
down in the face of holidays, developer bandwidth, etc.
113+
114+
Note: CVSS is convenient but imperfect. Ultimately, the security team has
115+
discretion on classifying the severity of a vulnerability.
116+
117+
The severity of the bug and related handling decisions must be discussed on in
118+
the security advisory, never in public repos.
119+
120+
### Fix disclosure process
121+
122+
With the Fix Development underway, the security team needs to come up with an
123+
overall communication plan for the wider community. This Disclosure process
124+
should begin after the Fix Team has developed a Fix or mitigation so that a
125+
realistic timeline can be communicated to users.
126+
127+
**Fix release day** (Completed within 1-21 days of Disclosure)
128+
129+
- The Fix Team will approve the related pull requests in the private temporary
130+
branch of the security advisory
131+
- The security team will merge the security advisory / temporary fork and its
132+
commits into the main branch of the affected repository
133+
![Security Advisory](docs/images/publish.png)
134+
- The security team will ensure all the binaries are built, signed, publicly
135+
available, and functional.
136+
- The security team will announce the new releases, the CVE number, severity,
137+
and impact, and the location of the binaries to get wide distribution and user
138+
action. As much as possible this announcement should be actionable, and
139+
include any mitigating steps users can take prior to upgrading to a fixed
140+
version. An announcement template is available below. The announcement will be
141+
sent to the following channels:
142+
- A link to fix will be posted to the
143+
[Stacklok Discord Server](https://discord.gg/stacklok) in the #toolhive
144+
channel.
145+
146+
## Retrospective
147+
148+
These steps should be completed 1-3 days after the Release Date. The
149+
retrospective process
150+
[should be blameless](https://landing.google.com/sre/book/chapters/postmortem-culture.html).
151+
152+
- The security team will send a retrospective of the process to the
153+
[Stacklok Discord Server](https://discord.gg/stacklok) including details on
154+
everyone involved, the timeline of the process, links to relevant PRs that
155+
introduced the issue, if relevant, and any critiques of the response and
156+
release process.

0 commit comments

Comments
 (0)