{"id":18360426,"url":"https://github.com/open-policy-agent/gatekeeper-external-data-provider","last_synced_at":"2025-10-13T22:42:11.835Z","repository":{"id":43345172,"uuid":"510890894","full_name":"open-policy-agent/gatekeeper-external-data-provider","owner":"open-policy-agent","description":"A template repository for building external data providers for Gatekeeper.","archived":false,"fork":false,"pushed_at":"2023-08-14T11:53:30.000Z","size":120,"stargazers_count":11,"open_issues_count":7,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-05T06:51:44.454Z","etag":null,"topics":["external-data","gatekeeper","hacktoberfest","kubernetes","policy"],"latest_commit_sha":null,"homepage":"https://open-policy-agent.github.io/gatekeeper/website/docs/externaldata","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/open-policy-agent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-05T20:53:28.000Z","updated_at":"2024-11-15T15:53:58.000Z","dependencies_parsed_at":"2024-06-19T19:00:12.318Z","dependency_job_id":"6e6f0bba-ee8d-423e-988c-6e36e2775c48","html_url":"https://github.com/open-policy-agent/gatekeeper-external-data-provider","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/open-policy-agent/gatekeeper-external-data-provider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-policy-agent%2Fgatekeeper-external-data-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-policy-agent%2Fgatekeeper-external-data-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-policy-agent%2Fgatekeeper-external-data-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-policy-agent%2Fgatekeeper-external-data-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/open-policy-agent","download_url":"https://codeload.github.com/open-policy-agent/gatekeeper-external-data-provider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/open-policy-agent%2Fgatekeeper-external-data-provider/sbom","scorecard":{"id":708481,"data":{"date":"2023-12-26T07:23:36Z","repo":{"name":"github.com/open-policy-agent/gatekeeper-external-data-provider","commit":"007a44106ccd58d1ae0546daf91fea02987548f1"},"scorecard":{"version":"v4.10.5","commit":"27cfe92ed356fdb5a398c919ad480817ea907808"},"score":6.3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#binary-artifacts"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#branch-protection"}},{"name":"CI-Tests","score":7,"reason":"9 out of 12 merged PRs checked by a CI test -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#ci-tests"}},{"name":"CII-Best-Practices","score":0,"reason":"no badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#cii-best-practices"}},{"name":"Code-Review","score":0,"reason":"found 4 unreviewed human changesets","details":null,"documentation":{"short":"Determines if the project requires code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#code-review"}},{"name":"Contributors","score":0,"reason":"0 different organizations found -- score normalized to 0","details":["Info: contributors work for "],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#contributors"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#dangerous-workflow"}},{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: Dependabot detected: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#dependency-update-tool"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":null,"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: License file found in expected location: LICENSE:1","Info: FSF or OSI recognized license: LICENSE:1"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#license"}},{"name":"Maintained","score":0,"reason":"0 commit(s) out of 16 and 0 issue activity out of 3 found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"no published package detected","details":["Warn: no GitHub publishing workflow detected"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":7,"reason":"dependency not pinned by hash detected -- score normalized to 7","details":["Warn: containerImage not pinned by hash: Dockerfile:5","Warn: containerImage not pinned by hash: Dockerfile:25","Info: GitHub-owned GitHubActions are pinned","Info: Third-party GitHubActions are pinned","Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles","Info: no insecure (not pinned by hash) dependency downloads found in shell scripts"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commmits","details":["Warn: 0 commits out of 12 are checked with a SAST tool","Info: SAST tool detected: CodeQL"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#sast"}},{"name":"Security-Policy","score":9,"reason":"security policy file detected","details":["Info: Found linked content in security policy: SECURITY.md","Info: Found text in security policy: SECURITY.md","Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy: SECURITY.md","Info: security policy detected in current repo: SECURITY.md"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":["Warn: no GitHub releases found"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#signed-releases"}},{"name":"Token-Permissions","score":10,"reason":"tokens are read-only in GitHub workflows","details":["Info: High severity: topLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:24","Info: Medium severity: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:31","Info: Medium severity: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:32","Info: High severity: topLevel 'contents' permission set to 'read': .github/workflows/dependency-review.yml:13","Info: High severity: topLevel permissions set to 'read-all': .github/workflows/scorecards.yml:18","Info: Medium severity: jobLevel 'contents' permission set to 'read': .github/workflows/scorecards.yml:29","Info: Medium severity: jobLevel 'actions' permission set to 'read': .github/workflows/scorecards.yml:30","Info: High severity: topLevel 'contents' permission set to 'read': .github/workflows/workflow.yaml:16","Info: Medium severity: jobLevel 'contents' permission set to 'read': .github/workflows/workflow.yaml:50","Info: Medium severity: jobLevel 'contents' permission set to 'read': .github/workflows/workflow.yaml:24","Info: Medium severity: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-2wrh-6pvc-2jm9 / GO-2023-1988","Warn: Project is vulnerable to: GHSA-4374-p667-p6c8 / GO-2023-2102","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/27cfe92ed356fdb5a398c919ad480817ea907808/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T07:27:03.445Z","repository_id":43345172,"created_at":"2025-08-22T07:27:03.445Z","updated_at":"2025-08-22T07:27:03.445Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017144,"owners_count":26085984,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["external-data","gatekeeper","hacktoberfest","kubernetes","policy"],"created_at":"2024-11-05T22:28:19.149Z","updated_at":"2025-10-13T22:42:11.793Z","avatar_url":"https://github.com/open-policy-agent.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# External Data Provider\n\nA template repository for building external data providers for Gatekeeper.\n\n## Prerequisites\n\n- [ ] [`docker`](https://docs.docker.com/get-docker/)\n- [ ] [`helm`](https://helm.sh/)\n- [ ] [`kind`](https://kind.sigs.k8s.io/)\n- [ ] [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl)\n\n## Quick Start\n\n1. Create a [kind cluster](https://kind.sigs.k8s.io/docs/user/quick-start/).\n\n2. Install the latest version of Gatekeeper and enable the external data feature.\n\n```bash\n# Add the Gatekeeper Helm repository\nhelm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts\n\n# Install the latest version of Gatekeeper with the external data feature enabled.\nhelm install gatekeeper/gatekeeper \\\n    --set enableExternalData=true \\\n    --name-template=gatekeeper \\\n    --namespace gatekeeper-system \\\n    --create-namespace\n```\n\n3. Build and deploy the external data provider.\n\n```bash\ngit clone https://github.com/open-policy-agent/gatekeeper-external-data-provider.git\ncd external-data-provider\n\n# if you are not planning to establish mTLS between the provider and Gatekeeper,\n# deploy the provider to a separate namespace. Otherwise, do not run the following command\n# and deploy the provider to the same namespace as Gatekeeper.\nexport NAMESPACE=provider-system\n\n# generate a self-signed certificate for the external data provider\n./scripts/generate-tls-cert.sh\n\n# build the image via docker buildx\nmake docker-buildx\n\n# load the image into kind\nmake kind-load-image\n\n# Choose one of the following ways to deploy the external data provider:\n\n# 1. client and server auth enabled (recommended)\nhelm install external-data-provider charts/external-data-provider \\\n    --set provider.tls.caBundle=\"$(cat certs/ca.crt | base64 | tr -d '\\n\\r')\" \\\n    --namespace \"${NAMESPACE:-gatekeeper-system}\"\n\n# 2. client auth disabled and server auth enabled\nhelm install external-data-provider charts/external-data-provider \\\n    --set clientCAFile=\"\" \\\n    --set provider.tls.caBundle=\"$(cat certs/ca.crt | base64 | tr -d '\\n\\r')\" \\\n    --namespace \"${NAMESPACE:-gatekeeper-system}\" \\\n    --create-namespace\n```\n\n4a. Install constraint template and constraint.\n\n```bash\nkubectl apply -f validation/external-data-provider-constraint-template.yaml\nkubectl apply -f validation/external-data-provider-constraint.yaml\n```\n\n4b. Test the external data provider by dry-running the following command:\n\n```bash\nkubectl run nginx --image=error_nginx --dry-run=server -ojson\n```\n\nGatekeeper should deny the pod admission above because the image field has an `error_nginx` prefix.\n\n```console\nError from server (Forbidden): admission webhook \"validation.gatekeeper.sh\" denied the request: [deny-images-with-invalid-suffix] invalid response: {\"errors\": [[\"error_nginx\", \"error_nginx_invalid\"]], \"responses\": [], \"status_code\": 200, \"system_error\": \"\"}\n```\n\n5a. Install Assign mutation.\n\n```bash\nkubectl apply -f mutation/external-data-provider-mutation.yaml\n```\n\n5b. Test the external data provider by dry-running the following command:\n\n```bash\nkubectl run nginx --image=nginx --dry-run=server -ojson\n```\n\nThe expected JSON output should have the following image field with `_valid` appended by the external data provider:\n\n```json\n\"containers\": [\n    {\n        \"name\": \"nginx\",\n        \"image\": \"nginx_valid\",\n        ...\n    }\n]\n```\n\n6. Uninstall the external data provider and Gatekeeper.\n\n```bash\nkubectl delete -f validation/\nkubectl delete -f mutation/\nhelm uninstall external-data-provider --namespace \"${NAMESPACE:-gatekeeper-system}\"\nhelm uninstall gatekeeper --namespace gatekeeper-system\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-policy-agent%2Fgatekeeper-external-data-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopen-policy-agent%2Fgatekeeper-external-data-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopen-policy-agent%2Fgatekeeper-external-data-provider/lists"}