terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

feat: Add support for Private Vulnerability Reporting

Open eslerm opened this issue 1 month ago • 0 comments

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

eslerm avatar Dec 05 '25 02:12 eslerm