oauth

Incident Response Plan (IRP)

Status: Draft

Purpose

This Incident Response Plan (IRP) defines the steps the project maintainer(s) will follow when handling security incidents related to the oauth gem. It is written for a small project with a single primary maintainer and is intended to be practical, concise, and actionable.

Scope

Applies to security incidents that affect the oauth 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.

Key assumptions

Contact & Roles

If you are an external reporter

Incident Handling Workflow (high level)

  1. Identification & Reporting
    • Reports may arrive via Tidelift, issue tracker, direct email, or third-party advisories.
    • Immediately acknowledge receipt (within 24-72 hours) via the reporting channel.
  2. Triage & Initial Assessment (first 72 hours)
    • Confirm the report is not duplicative and gather: reproducer, affected versions, attack surface, exploitability, and CVSS-like severity estimate.
    • Verify the issue against the codebase and reproduce locally if possible.
    • Determine scope: which versions are affected, whether the issue is in code paths executed in common setups, and whether a workaround exists.
  3. Containment & Mitigation
    • If a simple mitigation or workaround (configuration change, safe default, or recommended upgrade) exists, document it clearly in the issue/Tidelift advisory.
    • If immediate removal of a release is required (rare), consult Tidelift for coordinated takedown and notify package hosts if applicable.
  4. Remediation & Patch
    • Prepare a fix in a branch with tests and changelog entries. Prefer minimal, well-tested changes.
    • Include tests that reproduce the faulty behavior and demonstrate the fix.
    • Hardening: add fuzz tests, input validation, or additional checks as appropriate.
  5. Release & Disclosure
    • Coordinate disclosure through Tidelift per SECURITY.md timelines. Aim for a coordinated disclosure and patch release to minimize risk to users.
    • Publish a patch release (increment gem version) and an advisory via Tidelift.
    • Update CHANGELOG.md and repository release notes with non-sensitive details.
  6. Post-Incident
    • Produce a short postmortem: timeline, root cause, actions taken, and follow-ups.
    • Add/adjust tests and CI checks to prevent regressions.
    • If credentials or infrastructure were compromised, rotate secrets and audit access.

Severity classification (guidance)

Preservation of evidence

Communication templates

Acknowledgement (to reporter)

“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.”

Public advisory (after patch is ready)

“A security advisory for oauth (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.”

Runbook: Quick steps for a maintainer to patch and release

  1. Create a branch: git checkout -b fix/security-brief-description
  2. Reproduce the issue locally and add a regression spec in spec/.
  3. Implement the fix and run the test suite: bundle exec rspec (or the project’s preferred test command).
  4. Bump version in lib/oauth/version.rb following semantic versioning.
  5. Update CHANGELOG.md with an entry describing the fix (avoid exploit details).
  6. Commit and push the branch, open a PR, and merge after approvals.
  7. Build and push the gem: gem build oauth.gemspec && gem push pkg/... (coordinate with Tidelift before public push if disclosure is coordinated).
  8. Publish a release on GitHub and ensure the Tidelift advisory is posted.

Operational notes

Retrospective & continuous improvement

After an incident, perform a brief post-incident review covering:

References

Appendix: Example checklist for an incident