Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3.1.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f85571c5fb643da9750e94b949 # v3.1.2
with:
Comment on lines +24 to 26
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says GitHub Actions are pinned to SHA hashes, but this workflow still uses version tags for aquasecurity/tfsec-action, azure/setup-helm, and ibiqlik/action-yamllint. Either pin those actions to commit SHAs as well, or update the PR description so expectations match the actual hardening applied.

Copilot uses AI. Check for mistakes.
terraform_version: 1.6.0
- name: Terraform Format Check
Expand All @@ -39,17 +39,17 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: aquasecurity/tfsec-action@v1.0.2
with:
soft_fail: true
soft_fail: false

helm-lint:
name: Helm Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: azure/setup-helm@v4.2.0
with:
version: v3.13.0
Expand All @@ -61,7 +61,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: ibiqlik/action-yamllint@v3.1.1
with:
file_or_dir: argocd/
Expand Down
7 changes: 5 additions & 2 deletions argocd/projects/default-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ spec:
description: Default project for GitOps demo
sourceRepos:
- https://github.com/thomasvincent/gitops-infrastructure-demo.git
- https://charts.helm.sh/stable
destinations:
- namespace: '*'
- namespace: 'argocd'
server: https://kubernetes.default.svc
- namespace: 'default'
server: https://kubernetes.default.svc
- namespace: 'kube-system'
server: https://kubernetes.default.svc
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default AppProject destinations are now limited to argocd, default, and kube-system, but existing ArgoCD Applications/ApplicationSets in this repo deploy into sample-app and sample-app-{dev,staging,production} namespaces. With this change those apps will be rejected as unauthorized destinations. Add the required destination namespaces (or adjust the apps/project strategy) so current manifests continue to sync.

Suggested change
server: https://kubernetes.default.svc
server: https://kubernetes.default.svc
- namespace: 'sample-app'
server: https://kubernetes.default.svc
- namespace: 'sample-app-dev'
server: https://kubernetes.default.svc
- namespace: 'sample-app-staging'
server: https://kubernetes.default.svc
- namespace: 'sample-app-production'
server: https://kubernetes.default.svc

Copilot uses AI. Check for mistakes.
clusterResourceWhitelist:
- group: ''
Expand Down
12 changes: 10 additions & 2 deletions terraform/modules/argocd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ resource "helm_release" "argocd" {
values = [
yamlencode({
server = {
extraArgs = ["--insecure"]
service = { type = "LoadBalancer" }
service = { type = "LoadBalancer" }
certificate = {
enabled = true
}
ingress = {
enabled = false
}
}
configs = {
repositories = {
Expand All @@ -26,6 +31,9 @@ resource "helm_release" "argocd" {
type = "git"
}
}
params = {
"server.insecure" = "false"
}
}
applicationSet = { enabled = true }
})
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ resource "aws_eks_cluster" "this" {
subnet_ids = var.private_subnets
endpoint_private_access = true
endpoint_public_access = true
public_access_cidrs = var.public_access_cidrs
security_group_ids = [aws_security_group.cluster.id]
}

Expand Down
6 changes: 6 additions & 0 deletions terraform/modules/eks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ variable "node_groups" {
})
}))
}

variable "public_access_cidrs" {
description = "List of CIDR blocks that can access the EKS public API endpoint"
type = list(string)
default = ["10.0.0.0/8"]
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting public_access_cidrs default to ["10.0.0.0/8"] changes the module's out-of-the-box behavior (and the dev environment doesn’t pass this variable), which can easily lock out kubectl/Terraform access to the public endpoint from typical operator/CI IPs. Consider keeping the module default aligned with AWS’s default behavior (or explicitly disabling public access by default) and pushing the hardened CIDR list down from the environment layer so it’s an intentional, visible choice per environment.

Suggested change
default = ["10.0.0.0/8"]
default = ["0.0.0.0/0"]

Copilot uses AI. Check for mistakes.
}
Loading