etc/security/irp.md
This document outlines the procedure for responding to security incidents, with a primary focus on the discovery and handling of vulnerabilities in Gitoxide. It is a living document that will be updated as we learn and refine our processes.
The primary goal during any incident is to remain calm and methodical to ensure a thorough and effective response.
This plan supports two disclosure strategies:
The following steps are written for the standard "Issue Advisory With Patch" path, with notes indicating how the process changes for the "Issue Advisory Early" path.
This phase begins when a potential vulnerability is reported to us. Usually this is either by a member of the GitoxideLabs org itself via a draft GitHub Security Advisory, by anyone by Private Vulnerability Reporting (PVR) on GitHub or by email, as outlined in SECURITY.md. However, this also applies if a vulnerability is communicated in some other way, such as by being publicly disclosed. (Immediate public disclosure is plausible even if the reporter values coordinated disclosure, because a bug that the reporter believes is not a vulnerability, or whose security implications are unknown to the reporter, might be reported initially in a GitHub issue or other public post.)
Acknowledge the Report: Aim to provide an initial response to the reporter within 72 hours, acknowledging receipt of the report.
Understand the Report: Carefully review the report to ensure a full understanding of the claimed vulnerability. If any part is unclear, request clarification from the reporter.
Validate the Vulnerability:
Initiate Advisory:
Triage Severity: Perform an initial severity assessment. Determine the potential impact on confidentiality, integrity, and availability, and either calculate a CVSS score or validate/adjust the score suggested by the reporter.
Choose Disclosure Strategy: Based on the assessment, decide which disclosure path to follow. While "Issue Advisory With Patch" is the default, choose "Issue Advisory Early" if it is determined that we should publish an advisory before a fix is ready. Reasons for this include, but are not limited to:
This step can sometimes be deferred. That is, sometimes we may further investigate or coordinate before deciding to issue an advisory prior to making a fix available.
Once a vulnerability is validated, a deeper investigation is required to understand its full scope and impact.
Scope the Impact within Gitoxide:
Assess Risk and Ecosystem Impact:
Analyze for Broader Implications:
Coordinate with External Parties (if necessary):
Other Git Projects: If the vulnerability is confirmed or likely to affect other Git implementations, triage whether coordination is needed. For vulnerabilities in Git itself (including Git for Windows), the git-security mailing list is the correct communication channel. We will investigate if this list is also appropriate for broader coordination and update this IRP accordingly.
Consumers: For severe vulnerabilities, consider if direct coordination with critical applications or libraries that use Gitoxide is warranted. This is expected to be rare.
Downstream Packagers: Coordination with downstream packagers is not currently a required step, as there are few. However, this may be a consideration in the future for high-risk issues.
Update Advisory and Request CVE:
This phase covers developing and releasing a fix.
Plan the Fix: Design a code-level solution to address the vulnerability.
Establish a Timeline: If the fix is complex, break it down into manageable steps and establish a realistic timeline for implementation and release.
Implement and Test: Write the code for the fix. Ensure comprehensive tests are added to prevent regressions. Test any changes required in other Gitoxide crates to adapt to the fix.
Finalize Advisory: Perform a final review of the security advisory. Add the version numbers of all crates that will be released in the fix.
Publish and Release:
Create RUSTSEC Advisory: Author one or more advisories for the rustsec/advisory-db repository. The content should be consistent with the GHSA. Open a pull request to submit them.
After the fix is public, monitor its rollout and ensure information is accurate.
Monitor for Breakages: Keep an eye on user reports (e.g., GitHub issues) to see if the fix has introduced any breaking changes.
Verify Public Advisories: A few days after publication, check the global GHSA in the GitHub Advisory Database and the published RUSTSEC advisory. Ensure their content and formatting are correct and consistent with the original repository advisory.
Update Advisories: Update all advisories as needed with any new information, such as adding the CVE number if it was not available at the time of initial publication.
After the incident is fully resolved, it is crucial to learn from it.
Process Retrospective: Discuss the handling of the incident. Identify what went well and what could be improved in our response process. Such discussion may be brief or extensive, depending on the vulnerability and how involved it was to handle and remedy. Update this IRP with any lessons learned.
Root Cause Analysis: