feat(repo): add configurable vulnerability alerts support - #244
Conversation
Allow repositories to opt out of Dependabot vulnerability alerts by exposing a `vulnerabilityAlerts` option. Disable alerts for the `pkgs` repo as its lockfiles track upstream pins rather than direct dependencies, making advisories unactionable.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe repository components now accept an optional vulnerability-alert setting. The ChangesVulnerability alert configuration
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to Repository vulnerability alerts are now configurable, with alerts disabled only for pkgs where lockfile advisories are not actionable. The change is scoped and ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🟢 Approval recommended
The change is small and targeted, with only a minor maintainability suggestion around making the documented default explicit.
Pull request overview
Adds an opt-out switch for GitHub/Dependabot vulnerability alerts in this Pulumi-managed GitHub org, allowing per-repository configuration (used here to disable alerts for pkgs, where advisories are noisy/unactionable due to upstream-pinned lockfiles).
Changes:
- Introduce a
vulnerabilityAlerts?: Input<boolean>option on repos and plumb it throughPublicRepointo the baseRepocomponent. - Wire the option into the
gh.RepositoryVulnerabilityAlertsresource via itsenabledfield. - Disable vulnerability alerts for the
pkgsrepository inindex.ts.
File summaries
| File | Description |
|---|---|
| index.ts | Disables vulnerability alerts specifically for the pkgs repo. |
| components/repo.ts | Adds configurable vulnerabilityAlerts arg and passes it to RepositoryVulnerabilityAlerts.enabled. |
| components/publicRepo.ts | Exposes and forwards vulnerabilityAlerts from PublicRepoArgs to the base Repo. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const vulnerabilityAlerts = new gh.RepositoryVulnerabilityAlerts(name, { | ||
| repository: repo.name, | ||
| enabled: args.vulnerabilityAlerts, | ||
| }, { parent: this }); |
|
🍹 The Update (preview) for UnstoppableMango/unmango-github/prod (at 14e47f3) was successful. Resource Changes Name Type Operation
~ pkgs unmango:github:PublicRepo update
~ pkgs github:index/repositoryVulnerabilityAlerts:RepositoryVulnerabilityAlerts update
|
Allow repositories to opt out of Dependabot vulnerability alerts by
exposing a
vulnerabilityAlertsoption. Disable alerts for thepkgsrepo as its lockfiles track upstream pins rather than direct
dependencies, making advisories unactionable.
Summary by CodeRabbit
New Features
Configuration Changes
pkgsrepository.