Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6390e6c

Browse files
authored
Merge pull request #686 from ruby-oauth/add/draft-irp-20250925081344
2 parents 406c061 + f262d5a commit 6390e6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+524
-155
lines changed

‎.idea/copilot.data.migration.agent.xml‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/copilot.data.migration.ask.xml‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/copilot.data.migration.ask2agent.xml‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.idea/copilot.data.migration.edit.xml‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Gemfile.lock‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ GEM
103103
json (2.13.2)
104104
jwt (3.1.2)
105105
base64
106-
kettle-dev (1.1.26)
106+
kettle-dev (1.1.31)
107107
kettle-soup-cover (1.0.10)
108108
simplecov (~> 0.22)
109109
simplecov-cobertura (~> 3.0)

‎IRP.md‎

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Incident Response Plan (IRP)
2+
3+
Status: Draft
4+
5+
## Purpose
6+
7+
This Incident Response Plan (IRP) defines the steps the project maintainer(s) will follow when handling security incidents related to the `oauth2` gem. It is written for a small project with a single primary maintainer and is intended to be practical, concise, and actionable.
8+
9+
## Scope
10+
11+
Applies to security incidents that affect the `oauth2` codebase, releases (gems), CI/CD infrastructure related to building and publishing the gem, repository credentials, or any compromise of project infrastructure that could impact users.
12+
13+
## Key assumptions
14+
- This project is maintained primarily by a single maintainer.
15+
- Public vulnerability disclosure is handled via Tidelift (see `SECURITY.md`).
16+
- The maintainer will act as incident commander unless otherwise delegated.
17+
18+
## Contact & Roles
19+
20+
- Incident Commander: Primary maintainer (repo owner). Responsible for coordinating triage, remediation, and communications.
21+
- Secondary Contact: (optional) A trusted collaborator or organization contact if available.
22+
23+
### If you are an external reporter
24+
- Do not publicly disclose details of an active vulnerability before coordination via Tidelift.
25+
- See `SECURITY.md` for Tidelift disclosure instructions. If the reporter has questions and cannot use Tidelift, they may open a direct encrypted report as described in `SECURITY.md` (if available) or email the maintainer contact listed in the repository.
26+
27+
## Incident Handling Workflow (high level)
28+
1. Identification & Reporting
29+
- Reports may arrive via Tidelift, issue tracker, direct email, or third-party advisories.
30+
- Immediately acknowledge receipt (within 24-72 hours) via the reporting channel.
31+
32+
2. Triage & Initial Assessment (first 72 hours)
33+
- Confirm the report is not duplicative and gather: reproducer, affected versions, attack surface, exploitability, and CVSS-like severity estimate.
34+
- Verify the issue against the codebase and reproduce locally if possible.
35+
- Determine scope: which versions are affected, whether the issue is in code paths executed in common setups, and whether a workaround exists.
36+
37+
3. Containment & Mitigation
38+
- If a simple mitigation or workaround (configuration change, safe default, or recommended upgrade) exists, document it clearly in the issue/Tidelift advisory.
39+
- If immediate removal of a release is required (rare), consult Tidelift for coordinated takedown and notify package hosts if applicable.
40+
41+
4. Remediation & Patch
42+
- Prepare a fix in a branch with tests and changelog entries. Prefer minimal, well-tested changes.
43+
- Include tests that reproduce the faulty behavior and demonstrate the fix.
44+
- Hardening: add fuzz tests, input validation, or additional checks as appropriate.
45+
46+
5. Release & Disclosure
47+
- Coordinate disclosure through Tidelift per `SECURITY.md` timelines. Aim for a coordinated disclosure and patch release to minimize risk to users.
48+
- Publish a patch release (increment gem version) and an advisory via Tidelift.
49+
- Update `CHANGELOG.md` and repository release notes with non-sensitive details.
50+
51+
6. Post-Incident
52+
- Produce a short postmortem: timeline, root cause, actions taken, and follow-ups.
53+
- Add/adjust tests and CI checks to prevent regressions.
54+
- If credentials or infrastructure were compromised, rotate secrets and audit access.
55+
56+
## Severity classification (guidance)
57+
- High/Critical: Remote code execution, data exfiltration, or any vulnerability that can be exploited without user interaction. Immediate action and prioritized patching.
58+
- Medium: Privilege escalation, sensitive information leaks that require specific conditions. Patch in the next release cycle with advisory.
59+
- Low: Minor information leaks, UI issues, or non-exploitable bugs. Fix normally and include in the next scheduled release.
60+
61+
## Preservation of evidence
62+
- Preserve all reporter-provided data, logs, and reproducer code in a secure location (local encrypted storage or private branch) for the investigation.
63+
- Do not publish evidence that would enable exploitation before coordinated disclosure.
64+
65+
## Communication templates
66+
Acknowledgement (to reporter)
67+
68+
"Thank you for reporting this issue. I've received your report and will triage it within 72 hours. If you can, please provide reproduction steps, affected versions, and any exploit PoC. I will coordinate disclosure through Tidelift per the project's security policy."
69+
70+
Public advisory (after patch is ready)
71+
72+
"A security advisory for oauth2 (versions X.Y.Z) has been published via Tidelift. Please upgrade to version A.B.C which patches [brief description]. See the advisory for details and recommended mitigations."
73+
74+
## Runbook: Quick steps for a maintainer to patch and release
75+
1. Create a branch: `git checkout -b fix/security-brief-description`
76+
2. Reproduce the issue locally and add a regression spec in `spec/`.
77+
3. Implement the fix and run the test suite: `bundle exec rspec` (or the project's preferred test command).
78+
4. Bump version in `lib/oauth2/version.rb` following semantic versioning.
79+
5. Update `CHANGELOG.md` with an entry describing the fix (avoid exploit details).
80+
6. Commit and push the branch, open a PR, and merge after approvals.
81+
7. Build and push the gem: `gem build oauth2.gemspec && gem push pkg/...` (coordinate with Tidelift before public push if disclosure is coordinated).
82+
8. Publish a release on GitHub and ensure the Tidelift advisory is posted.
83+
84+
## Operational notes
85+
- Secrets: Use local encrypted storage for any sensitive reporter data. If repository or CI secrets may be compromised, rotate them immediately and update dependent services.
86+
- Access control: Limit who can publish gems and who has admin access to the repo. Keep an up-to-date list of collaborators in a secure place.
87+
88+
## Legal & regulatory
89+
- If the incident involves user data or has legal implications, consult legal counsel or the maintainers' employer as appropriate. The maintainer should document the timeline and all communications.
90+
91+
## Retrospective & continuous improvement
92+
After an incident, perform a brief post-incident review covering:
93+
- What happened and why
94+
- What was done to contain and remediate
95+
- What tests or process changes will prevent recurrence
96+
- Assign owners and deadlines for follow-up tasks
97+
98+
## References
99+
- See `SECURITY.md` for the project's official disclosure channel (Tidelift).
100+
101+
## Appendix: Example checklist for an incident
102+
- [ ] Acknowledge report to reporter (24-72 hours)
103+
- [ ] Reproduce and classify severity
104+
- [ ] Prepare and test a fix in a branch
105+
- [ ] Coordinate disclosure via Tidelift
106+
- [ ] Publish patch release and advisory
107+
- [ ] Postmortem and follow-up actions

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /