terraform-provider-github
terraform-provider-github copied to clipboard
feat: Add support for Private Vulnerability Reporting
Adds private_vulnerability_reporting to the github_repository resource's security_and_analysis block.
Implementation uses dedicated GitHub API endpoints rather than the repository Edit API, since PVR status is not included in the SecurityAndAnalysis response:
- EnablePrivateReporting/DisablePrivateReporting for writes
- IsPrivateReportingEnabled for reads
- Gracefully handles repos where PVR is unavailable
Changes:
- Add private_vulnerability_reporting schema field (Optional, Computed)
- Add updatePrivateVulnerabilityReporting helper function
- Fetch and merge PVR status separately in Read function
- Add acceptance test for public repository PVR management
- Add documentation for private_vulnerability_reporting field
Resolves #2399