Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 586033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:03:54+00:00 2026-05-13T15:03:54+00:00

Is there an existing gem or code that will flag malicious user behavior in

  • 0

Is there an existing gem or code that will flag malicious user behavior in real-time? i.e. not something where I manually comb the log files for 404s or suspicious accesses (e.g. sql injection attempts, js inserted into text fields, etc.?)

For instance, today I noticed requests like this in the log.

ActionController::RoutingError (No route matches
“///scripts/setup.php” with {:method=>:get}):

I’d love to know real-time via alerts or emails if someone is scanning the site for vulnerabilities – i.e. to differentiate innocuous 404s from malicious 404s, to flag sql injection or js injections, etc.

Are there existing gems or code to do this or must I roll my own?

Thanks for thoughts.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:03:54+00:00Added an answer on May 13, 2026 at 3:03 pm

    If there was such a system and your site was even moderately populate you would get a lot of real time updates.

    The reality is that you’re likely going to get people trying to put js in their profiles, submitting weird stuff to your site out of both curiosity and malice. You could scan your log files for this stuff regularly to make sure your actions and views are protected against such attacks, but that really isn’t manageable in the long run.

    The problem is, how do you know if your input is malicious? Depending on your site the input you just mentioned could be perfectly valid.

    If you’re worried about sql injection you should document and thoroughly test your find_by_sql statements.

    If you’re worried about un-escaped user input you could consider moving to erubis and enabling escaping by default.

    A more pressing problem for most sites is misuse of the functionality you provide, for example sending too many messages, posting too many questions, voting too often, scraping your content etc… for this you can configure your webserver to stop a user making too many requests (you can set this up with nginx really easily) and impose rate limiting in your application code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 316k
  • Answers 316k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yep. It works great for all of the above. If… May 13, 2026 at 11:26 pm
  • Editorial Team
    Editorial Team added an answer I found some help from another website. Here's what I… May 13, 2026 at 11:26 pm
  • Editorial Team
    Editorial Team added an answer In looking at the service you are using it does… May 13, 2026 at 11:26 pm

Related Questions

I'm looking for recommendations of a good, free tool for generating sample data for
I'm adding functionality to one of our existing (but broken) systems. It grabs an
I am using the rmagick gem for generating dynamic images from a controller. The
I have an existing table that I'd like to use for a Rails application.
This appears to be a rare gem: where to find documentation on the structure

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.