Skip to content

Commit

Permalink
feat: allow vulnerability scanning of Argo repository and implement i…
Browse files Browse the repository at this point in the history
…gnore changes for non-change drift (#1120)

Co-authored-by: Igor Rodionov <[email protected]>
  • Loading branch information
RoseSecurity and goruha authored Oct 1, 2024
1 parent 6118bf4 commit fc5299c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/argocd-repo/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ resource "github_repository" "default" {
description = var.description
auto_init = true # will create a 'main' branch

visibility = "private"
visibility = "private"
vulnerability_alerts = var.vulnerability_alerts_enabled
}

resource "github_branch_default" "default" {
Expand Down Expand Up @@ -90,6 +91,12 @@ resource "github_branch_protection" "default" {
join("", data.github_user.automation_user[*].node_id),
] : []
}

lifecycle {
ignore_changes = [
restrict_pushes[0].push_allowances
]
}
}

data "github_team" "default" {
Expand Down
6 changes: 6 additions & 0 deletions modules/argocd-repo/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ variable "push_restrictions_enabled" {
default = true
}

variable "vulnerability_alerts_enabled" {
type = bool
description = "Enable security alerts for vulnerable dependencies"
default = false
}

variable "slack_notifications_channel" {
type = string
default = ""
Expand Down

0 comments on commit fc5299c

Please sign in to comment.