{"id":13878005,"url":"https://github.com/Wafris/wafris-rb","last_synced_at":"2025-07-16T14:30:45.778Z","repository":{"id":177115630,"uuid":"578210150","full_name":"Wafris/wafris-rb","owner":"Wafris","description":"Wafris Client for Rails and Rack applications","archived":false,"fork":false,"pushed_at":"2024-11-19T17:55:28.000Z","size":1491,"stargazers_count":101,"open_issues_count":3,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-19T18:50:33.627Z","etag":null,"topics":["firewall","rails","security","waf"],"latest_commit_sha":null,"homepage":"https://wafris.org","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wafris.png","metadata":{"files":{"readme":"README.md","changelog":"Changes.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":"2022-12-14T14:13:34.000Z","updated_at":"2024-11-19T17:55:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"a581807d-7bf6-47b6-89b9-0b6cb48b85ec","html_url":"https://github.com/Wafris/wafris-rb","commit_stats":null,"previous_names":["wafris/wafris-rb"],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wafris%2Fwafris-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wafris%2Fwafris-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wafris%2Fwafris-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wafris%2Fwafris-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wafris","download_url":"https://codeload.github.com/Wafris/wafris-rb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226134226,"owners_count":17578778,"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":["firewall","rails","security","waf"],"created_at":"2024-08-06T08:01:37.293Z","updated_at":"2025-07-16T14:30:45.759Z","avatar_url":"https://github.com/Wafris.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Wafris for Ruby/Rails \nWafris is an open-source Web Application Firewall (WAF) that runs within Rails (and other frameworks) powered by Redis. \n\nPaired with [Wafris Hub](https://hub.wafris.org), you can view your site traffic in real time and and create rules to block malicious traffic from hitting your application.\n\n![Rules and Graph](docs/rules-and-graph.png)\n\nRules like:\n\n- Block IP addresses (IPv6 and IPv4) from making requests\n- Block on hosts, paths, user agents, parameters, and methods\n- Rate limit (throttle) requests \n- Visualize inbound traffic and requests\n\nNeed a better explanation? Read the overview at: [wafris.org](https://wafris.org)\n\n## Installation and Configuration\n\nThe Wafris Ruby client is a gem that installs a Rack middleware into your Rails/Sinatra/Rack application filtering requests based on your created rules.\n\n### Requirements\n- Rails 5+\n- Ruby 2.5+\n\n## Setup\n\n### 1. Connect on Wafris Hub\n\nGo to https://wafris.org/hub to create a new account and\nfollow the instructions to link your Redis instance.\n\n**Note:** In Step 3, you'll use this same Redis URL in your app configuration.\n\n### 2. Add the gem to your application\n\nUpdate your Gemfile to include the Wafris gem and run \n`bundle install`\n\n```\n# Gemfile\ngem 'wafris'\n```\n\n### 3. Set your API Key\nWhen you sign up on [Wafris Hub](https://hub.wafris.org), you'll receive your API key along with Rails instructions.\n\nYou have the option of using an Environment Variable or setting it in an initializer.\n\n*ENV Variable:*\n\nIn your development/production environment, you'll need to set the `WAFRIS_API_KEY` environment variable to your API key.\n\n*Initializer:*\n\nYou can also set an API key with an initializer files. Using something like `config/initializers/wafris.rb`:\n```ruby\nWafris.configure do |config|\n  config.api_key = 'provided key'\nend\n```\nThis is the suggested method if you want to store your API key in Rails credentials.\n\n## v1 Migration\n\nVersion 1 of the Wafris Rails client gem is deprecated. While it will continue to work you will experience signifiant performance improvements moving to v2.\n\nThe v2 Client does not depend on a Redis instance and instead uses locally sync'd SQLite databases. If you are currently using your own Redis instance, it will continue to work, but we would recommend creating a new WAF instance on Hub and migrating your existing rules.\n\nUpdate by running `bundle update wafris` and then updating your configuration.\n\nWe recommend removing your existing `config/initializers/wafris.rb` file and instead setting the `WAFRIS_API_KEY` environment variable in your production environment.\n\nYour Wafris API key and platform specific instructions are available in the Setup section of your [Wafris Hub](https://hub.wafris.org) dashboard.\n\n\n## Trusted Proxies\n\nIf you have Cloudflare, Expedited WAF, or another service in front of your application that modifies the `x-forwarded-for` HTTP Request header, please review how to configure [Trusted Proxy Ranges](docs/trusted-proxies.md)\n\n## Help / Support\n\n- Email: [support@wafris.org](mailto:support@wafris.org)\n- Twitter: [@wafrisorg](https://twitter.com/wafrisorg)\n- Booking: https://app.harmonizely.com/expedited/wafris\n\n\u003cimg src='https://uptimer.expeditedsecurity.com/wafris-rb' width='0' height='0'\u003e\n\n[redis-url]: https://www.iana.org/assignments/uri-schemes/prov/redis\n\n## Credits\n\nThanks to the following people who have contributed patches or helpful suggestions:\n\n- [Matt Swanson](https://github.com/swanson)\n- [Ron Shinall](https://github.com/ron-shinall)\n- [Eric Bauer](https://github.com/ericbauer)\n- [Jeremy Smith](jeremysmithco)\n- [Sean Mitchell](https://github.com/seanwmitchell)\n- [Ben Curtis](https://github.com/stympy)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWafris%2Fwafris-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWafris%2Fwafris-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWafris%2Fwafris-rb/lists"}