Upgrade vulnerable .NET dependencies#99
Conversation
📝 WalkthroughWalkthroughThe change updates vulnerable .NET dependencies, adds an SQLite version regression test, introduces a NuGet vulnerability audit script and CI workflow, configures Dependabot for NuGet and GitHub Actions, and documents the dependency security process and remediation details. ChangesDependency Security
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/dependency-security.yml (1)
24-25: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDisable credential persistence in the checkout action.
Since this workflow does not push changes back to the repository, setting
persist-credentials: falseis a recommended security best practice. It prevents the GitHub token from remaining in the local git configuration, reducing the risk of token leakage if subsequent steps inadvertently run untrusted code.🔒️ Proposed fix
- name: Checkout repository uses: actions/checkout@v4 + with: + persist-credentials: false🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/dependency-security.yml around lines 24 - 25, Update the actions/checkout@v4 step in the dependency security workflow to set persist-credentials to false, leaving the repository checkout behavior otherwise unchanged.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/dependency-security.yml:
- Around line 24-25: Update the actions/checkout@v4 step in the dependency
security workflow to set persist-credentials to false, leaving the repository
checkout behavior otherwise unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cc8e3119-ad2e-46dc-b0ce-d15b25802b89
📒 Files selected for processing (6)
.github/dependabot.yml.github/workflows/dependency-security.ymlPayBridge.SDK.Test/Unit/DependencySecurityTests.csPayBridge.SDK/PayBridge.SDK.csprojdocs/dependency-security.mdscripts/check-vulnerable-packages.sh
There was a problem hiding this comment.
Pull request overview
This PR hardens PayBridge’s .NET 8 dependency supply chain by upgrading EF Core servicing packages, pinning patched transitive dependencies to address high-severity advisories, and adding automated vulnerability auditing via script + GitHub Actions (with Dependabot scheduling and documentation).
Changes:
- Upgrade EF Core 8 packages from 8.0.15 to 8.0.29 and pin
System.Text.Json(8.0.6) +SQLitePCLRaw.bundle_e_sqlite3(3.0.3) to remediate known advisories. - Add a reusable
dotnet list package --vulnerable --include-transitiveaudit script and a scheduled/PR GitHub Actions workflow to fail on high/critical vulnerabilities. - Add a native SQLite regression test to assert the embedded SQLite version meets the security-fix minimum, plus documentation and weekly Dependabot updates.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scripts/check-vulnerable-packages.sh | Adds a reusable high/critical NuGet vulnerability audit script for local/CI use. |
| PayBridge.SDK/PayBridge.SDK.csproj | Updates EF Core packages and pins patched dependency versions to override vulnerable transitive resolutions. |
| PayBridge.SDK.Test/Unit/DependencySecurityTests.cs | Adds a unit test to verify embedded SQLite runtime version meets the remediation threshold. |
| docs/dependency-security.md | Documents the new dependency security policy, workflow, and remediation rationale. |
| .github/workflows/dependency-security.yml | Introduces an automated vulnerability-audit workflow (PR/push/scheduled/manual). |
| .github/dependabot.yml | Configures weekly Dependabot updates for NuGet and GitHub Actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| PayBridge treats high and critical NuGet advisories as release blockers. The | ||
| dependency security workflow audits direct and transitive packages on every | ||
| pull request to `master`, on security branch pushes, and every Monday. |
Summary
System.Text.Json 8.0.6andSQLitePCLRaw.bundle_e_sqlite3 3.0.3Dependabot vulnerability alerts and automated security updates have also been enabled at repository level.
TDD
scripts/check-vulnerable-packages.shfailed across all four projects on the two high-severity dependency chainsAdvisory review
EF Core 8.0.29 still declares SQLitePCLRaw bundle 2.1.6, so the explicit 3.0.3 bundle reference is intentional.
Senior .NET review
SQLitePCLRaw.lib.e_sqlite3and resolvesSourceGear.sqlite3 3.50.4.5Validation
dotnet format: passedactionlint: passedgit diff --check: passedOne existing nullable warning remains in
PaymentController.csand is tracked by #70.Closes #59
Summary by CodeRabbit
Bug Fixes
Chores
Documentation