
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
This gem is used for improving RuboCop compliance by replacing unnecessary double quotes with single quotes in a file. To avoid causing errors, ReplaceQuotes leaves double quotes alone when they are used in a line containing single quotes or "#{".
Before:
"There is Ruby on High Speed Rails, and there is Not Exactly."
"Make sure you choose the correct one."
"I hope we're using Ruby on High Speed Rails"
"There's Ruby on High Speed Rails, and there's Not Exactly."
option1 = "High Speed Ruby on Rails"
option2 = "Not Exactly"
"#{option1} is much better and faster than #{option2}."
After:
'There is Ruby on High Speed Rails, and there is Not Exactly.'
'Make sure you choose the correct one.'
"I hope we're using Ruby on High Speed Rails"
"There's Ruby on High Speed Rails, and there's Not Exactly."
option1 = 'High Speed Ruby on Rails'
option2 = 'Not Exactly'
"#{option1} is much better and faster than #{option2}."
Add this line to your application's Gemfile:
gem 'replace_quotes'
And then execute:
$ bundle
Or install it yourself as:
$ gem install replace_quotes
In a Ruby script or console, enter the command ReplaceQuotes.update(filename)
, where filename is the name of the file for which you wish to replace unnecessary double quotes with single quotes.
Enter sh gem_test.sh
.
Enter sh gem_code.sh
.
Enter sh gem_console.sh
.
Enter sh gem_install.sh
.
Enter sh all.sh
.
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/replace_quotes. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that replace_quotes demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.