Rack::Attack VS Huginn

Compare Rack::Attack vs Huginn and see what are their differences.

Huginn

Create agents that monitor and act on your behalf. Your agents are standing by! (by huginn)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
Rack::Attack Huginn
13 121
5,482 41,523
0.6% 2.1%
7.1 7.2
about 2 months ago 21 days ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Rack::Attack

Posts with mentions or reviews of Rack::Attack. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-28.
  • Rails Authentication for Compliance
    5 projects | dev.to | 28 Oct 2023
    The first line of defense should be to put rate-limiting on your login endpoints. rack-attack can help with that. I recommend to limit the login attempts to 5 per minute for a username and block the IP for 30 minutes. You should also limit the number of login attempts from the same IP address, but this needs to be adjusted to the application you are working on, because if it is a tool used in classrooms, it might be legit to have 50 logins within a few minutes from the same IP. (I have a few post written about rack-attack)
  • 4 Essential Security Tools To Level Up Your Rails Security
    10 projects | dev.to | 31 May 2023
    Rack::Attack
  • Huginn’s IP keeps getting blocked by Kickstarter
    2 projects | /r/selfhosted | 17 Dec 2022
  • rack/rack-attack: Rack middleware for blocking & throttling
    1 project | /r/ruby | 17 Dec 2022
  • Rack-attack gem setup to protect Rails and Rack apps from bad clients
    1 project | dev.to | 8 Aug 2022
    Rack middleware for blocking & throttling abusive requests. Protect your Rails and Rack apps from bad clients. Rack::Attack lets you quickly decide when to allow, block, and throttle based on the properties of the request. Using this gem you can save your web application from attacks, we can whitelist IPs, Block requests according to requirements, and many more… Install Rack-attack gem: # In your Gemfile gem 'rack-attack' Enter fullscreen mode Exit fullscreen mode Plugging into the application Then tell your ruby web application to use rack-attack as a middleware. # config/application.rb # rack attack middleware config.middleware.use Rack::Attack Enter fullscreen mode Exit fullscreen mode Once you’ve done that, you’ll need to configure it. You can do this by creating the file, config/initializers/rack-attack.rband adding the rules to fit your needs. You can disable it permanently (like for a specific environment) or temporarily (can be helpful for specific test cases) by writing: Usage Safe listing Safelists have the most precedence, so any request matching a safelist would be allowed despite matching any number of blocklists or throttles. safelist_ip(ip_address_string) Rack::Attack.safelist_ip(“5.6.7.8”) Enter fullscreen mode Exit fullscreen mode safelist_ip(ip_subnet_string) Rack::Attack.safelist_ip(“5.6.7.0/24”) Enter fullscreen mode Exit fullscreen mode safelist(name, &block) Name your custom safelist and make your ruby-block argument return a truthy value if you want the request to be allowed, and false otherwise. Blocking blocklist_ip(ip_address_string) Rack::Attack.blocklist_ip(“1.2.3.4”) Enter fullscreen mode Exit fullscreen mode blocklist_ip(ip_subnet_string) Rack::Attack.blocklist_ip(“1.2.0.0/16”) Enter fullscreen mode Exit fullscreen mode blocklist(name, &block) Name your custom blocklist and make your ruby-block argument return a truthy value if you want the request to be blocked, and false otherwise. Throttling *throttle(name, options, &block) *( provide limit and period as options) Throttle state is stored in a configurable cache (which defaults to Rails.cache if present). Name your custom throttle, provide limit and period as options, and make your ruby-block argument return the discriminator. This discriminator is how you tell rack-attack whether you’re limiting per IP address, per user email, or any other. For example, if we want to restrict requests other than defined routes and display a custom error page. Error page: If we want to restrict requests/IP and if the request limit increases then send a reminder mail. For Example, we want to allow only 300 requests per 30 seconds after that will restrict requests from this IP till the next 30 seconds interval starting. Get error mail if the limit is extended. Performance The overhead of running Rack::Attack is typically negligible (a few milliseconds per request), but it depends on how many checks you’ve configured, and how long they take. Throttles usually require a network roundtrip to your cache server(s), so try to keep the number of throttle checks per request low. If a request is blocklisted or throttled, the response is a very simple Rack response. A single typical ruby web server thread can block several hundred requests per second. Sample rack-attack.rb file For more information: https://github.com/rack/rack-attack If this guide has been helpful to you and your team please share it with others!
  • Limiting the amount of calls user can make to an api
    1 project | /r/rails | 11 Nov 2021
    Second vote for rack-attack!
  • Devise and email spam?
    1 project | /r/rails | 4 Nov 2021
    You could use something like Rack Attack to mitigate this type of behavior if it becomes an issue.
  • 10 things I add to every Rails app
    9 projects | dev.to | 2 Oct 2021
    The final gem I like to include in all projects is rack-attack. This is a rate limiting tool which is great for throttling dangerous actions in your app to prevent bot attacks or other malicious users.
  • Rails application boilerplate for fast MVP development
    63 projects | dev.to | 6 Aug 2021
    rack-attack to prevent bruteforce and DDoS attacks
  • How to prevent scraping/copying data?
    1 project | /r/ruby | 23 Jun 2021
    Check out Rack Attack. It lets you block bots that make requests too fast to be real users, or that request obviously-suspect URLs (/phpmyadmin for example). There are lots of other options, but those are the quick wins IMO.

