Skip to content

Files

Latest commit

 

History

History
49 lines (31 loc) · 844 Bytes

github-repositories-enable_vulnerability_alerts.md

File metadata and controls

49 lines (31 loc) · 844 Bytes

Pattern: Disabled GitHub vulnerability alerts

Issue: -

Description

GitHub repository should be set to use vulnerability alerts.

You can do this by setting the vulnerability_alerts attribute to 'true'.

Resolution: Enable vulnerability alerts.

Examples

Example of incorrect code:

 resource "github_repository" "bad_example" {
   name        = "example"
   description = "My awesome codebase"

   vulnerability_alerts = false

   template {
     owner = "github"
     repository = "terraform-module-template"
   }
 }
 

Example of correct code:

 resource "github_repository" "good_example" {
   name        = "example"
   description = "My awesome codebase"

   vulnerability_alerts = true

   template {
     owner = "github"
     repository = "terraform-module-template"
   }
 }