Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: implement security pipeline #549

Merged
merged 14 commits into from
Jan 2, 2023
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
94 changes: 94 additions & 0 deletions .github/.kubescape/controls-inputs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"imageRepositoryAllowList": [
"ecr.*amazonaws.com",
".*.gcr.io",
"*.ghcr.io",
".*azurecr.io",
"docker.io",
"ghcr.keptn.sh"
],
"max_critical_vulnerabilities": [
"5"
],
"max_high_vulnerabilities": [
"10"
],
"memory_limit_max": [],
"memory_limit_min": [],
"memory_request_max": [],
"memory_request_min": [],
"publicRegistries": [
"ghcr.io",
"registry.hub.docker.com"
],
"recommendedLabels": [
"app",
"tier",
"phase",
"version",
"owner",
"env"
],
"sensitiveInterfaces": [
"nifi",
"argo-server",
"weave-scope-app",
"kubeflow",
"kubernetes-dashboard"
],
"sensitiveKeyNames": [
"aws_access_key_id",
"aws_secret_access_key",
"azure_batchai_storage_account",
"azure_batchai_storage_key",
"azure_batch_account",
"azure_batch_key",
"secret",
"key",
"password",
"pwd",
"token",
"jwt",
"bearer",
"credential"
],
"sensitiveValues": [
"BEGIN \\w+ PRIVATE KEY",
"PRIVATE KEY",
"eyJhbGciO",
"JWT",
"Bearer",
"_key_",
"_secret_"
],
"sensitiveValuesAllowed": [],
"servicesNames": [
"nifi-service",
"argo-server",
"minio",
"postgres",
"workflow-controller-metrics",
"weave-scope-app",
"kubernetes-dashboard"
],
"untrustedRegistries": [],
"wlKnownNames": [
"coredns",
"kube-proxy",
"event-exporter-gke",
"kube-dns",
"17-default-backend",
"metrics-server",
"ca-audit",
"ca-dashboard-aggregator",
"ca-notification-server",
"ca-ocimage",
"ca-oracle",
"ca-posture",
"ca-rbac",
"ca-vuln-scan",
"ca-webhook",
"ca-websocket",
"clair-clair"
]
}
64 changes: 64 additions & 0 deletions .github/.kubescape/exceptions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
[
{
"name": "ignore-cluster-role-can-get-secrets",
"policyType": "postureExceptionPolicy",
"actions": [
"alertOnly"
],
"resources": [
{
"designatorType": "Attributes",
"attributes": {
"kind": "ServiceAccount",
"name": "klc-controller-manager"
}
}
],
"posturePolicies": [
{
"controlID": "C-0015"
}
]
},
{
"name": "ignore-auto-mounting-of-service-account-tokens",
"policyType": "postureExceptionPolicy",
"actions": [
"alertOnly"
],
"resources": [
{
"designatorType": "Attributes",
"attributes": {
"kind": ".*"
}
}
],
"posturePolicies": [
{
"controlID": "C-0034"
}
]
},
{
"name": "ignore-access-container-service-account",
"policyType": "postureExceptionPolicy",
"actions": [
"alertOnly"
],
"resources": [
{
"designatorType": "Attributes",
"attributes": {
"kind": ".*"
}
}
],
"posturePolicies": [
{
"controlID": "C-0053"
}
]
}
]

17 changes: 17 additions & 0 deletions .github/kics-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
exclude-queries:
# query IDs can be found here: https://docs.kics.io/latest/queries/all-queries/
# The queries below are excluded because they are not relevant or not needed for this project
- 48471392-d4d0-47c0-b135-cdec95eb3eef # Service Account Token Automount Not Disabled
exclude-results:
# Similarity IDs can be found in the JSON result file of kics
- 76f0ba03bcaf9f6e0ff8660beaebff55f74f1d89e38b6831c2b7b468a3dc764b # RBAC Roles with Read Secrets Permissions
- f88463cc96ec0165f0c1d83c279ff2658b8a8bd8adb2aaaf79f64a230df88504 # RBAC Roles with Read Secrets Permissions
- c4886e7b8193614214e9626539430632e8d90cb58499932a82c924266c05d118 # RBAC Roles with Read Secrets Permissions
- 00d587d8e63760f6a5d45ede024de5c793cb9e018ba78e4d9e50b8d671f79ba4 # Readiness Probe not configured for kube-rbac-proxy

no-color: false
no-progress: true
preview-lines: 5
silent: false
verbose: true
disable-full-descriptions: false
Loading