{"id":13645989,"url":"https://github.com/aquasecurity/kube-query","last_synced_at":"2026-03-06T11:01:21.733Z","repository":{"id":38272194,"uuid":"199878047","full_name":"aquasecurity/kube-query","owner":"aquasecurity","description":"[EXPERIMENTAL] Extend osquery to report on Kubernetes","archived":false,"fork":false,"pushed_at":"2021-03-04T22:14:31.000Z","size":15168,"stargazers_count":228,"open_issues_count":10,"forks_count":14,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-10-21T02:57:15.222Z","etag":null,"topics":["osquery"],"latest_commit_sha":null,"homepage":"","language":"Go","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/aquasecurity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-31T15:01:02.000Z","updated_at":"2025-06-28T08:54:14.000Z","dependencies_parsed_at":"2022-09-13T08:21:58.592Z","dependency_job_id":null,"html_url":"https://github.com/aquasecurity/kube-query","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aquasecurity/kube-query","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Fkube-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Fkube-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Fkube-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Fkube-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquasecurity","download_url":"https://codeload.github.com/aquasecurity/kube-query/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquasecurity%2Fkube-query/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30173343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["osquery"],"created_at":"2024-08-02T01:02:46.342Z","updated_at":"2026-03-06T11:01:21.712Z","avatar_url":"https://github.com/aquasecurity.png","language":"Go","funding_links":[],"categories":["osquery with containers","Go"],"sub_categories":[],"readme":"# kube-query\n\nkube-query is an extension for [osquery](https://osquery.io), letting you visualize your cluster using sql queries.\n\nDeployment\n===\n### Prerequisites\n#### Go v1.12+\n\n### build\n```bash\n$ export GO111MODULE=on \n$ go build kube-query.go \n```\n\n## Running kube-query\n**When running kube-query, you should always pass the `-kubeconfig` flag, specifying the path to your kubeconfig file.**\n\n## osqueryi \nWhen using the [osqueryi tool](https://osquery.readthedocs.io/en/stable/introduction/using-osqueryi/) you can easily register kube-query by passing the -socket parameter to kube-query on another process. For example:  \n`./kube-query -socket=\"/path/to/osquery/socket\" -kubeconfig=\"/path/to/kubeconfig.yml\"` \n\nOne way to get the path to the osquery socket is like this:\n```\nosqueryi --nodisable_extensions\nosquery\u003e select value from osquery_flags where name = 'extensions_socket';\n+-----------------------------------+\n| value                             |\n+-----------------------------------+\n| /Users/USERNAME/.osquery/shell.em |\n+-----------------------------------+\n```\n\nThere are many other options to automatically [register extensions](https://osquery.readthedocs.io/en/stable/deployment/extensions/).\n\n###\n\nExample Queries\n===\n```sql\n# query all kube-system pods\nSELECT * FROM kubernetes_pods WHERE namespace=\"kube-system\";\n\n# query all containers created by kubernetes\nSELECT * FROM kubernetes_containers;\n\n# query all pods that runs with a privileged container   \nSELECT * \n FROM kubernetes_containers \n JOIN kubernetes_pods \n ON kubernetes_containers.pod_uid=kubernetes_pods.uid\n WHERE privileged=\"True\";\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquasecurity%2Fkube-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquasecurity%2Fkube-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquasecurity%2Fkube-query/lists"}