Skip to content

Commit 91a6f43

Browse files
RoseSecuritygoruha
andauthored
feat: allow vulnerability scanning of Argo repository and implement ignore changes for non-change drift (cloudposse/terraform-aws-components#1120)
Co-authored-by: Igor Rodionov <[email protected]>
1 parent 2a79df8 commit 91a6f43

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/main.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ resource "github_repository" "default" {
4949
description = var.description
5050
auto_init = true # will create a 'main' branch
5151

52-
visibility = "private"
52+
visibility = "private"
53+
vulnerability_alerts = var.vulnerability_alerts_enabled
5354
}
5455

5556
resource "github_branch_default" "default" {
@@ -90,6 +91,12 @@ resource "github_branch_protection" "default" {
9091
join("", data.github_user.automation_user[*].node_id),
9192
] : []
9293
}
94+
95+
lifecycle {
96+
ignore_changes = [
97+
restrict_pushes[0].push_allowances
98+
]
99+
}
93100
}
94101

95102
data "github_team" "default" {

src/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ variable "push_restrictions_enabled" {
151151
default = true
152152
}
153153

154+
variable "vulnerability_alerts_enabled" {
155+
type = bool
156+
description = "Enable security alerts for vulnerable dependencies"
157+
default = false
158+
}
159+
154160
variable "slack_notifications_channel" {
155161
type = string
156162
default = ""

0 commit comments

Comments
 (0)