Skip to content

Commit cdaa1bf

Browse files
committed
Add sections from Bootstrap example
At the risk of making this document larger, add in sections in Bootstrap IRP but not ours. - https://github.com/twbs/bootstrap/blob/main/.github/INCIDENT_RESPONSE.md
1 parent 4d63d0b commit cdaa1bf

File tree

1 file changed

+57
-18
lines changed

1 file changed

+57
-18
lines changed

.github/INCIDENT_RESPONSE.md

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,21 @@ This plan covers:
6161

6262
---
6363

64-
## 3. Roles
64+
## 3. Definitions
65+
66+
| Term | Meaning |
67+
|---|---|
68+
| **Incident** | Any event that compromises or threatens the confidentiality, integrity, or availability of Pillow's code, release artifacts, or infrastructure. |
69+
| **Vulnerability** | A security flaw in Pillow or a bundled library that can be exploited by a crafted image or API call. |
70+
| **Incident Lead** | The maintainer who owns coordination of the response from triage to closure. |
71+
| **Embargo** | A period during which fix details are kept private to allow coordinated patching before public disclosure. |
72+
| **Yank** | A PyPI action that keeps a release downloadable by pinned users but removes it from default `pip install` resolution. |
73+
| **CVE** | Common Vulnerabilities and Exposures — a public identifier assigned to a specific vulnerability. |
74+
| **CNA** | CVE Numbering Authority — GitHub is a CNA and can assign CVEs directly through the advisory workflow. |
75+
76+
---
77+
78+
## 4. Roles
6579

6680
| Role | Responsibility |
6781
|---|---|
@@ -76,7 +90,7 @@ explicitly at the start of each incident to avoid gaps.
7690

7791
---
7892

79-
## 4. Severity Classification
93+
## 5. Severity Classification
8094

