Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit f1d361b

Browse files
committed
fix(kics): ignore kics issues
1 parent d8cdc1b commit f1d361b

File tree

15 files changed

+139
-43
lines changed

15 files changed

+139
-43
lines changed

.github/workflows/kube-linter.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.jscpd.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignore": ["**"]
3+
}

.lycheeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.*.myexample.dev
2+
.*.mylabs.dev
23
https://github.com/ruzickap/k8s-flux-repository

.mega-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ BASH_SHFMT_ARGUMENTS: --indent 2 --space-redirects
66
DISABLE_LINTERS:
77
- MARKDOWN_MARKDOWN_LINK_CHECK # Using lychee instead
88
- SPELL_CSPELL
9+
- TEKTON_TEKTON_LINT # It can not be easily configured / disabled per files/dirs
910
- TERRAFORM_TERRASCAN # Hard to configure - no documentation of the config file
1011

1112
# Remove: To receive reports as email, please set variable EMAIL_REPORTER_EMAIL

.mlc_config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
"pattern": "https://github.com/ruzickap/k8s-flux-repository"
55
},
66
{
7-
"pattern": ".*myexample.dev.*"
7+
"pattern": "(https|http)://.*.myexample.dev"
8+
},
9+
{
10+
"pattern": "https://.*.mylabs.dev"
811
}
912
]
1013
}

.tektonlintrc.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
rules: # error | warning | off
3+
no-duplicate-param: warning
4+
no-invalid-name: warning
5+
no-invalid-param-type: warning
6+
no-pipeline-missing-parameters: warning
7+
no-pipeline-missing-task: warning
8+
no-pipeline-task-cycle: warning
9+
no-extra-param: warning
10+
no-missing-workspace: warning
11+
no-undefined-result: warning
12+
no-missing-param: warning
13+
no-duplicate-resource: warning
14+
no-resourceversion: warning
15+
no-duplicate-env: warning
16+
no-undefined-volume: warning
17+
no-latest-image: warning
18+
prefer-beta: warning
19+
prefer-kebab-case: warning
20+
no-unused-param: warning
21+
no-missing-resource: warning
22+
no-undefined-param: warning
23+
prefer-when-expression: warning
24+
no-deprecated-resource: warning
25+
no-missing-hashbang: warning

.trivyignore.yaml

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
misconfigurations:
1+
vulnerabilities:
22
# │ glob-parent │ CVE-2020-28469 │ HIGH │ fixed │ 3.1.0 │ 5.1.2 │ Regular expression denial of service │
33
- id: CVE-2020-28469
44
# │ json5 │ CVE-2022-46175 │ HIGH │ fixed │ 0.5.1 │ 2.2.2, 1.0.2 │ json5: Prototype Pollution in JSON5 via Parse Method │
@@ -11,3 +11,91 @@ misconfigurations:
1111
- id: CVE-2022-24772
1212
# │ nth-check │ CVE-2021-3803 │ HIGH │ fixed │ 1.0.2 │ 2.0.1 │ inefficient regular expression complexity │
1313
- id: CVE-2021-3803
14+
15+
misconfigurations:
16+
# Launch configuration with unencrypted block device.
17+
- id: AVD-AWS-0008
18+
paths:
19+
- git::https:/github.com/terraform-aws-modules/terraform-aws-eks.git?ref=v6.0.0/workers.tf
20+
21+
# Launch configuration should not have a public IP address.
22+
- id: AVD-AWS-0009
23+
paths:
24+
- git::https:/github.com/terraform-aws-modules/terraform-aws-eks.git?ref=v6.0.0/workers.tf
25+
26+
# EKS should have the encryption of secrets enabled
27+
- id: AVD-AWS-0039
28+
paths:
29+
- git::https:/github.com/terraform-aws-modules/terraform-aws-eks.git?ref=v6.0.0/cluster.tf
30+
31+
# EKS Clusters should have the public access disabled
32+
- id: AVD-AWS-0040
33+
paths:
34+
- git::https:/github.com/terraform-aws-modules/terraform-aws-eks.git?ref=v6.0.0/cluster.tf
35+
36+
# EKS cluster should not have open CIDR range for public access
37+
- id: AVD-AWS-0041
38+
paths:
39+
- terraform/aws/aws.tf
40+
41+
# IAM policy should avoid use of wildcards and instead apply the principle of least privilege
42+
- id: AVD-AWS-0057
43+
paths:
44+
- git::https:/github.com/terraform-aws-modules/terraform-aws-eks.git?ref=v6.0.0/workers.tf
45+
46+
# An egress security group rule allows traffic to /0.
47+
- id: AVD-AWS-0104
48+
paths:
49+
- git::https:/github.com/terraform-aws-modules/terraform-aws-eks.git?ref=v6.0.0/cluster.tf
50+
51+
# An ingress security group rule allows traffic from /0
52+
- id: AVD-AWS-0107
53+
paths:
54+
- terraform/aws/aws.tf
55+
56+
# aws_instance should activate session tokens for Instance Metadata Service.
57+
- id: AVD-AWS-0130
58+
paths:
59+
- git::https:/github.com/terraform-aws-modules/terraform-aws-eks.git?ref=v6.0.0/workers.tf
60+
61+
# Instances in a subnet should not receive a public IP address by default.
62+
- id: AVD-AWS-0164
63+
paths:
64+
- git::https:/github.com/terraform-aws-modules/terraform-aws-vpc.git?ref=v2.15.0/main.tf
65+
66+
# Ensure AKS has an API Server Authorized IP Ranges enabled
67+
- id: AVD-AZU-0041
68+
paths:
69+
- terraform/azure/azure.tf
70+
71+
# Ensure RBAC is enabled on AKS clusters
72+
- id: AVD-AZU-0042
73+
paths:
74+
- terraform/azure/azure.tf
75+
76+
# Ensure AKS cluster has Network Policy configured
77+
- id: AVD-AZU-0043
78+
paths:
79+
- terraform/azure/azure.tf
80+
81+
# Use Readonly Filesystem
82+
- id: AVD-KSV-0014
83+
paths:
84+
- files/flux-repository/workloads/tekton-dashboard.yaml
85+
- files/flux-repository/workloads/tekton.yaml
86+
87+
# No Manage Secrets
88+
- id: AVD-KSV-0041
89+
paths:
90+
- files/flux-repository/workloads/tekton-dashboard.yaml
91+
- files/flux-repository/workloads/tekton.yaml
92+
93+
# No Manage Networking Resources
94+
- id: AVD-KSV-0056
95+
paths:
96+
- files/flux-repository/workloads/tekton-dashboard.yaml
97+
98+
# Manage webhookconfigurations
99+
- id: AVD-KSV-0114
100+
paths:
101+
- files/flux-repository/workloads/tekton.yaml