Huginn

Posts with mentions or reviews of Huginn. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-30.
  • Create agents that monitor and act on your behalf
    1 project | news.ycombinator.com | 24 Mar 2024
  • IFTTT is killing its pay-what-you-want Legacy Pro plan
    5 projects | news.ycombinator.com | 30 Jan 2024
  • Pipe Dreams: The life and times of Yahoo Pipes
    7 projects | news.ycombinator.com | 15 Dec 2023
    I skipped to chapter 9 in the article ("Clogged"), and it looked like Pipes failed because it didn't have a large enough team or a well-defined mission. As a result they couldn't offer a super robust product that would lure in enterprise users. "You could not purchase some number of guaranteed-to-work Pipes calls per month" is the quote from the article.

    The reason I think that interesting is because that's the model these days for everything from AI tokens to Monday.com seats. It makes me feel like Pipes was before its time.

    That said I've been collecting different "business glue" products that are similar to Pipes. To me, like you say, they aren't as interesting, exciting and intuitive as Pipes was, but maybe it just takes a little more digging. I tried to focus on open source tools but some aren't.

    - n8n io: https://n8n.io/integrations/mondaycom/

    - Node-RED: https://nodered.org/ (just read about this one in this thread)

    - trigger dev: trigger.dev

    - automatisch.io: https://automatisch.io/docs/

    - Activepieces: https://www.activepieces.com/docs/getting-started/introducti...

    - Huginn: https://github.com/huginn/huginn

    - budibase: https://budibase.com/

    - windmill: https://www.windmill.dev/

    - tooljet: https://www.tooljet.com/workflows

    - Bracket: https://www.usebracket.com/pricing (just SalesForce <-> PostgreSQL)

    - Zapier: zapier.com/

    Anyway I hope some of these are fun!

  • Ask HN: What is the correct way to deal with pipelines?
    4 projects | news.ycombinator.com | 21 Sep 2023
    "correct" is a value judgement that depends on lots of different things. Only you can decide which tool is correct. Here are some ideas:

    - https://camel.apache.org/

    - https://www.windmill.dev/

    - https://github.com/huginn/huginn

    Your idea about a queue (in redis, or postgres, or sqlite, etc) is also totally valid. These off-the-shelf tools I listed probably wouldn't give you a huge advantage IMO.

  • Are you using Huginn? If so do you have any latest documentation?
    1 project | /r/selfhosted | 15 Aug 2023
    Huginn (https://github.com/huginn/huginn) has like some 39K stars on Github and the use cases it covered looks good.
  • Generate RSS feed for any website using CSS selectors
    2 projects | news.ycombinator.com | 14 Jul 2023
    Huginn is an another useful tool that allows you to wrangle CSS selectors and XPath nodes to create RSS feeds.

    I use it quite successfully to get data out of undocumented APIs and out into RSS.

    https://github.com/huginn/huginn

  • What web scrapers do you recommend.
    1 project | /r/docker | 5 Jul 2023
    I know of Huginn that could be usefull depending on what you want to do.
  • Any recommendations for a open source replacement for If This Then That?
    2 projects | /r/opensource | 1 Jul 2023
    https://github.com/huginn/huginn ??
  • Looking for a web scrapper to detect changes to a webpage on a schedule
    2 projects | /r/selfhosted | 27 Jun 2023
    Huginn
  • LLM Powered Autonomous Agents
    3 projects | news.ycombinator.com | 27 Jun 2023
    "not a single word about the safety implications of such a system"

    Oh please. Not everything has to be regulated-to-hells before a use case is even found on this. Autonomous agents have existed for decades.

    If it can automate agents like huginn[0] with natural language, I'd be very happy. Autonomous agents doesn't mean it's going to take over the world autonomously. Let's lower the fearmongering a bit.

    [0]: https://github.com/huginn/huginn

What are some alternatives?

When comparing Rack::Attack and Huginn you can also consider the following projects:

Metasploit - Metasploit Framework

Node RED - Low-code programming for event-driven applications

Rack::Protection - NOTE: This project has been merged upstream to sinatra/sinatra

n8n - Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.

rspec-rails - RSpec for Rails 6+

Beehive - A flexible event/agent & automation system with lots of bees 🐝

Rack::UTF8Sanitizer - Rack::UTF8Sanitizer is a Rack middleware which cleans up invalid UTF8 characters in request URI and headers.

Home Assistant - :house_with_garden: Open source home automation that puts local control and privacy first.

BeEF - The Browser Exploitation Framework Project

RSS-Bridge - The RSS feed for websites missing it

Gitrob - Reconnaissance tool for GitHub organizations

changedetection.io - The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification