Skip to content

Files

Latest commit

 

History

History
44 lines (28 loc) · 1.84 KB

github-branch_protections-require_signed_commits.md

File metadata and controls

44 lines (28 loc) · 1.84 KB

Pattern: Missing signed commits for GitHub branch protection

Issue: -

Description

GitHub branch protection should be set to require signed commits.

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

Resolution: Require signed commits.

Examples

The following example will fail the github-branch_protections-require_signed_commits check.

 resource "github_branch_protection" "good_example" {
   repository_id = "example"
   pattern       = "main"

   require_signed_commits = false
 }
 

The following example will pass the github-branch_protections-require_signed_commits check.

 resource "github_branch_protection" "good_example" {
   repository_id = "example"
   pattern       = "main"

   require_signed_commits = true
 }
 

Further reading