8195
Use the [CVSS v3.1](https://www.first.org/cvss/v3.1/specification-document) base score as
8296
a guide, mapped to the following levels:
@@ -90,9 +104,11 @@ a guide, mapped to the following levels:
90104

91105
Supply-chain and CI/CD incidents are always treated as **Critical** regardless of CVSS.
92106

107+
> **Note:** These are good-faith targets for a small volunteer maintainer team, not contractual SLAs. Public safety and transparency will always be prioritised, even when timing varies.
108+
93109
---
94110

95-
## 5. Detection Sources
111+
## 6. Detection Sources
96112

97113
Vulnerabilities and incidents may be reported or discovered through:
98114

@@ -106,9 +122,9 @@ Vulnerabilities and incidents may be reported or discovered through:
106122

107123
---
108124

109-
## 6. Response Process
125+
## 7. Response Process
110126

111-
### 6.1 Triage (all severities)
127+
### 7.1 Triage (all severities)
112128

113129
1. **Acknowledge receipt** to the reporter within **72 hours** using the template in
114130
[Appendix A](#appendix-a-communication-templates). Ask the reporter:
@@ -130,7 +146,7 @@ Vulnerabilities and incidents may be reported or discovered through:
130146
- A legal concern arises (e.g. GDPR-reportable data exposure) → contact the project's legal/fiscal sponsor
131147
- The Incident Lead is unreachable for > 24 hours on a Critical issue → any other maintainer may assume the role
132148

133-
### 6.2 Fix Development
149+
### 7.2 Fix Development
134150

135151
1. Develop the fix in a **private fork** or directly in the private security advisory
136152
workspace on GitHub. Do **not** push to a public branch before the embargo lifts.
@@ -141,7 +157,7 @@ Vulnerabilities and incidents may be reported or discovered through:
141157
```
142158
4. Review the patch with at least one other maintainer.
143159

144-
### 6.3 Standard (Non-Embargoed) Release
160+
### 7.3 Standard (Non-Embargoed) Release
145161

146162
For Medium and Low severity, or when no distro pre-notification is needed:
147163

@@ -152,7 +168,7 @@ For Medium and Low severity, or when no distro pre-notification is needed:
152168
4. Publish the GitHub Security Advisory (this simultaneously publishes the CVE).
153169
5. Announce on [Mastodon](https://fosstodon.org/@pillow).
154170

155-
### 6.4 Embargoed Release
171+
### 7.4 Embargoed Release
156172

157173
For Critical and High severity where distro pre-notification improves user safety:
158174

@@ -169,7 +185,7 @@ For Critical and High severity where distro pre-notification improves user safet
169185
- Publish the GitHub Security Advisory.
170186
- Announce on [Mastodon](https://fosstodon.org/@pillow).
171187

172-
### 6.5 Rollback Procedures
188+
### 7.5 Rollback Procedures
173189

174190
If a security patch introduces a critical regression after release:
175191

@@ -182,10 +198,10 @@ If a security patch introduces a critical regression after release:
182198
that the release has been yanked.
183199
3. If the previous (vulnerable) version was also yanked, **un-yank it temporarily** so users
184200
have a functional fallback while the corrected release is prepared.
185-
4. Prepare a corrected point release (incrementing the patch version), repeating §6.2–§6.3.
201+
4. Prepare a corrected point release (incrementing the patch version), repeating §7.2–§7.3.
186202
5. Document the regression in the post-incident review (§9).
187203

188-
### 6.6 Supply-Chain / Infrastructure Compromise
204+
### 7.6 Supply-Chain / Infrastructure Compromise
189205

190206
1. **Immediately** revoke any potentially compromised credentials:
191207
- PyPI API tokens (regenerate and update in GitHub secrets)
@@ -200,9 +216,19 @@ If a security patch introduces a critical regression after release:
200216
4. Notify GitHub Security if repository access or Actions secrets are involved.
201217
5. Issue a public advisory describing the scope and any user action required.
202218

219+
### 7.7 Recovery
220+
221+
After the fix is released and the advisory is public:
222+
223+
1. Verify that the patched wheels are live on PyPI and passing CI across all supported platforms.
224+
2. Confirm any yanked releases are handled correctly (re-yank if un-yanked as a fallback during rollback).
225+
3. Resume normal development operations on `main`.
226+
4. Monitor the GitHub issue tracker and Mastodon for user reports of residual problems for at least **72 hours** post-release.
227+
5. Close the private GitHub Security Advisory once recovery is confirmed.
228+
203229
---
204230

205-
## 7. Communication
231+
## 8. Communication
206232

207233
### Internal (during embargo)
208234
- Use the **private GitHub Security Advisory** thread for all coordination.
@@ -228,7 +254,7 @@ If a security patch introduces a critical regression after release:
228254

229255
---
230256

231-
## 8. Post-Incident Review
257+
## 9. Post-Incident Review
232258

233259
Within **2 weeks** of a Critical or High severity fix being released:
234260

@@ -252,12 +278,12 @@ Within **2 weeks** of a Critical or High severity fix being released:
252278

253279
---
254280

255-
## 9. Dependency Map
281+
## 10. Dependency Map
256282

257283
Understanding what Pillow depends on (upstream) and what depends on Pillow (downstream)
258284
is essential for scoping impact and coordinating notifications during an incident.
259285

260-
### 9.1 Upstream Dependencies
286+
### 10.1 Upstream Dependencies
261287

262288
#### Bundled C libraries (shipped in official wheels)
263289

@@ -294,7 +320,7 @@ require a Pillow point release even if Pillow's own code is unchanged.
294320
| `olefile` | Optional (`fpx`, `mic` extras) | OLE2 container parsing (FPX, MIC formats) |
295321
| `defusedxml` | Optional (`xmp` extra) | Safe XML parsing for XMP metadata |
296322

297-
### 9.2 Downstream Dependencies
323+
### 10.2 Downstream Dependencies
298324

299325
A vulnerability in Pillow can have wide impact. Notify or consider the blast radius of
300326
these downstream consumers when assessing severity and planning communications.
@@ -336,7 +362,7 @@ maintainers should be notified for Critical/High issues that affect the plugin A
336362
or the formats they decode. See the
337363
[full plugin list](https://pillow.readthedocs.io/en/stable/handbook/third-party-plugins.html).
338364

339-
### 9.3 Responding to an Upstream Vulnerability
365+
### 10.3 Responding to an Upstream Vulnerability
340366

341367
When a CVE is published for a bundled C library:
342368

@@ -349,7 +375,20 @@ When a CVE is published for a bundled C library:
349375

350376
---
351377

352-
## 10. References
378+
## 11. Plan Maintenance
379+
380+
This document is a living record. It should be kept current so it is useful when an
381+
incident actually occurs.
382+
383+
- **Annual review** — revisit during the §1.3 readiness review each January.
384+
- **Post-incident update** — if the response process revealed gaps or needed improvisation,
385+
update this document before the post-incident review is closed (§9).
386+
- **Ownership** — changes are approved by the Core Team and recorded in Git history.
387+
Substantive changes should be noted in the PR description so they are easy to find later.
388+
389+
---
390+
391+
## 12. References
353392

354393
- [Security Policy](SECURITY.md)
355394
- [Release Checklist](../RELEASING.md)

0 commit comments

Comments
 (0)