Skip to content
Myr

SECURITY.md

This file

Path

SECURITY.md

105 lines · 5.0 KiB · Markdown

Last changed by

feat: Add security policy (#2253)John McBridebefore adoptionc25b598

History of this file

Take it

feat: Add security policy (#2253)John McBridebefore adoptionc25b598

lines 1–105why, one step back
1# Security Policy
23## Reporting a Vulnerability45The `cobra` maintainers take security issues seriously and6we appreciate your efforts to _**responsibly**_ disclose your findings.7We will make every effort to swiftly respond and address concerns.89To report a security vulnerability:10111. **DO NOT** create a public GitHub issue for the vulnerability!122. **DO NOT** create a public GitHub Pull Request with a fix for the vulnerability!133. Send an email to `cobra-security@googlegroups.com`.144. Include the following details in your report:15 - Description of the vulnerability16 - Steps to reproduce17 - Potential impact of the vulnerability (to your downstream project, to the Go ecosystem, etc.)18 - Any potential mitigations you've already identified195. Allow up to 7 days for an initial response.20 You should receive an acknowledgment of your report and an estimated timeline for a fix.216. (Optional) If you have a fix and would like to contribute your patch, please work22 directly with the maintainers via `cobra-security@googlegroups.com` to23 coordinate pushing the patch to GitHub, cutting a new release, and disclosing the change.2425## Response Process2627When a security vulnerability report is received, the `cobra` maintainers will:28291. Confirm receipt of the vulnerability report within 7 days.302. Assess the report to determine if it constitutes a security vulnerability.313. If confirmed, assign the vulnerability a severity level and create a timeline for addressing it.324. Develop and test a fix.335. Patch the vulnerability and make a new GitHub release: the maintainers will coordinate disclosure with the reporter.346. Create a new GitHub Security Advisory to inform the broader Go ecosystem3536## Disclosure Policy3738The `cobra` maintainers follow a coordinated disclosure process:39401. Security vulnerabilities will be addressed as quickly as possible.412. A CVE (Common Vulnerabilities and Exposures) identifier will be requested for significant vulnerabilities42 that are within `cobra` itself.433. Once a fix is ready, the maintainers will:44 - Release a new version containing the fix.45 - Update the security advisory with details about the vulnerability.46 - Credit the reporter (unless they wish to remain anonymous).47 - Credit the fixer (unless they wish to remain anonymous, this may be the same as the reporter).48 - Announce the vulnerability through appropriate channels49 (GitHub Security Advisory, mailing lists, GitHub Releases, etc.)5051## Supported Versions5253Security fixes will typically only be released for the most recent major release.5455## Upstream Security Issues5657`cobra` generally will not accept vulnerability reports that originate in upstream58dependencies. I.e., if there is a problem in Go code that `cobra` depends on,59it is best to engage that project's maintainers and owners.6061This security policy primarily pertains only to `cobra` itself but if you believe you've62identified a problem that originates in an upstream dependency and is being widely63distributed by `cobra`, please follow the disclosure procedure above: the `cobra`64maintainers will work with you to determine the severity and ecosystem impact.6566## Security Updates and CVEs6768Information about known security vulnerabilities and CVEs affecting `cobra` will69be published as GitHub Security Advisories at70https://github.com/spf13/cobra/security/advisories.7172All users are encouraged to watch the repository and upgrade promptly when73security releases are published.7475## `cobra` Security Best Practices for Users7677When using `cobra` in your CLIs, the `cobra` maintainers recommend the following:78791. Always use the latest version of `cobra`.802. [Use Go modules](https://go.dev/blog/using-go-modules) for dependency management.813. Always use the latest possible version of Go.8283## Security Best Practices for Contributors8485When contributing to `cobra`:86871. Be mindful of security implications when adding new features or modifying existing ones.882. Be aware of `cobra`'s extremely large reach: it is used in nearly every Go CLI89 (like Kubernetes, Docker, Prometheus, etc. etc.)903. Write tests that explicitly cover edge cases and potential issues.914. If you discover a security issue while working on `cobra`, please report it92 following the process above rather than opening a public pull request or issue that93 addresses the vulnerability.945. Take personal sec-ops seriously and secure your GitHub account: use [two-factor authentication](https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa),95 [sign your commits with a GPG or SSH key](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification),96 etc.9798## Acknowledgments99100The `cobra` maintainers would like to thank all security researchers and101community members who help keep cobra, its users, and the entire Go ecosystem secure through responsible disclosures!!102103---104105*This security policy is inspired by the [Open Web Application Security Project (OWASP)](https://owasp.org/) guidelines and security best practices.*