{"id":24629513,"url":"https://github.com/framsouza/validating-webhook","last_synced_at":"2026-02-27T14:02:38.837Z","repository":{"id":168612672,"uuid":"525378225","full_name":"framsouza/validating-webhook","owner":"framsouza","description":"Deny pods creation that contains hostPath pointing to /","archived":false,"fork":false,"pushed_at":"2022-08-19T07:21:05.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T22:13:33.422Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/framsouza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-16T12:52:18.000Z","updated_at":"2022-09-09T09:09:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"ef84cef2-e643-4c3c-b716-7fbd87e9a845","html_url":"https://github.com/framsouza/validating-webhook","commit_stats":null,"previous_names":["framsouza/validating-webhook"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fvalidating-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fvalidating-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fvalidating-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/framsouza%2Fvalidating-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/framsouza","download_url":"https://codeload.github.com/framsouza/validating-webhook/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252961843,"owners_count":21832199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-25T06:13:10.423Z","updated_at":"2025-10-26T10:13:56.494Z","avatar_url":"https://github.com/framsouza.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Validating Webhook hostpath\n\nThis is a Validationg Webhook Configuration that will denied the creation of pods that are using `/` to mount `hostPath` volumes. For more informations about the risk of using hostPath, please check this [doc page](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath).\n\nThis is using cert-manager to generate the certs.\n\n### Usage\n\n1. `kind create cluster`\n2. Install cert manager\n  - `helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.9.1 --set installCRDs=true`\n3. `git clone git@github.com:framsouza/validating-webhook.git`\n4. `kubectl create -f manifests/cert-manager.yaml`\n5. `kubectl create -f manifests/validation.yaml`\n6. `kubectl create -f manifests/webhook.yaml`\n7. `kubectl create -f manifests/bad-pod.yaml`\n\n  The command will try to spin up a pod that mounts `/`. The output is the following:\n```\nkubectl create -f manifests/bad-pod.yaml \nnamespace/apps created\nError from server: error when creating \"manifests/bad-pod.yaml\": admission webhook \"hostpah-kubernetes-webhook.acme.com\" denied the request: pod contains \"/\" as hostPath\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframsouza%2Fvalidating-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fframsouza%2Fvalidating-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fframsouza%2Fvalidating-webhook/lists"}