|
| 1 | +# Security Policy |
| 2 | + |
| 3 | +The StacklokLabs community take security seriously! We appreciate your efforts |
| 4 | +to 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/StacklokLabs/mcp-shell/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 StacklokLabs 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 StacklokLabs 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 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 StacklokLabs security team will coordinate to create |
| 50 | +the 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 | + StacklokLabs 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 bring 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/StacklokLabs/mcp-shell/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 | +- Add collaborators from codeowners team only (outside members can only be added |
| 89 | + after approval from the security team) |
| 90 | +- The reporter may be added to the issue to assist with review, but **only |
| 91 | + reporters who have contacted the security team using a private channel**. |
| 92 | +- Select 'Request CVE' |
| 93 | +- The security team / Fix Team create a private temporary fork |
| 94 | +- The Fix team performs all work in a 'security advisory' within its temporary |
| 95 | + fork |
| 96 | +- CI can be checked locally using the [act](https://github.com/nektos/act) |
| 97 | + project |
| 98 | +- All communication happens within the security advisory, it is _not_ discussed |
| 99 | + in slack channels or non private issues. |
| 100 | +- The Fix Team will notify the security team that work on the fix branch is |
| 101 | + completed, this can be done by tagging names in the advisory |
| 102 | +- The Fix team and the security team will agree on fix release day |
| 103 | +- The recommended release time is 4pm UTC on a non-Friday weekday. This means |
| 104 | + the announcement will be seen morning Pacific, early evening Europe, and late |
| 105 | + evening Asia. |
| 106 | + |
| 107 | +If the CVSS score is under ~4.0 |
| 108 | +([a low severity score](https://www.first.org/cvss/specification-document#i5)) |
| 109 | +or the assessed risk is low the Fix Team can decide to slow the release process |
| 110 | +down in the face of holidays, developer bandwidth, etc. |
| 111 | + |
| 112 | +Note: CVSS is convenient but imperfect. Ultimately, the security team has |
| 113 | +discretion on classifying the severity of a vulnerability. |
| 114 | + |
| 115 | +The severity of the bug and related handling decisions must be discussed in |
| 116 | +the security advisory, never in public repos. |
| 117 | + |
| 118 | +### Fix disclosure process |
| 119 | + |
| 120 | +With the Fix Development underway, the security team needs to come up with an |
| 121 | +overall communication plan for the wider community. This Disclosure process |
| 122 | +should begin after the Fix Team has developed a Fix or mitigation so that a |
| 123 | +realistic timeline can be communicated to users. |
| 124 | + |
| 125 | +**Fix release day** (Completed within 1-21 days of Disclosure) |
| 126 | + |
| 127 | +- The Fix Team will approve the related pull requests in the private temporary |
| 128 | + branch of the security advisory |
| 129 | +- The security team will merge the security advisory / temporary fork and its |
| 130 | + commits into the main branch of the affected repository |
| 131 | +- The security team will ensure all the binaries are built, signed, publicly |
| 132 | + available, and functional. |
| 133 | +- The security team will announce the new releases, the CVE number, severity, |
| 134 | + and impact, and the location of the binaries to get wide distribution and user |
| 135 | + action. As much as possible this announcement should be actionable, and |
| 136 | + include any mitigating steps users can take prior to upgrading to a fixed |
| 137 | + version. An announcement template is available below. The announcement will be |
| 138 | + sent to the following channels: |
| 139 | +- A link to fix will be posted to the |
| 140 | + [Stacklok Discord Server](https://discord.gg/stacklok) in the #mcp-servers |
| 141 | + channel. |
| 142 | + |
| 143 | +## Retrospective |
| 144 | + |
| 145 | +These steps should be completed 1-3 days after the Release Date. The |
| 146 | +retrospective process |
| 147 | +[should be blameless](https://landing.google.com/sre/book/chapters/postmortem-culture.html). |
| 148 | + |
| 149 | +- The security team will send a retrospective of the process to the |
| 150 | + [Stacklok Discord Server](https://discord.gg/stacklok) including details on |
| 151 | + everyone involved, the timeline of the process, links to relevant PRs that |
| 152 | + introduced the issue, if relevant, and any critiques of the response and |
| 153 | + release process. |
0 commit comments