files/flux-repository/workloads/tekton-dashboard.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ spec:
215215
httpGet:
216216
path: /health
217217
port: 9097
218+
# kics-scan ignore-line
218219
name: tekton-dashboard
219220
ports:
220221
- containerPort: 9097
@@ -309,6 +310,3 @@ spec:
309310
resource: git-source
310311
taskRef:
311312
name: pipeline0-task
312-
313-
---
314-

files/flux-repository/workloads/tekton-services.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spec:
2323
tls:
2424
credentialName: ingress-cert-${LETSENCRYPT_ENVIRONMENT}
2525
mode: SIMPLE
26+
# kics-scan ignore-line
2627
privateKey: sds
2728
serverCertificate: sds
2829
---

files/flux-repository/workloads/tekton.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# kics-scan ignore
2+
13
apiVersion: v1
24
kind: Namespace
35
metadata:
@@ -648,6 +650,3 @@ spec:
648650
- configMap:
649651
name: config-logging
650652
name: config-logging
651-
652-
---
653-

terraform/aws/aws.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ resource "aws_security_group" "security_group" {
2727
vpc_id = module.vpc.vpc_id
2828
tags = var.tags
2929

30+
# kics-scan ignore-line
3031
ingress {
3132
from_port = 22
3233
to_port = 22
3334
protocol = "tcp"
3435

36+
# kics-scan ignore-line
3537
cidr_blocks = [
3638
"0.0.0.0/0",
3739
]

terraform/azure/azure.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ data "azurerm_resource_group" "resource_group" {
22
name = var.resource_group_name
33
}
44

5+
# kics-scan ignore-line
56
resource "azurerm_kubernetes_cluster" "kubernetes_cluster" {
67
name = "${var.prefix}-${var.kubernetes_cluster_name}-${replace(var.dns_zone_name, ".", "-")}"
78
location = var.location

terraform/modules/k8s_initial_config/external-dns.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# kics-scan ignore
2+
13
resource "kubernetes_namespace" "external-dns" {
24
metadata {
35
name = "external-dns"

terraform/modules/k8s_initial_config/helm.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# kics-scan ignore
2+
13
resource "kubernetes_service_account" "tiller" {
24
metadata {
35
name = "tiller"

tflint.hcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
config {
2+
# module = false
3+
# force = false
4+
disabled_by_default = true
5+
}

0 commit comments

Comments
 (0)