{"id":18131640,"url":"https://github.com/mrtc0/wazuh-ruby-client","last_synced_at":"2025-08-20T23:32:58.431Z","repository":{"id":41858365,"uuid":"235828455","full_name":"mrtc0/wazuh-ruby-client","owner":"mrtc0","description":"Wazuh API client for Ruby","archived":false,"fork":false,"pushed_at":"2024-10-24T06:09:53.000Z","size":369,"stargazers_count":9,"open_issues_count":5,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-17T06:38:23.285Z","etag":null,"topics":["wazuh"],"latest_commit_sha":null,"homepage":"https://mrtc0.github.io/wazuh-ruby-client","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrtc0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2020-01-23T15:49:42.000Z","updated_at":"2024-10-24T06:09:25.000Z","dependencies_parsed_at":"2022-07-24T23:46:28.510Z","dependency_job_id":"dc850a74-602a-4d81-9607-492251881c2f","html_url":"https://github.com/mrtc0/wazuh-ruby-client","commit_stats":{"total_commits":124,"total_committers":8,"mean_commits":15.5,"dds":"0.42741935483870963","last_synced_commit":"750eabe41d979abc9cbf395c111e73433434b15d"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtc0%2Fwazuh-ruby-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtc0%2Fwazuh-ruby-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtc0%2Fwazuh-ruby-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrtc0%2Fwazuh-ruby-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrtc0","download_url":"https://codeload.github.com/mrtc0/wazuh-ruby-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230471175,"owners_count":18231193,"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":["wazuh"],"created_at":"2024-11-01T12:08:24.065Z","updated_at":"2024-12-19T17:08:42.861Z","avatar_url":"https://github.com/mrtc0.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wazuh Ruby Client\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/mrtc0/wazuh-ruby-client/blob/master/LICENSE.txt)\n![](https://github.com/mrtc0/wazuh-ruby-client/workflows/GitHub%20Workflow/badge.svg)\n[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://mrtc0.github.io/wazuh-ruby-client)\n\n\nA Ruby client for the wazuh APIs.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'wazuh-ruby-client'\n```\n\n## Usage\n\n```ruby\nWazuh.configure do |config|\n  config.endpoint = \"https://wazuh.local:55000\"\n  config.basic_user = \"foo\"\n  config.basic_password = \"bar\"\n  config.verify_ssl = false\n  # if you are using the Wazuh version 4\n  # config.api_version = 4\nend\n\nclient = Wazuh::Client.new\nclient.all_agents\n# =\u003e {\"error\"=\u003e0, \"data\"=\u003e{\"items\"=\u003e[{\"os\"=\u003e{\"arch\"=\u003e\"x86_64\", \"codename\"=\u003e\"Xenial Xerus\", \"major\"=\u003e\"16\", \"minor\"=\u003e\"04\", \"name\"=\u003e\"Ubuntu\", \"platform\"=\u003e\"ubuntu\", \"uname\"=\u003e\"Linux |wazuh-manager-master-0 |4.14.138+ |#1 SMP Tue Sep 3 02:58:08 PDT 2019 |x86_64\", \"version\"=\u003e\"16.04.6 LTS\"}, \"status\"=\u003e\"Active\", \"name\"=\u003e\"wazuh-manager-master-0\", \"registerIP\"=\u003e\"127.0.0.1\", \"manager\"=\u003e\"wazuh-manager-master-0\", \"dateAdd\"=\u003e\"2020-01-07 16:13:05\", \"ip\"=\u003e\"127.0.0.1\", \"node_name\"=\u003e\"wazuh-manager-master\", \"version\"=\u003e\"Wazuh v3.11.1\", \"lastKeepAlive\"=\u003e\"9999-12-31 23:59:59\", \"id\"=\u003e\"000\"}], \"totalItems\"=\u003e1}}\n```\n\n### Authorization\n\nSet `basic_user` and `basic_password` for basic authentication.  \nIf you using self-signed certificate, `verify_ssl` must be set to `false` .\n\n```ruby\nWazuh.configure do |config|\n  config.endpoint = \"https://wazuh.local:55000\"\n  config.basic_user = \"foo\"\n  config.basic_password = \"bar\"\n  config.verify_ssl = false\nend\n```\n\nIf you are using client certificate authentication, set `client_key` and `client_cert` .\n\n```ruby\nrequire 'openssl'\n\nWazuh.configure do |config|\n  config.endpoint = \"https://wazuh.local:55000\"\n  config.client_key = OpenSSL::PKey::RSA.new(File.read(\"./wazuh.key\"))\n  config.client_cert = OpenSSL::X509::Certificate.new(File.read(\"./wazuh.crt\"))\nend\n```\n\n### Global Settings\n\nThe following global settings are supported via `Wazuh.configure` .\n\n| setting | description |\n|:--------|:------------|\n| user_agent | User-Agent |\n| ca_file | CA file (if use Client Certificate Authentication and specify CA file) |\n| client_cert | Client certificate (if use Client Certificate Authentication) |\n| client_key | Client Key (if use Client Certificate Authentication) |\n| basic_user | Basic Authentication user name |\n| basic_password | Basic Authentication password |\n| verify_ssl | Skip the SSL/TLS verify |\n| logger | loggeer object |\n| endpoint | Wazuh API endpoint URL |\n| ignore_env_proxy | Ignores ENV proxy settings |\n| api_version | Wazuh API Version (3 or 4) |\n\n\n### Agents\n\nGet all agents list.\n\n```ruby\n\u003e client.all_agents\n=\u003e [\n      {\n        :os=\u003e{\n          :arch=\u003e\"x86_64\",\n          :codename=\u003e\"Xenial Xerus\",\n          :major=\u003e\"16\",\n          :minor=\u003e\"04\",\n          :name=\u003e\"Ubuntu\",\n          :platform=\u003e\"ubuntu\",\n          :uname=\u003e\"Linux |wazuh-manager |4.15.0-60-generic |#67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 |x86_64\",\n          :version=\u003e\"16.04.6 LTS\"\n        },\n        :manager=\u003e\"wazuh-manager\",\n        :id=\u003e\"000\",\n        :registerIP=\u003e\"127.0.0.1\",\n        :name=\u003e\"wazuh-manager\",\n        :version=\u003e\"Wazuh v3.11.0\",\n        :ip=\u003e\"127.0.0.1\",\n        :dateAdd=\u003e\"2020-01-27 17:02:18\",\n        :status=\u003e\"Active\",\n        :lastKeepAlive=\u003e\"9999-12-31 23:59:59\",\n        :node_name=\u003e\"wazuh-master-1\"\n      },\n      ...\n  ]\n\n\u003e agents.first.os.name\n=\u003e \"Ubuntu\"\n\n\u003e agents.first.id\n=\u003e \"000\"\n```\n\nfilter by options. (see https://mrtc0.github.io/wazuh-ruby-client/Wazuh/Api/Endpoints/Agents.html#all_agents-instance_method )\n\n```ruby\n# Filter by status is active\n\u003e client.all_agents({ status: 'active' })\n# Filter by agent os.name is ubuntu\n\u003e client.all_agents({ 'os.name' =\u003e 'ubuntu' })\n```\n\n### Syscollector\n\nList agent's packages.\n\n```ruby\n\u003e client.packages('000').map { |package| package.name }\n=\u003e [\"python-apt-common\",\n \"python-idna\",\n \"libedit2\",\n \"libncurses5\",\n \"libpam-runtime\",\n \"python3.5\",\n \"libgsasl7\",\n \"vim-tiny\",\n ...\n```\n\nList agents' processes.\n\n```ruby\n\u003e client.packages('000').map { |package| package.name }\n=\u003e [\"entrypoint.sh\",\n \"my_init\",\n \"syslog-ng\",\n \"runsvdir\",\n \"runsv\",\n ...\n```\n\n### Vulnerability\n\n```ruby\n\u003e client.vulnerabilities('000')\n=\u003e [{:architecture=\u003e\"amd64\", :cve=\u003e\"CVE-2016-4802\", :name=\u003e\"curl\", :version=\u003e\"7.47.0-1ubuntu2.14\"}, {:architecture=\u003e\"amd64\", :cve=\u003e\"CVE-2016-8620\", :name=\u003e\"curl\", :version=\u003e\"7.47.0-1ubun...\n```\n\n### Other\n\nwazuh-ruby-client is supports some of the Wazuh API.  \nThe v4 API is not yet supported.\n\n- [x] Active Response\n- [x] Agents\n- [x] Cache\n- [x] Ciscat\n- [x] Cluster\n- [x] Decoders\n- [x] Experimental\n- [ ] Groups\n- [x] Lists\n- [ ] Logtest\n- [ ] Mitre\n- [x] Manager\n- [x] Rootcheck\n- [x] Rules\n- [ ] Security\n- [x] Security Configuration Assessment\n- [x] Summary\n- [x] Syscheck\n- [x] Syscollector\n- [ ] Tasks\n- [x] Vulnerability\n\nRefer to the document of wazuh-ruby-client and Wazuh API Reference for the list of all available methods.\n\n- https://mrtc0.github.io/wazuh-ruby-client/Wazuh/Api/Endpoints.html\n- https://documentation.wazuh.com/3.10/user-manual/api/reference.html\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/mrtc0/wazuh-ruby-client.\n\n## Copyright and License\n\nCopyright (c) 2015-2019, [Kohei Morita](https://blog.ssrf.in)\n\nThis project is licensed under the [MIT License](https://github.com/mrtc0/wazuh-ruby-client/blob/master/LICENSE) .\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtc0%2Fwazuh-ruby-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrtc0%2Fwazuh-ruby-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrtc0%2Fwazuh-ruby-client/lists"}