gatekeeper
kube-bench
Our great sponsors
gatekeeper | kube-bench | |
---|---|---|
22 | 23 | |
3,422 | 6,586 | |
1.8% | 1.7% | |
9.3 | 8.4 | |
3 days ago | 4 days ago | |
Go | Go | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
gatekeeper
- Shrink to Secure: Kubernetes and Secure Compact Containers
-
Long, detailed post mortem on a reddit failed k8s upgrade
When the Gatekeeper validatingwebhook came up, I was really worried that'd be the issue! Regardless I'd recommend anyone who cares about their cluster not collapsing to change the gatekeeper webhook to only intercept resources you care about: https://github.com/open-policy-agent/gatekeeper/pull/1806
- Is OPA Gatekeeper the best solution for writing policies for k8s clusters?
-
Implement DevSecOps to Secure your CI/CD pipeline
Kyverno adds an extra layer of security where only the allowed type of manifest is deployed onto kubernetes, otherwise, it will reject or we can set validationFailureAction to audit which only logs the policy violation message for reporting. Kubewarden and Gatekeeper are alternative tools available to enforce policies on Kubernetes CRD.
-
Gatekeeper with Istio
Now, we have the hardest part resolved and let's turn our attention to the OPA Gatekeeper. Gatekeeper uses the OPA Constraint Framework to describe and enforce policy. Right now there are mainly 3 parts we should pay attention:
-
10 Essentials For Kubernetes Multi-Tenancy
They enable you to establish the policies and regulations that govern cluster deployments and applications. Using predefined policies, policy engines can dynamically modify or create configurations. Policy engines such as Gatekeeper and Kyverno can be leveraged to meet legal and compliance requirements while maintaining operational flexibility and development speed.
-
Kubernetes for Startups: Practical Considerations for Your App
Setup policy around what resource requirements can be requested by an app per environment. OPA and gatekeeper or kyverno can help. Setup access control for who can create or modify apps.
-
Top 6 Kubernetes Security Tools
Here's a link to Gatekeeper on Github
-
Container security best practices: Comprehensive guide
Gatekeeper provides a powerful language that can be used to define flexible rules to accept or reject containers based on the pod specification (e.g., enforce annotations, detect privileged pods, or using host paths) and the status of the cluster (e.g.m, require all ingress hosts to be unique within the cluster).
-
Expose Open Policy Agent/Gatekeeper Constraint Violations for Kubernetes Applications with Prometheus and Grafana
by default and exposes metrics on path ```/metrics``` . It can run locally on your development box as long as you have a valid Kubernetes configuration in your home folder (i.e. if you can run kubectl and have the right permissions). When running on the cluster a ```incluster``` parameter is passed in so that it knows where to look up for the cluster credentials. Exporter program connects to Kubernetes API every 10 seconds to scrape data from Kubernetes API. We've used [this](https://medium.com/teamzerolabs/15-steps-to-write-an-application-prometheus-exporter-in-go-9746b4520e26) blog post as the base for the code. ## Demo Let's go ahead and prepare our components so that we have a Grafana dashboard to show us which constraints have been violated and how the number of violations evolve over time. ### 0) Required tools - [Git](https://git-scm.com/downloads): A git cli is required to checkout the repo and - [Kubectl](https://kubernetes.io/docs/tasks/tools/) and a working K8S cluster - [Ytt](https://carvel.dev/ytt/): This is a very powerful yaml templating tool, in our setup it's used for dynamically overlaying a key/value pair in all constraints. It's similar to Kustomize, it's more flexibel than Kustomize and heavily used in some [Tanzu](https://tanzu.vmware.com/tanzu) products. - [Kustomize](https://kustomize.io/): Gatekeeper-library relies on Kustomize, so we need it too. - [Helm](https://helm.sh/): We will install Prometheus and Grafana using helm - Optional: [Docker](https://www.docker.com/products/docker-desktop): Docker is only optional as we already publish the required image on dockerhub. ### 1) Git submodule update Run ```git submodule update --init``` to download gatekeeper-library dependency. This command will download the [gatekeeper-library](https://github.com/open-policy-agent/gatekeeper-library) dependency into folder ```gatekeeper-library/library``` . ### 2) Install OPA/Gatekeeper If your K8S cluster does not come with Gatekeeper preinstalled, you can use install it as explained [here](https://open-policy-agent.github.io/gatekeeper/website/docs/install/). If you are familiar with helm, the easiest way to install is as follows: ```bash helm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts helm install gatekeeper/gatekeeper --generate-name
kube-bench
-
Kube-bench and Popeye: A Power Duo for AKS Security Compliance
The official repository can be found here with detailed installation instructions.
- Looking for Tips on Open Sourcing a kubernetes security tool
-
Implement DevSecOps to Secure your CI/CD pipeline
kube-bench checks whether Kubernetes is deployed securely by running the checks documented in the CIS Kubernetes Benchmark. We can deploy kube-bench as a Job that runs daily and consume its report in CI/CD to pass or fail the pipeline based on the level of severity.
-
Top 6 Kubernetes Security Tools
Kube-bench, written as a Go application, is deployable as a container. Ready-made job.yaml files make it easy to run Kube-bench inside a Kubernetes cluster or on a managed Kubernetes service, such as Azure Kubernetes Service (AKS), Amazon Elastic Kubernetes Service (EKS), Google Kubernetes Engine (GKE), or OpenShift. Here's a link to Kube-Bench on Github
-
Introduction to Kubernetes Pentesting
kube-bench - Checks whether Kubernetes is deployed securely by running CIS Kubernetes Benchmark
-
Container security best practices: Comprehensive guide
Other tools you can use are linux-bench, docker-bench, kube-bench, kube-hunter, kube-striker, Cloud Custodian, OVAL, and OS Query.
- 27 open-source tools that can make your Kubernetes workflow easier 🚀🥳
-
Kubernetes Security Checklist 2021
Cluster Configuration should be audited regularly (Kube-bench, Kube-hunter, Kubestriker)
-
2 Widespread Attacks on Your Containerized Environment and 7 Rules to Prevent it.
Also, I use the security tool Kube-bench that covers vulnerabilities scanning only. The Kubebench brings an additional layer to your cluster security monitoring. There are plenty of security tools available for Kubernetes.
-
docktor - A tool for generating health checks and improving security for running Docker containers and images
How does it compare to https://github.com/aquasecurity/kube-bench ?
What are some alternatives?
Kyverno - Kubernetes Native Policy Management
trivy - Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more
kubesec - Security risk analysis for Kubernetes resources
falco - Cloud Native Runtime Security
cloud-custodian - Rules engine for cloud security, cost optimization, and governance, DSL in yaml for policies to query, filter, and take actions on resources
k-rail - Kubernetes security tool for policy enforcement
kubeaudit - kubeaudit helps you audit your Kubernetes clusters against common security controls
kube-hunter - Hunt for security weaknesses in Kubernetes clusters
connaisseur - An admission controller that integrates Container Image Signature Verification into a Kubernetes cluster
opa-envoy-plugin - A plugin to enforce OPA policies with Envoy
docker-bench-security - The Docker Bench for Security is a script that checks for dozens of common best-practices around deploying Docker containers in production.