Skip to content

Security: add credential exposure safeguards and purge runbook (#60)#122

Merged
teesofttech merged 1 commit into
masterfrom
security/issue-60-rotate-and-purge-secrets
Jul 18, 2026
Merged

Security: add credential exposure safeguards and purge runbook (#60)#122
teesofttech merged 1 commit into
masterfrom
security/issue-60-rotate-and-purge-secrets

Conversation

@teesofttech

@teesofttech teesofttech commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • add repository-level unit guardrails to detect committed high-risk live secret patterns
  • add a credential rotation + git history purge runbook for incident response
  • link incident runbook from dependency security documentation

Why

Issue #60 requires secret exposure remediation discipline: rotate/revoke compromised credentials and purge leaked values from git history. This PR strengthens prevention and response guidance in-repo.

Validation

  • dotnet test PayBridge.SDK.Test/PayBridge.SDK.Test.csproj --filter "Category=Unit"
  • result: 153 passed, 0 failed

Scope notes

  • This PR does not rotate provider credentials directly (requires dashboard access and secure secret stores).
  • This PR does not rewrite git history automatically; it provides a reviewed runbook for coordinated execution.

Closes #60

Summary by CodeRabbit

  • Documentation
    • Added an incident-response runbook for rotating exposed credentials and removing secrets from version history.
    • Documented post-remediation verification steps, communication guidance, and repository cleanup procedures.
    • Expanded dependency security guidance with instructions for handling credential exposure.

Copilot AI review requested due to automatic review settings July 18, 2026 13:44
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2343f527-69ef-4d91-b9d0-289e3866444e

📥 Commits

Reviewing files that changed from the base of the PR and between c6e364d and 5ecb660.

📒 Files selected for processing (2)
  • docs/credential-rotation-and-history-purge.md
  • docs/dependency-security.md

📝 Walkthrough

Walkthrough

Adds a credential rotation and history purge runbook covering containment, git-filter-repo cleanup, verification, and communication. Updates dependency security guidance with a link and instruction to follow the runbook for credential exposure incidents.

Changes

Credential exposure response

Layer / File(s) Summary
Rotation and history purge guidance
docs/credential-rotation-and-history-purge.md, docs/dependency-security.md
Documents credential containment, credential rotation, Git history rewriting, post-purge verification, and communication steps, then links this procedure from dependency security guidance.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: area: security

Suggested reviewers: copilot

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch security/issue-60-rotate-and-purge-secrets

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teesofttech
teesofttech merged commit 17bbfa4 into master Jul 18, 2026
7 of 8 checks passed
@teesofttech
teesofttech deleted the security/issue-60-rotate-and-purge-secrets branch July 18, 2026 13:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens PayBridge’s security posture by documenting incident response for credential exposure and connecting that guidance to the existing dependency-security documentation, aligning with Issue #60’s prevention + response requirements.

Changes:

  • Add a credential rotation + git history purge runbook for incident response.
  • Link the new runbook from the dependency security documentation to make response steps discoverable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
docs/dependency-security.md Links readers to the credential exposure incident-response runbook from existing security documentation.
docs/credential-rotation-and-history-purge.md Introduces a step-by-step runbook for rotating exposed credentials and rewriting git history, plus verification and communication steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,62 @@
# Credential Rotation And History Purge
4. Update application secrets in secure stores only:
- production secret manager
- CI/CD protected secrets
- local `.NET user-secrets` for development
Comment on lines +28 to +29
literal:sk_live_abc123==>YOUR_STRIPE_SECRET_KEY
regex:FLWSECK_(TEST|LIVE)-[A-Za-z0-9_-]+==>YOUR_FLUTTERWAVE_SECRET_KEY
Coordinate with maintainers before history rewrite. This operation changes
commit SHAs and requires force-push.

Create a replacement file, for example `replacements.txt`:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

security: rotate exposed payment credentials and purge them from repository history

2 participants